QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#510922#5206. Hot and ColdjakerRE 1ms3700kbC++142.1kb2024-08-09 14:07:372024-08-09 14:07:38

Judging History

你现在查看的是最新测评结果

  • [2024-08-09 14:07:38]
  • 评测
  • 测评结果:RE
  • 用时:1ms
  • 内存:3700kb
  • [2024-08-09 14:07:37]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,k) for(int i = j;i <= k;++i)
#define repp(i,j,k) for(int i = j;i >= k;--i)
string closer,further;
string tmp,tmp1;
void output(int x,int y) {
    cout<<x<<" "<<y<<endl;
}
void check(string s) {
    if(s[s.length()-1] == '!')
        exit(0);
}
void work(int x1,int x2,int y1,int y2) {
    if( x2 - x1 <= 1 && y2 - y1 <= 1 ) {
        output(x1,y1); getline(cin,tmp); check(tmp);
        output(x1,y2); getline(cin,tmp); check(tmp);
        output(x2,y1); getline(cin,tmp); check(tmp);
        output(x2,y2); getline(cin,tmp); check(tmp);
        // assert(0);
        return;
    }
    int midx = (x1+x2)/2 , midy = (y1+y2)/2;
    output(midx,midy);
    getline(cin,tmp); check(tmp);
    output(midx+1,midy);
    getline(cin,tmp); check(tmp);
    output(midx+1,midy+1);
    getline(cin,tmp1);; check(tmp1);

    int x1_n,x2_n,y1_n,y2_n;
    if( tmp == closer )
        x1_n = midx + 1, x2_n = x2;
    else 
        x1_n = x1 , x2_n = midx;
    if( tmp1 == closer )
        y1_n = midy + 1 , y2_n = y2;
    else 
        y1_n = y1 , y2_n = midy;
    work(x1_n,x2_n,y1_n,y2_n);
}
void work1(int l,int r) {
    if( r-l <= 2 ) {
        rep(i,l,r) {
            output(0,i);
            getline(cin,tmp); check(tmp);
            output(i,0);
            getline(cin,tmp); check(tmp);
        }
        assert(0);
        return;
    }
    int mid = (l+r)>>1 , midd = mid>>1;
    output(midd,midd);
    getline(cin,tmp); check(tmp);
    output(midd+1,midd+1);
    getline(cin,tmp); check(tmp);
    if( tmp == closer ) {
        work1(mid,r);
    }
    else work1(l,mid);
}
signed main(){
    output(0,0);
    
    getline(cin,tmp); check(tmp);
    output(0,1);
    getline(cin,closer); check(closer);
    output(0,0);
    getline(cin,tmp); check(tmp);
    output(1,0);
    getline(cin,tmp); check(tmp);
    if( tmp == closer ) work(1,1000000,1,1000000);
    else {
        output(1000000,1000000);
        getline(cin,further); check(further);
        output(999999,999999);
        getline(cin,closer); check(closer);
        work1(0,1000000);
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3568kb

input:

Tabilmadi
Daha yakin
Dalej
Daha yakin
Dalej
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Daha yakin
Dalej
Daha yaki...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
250000 250000
250001 250000
250001 250001
125000 125000
125001 125000
125001 125001
62500 62500
62501 62500
62501 62501
31250 31250
31251 31250
31251 31251
15625 15625
15626 15625
15626 15626
7813 7813
7814 7813
7814 7814
3907 3907
3908 3907
...

result:

ok 64 points

Test #2:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

rr
qq
ww
qq
qq
qq
qq
qq
qq
qq
ww
ww
ww
qq
ww
ww
qq
ww
ww
ww
qq
qq
qq
qq
qq
qq
qq
qq
ww
ww
ww
qq
ww
ww
qq
ww
ww
ww
qq
qq
qq
qq
qq
qq
qq
qq
ww
ww
ww
qq
ww
ww
qq
ww
ww
qq
qq
You are lucky today!

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 750000
750001 750000
750001 750001
875000 875000
875001 875000
875001 875001
812500 812500
812501 812500
812501 812501
781250 781250
781251 781250
781251 781251
765625 765625
765626 765625
765626 765626
773438 773438
773439 773438
7734...

result:

ok 58 points

Test #3:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

Tabilmadi
Daha yakin
Dalej
Daha yakin
Dalej
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Dalej
Daha yakin
Dalej
Daha yakin
Daha yaki...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
250000 250000
250001 250000
250001 250001
125000 125000
125001 125000
125001 125001
62500 62500
62501 62500
62501 62501
31250 31250
31251 31250
31251 31251
15625 15625
15626 15625
15626 15626
7813 7813
7814 7813
7814 7814
3907 3907
3908 3907
...

result:

ok 63 points

Test #4:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

voyne net
miru mir
mir miru
miru mir
miru mir
miru mir
mir miru
miru mir
mir miru
mir miru
miru mir
mir miru
miru mir
miru mir
miru mir
miru mir
miru mir
mir miru
miru mir
miru mir
mir miru
miru mir
miru mir
mir miru
mir miru
miru mir
mir miru
miru mir
mir miru
miru mir
mir miru
miru mir
miru mir
mi...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 250000
750001 250000
750001 250001
625000 125000
625001 125000
625001 125001
562500 187500
562501 187500
562501 187501
593750 218750
593751 218750
593751 218751
578125 234375
578126 234375
578126 234376
570313 242188
570314 242188
5703...

result:

ok 60 points

Test #5:

score: 0
Accepted
time: 0ms
memory: 3700kb

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
...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
250000 750000
250001 750000
250001 750001
125000 625000
125001 625000
125001 625001
187500 562500
187501 562500
187501 562501
218750 593750
218751 593750
218751 593751
234375 578125
234376 578125
234376 578126
242188 570313
242189 570313
2421...

result:

ok 64 points

Test #6:

score: 0
Accepted
time: 1ms
memory: 3568kb

input:

mmimRRmmmmuiiuuiuimRmiiuiuiiuu
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiui
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRmiiuiuiiuR
mmimRRmmmmuiiuuiuimRm...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
250000 250000
250001 250000
250001 250001
375000 375000
375001 375000
375001 375001
312500 312500
312501 312500
312501 312501
343750 343750
343751 343750
343751 343751
328125 328125
328126 328125
328126 328126
335938 335938
335939 335938
3359...

result:

ok 61 points

Test #7:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

uiuumRmiRuRuRmmimuuummiRuiRumR
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumi
uiuumRmiRuRuRmmimuuummiRuiRumu
uiuumRmiRuRuRmmimuuum...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 750000
750001 750000
750001 750001
625000 625000
625001 625000
625001 625001
687500 687500
687501 687500
687501 687501
656250 656250
656251 656250
656251 656251
671875 671875
671876 671875
671876 671876
664063 664063
664064 664063
6640...

result:

ok 55 points

Test #8:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

RiRiiiimiRiiiuRuuRiRmuRiuRuRR!

output:

0 0

result:

ok 1 points

Test #9:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

imRRmiRiRiRuimuiRiiiumiiRRmRim
RuRummmRRimumRimuRRiRuRuuiuRui
mRmmmRmRRmiiuiummmuiiiuiRiRRmu
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiRuRuuiuRui
RuRummmRRimumRimuRRiR...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 750000
750001 750000
750001 750001
875000 875000
875001 875000
875001 875001
937500 937500
937501 937500
937501 937501
968750 968750
968751 968750
968751 968751
984375 984375
984376 984375
984376 984376
992188 992188
992189 992188
9921...

result:

ok 61 points

Test #10:

score: 0
Accepted
time: 1ms
memory: 3692kb

input:

RiuimmRRRmmiimmiRuRRRmRiuimRum
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuu
RiuimmRRRmmiimmiRuRRRmRiuimRuu
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRRmRiuimRuR
RiuimmRRRmmiimmiRuRRR...

output:

0 0
0 1
0 0
1 0
1000000 1000000
999999 999999
250000 250000
250001 250001
375000 375000
375001 375001
437500 437500
437501 437501
468750 468750
468751 468751
484375 484375
484376 484376
492187 492187
492188 492188
496093 496093
496094 496094
498046 498046
498047 498047
499023 499023
499024 499024
49...

result:

ok 49 points

Test #11:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

muumRumummuRiiiRuRmmmimumuimmm
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRii...

output:

0 0
0 1
0 0
1 0
1000000 1000000
999999 999999
250000 250000
250001 250001
375000 375000
375001 375001
437500 437500
437501 437501
468750 468750
468751 468751
484375 484375
484376 484376
492187 492187
492188 492188
496093 496093
496094 496094
498046 498046
498047 498047
499023 499023
499024 499024
49...

result:

ok 50 points

Test #12:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

iiRmmuRiummRimiuiRRmmmimRummii
RmRumumumimiRmuimRRmuumiRRRiRR
mRuRuuRRiuiiiRiummuumRRRiRRmRu
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmuumiRRRiRR
mRuRuuRRiuiiiRiummuumRRRiRRmRu
mRuRuuRRiuiiiRiummuumRRRiRRmRu
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmuumiRRRiRR
RmRumumumimiRmuimRRmu...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
250000 250000
250001 250000
250001 250001
375000 375000
375001 375000
375001 375001
312500 312500
312501 312500
312501 312501
343750 343750
343751 343750
343751 343751
328125 328125
328126 328125
328126 328126
335938 335938
335939 335938
3359...

result:

ok 63 points

Test #13:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

RimiuiiuuimmRiimimuiiuuuiiimmR
iRiuuRumumumiiRRumRmiRRiuumiii
miiuuimuiiimuuiimuiRRuimRRRRRm
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
iRiuuRumumumiiRRumRmiRRiuumiii
miiuuimuiiimuuiimuiRRuimRRRRRm
miiuuimuiiimuuiimuiRR...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 750000
750001 750000
750001 750001
625000 625000
625001 625000
625001 625001
687500 687500
687501 687500
687501 687501
656250 656250
656251 656250
656251 656251
671875 671875
671876 671875
671876 671876
664063 664063
664064 664063
6640...

result:

ok 63 points

Test #14:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

mimimRRuRRRmummimRuiiuRRiiRiuu
RuuiuRuiuRmiRumRRmummiuiiiiiu!

output:

0 0
0 1

result:

ok 2 points

Test #15:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

miRuRiuumuuimuRRiRimmmRRimmuui
RRuiuiiuiummRuuuuiRmRRmuuimuim
iRRRuRuiimRRuuiuRumiuiiumRuRiR
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmR...

output:

0 0
0 1
0 0
1 0
500000 500000
500001 500000
500001 500001
750000 750000
750001 750000
750001 750001
875000 875000
875001 875000
875001 875001
937500 937500
937501 937500
937501 937501
968750 968750
968751 968750
968751 968751
984375 984375
984376 984375
984376 984376
992188 992188
992189 992188
9921...

result:

ok 60 points

Test #16:

score: -100
Runtime Error

input:

RRuuiiiiiiRummuRuumRmuiiiiuuui
iRmRiiuiuRiumummumummuiumuuRRR
uRimmuumRmumRiuuRuiiRuuRimRRRm
uRimmuumRmumRiuuRuiiRuuRimRRRm
uRimmuumRmumRiuuRuiiRuuRimRRRm
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumummuiumuuRRR
iRmRiiuiuRiumummumumm...

output:

0 0
0 1
0 0
1 0
1000000 1000000
999999 999999
250000 250000
250001 250001
375000 375000
375001 375001
437500 437500
437501 437501
468750 468750
468751 468751
484375 484375
484376 484376
492187 492187
492188 492188
496093 496093
496094 496094
498046 498046
498047 498047
499023 499023
499024 499024
49...

result: