QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#469081#5206. Hot and Coldcyc001WA 1ms3864kbC++231.3kb2024-07-09 13:17:112024-07-09 13:17:11

Judging History

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

  • [2024-07-09 13:17:11]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3864kb
  • [2024-07-09 13:17:11]
  • 提交

answer

#include<bits/stdc++.h>
#if not defined(ONLINE_JUDGE)
    std::string Ask(int,int);
#endif
#define cir(i,a,b) for(int i=a;i<b;++i)
using namespace std;

#if not defined(__GRADER_H) && defined(ONLINE_JUDGE)

#define __GRADER_H 1

extern void findTreasure();

string Ask(int x,int y){
    cout<<x<<' '<<y<<'\n';
    cout.flush();
    string res;
    getline(cin,res);
    if(find(res.begin(),res.end(),'!')!=res.end()) exit(0);
    return res;
}

int main(){
    ios::sync_with_stdio(false),cin.tie(0);
    findTreasure();
    return 0;
}

#endif

static constexpr auto maxrng=(int)(1e6);

void findTreasure(){
    Ask(0,0);
    const auto strlf=Ask(1,1);
    Ask(maxrng,maxrng);
    const auto strrg=Ask(maxrng-1,maxrng-1);
    if(strlf!=strrg){
        cir(dxi,0,2) cir(dyi,0,2){
            Ask(dxi,dyi);
            Ask(maxrng-dxi,maxrng-dyi);
        }
        // abort();
    }
    const auto closer=strlf;
    auto xl=0,xr=maxrng,yl=0,yr=maxrng;
    cir(i,0,20){
        if(xl==xr&&yl==yr) break;
        const auto xmid=midpoint(xl,xr);
        const auto ymid=midpoint(yl,yr);
        Ask(xmid,ymid);
        Ask(xmid+1,ymid)==closer?xl=xmid+1:xr=xmid-1;
        Ask(xmid+1,ymid+1)==closer?yl=ymid+1:yr=ymid-1;
    }
    Ask(xl,yl);
    Ask(xl,yl+1);
    Ask(xl+1,yl);
    Ask(xl+1,yl+1);
    // abort();
}

詳細信息

Test #1:

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

input:

Tabilmadi
Daha yakin
Dalej
Daha yakin
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
Dalej
Daha yakin
Daha yakin
Dalej
Daha...

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 249999
250000 249999
250000 250000
124999 124999
125000 124999
125000 125000
62499 62499
62500 62499
62500 62500
31249 31249
31250 31249
31250 31250
15624 15624
15625 15624
15625 15625
7811 7811
7812 7811
7812 781...

result:

ok 56 points

Test #2:

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

input:

rr
qq
qq
qq
ww
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
You are lucky today!

output:

0 0
1 1
1000000 1000000
999999 999999
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
773437 773...

result:

ok 53 points

Test #3:

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

input:

Tabilmadi
Daha yakin
Dalej
Daha yakin
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
Dalej
Daha yakin
Dalej
Daha yakin
Daha...

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 249999
250000 249999
250000 250000
124999 124999
125000 124999
125000 125000
62499 62499
62500 62499
62500 62500
31249 31249
31250 31249
31250 31250
15624 15624
15625 15624
15625 15625
7811 7811
7812 7811
7812 781...

result:

ok 56 points

Test #4:

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

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
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
750000 249999
750001 249999
750001 250000
625000 124999
625001 124999
625001 125000
562500 187499
562501 187499
562501 187500
593750 218749
593751 218749
593751 218750
578125 234374
578126 234374
578126 234375
570312 242...

result:

ok 60 points

Test #5:

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

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
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 750000
250000 750000
250000 750001
124999 625000
125000 625000
125000 625001
187499 562500
187500 562500
187500 562501
218749 593750
218750 593750
218750 593751
234374 578125
234375 578125
234375 578126
242186 570...

result:

ok 64 points

Test #6:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 249999
250000 249999
250000 250000
374999 374999
375000 374999
375000 375000
312499 312499
312500 312499
312500 312500
343749 343749
343750 343749
343750 343750
328124 328124
328125 328124
328125 328125
335936 335...

result:

ok 53 points

Test #7:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
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
664062 664...

result:

ok 58 points

Test #8:

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

input:

RiRiiiimiRiiiuRuuRiRmuRiuRuRR!

