QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#373671#5206. Hot and ColdInfinityNS#TL 1ms4084kbC++141.0kb2024-04-01 21:45:342024-04-01 21:45:34

Judging History

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

  • [2024-04-01 21:45:34]
  • 评测
  • 测评结果:TL
  • 用时:1ms
  • 内存:4084kb
  • [2024-04-01 21:45:34]
  • 提交

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;
        string x,y;
        if(lx!=rx){
            ask(mx+1,my);
            x=ask(mx,my);
        }
        else{
            ask(mx,my);
        }
        if(ly!=ry){
            y=ask(mx,my+1);
        }
        if(lx!=rx)
        if(x!=manje){
            lx=mx+1;
        }
        else{
            rx=mx;
        }
        if(ly!=ry)
        if(y==manje){
            ly=my+1;
        }
        else{
            ry=my;
        }
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 3756kb

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: 1ms
memory: 4068kb

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: 0ms
memory: 3756kb

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: 1ms
memory: 3696kb

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: 3712kb

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: 0ms
memory: 3800kb

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: 3716kb

input:

RiRiiiimiRiiiuRuuRiRmuRiuRuRR!

output:

0 0

result:

ok 1 points

Test #9:

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

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

result:

ok 62 points

Test #10:

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

input:

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

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 63 points

Test #11:

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

input:

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

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 62 points

Test #12:

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

input:

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

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 64 points

Test #13:

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

input:

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

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 64 points

Test #14:

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

input:

mimimRRuRRRmummimRuiiuRRiiRiuu
iiiiRimiimimRuRmuimRiRmRuRmiRm
RuuiuRuiuRmiRumRRmummiuiiiiiu!

output:

0 0
1 1
0 1

result:

ok 3 points

Test #15:

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

input:

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

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

result:

ok 59 points

Test #16:

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

input:

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

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 64 points

Test #17:

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

input:

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

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 59 points

Test #18:

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

input:

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

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 #19:

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

input:

iummmimiimRimumiRuimRimRRiRmuR
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmum
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimRimRRiRmuu
iummmimiimRimumiRuimR...

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 #20:

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

input:

uRimimimiRumimRiRmuRiuummRiiRm
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRR
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRiuummRiiRi
uRimimimiRumimRiRmuRi...

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 63 points

Test #21:

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

input:

iumiimiRuimmuiRmuuuRiiRRmRiium
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiuR
iumiimiRuimmuiRmuuuRiiRRmRiiui
iumiimiRuimmuiRmuuuRi...

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

result:

ok 62 points

Test #22:

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

input:

mmiuiimumiRiRuRuRmiRimRmuiimmu
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmR
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRimRmuiimmi
mmiuiimumiRiRuRuRmiRi...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 63 points

Test #23:

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

input:

umuuuiRmuRiummRRumimRRiimmiiim
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuiiuuiuRimRR
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
RuumRiiuumRmumRRuRiRmRiiimRiiu
mRuiummRuRimmmRmmmuiiuuiuRimRR
RuumRiiuumRmumRRuRiRmRiiimRiiu
RuumRiiuumRmumRRuRiRm...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 62 points

Test #24:

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

input:

immRuRRmmRuRiimRimiuuumuRiRmum
uRmumuimRRmiuRuuumRmmuRRmiiRiR
mRimuiuimmRRmmiuRmRimuuuumimRi
mRimuiuimmRRmmiuRmRimuuuumimRi
uRmumuimRRmiuRuuumRmmuRRmiiRiR
uRmumuimRRmiuRuuumRmmuRRmiiRiR
mRimuiuimmRRmmiuRmRimuuuumimRi
uRmumuimRRmiuRuuumRmmuRRmiiRiR
mRimuiuimmRRmmiuRmRimuuuumimRi
uRmumuimRRmiuRuuumRmm...

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 59 points

Test #25:

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

input:

iuRRmRRmRuuuumuuuuumuRuimuRiui
mumumRimiumuRumumRiimRummiiiim
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
mumumRimiumuRumumRiimRummiiiim
umRuRiRmiiuuuuRuRumRmuiuRiRiRR
mumumRimiumuRumumRiimRummiiiim
mumumRimiumuRumumRiimRummiiiim
mumumRimiumuRumumRiimRummiiiim
umRuRiRmiiuuuuRuRumRm...

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 64 points

Test #26:

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

input:

