Hill_Fly @ 2024-12-14 17:51:06
我甚至用 windows 的 fc 指令对比了我的输出与第二个样例的差距:"fc:找不到差异"
qwq
(第2~9测试点都不对)
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
string s="";
int main() {
// freopen("P1042[NOIP2003普及组]乒乓球.out", "w", stdout);
char x = 32;
while ((x = getchar())!= 'E') {
if (x != '\n' && x != 'E') {
s += x;
}
}
LL len = s.size(), w = 0, l = 0;
for (LL i = 0; i < len; i++) {
if (s[i] == 'W') {
w++;
} else {
l++;
}
if ((w >= 11 || l >= 11) && (abs(w - l) >= 2 )) {
printf("%lld:%lld\n", w, l);
w = l = 0;
}
}
printf("%lld:%lld\n\n", w, l);
w = 0, l = 0;
for (LL i = 0; i < len; i++) {
if (s[i] == 'W') {
w++;
} else {
l++;
}
if ((w >= 21 || l >= 21) && (w - l >= 2 || l - w >= 2)) {
printf("%lld:%lld\n", w, l);
w = l = 0;
}
}
printf("%lld:%lld\n", w, l);
return 0;
}
回复我的我一定关注!!!