QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#329016#5577. AlchemytorresosWA 0ms3844kbC++23372b2024-02-16 11:55:062024-02-16 11:55:06

Judging History

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

  • [2024-02-16 11:55:06]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3844kb
  • [2024-02-16 11:55:06]
  • 提交

answer

#include <iostream>
#include <string>

using namespace std;


int main() {
	string s;
	cin >> s;
	
	int n = s.size();
	int prev = 0;
	int nms = 0;
	
	for (int i = 0; i < n / 2; i++) {
		if ((s[i] != s[n-i-1]) && !prev) {
			prev = 1;
			++nms;
			continue;
		} else if (prev) {
			++nms;
		}
		
		prev = 0;
	}
	
	cout << nms;
	
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3772kb

input:

ioi

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

noi

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

ctsc

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

fool

output:

2

result:

ok single line: '2'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

vetted

output:

2

result:

ok single line: '2'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

aa

output:

0

result:

ok single line: '0'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

ic

output:

1

result:

ok single line: '1'

Test #8:

score: -100
Wrong Answer
time: 0ms
memory: 3608kb

input:

tlffohemdcncrfrxaqsbzcoyodvbxmhqukvfpahnakexcmacqa

output:

24

result:

wrong answer 1st lines differ - expected: '12', found: '24'