immRRmRuuRmRiRRmmuRiiuimiiumRu
iuimuRRRmRiRiRimuiimmmuRmiuuRi
iuimuRRRmRiRiRimuiimmmuRmiuuRi
uiRRuRiiumuimiiuiumRimRmmRRmim
uiRRuRiiumuimiiuiumRimRmmRRmim
iuimuRRRmRiRiRimuiimmmuRmiuuRi
uiRRuRiiumuimiiuiumRimRmmRRmim
iuimuRRRmRiRiRimuiimmmuRmiuuRi
iuimuRRRmRiRiRimuiimmmuRmiuuRi
uiRRuRiiumuimiiuiumRi...

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 #27:

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

input:

mmiRRRRmRmuummmmumRmiiimuRmuRi
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRR
mmiRRRRmRmuummmmumRmiiimuRmuRm
mmiRRRRmRmuummmmumRmi...

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

result:

ok 63 points

Test #28:

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

input:

uRiiRiRmmiuRmRiRmRiuiRiRuumium
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
imimumRmiRmiuuiimmRRuiRuimRmRR
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiuiimmRmiRi
iuimiiRuimuRuumRRmmiu...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 64 points

Test #29:

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

input:

imRuuRRimiuuRiRuiiRummimuiRuuR
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiuiRRRiiummm
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
iRmuuuiuuiimRiimRumiiimmimuuii
RmRimiuRRiRRiiuiRiiuiRRRiiummm
iRmuuuiuuiimRiimRumiiimmimuuii
iRmuuuiuuiimRiimRumii...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 63 points

Test #30:

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

input:

uuRmRRuimummRmRmuiiumRiRiiiRuu
iuiRmmuuumimiuuiiRimiRmmummRum
imimuimiuRumiRRRRiRmuiRumuuimR
iuiRmmuuumimiuuiiRimiRmmummRum
iuiRmmuuumimiuuiiRimiRmmummRum
iuiRmmuuumimiuuiiRimiRmmummRum
imimuimiuRumiRRRRiRmuiRumuuimR
iuiRmmuuumimiuuiiRimiRmmummRum
imimuimiuRumiRRRRiRmuiRumuuimR
iuiRmmuuumimiuuiiRimi...

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 62 points

Test #31:

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

input:

uRmmiiiuRiuuRiRiiRmuRmuRRimuRm
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRi
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuRmuRRimuRR
uRmmiiiuRiuuRiRiiRmuR...

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 62 points

Test #32:

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

input:

iRimiRmmiiumiiimRmRmRimumimRuu
iRimiRmmiiumiiimRmRmRimumimRum
iRimiRmmiiumiiimRmRmRimumimRuR
iRimiRmmiiumiiimRmRmRimumimRu!

output:

0 0
1 1
0 1
1 0

result:

ok 4 points

Test #33:

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

input:

uiRRmumuRimiRRRmmiiRRiimRRmiRR
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuimRuRuuRuum
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRiiRiRiRuuii
imRuimiumRmimimmuiRiiRiRiRuuii
iiumuiimmRuRmRimumuimRuRuuRuum
imRuimiumRmimimmuiRii...

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

result:

ok 61 points

Test #34:

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

input:

RimuuRuuiiuRRmuiRRuiRmRmiuiumR
iuRmummRiuRRRRiiummiRmimRiiRmm
mRiRumRmmmRRmmuiummRiRimuiRuui
mRiRumRmmmRRmmuiummRiRimuiRuui
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiRmimRiiRmm
iuRmummRiuRRRRiiummiR...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 61 points

Test #35:

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

input:

muRmmummiuiRRRmmmRRimmiimuuiRR
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
uuiRmRRRmmiimRuuuRmimmmiRumumu
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
uuiRmRRRmmiimRuuuRmimmmiRumumu
uuiRmRRRmmiimRuuuRmimmmiRumumu
miiRumuuRiuRiiuRRRmuRmuRRRRRmm
uuiRmRRRmmiimRuuuRmimmmiRumumu
uuiRmRRRmmiimRuuuRmim...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 62 points

Test #36:

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

input:

mmmimRRuuiiuimRRmmiiummmuumRRR
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRi
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiummmuumRRu
mmmimRRuuiiuimRRmmiiummmuumRRm
mmmimRRuuiiuimRRmmiiu...

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 57 points

Test #37:

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

input:

RuRumuuiRRmmiRmiRiumRmuRiiimmR
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumRmuRiiimmi
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmu
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumRmuRiiimmm
RuRumuuiRRmmiRmiRiumR...

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 60 points

Test #38:

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

input:

