QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#202913 | #4653. Painting Game | yiyiyi# | WA | 17ms | 3908kb | C++17 | 615b | 2023-10-06 14:05:09 | 2023-10-06 14:05:10 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define rep(i,s,t) for(int i=(s);i<=(t);i++)
#define rev_rep(i,s,t) for(int i=(s);i>=(t);i--)
using namespace std;
int ci(){
int x; scanf("%d",&x); return x;
}
enum{N=200023};
signed main(){
int T = ci();
while( T-- ){
int n = ci();
char s[10];
scanf("%s", s);
if( s[0]=='A' ){
int t = n/5;
const int a[] = {0,1,1,1,2};
printf("%d\n",t*2+a[n-t*5]);
}else{
int bk = 0;
if( (n-5)%10==0 ){
bk = 1;
}
int t = n/5;
const int a[] = {0,1,1,2,2};
printf("%d\n",t*2+a[n-t*5]+bk);
}
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 17ms
memory: 3908kb
input:
100000 202887890 Bob 212404006 Bob 127716000 Alice 334251217 Bob 379690549 Alice 450610130 Alice 946907168 Bob 29213358 Bob 112883509 Bob 794872736 Bob 403671135 Alice 714834265 Bob 540986736 Bob 935406639 Bob 756411692 Bob 182091395 Alice 662716337 Alice 217541941 Alice 190231925 Bob 705864412 Alic...
output:
81155156 84961603 51086400 133700487 151876220 180244052 378762868 11685344 45153404 317949095 161468454 285933707 216394695 374162656 302564677 72836558 265086535 87016777 76092771 282345765 359629489 232316253 83731933 107097851 97373816 297435313 378025931 318028710 148156095 163603476 214147972 ...
result:
wrong answer 1st lines differ - expected: '86951953', found: '81155156'