output:

0 0

result:

ok 1 points

Test #9:

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

input:

imRRmiRiRiRuimuiRiiiumiiRRmRim
RuRummmRRimumRimuRRiRuRuuiuRui
iimumuiuRiiiiRmRmimuiRmiRRiRm!

output:

0 0
1 1
1000000 1000000

result:

ok 3 points

Test #10:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 750000
250000 750000
250000 750001
124999 875000
125000 875000
125000 875001
62499 937500
62500 937500
62500 937501
31249 968750
31250 968750
31250 968751
15624 984375
15625 984375
15625 984376
7811 992188
7812 99...

result:

ok 62 points

Test #11:

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

input:

muumRumummuRiiiRuRmmmimumuimmm
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuimuiiuRmiRRummuiiuuiiiiRiuR
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuRimimuimRRRmuuiRiiumuRRiiui
RuuimuiiuRmiRRummuiiu...

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
750000 249999
750001 249999
750001 250000
875000 124999
875001 124999
875001 125000
937500 62499
937501 62499
937501 62500
968750 31249
968751 31249
968751 31250
984375 15624
984376 15624
984376 15625
992188 7811
992189 ...

result:

ok 60 points

Test #12:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 249999
250000 249999
250000 250000
374999 374999
375000 374999
375000 375000
312499 312499
312500 312499
312500 312500
343749 343749
343750 343749
343750 343750
328124 328124
328125 328124
328125 328125
335936 335...

result:

ok 64 points

Test #13:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
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
664062 664...

result:

ok 63 points

Test #14:

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

input:

mimimRRuRRRmummimRuiiuRRiiRiuu
iiiiRimiimimRuRmuimRiRmRuRmiRm
mimRimmRuuiuRumimiumuuiuiRuiiR
mRummmRRuRRumiuiuiiuummmRmRRui
mRummmRRuRRumiuiuiiuummmRmRRui
mimRimmRuuiuRumimiumuuiuiRuiiR
RuuiuRuiuRmiRumRRmummiuiiiiiu!

output:

0 0
1 1
1000000 1000000
999999 999999
0 0
1000000 1000000
0 1

result:

ok 7 points

Test #15:

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

input:

miRuRiuumuuimuRRiRimmmRRimmuui
RRuiuiiuiummRuuuuiRmRRmuuimuim
RRuiuiiuiummRuuuuiRmRRmuuimuim
miRiRRuiRiiuuRRiiRiiiuimuRmiiu
iRRRuRuiimRRuuiuRumiuiiumRuRiR
RRuiuiiuiummRuuuuiRmRRmuuimuim
iRRRuRuiimRRuuiuRumiuiiumRuRiR
uRiiuiuiRuuRiiuuumRuuuRumiuRi!

output:

0 0
1 1
1000000 1000000
999999 999999
0 0
1000000 1000000
0 1
1000000 999999

result:

ok 8 points

Test #16:

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

input:

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

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 750000
250000 750000
250000 750001
124999 875000
125000 875000
125000 875001
62499 937500
62500 937500
62500 937501
31249 968750
31250 968750
31250 968751
15624 984375
15625 984375
15625 984376
7811 992188
7812 99...

result:

ok 59 points

Test #17:

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

input:

mRRuumRRmuRumRmimiimmiRiuiiRRm
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRi
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRu
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimmiRiuiiRRR
mRRuumRRmuRumRmimiimm...

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
750000 249999
750001 249999
750001 250000
875000 124999
875001 124999
875001 125000
937500 62499
937501 62499
937501 62500
968750 31249
968751 31249
968751 31250
984375 15624
984376 15624
984376 15625
992188 7811
992189 ...

result:

ok 61 points

Test #18:

score: -100
Wrong Answer
time: 1ms
memory: 3548kb

input:

miiuRimumuumRiRiuRiiiRuRRumiRu
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRi
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiiiRuRRumiRm
miiuRimumuumRiRiuRiii...

output:

0 0
1 1
1000000 1000000
999999 999999
500000 500000
500001 500000
500001 500001
249999 249999
250000 249999
250000 250000
374999 374999
375000 374999
375000 375000
312499 312499
312500 312499
312500 312500
343749 343749
343750 343749
343750 343750
328124 328124
328125 328124
328125 328125
335936 335...

result:

wrong answer Used 64 points but did not win