QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#373668 | #5206. Hot and Cold | InfinityNS# | TL | 1ms | 3996kb | C++14 | 933b | 2024-04-01 21:40:29 | 2024-04-01 21:40:30 |
Judging History
answer
#include<bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) x.begin(),x.end()
using namespace std;
string ask(int x,int y){
printf("%i %i\n",x,y);
fflush(stdout);
string xx;
getline(cin,xx);
if(xx[sz(xx)-1]=='!'){
exit(0);
}
return xx;
}
int main(){
const int N=1e6;
string start=ask(0,0);
string manje=ask(1,1);
ask(0,1);
ask(1,0);
int lx=0,ly=0,rx=N,ry=N;
while(1){
int mx=(lx+rx)>>1;
int my=(ly+ry)>>1;
ask(mx+1,my);
string x=ask(mx,my);
string y=ask(mx,my+1);
bool xdec=x!=manje;
bool ydec=y==manje;
if(xdec){
lx=mx+1;
}
else{
rx=mx;
}
if(ydec){
ly=my+1;
}
else{
ry=my;
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3712kb
input:
Tabilmadi Daha yakin Dalej Daha yakin Dalej Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 250001 250000 250000 250000 250000 250001 125001 125000 125000 125000 125000 125001 62501 62500 62500 62500 62500 62501 31251 31250 31250 31250 31250 31251 15626 15625 15625 15625 15625 15626 7813 7812 7812 7812 7812 7813 3907 3906 3906 3906 ...
result:
ok 64 points
Test #2:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
rr qq ww ee qq ww qq qq ww qq ww qq ww qq qq ww qq qq ww ww ww qq qq ww qq qq ww qq ww qq ww qq qq ww qq qq ww ww ww qq qq ww qq qq ww qq ww qq ww qq qq ww qq qq ww qq ww qq ww qq ww qq You are lucky today!
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 750001 750000 750000 750000 750000 750001 875001 875000 875000 875000 875000 875001 812501 812500 812500 812500 812500 812501 781251 781250 781250 781250 781250 781251 765626 765625 765625 765625 765625 765626 773439 773438 773438 773438 7734...
result:
ok 63 points
Test #3:
score: 0
Accepted
time: 0ms
memory: 3996kb
input:
Tabilmadi Daha yakin Dalej Dalej Dalej Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yakin Dalej Daha yakin Daha yaki...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 250001 250000 250000 250000 250000 250001 125001 125000 125000 125000 125000 125001 62501 62500 62500 62500 62500 62501 31251 31250 31250 31250 31250 31251 15626 15625 15625 15625 15625 15626 7813 7812 7812 7812 7812 7813 3907 3906 3906 3906 ...
result:
ok 62 points
Test #4:
score: 0
Accepted
time: 1ms
memory: 3732kb
input:
voyne net miru mir mir miru miru mir miru mir mir miru mir miru miru mir miru mir mir miru miru mir miru mir miru mir miru mir mir miru miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir mir miru miru mir miru mir miru mir mir miru mir miru mir miru miru mir mir miru mi...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 750001 250000 750000 250000 750000 250001 625001 125000 625000 125000 625000 125001 562501 187500 562500 187500 562500 187501 593751 218750 593750 218750 593750 218751 578126 234375 578125 234375 578125 234376 570314 242188 570313 242188 5703...
result:
ok 59 points
Test #5:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir miru mir mi...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 250001 750000 250000 750000 250000 750001 125001 625000 125000 625000 125000 625001 187501 562500 187500 562500 187500 562501 218751 593750 218750 593750 218750 593751 234376 578125 234375 578125 234375 578126 242189 570313 242188 570313 2421...
result:
ok 61 points
Test #6:
score: 0
Accepted
time: 1ms
memory: 3704kb
input:
mmimRRmmmmuiiuuiuimRmiiuiuiiuu mmimRRmmmmuiiuuiuimRmiiuiuiiuR mmimRRmmmmuiiuuiuimRmiiuiuiiui mmimRRmmmmuiiuuiuimRmiiuiuiium mmimRRmmmmuiiuuiuimRmiiuiuiiuR mmimRRmmmmuiiuuiuimRmiiuiuiiuR mmimRRmmmmuiiuuiuimRmiiuiuiiui mmimRRmmmmuiiuuiuimRmiiuiuiiuR mmimRRmmmmuiiuuiuimRmiiuiuiiui mmimRRmmmmuiiuuiuimRm...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 250001 250000 250000 250000 250000 250001 375001 375000 375000 375000 375000 375001 312501 312500 312500 312500 312500 312501 343751 343750 343750 343750 343750 343751 328126 328125 328125 328125 328125 328126 335939 335938 335938 335938 3359...
result:
ok 63 points
Test #7:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
uiuumRmiRuRuRmmimuuummiRuiRumR uiuumRmiRuRuRmmimuuummiRuiRumi uiuumRmiRuRuRmmimuuummiRuiRumu uiuumRmiRuRuRmmimuuummiRuiRumm uiuumRmiRuRuRmmimuuummiRuiRumi uiuumRmiRuRuRmmimuuummiRuiRumu uiuumRmiRuRuRmmimuuummiRuiRumi uiuumRmiRuRuRmmimuuummiRuiRumi uiuumRmiRuRuRmmimuuummiRuiRumi uiuumRmiRuRuRmmimuuum...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 750001 750000 750000 750000 750000 750001 625001 625000 625000 625000 625000 625001 687501 687500 687500 687500 687500 687501 656251 656250 656250 656250 656250 656251 671876 671875 671875 671875 671875 671876 664064 664063 664063 664063 6640...
result:
ok 63 points
Test #8:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
RiRiiiimiRiiiuRuuRiRmuRiuRuRR!
output:
0 0
result:
ok 1 points
Test #9:
score: -100
Time Limit Exceeded
input:
imRRmiRiRiRuimuiRiiiumiiRRmRim RuRummmRRimumRimuRRiRuRuuiuRui mRmmmRmRRmiiuiummmuiiiuiRiRRmu RRmuRmRumiiiiiuRmRmummuiuRuRiR RuRummmRRimumRimuRRiRuRuuiuRui mRmmmRmRRmiiuiummmuiiiuiRiRRmu RuRummmRRimumRimuRRiRuRuuiuRui RuRummmRRimumRimuRRiRuRuuiuRui mRmmmRmRRmiiuiummmuiiiuiRiRRmu RuRummmRRimumRimuRRiR...
output:
0 0 1 1 0 1 1 0 500001 500000 500000 500000 500000 500001 750001 750000 750000 750000 750000 750001 875001 875000 875000 875000 875000 875001 937501 937500 937500 937500 937500 937501 968751 968750 968750 968750 968750 968751 984376 984375 984375 984375 984375 984376 992189 992188 992188 992188 9921...