QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#870497 | #8619. Interactive Casino | ucup-team6274# | WA | 1ms | 3584kb | C++20 | 2.1kb | 2025-01-25 16:36:17 | 2025-01-25 16:36:19 |
Judging History
answer
#include<bits/stdc++.h>
bool Mbg;
using namespace std;
#define vec vector
#define pb push_back
#define eb emplace_back
#define siz(vec) ((int)(vec).size())
#define all(vec) (vec).begin(),(vec).end()
template<class T>
void operator +=(vec<T> &a,T b){a.push_back(b);}
template<class T>
void operator --(vec<T> &a){a.pop_back();}
#define pii pair<int,int>
#define x first
#define y second
#define mp make_pair
#define exc(exp) if(exp)continue;
#define stop(exp) if(exp)break;
#define ret(exp) if(exp)return;
#define deb(var) cerr<<#var<<'='<<(var)<<"; "
#define debl(var) cerr<<#var<<'='<<(var)<<";\n"
#define ins insert
#define era erase
#define lb lower_bound
#define ub upper_bound
#define int long long
#define inf (long long)(1e18)
template<class T>
bool Min(T &x,T y){return x>y?x=y,1:0;}
template<class T>
bool Max(T &x,T y){return x<y?x=y,1:0;}
const int mod=998244353;
void Add(int &x,int y){x=x+y<mod?x+y:x+y-mod;}
void Dec(int &x,int y){x=x>=y?x-y:x-y+mod;}
int fpm(int x,int y){
int ans=1;for(;y;y>>=1,x=1ll*x*x%mod)if(y&1)ans=1ll*x*ans%mod;return ans;
}
mt19937 eng(random_device{}());
void work(){
int sum=1000,x;
for(int T=1;T<=1000;T++){
// int x=eng()%sum+1;
// if((x<<1)>sum);
// else{
// if(eng()&1){
// sum-=x;
// }else{
// sum+=x<<1;
// }
// }
// if(sum<=0){
// assert(0);
// }
// if(sum>10000){
// exit(0);
// }
string str;
cin>>str>>sum>>x;
if(str=="WIN"){
exit(0);
}
if(str=="LOSE"){
assert(0);
}
if((x<<1)<=sum){
cout<<"PLAY\n";
}else{
cout<<"SKIP\n";
}
}
}
bool Med;
signed main(){
int T=1;while(T--)work();
// cerr<<"Time: "<<clock()<<" ms;\n";
// cerr<<"Memory: "<<abs(&Med-&Mbg)/1024.0/1024.0<<" MiB.\n";
}
/*
- CONTINUE, NON-STOPPING, FOR THE FAITH
- START TYPING IF YOU DON'T KNOW WHAT TO DO
- STOP TYPING IF YOU DON'T KNOW WHAT YOU'RE DOING
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
input:
5 ROUND 1000 43 ROUND 957 433 ROUND 1823 973 ROUND 850 731 ROUND 119 12 WIN
output:
PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY ...
result:
ok OK
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3456kb
input:
1000 ROUND 1000 741 ROUND 259 171 ROUND 88 7 ROUND 102 54 ROUND 48 10 ROUND 68 29 ROUND 39 29 ROUND 10 9 ROUND 28 16 ROUND 60 57 ROUND 3 1 ROUND 5 2 ROUND 3 2 ROUND 1 1 LOSE
output:
PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY PLAY ...
result:
wrong answer WA