QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#91876 | #5422. Perfect Palindrome | d1n9yx | WA | 3ms | 3772kb | C++14 | 447b | 2023-03-29 19:43:23 | 2023-03-29 19:43:24 |
Judging History
answer
# include <iostream>
# include <algorithm>
int cnt[200];
int main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int t;
std::cin >> t;
while (t -- ) {
int maxres = -1;
std::string s;
std::cin >> s;
for (int i = 0; i < s.size(); ++ i) {
int x = s[i];
++ cnt[x];
maxres = std::max(maxres, cnt[x]);
}
std::cout << s.size() - maxres << '\n';
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 3ms
memory: 3404kb
input:
2 abcb xxx
output:
2 0
result:
ok 2 number(s): "2 0"
Test #2:
score: -100
Wrong Answer
time: 3ms
memory: 3772kb
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:
8 6 0 7 2 4 0 2 18446744073709551615 18446744073709551614 4 18446744073709551614 0 18446744073709551614 0 18446744073709551615 0 1 18446744073709551615 1 18446744073709551612 0 18446744073709551615 18446744073709551611 18446744073709551614 18446744073709551613 18446744073709551611 184467440737095516...
result:
wrong answer 2nd numbers differ - expected: '7', found: '6'