QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#202944 | #4653. Painting Game | yiyiyi# | WA | 17ms | 3884kb | C++17 | 665b | 2023-10-06 14:15:39 | 2023-10-06 14:15:40 |
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 bk = 0;
if( n==3 ){
bk = -1;
}
int t = n/5;
const int a[] = {0,1,1,2,2};
printf("%d\n",t*2+a[n-t*5]+bk);
}else{
int bk = 0;
if( n%5==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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 17ms
memory: 3884kb
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:
81155157 84961603 51086400 133700487 151876220 180244052 378762868 11685344 45153404 317949095 161468454 285933707 216394695 374162656 302564677 72836558 265086535 87016777 76092771 282345765 359629490 232316253 83731934 107097851 97373816 297435314 378025932 318028710 148156095 163603476 214147973 ...
result:
wrong answer 1st lines differ - expected: '86951953', found: '81155157'