yylz1031 @ 2024-09-05 12:50:05
大佬请六部,WA了6个点,求调
using namespace std ;
char c ; int i = 1, j = 1 ; int t1 = 1, t2 = 1 ; int ans1 [ 5000005 ] [ 4 ] ; int ans2 [ 5000005 ] [ 4 ] ;
int main() {
while ( cin >> c && c != 'E' ) {
if ( i > 11 ) {
i = 1 ;
t1 ++ ;
}
if ( j > 21 ) {
j = 1 ;
t2 ++ ;
}
if ( c == 'W' ) {
ans1 [ t1 ] [ 1 ] ++ ;
} else {
ans1 [ t1 ] [ 2 ] ++ ;
}
i ++ ;
if ( c == 'W' ) {
ans2 [ t2 ] [ 1 ] ++ ;
} else {
ans2 [ t2 ] [ 2 ] ++ ;
}
j ++ ;
}
for ( int i = 1 ; i <= t1 ; i ++ ) {
cout << ans1 [ i ] [ 1 ] << ':' << ans1 [ i ] [ 2 ] << '\n' ;
}
cout << '\n' ;
for ( int i = 1 ; i <= t2 ; i ++ ) {
cout << ans2 [ i ] [ 1 ] << ':' << ans2 [ i ] [ 2 ] << '\n' ;
}
}
by dongzirui0817 @ 2024-09-05 13:05:03
@yylz1031 如果新开一局,要再输出 0:0
\
hack:
WWWWWWWWWWWWWWWWWWWW
WWE
AC:
11:0
11:0
0:0
21:0
1:0
by yylz1031 @ 2024-09-05 15:52:46
@dongzirui0817 感谢巨佬