miiRRuuRmmiimuuimiRiRmmummRRim
mmmummuRmRmuummmummuRiRRuuiuu!

output:

0 0
1 1

result:

ok 2 points

Test #39:

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

input:

uRumumuRuRuuRRiummiiiRuuuRRiRR
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiiiRuuuRRiRu
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRi
uRumumuRuRuuRRiummiiiRuuuRRiRm
uRumumuRuRuuRRiummiii...

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

result:

ok 60 points

Test #40:

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

input:

muiiuumiuiiuRiRiimuuRuRRRRimim
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimiR
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuRuRRRRimii
muiiuumiuiiuRiRiimuuR...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 60 points

Test #41:

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

input:

miuiimuiiRmumuuuuRiuRiuiimummR
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uumRuuuiiummiiRiimuiiiimmiuumu
uuiiuRRuiiuRRuRmumimRmRuRumRRi
uumRuuuiiummiiRiimuiiiimmiuumu
uumRuuuiiummiiRiimuii...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 60 points

Test #42:

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

input:

RuiiiuuummiRuRRumiRRiimmmRuiRi
RiRRiuiRRuimuuimiiuiiuRuuuimRm
iimiimumRimimimRiRRmiiRRRRuRRu
iimiimumRimimimRiRRmiiRRRRuRRu
RiRRiuiRRuimuuimiiuiiuRuuuimRm
RiRRiuiRRuimuuimiiuiiuRuuuimRm
iimiimumRimimimRiRRmiiRRRRuRRu
RiRRiuiRRuimuuimiiuiiuRuuuimRm
iimiimumRimimimRiRRmiiRRRRuRRu
RiRRiuiRRuimuuimiiuii...

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 58 points

Test #43:

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

input:

iiRiumiuimuRmumRmiiiummRiiiuRu
iiuimiiRmRmuRumRumRmiumiRiiiiR
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
iiuimiiRmRmuRumRumRmiumiRiiiiR
RumRuRuRRiiuuRuRiuRiuRmmiuRuui
iiuimiiRmRmuRumRumRmiumiRiiiiR
iiuimiiRmRmuRumRumRmiumiRiiiiR
iiuimiiRmRmuRumRumRmiumiRiiiiR
RumRuRuRRiiuuRuRiuRiu...

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 61 points

Test #44:

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

input:

iiRuiRRuimuuimmummiuiuRuRmRmiu
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiuiuRuRmRmim
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiuiuRuRmRmiR
iiRuiRRuimuuimmummiui...

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 61 points

Test #45:

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

input:

RRRRRRRmuuuumiuuuiRRRmiuuuuRim
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRiu
RRRRRRRmuuuumiuuuiRRRmiuuuuRii
RRRRRRRmuuuumiuuuiRRR...

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

result:

ok 62 points

Test #46:

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

input:

mmuuuummRuiRummuiRmuiRiRRmRmuu
muimRiRiiRRimimiimiRuuRiumRiRR
RiRRmRmuuiuRimimimiiRRRmRiuiRm
RiRRmRmuuiuRimimimiiRRRmRiuiRm
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRuuRiumRiRR
muimRiRiiRRimimiimiRu...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
250001 750000
250000 750000
250000 750001
125001 875000
125000 875000
125000 875001
62501 937500
62500 937500
62500 937501
31251 968750
31250 968750
31250 968751
15626 984375
15625 984375
15625 984376
7813 992188
7812 992188
7812 992189
3907 ...

result:

ok 62 points

Test #47:

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

input:

iiiiRmmiuRiumRRiumimmuuRuiiuRR
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRmmRRRuimRu
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
iiRimRiuuRiiumiRimRiumRmRuRmum
imiimmRRuRiuuuiuuiRRmmRRRuimRu
iiRimRiuuRiiumiRimRiumRmRuRmum
iiRimRiuuRiiumiRimRiu...

output:

0 0
1 1
0 1
1 0
500001 500000
500000 500000
500000 500001
750001 250000
750000 250000
750000 250001
875001 125000
875000 125000
875000 125001
937501 62500
937500 62500
937500 62501
968751 31250
968750 31250
968750 31251
984376 15625
984375 15625
984375 15626
992189 7812
992188 7812
992188 7813
99609...

result:

ok 61 points

Test #48:

score: -100
Time Limit Exceeded

input:

RRiRRuiiuRuimRuuuuiRRuRmuimRRR
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRRuRmuimRRm
RRiRRuiiuRuimRuuuuiRRuRmuimRRi
RRiRRuiiuRuimRuuuuiRR...

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: