QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#105950#5422. Perfect Palindrome0xyz#WA 2ms3384kbC++14329b2023-05-16 08:17:322023-05-16 08:17:36

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-16 08:17:36]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3384kb
  • [2023-05-16 08:17:32]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t,n,ans;
string s;
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	cin>>t;
	for(int i=1;i<=t;i++){
		ans=0;
		cin>>s;
		n=s.size();
		for(int j=0;j<(n+1)/2;j++)
			if(s[j]!=s[n-1-j])ans++;
		cout<<ans<<'\n';
	}
	return 0;
} 

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3384kb

input:

2
abcb
xxx

output:

2
0

result:

ok 2 number(s): "2 0"

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 3372kb

input:

11107
lfpbavjsm
pdtlkfwn
fmb
hptdswsoul
bhyjhp
pscfliuqn
nej
nxolzbd
z
clzb
zqomviosz
u
ek
vco
oymonrq
rjd
ktsqti
mdcvserv
x
birnpfu
gsgk
ftchwlm
bzqgar
ovj
nsgiegk
dbolme
nvr
rpsc
fprodu
eqtidwto
j
qty
o
jknssmabwl
qjfv
wrd
aa
ejsf
i
npmmhkef
dzvyon
p
zww
dp
ru
qmwm
sc
wnnjyoepxo
hc
opvfepiko
inuxx...

output:

4
4
1
5
2
4
1
3
0
2
2
0
1
1
3
1
2
4
0
3
2
3
3
1
3
3
1
2
3
4
0
1
0
5
2
1
0
2
0
4
3
0
1
1
1
2
1
5
1
3
3
2
2
3
1
4
3
3
4
4
3
2
0
1
2
1
1
3
0
0
5
2
2
3
5
2
0
3
1
3
3
0
4
4
2
2
5
2
3
1
3
4
5
4
3
1
3
2
1
4
2
4
4
2
2
5
4
5
2
5
2
5
0
3
4
1
4
0
0
3
3
0
4
2
2
1
1
4
4
3
1
3
3
4
2
2
1
3
2
5
4
0
2
3
1
1
2
0
3
5
...

result:

wrong answer 1st numbers differ - expected: '8', found: '4'