Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

Dưới đây là một ví dụ về cách giải quyết bài toán này bằng ngôn ngữ Pascal:
function isPalindrome(s: string): boolean; var i, n: integer; begin n := Length(s); for i := 1 to n div 2 do begin if s[i] <> s[n - i + 1] then begin Result := false; Exit; end; end; Result := true; end; function countSuperPalindromes(s: string): integer; var i, j, n: integer; subStr: string; begin n := Length(s); Result := 0; // Đếm số xâu con đối xứng for i := 1 to n do begin subStr := ''; for j := i to n do begin subStr := subStr + s[j]; if isPalindrome(subStr) then Inc(Result); end; end; // Đếm số xâu con siêu đối xứng for i := 1 to n - 1 do begin subStr := ''; for j := i to n do begin subStr := subStr + s[j]; if isPalindrome(subStr) then Inc(Result); end; end; end; var s: string; begin s := 'ababcb'; writeln(countSuperPalindromes(s)); end.Kết quả của ví dụ trên sẽ là 3, tương ứng với 3 xâu con siêu đối xứng của xâu "ababcb" là "aba", "bcb", và "ababcb".
Lưu ý rằng đây chỉ là một cách giải quyết bài toán và có thể tồn tại các cách giải khác.

Program hotrotinhoc_hoc24;
const fi='CAPSO.INP';
fo='CAPSO.OUT';
var a: array[1..100] of integer;
i,j,n,x,d: integer;
f: text;
procedure ip;
begin
assign(f,fi);
reset(f);
readln(f,n);
for i:=1 to n do read(f,a[i]);
readln(f);
read(f,x);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
d:=0;
for i:=1 to n do
for j:=i to n do
if i+j=x then inc(d);
write(f,d);
close(f);
end;
begin
ip;
out;
end.

Program hotrotinhoc;
const fi='cau2.inp';
fo='cau2.out';
var f: text;
s: ansistring;
i,n,d,max,min: integer;
a: array[1..1000] of string;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,s);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
s:=s+' ';
while length(s)<>0 do
begin
inc(d);
min:=1001;
max:=0;
a[d]:=copy(s,1,pos(' ',s)-1);
delete(s,1, pos(' ',s));
end;
for i:=1 to d do
begin
if length(a[i])>max then max:=length(a[i]);
if length(a[i])<min then min:=length(a[i]);
end;
write(f,min,' ',max);
close(f);
end;
begin
ip;
out;
end.

Bài 2:
-Sum(a1,b1,30): 110
-sum(a1,a1,b1): 110
-Average(a1,b1,50): 43,(3)
-Max(a1,b1,25): 50