QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#131855#5134. Jagged SkylinePetroTarnavskyi#AC ✓58ms3604kbC++171.1kb2023-07-28 16:16:392023-07-28 16:16:43

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-28 16:16:43]
  • 评测
  • 测评结果:AC
  • 用时:58ms
  • 内存:3604kb
  • [2023-07-28 16:16:39]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FOR(i, a, b) for (int i = (a); i<(b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i>=(a); --i)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define FILL(a, b) memset(a, b, sizeof(a))

typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;

typedef long double db;


bool check(int x, LL y){
	cout << "? " << x << " " << y << endl;
	string s;
	cin >> s;
	return s == "building";
}

int main()
{
	//ios::sync_with_stdio(false);
	//cin.tie(0);
	
	int w;
	LL h;
	cin >> w >> h;
	
	VI order(w);
	iota(ALL(order), 1);
	srand(447);
	random_shuffle(ALL(order));
	
	
	
	LL cur_h = 0;
	int where = 1; 
	for(int x : order){
		if(cur_h == h)
			continue;
			
		if(!check(x, cur_h + 1))
			continue;
		LL l = cur_h + 1, r = h + 1;
		while(r - l > 1){
			LL m = (l + r) / 2;
			if(check(x, m))
				l = m;
			else
				r = m;
		}
		cur_h = l;
		where = x;
	}
	cout << "! " << where << " " << cur_h << endl;
	
	
	return 0;
}

詳細信息

Test #1:

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

input:

1 1
sky

output:

? 1 1
! 1 0

result:

ok Used 1 queries

Test #2:

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

input:

1 1
building

output:

? 1 1
! 1 1

result:

ok Used 1 queries

Test #3:

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

input:

2 1
sky
sky

output:

? 2 1
? 1 1
! 1 0

result:

ok Used 2 queries

Test #4:

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

input:

2 1
building

output:

? 2 1
! 2 1

result:

ok Used 1 queries

Test #5:

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

input:

2 1000000000000000000
sky
sky

output:

? 2 1
? 1 1
! 1 0

result:

ok Used 2 queries

Test #6:

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

input:

2 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky

output:

? 2 1
? 2 500000000000000001
? 2 250000000000000001
? 2 125000000000000001
? 2 62500000000000001
? 2 31250000000000001
? 2 15625000000000001
? 2 7812500000000001
? 2 3906250000000001
? 2 1953125000000001
? 2 976562500000001
? 2 488281250000001
? 2 244140625000001
? 2 122070312500001
? 2 610351562500...

result:

ok Used 61 queries

Test #7:

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

input:

3 3
building
sky
sky
sky

output:

? 2 1
? 2 2
? 1 2
? 3 2
! 2 1

result:

ok Used 4 queries

Test #8:

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

input:

5 5
building
building
building
building

output:

? 2 1
? 2 3
? 2 4
? 2 5
! 2 5

result:

ok Used 4 queries

Test #9:

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

input:

8 4
building
building
sky
sky
sky
sky
sky
sky
sky
sky

output:

? 6 1
? 6 3
? 6 4
? 1 4
? 8 4
? 4 4
? 3 4
? 7 4
? 2 4
? 5 4
! 6 3

result:

ok Used 10 queries

Test #10:

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

input:

10 100
building
building
sky
sky
building
building
sky
sky
building
sky
building
sky
sky
building
sky
sky
sky
sky
sky
sky
sky

output:

? 6 1
? 6 51
? 6 76
? 6 63
? 6 57
? 6 60
? 6 61
? 1 61
? 8 61
? 8 81
? 8 71
? 8 76
? 8 73
? 8 72
? 4 73
? 3 73
? 7 73
? 2 73
? 10 73
? 5 73
? 9 73
! 8 72

result:

ok Used 21 queries

Test #11:

score: 0
Accepted
time: 4ms
memory: 3480kb

input:

100 1000
building
sky
sky
building
building
sky
building
building
sky
sky
sky
building
building
building
building
sky
sky
building
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
building
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
...

output:

? 80 1
? 80 501
? 80 251
? 80 126
? 80 188
? 80 219
? 80 203
? 80 211
? 80 215
? 80 213
? 80 212
? 57 212
? 57 606
? 57 803
? 57 902
? 57 951
? 57 926
? 57 914
? 57 920
? 57 917
? 57 918
? 40 918
? 55 918
? 56 918
? 46 918
? 86 918
? 69 918
? 72 918
? 24 918
? 1 918
? 88 918
? 42 918
? 37 918
? 68 9...

result:

ok Used 125 queries

Test #12:

score: 0
Accepted
time: 2ms
memory: 3504kb

input:

100 10
building
sky
building
building
building
building
sky
building
sky
building
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building

output:

? 80 1
? 80 6
? 80 3
? 80 4
? 80 5
? 57 6
? 57 8
? 57 7
? 40 8
? 55 8
? 55 9
? 55 10
? 56 10
? 46 10
? 86 10
? 69 10
? 72 10
? 24 10
? 1 10
? 88 10
? 42 10
? 37 10
? 68 10
? 97 10
? 53 10
! 53 10

result:

ok Used 25 queries

Test #13:

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

input:

1 98
building
building
building
sky
building
sky
sky

output:

? 1 1
? 1 50
? 1 74
? 1 86
? 1 80
? 1 83
? 1 81
! 1 80

result:

ok Used 7 queries

Test #14:

score: 0
Accepted
time: 7ms
memory: 3520kb

input:

899 2794
building
sky
sky
building
sky
sky
sky
building
building
building
building
sky
building
building
building
building
building
building
sky
building
sky
building
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
...

output:

? 708 1
? 708 1398
? 708 699
? 708 350
? 708 524
? 708 437
? 708 393
? 708 371
? 708 382
? 708 387
? 708 390
? 708 391
? 445 391
? 445 1593
? 445 2194
? 445 2494
? 445 2644
? 445 2719
? 445 2757
? 445 2738
? 445 2747
? 445 2742
? 445 2744
? 445 2743
? 357 2744
? 576 2744
? 56 2744
? 324 2744
? 541 2...

result:

ok Used 934 queries

Test #15:

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

input:

6370 86
building
sky
building
building
sky
sky
building
building
building
building
building
building
sky
sky
sky
sky
sky
building
building
building

output:

? 5705 1
? 5705 44
? 5705 22
? 5705 33
? 5705 38
? 5705 35
? 5705 34
? 5170 35
? 5170 61
? 5170 74
? 5170 80
? 5170 83
? 5170 85
? 5170 84
? 5782 84
? 6187 84
? 927 84
? 1081 84
? 1081 85
? 1081 86
! 1081 86

result:

ok Used 20 queries

Test #16:

score: 0
Accepted
time: 3ms
memory: 3488kb

input:

3647 2089
building
building
building
building
sky
building
building
building
sky
sky
building
building
building
sky
sky
building
sky
sky
building
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
sky
building
sky
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
...

output:

? 708 1
? 708 1045
? 708 1567
? 708 1828
? 708 1959
? 708 1893
? 708 1926
? 708 1942
? 708 1950
? 708 1946
? 708 1944
? 708 1945
? 3174 1946
? 3174 2018
? 3174 1982
? 3174 1964
? 3174 1973
? 3174 1968
? 3174 1966
? 3174 1967
? 2983 1968
? 2491 1968
? 927 1968
? 1081 1968
? 541 1968
? 1332 1968
? 884...

result:

ok Used 1110 queries

Test #17:

score: 0
Accepted
time: 4ms
memory: 3512kb

input:

3813 63935448
building
sky
sky
building
building
building
building
sky
building
building
sky
building
sky
sky
building
building
building
sky
sky
building
building
building
sky
sky
sky
sky
building
building
sky
building
sky
building
building
sky
sky
sky
building
sky
building
sky
building
sky
sky
buil...

output:

? 708 1
? 708 31967725
? 708 15983863
? 708 7991932
? 708 11987897
? 708 13985880
? 708 14984871
? 708 15484367
? 708 15234619
? 708 15359493
? 708 15421930
? 708 15390711
? 708 15406320
? 708 15398515
? 708 15394613
? 708 15396564
? 708 15397539
? 708 15398027
? 708 15397783
? 708 15397661
? 708 15...

result:

ok Used 3976 queries

Test #18:

score: 0
Accepted
time: 14ms
memory: 3452kb

input:

3689 531350850216
building
building
sky
sky
sky
sky
sky
sky
building
building
building
sky
sky
building
building
sky
sky
building
sky
sky
sky
sky
sky
building
sky
building
sky
sky
sky
sky
building
sky
building
sky
building
sky
sky
building
building
building
sky
building
sky
sky
building
sky
sky
sky
...

output:

? 708 1
? 708 265675425109
? 708 398513137663
? 708 332094281386
? 708 298884853247
? 708 282280139178
? 708 273977782143
? 708 269826603626
? 708 267751014367
? 708 268788808996
? 708 269307706311
? 708 269567154968
? 708 269437430639
? 708 269372568475
? 708 269404999557
? 708 269421215098
? 708 2...

result:

ok Used 4104 queries

Test #19:

score: 0
Accepted
time: 26ms
memory: 3540kb

input:

10000 1000000000000000000
building
building
sky
building
building
sky
sky
sky
sky
building
sky
building
building
sky
sky
sky
building
sky
building
sky
sky
sky
building
sky
sky
sky
building
sky
sky
sky
building
building
building
building
building
building
building
building
building
sky
sky
building
b...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 687500000000000001
? 5705 718750000000000001
? 5705 703125000000000001
? 5705 695312500000000001
? 5705 691406250000000001
? 5705 689453125000000001
? 5705 690429687500000001
? 5705 689941406250000001
? 570...

result:

ok Used 10477 queries

Test #20:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
s...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10300 queries

Test #21:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
s...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10059 queries

Test #22:

score: 0
Accepted
time: 26ms
memory: 3536kb

input:

10000 1000000000000000000
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sk...

output:

? 5705 1
? 5170 1
? 5782 1
? 8812 1
? 927 1
? 1081 1
? 541 1
? 1332 1
? 6007 1
? 7621 1
? 7573 1
? 9489 1
? 7066 1
? 7103 1
? 7873 1
? 4272 1
? 4250 1
? 1027 1
? 6089 1
? 3290 1
? 2616 1
? 6421 1
? 4889 1
? 6741 1
? 3994 1
? 3858 1
? 9640 1
? 812 1
? 4472 1
? 1588 1
? 3762 1
? 8552 1
? 8331 1
? 9936...

result:

ok Used 10059 queries

Test #23:

score: 0
Accepted
time: 20ms
memory: 3488kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
sky
sky
sky
sky
sky
sky...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10059 queries

Test #24:

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

input:

10000 1000000000000000000
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
buil...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 875000000000000001
? 5705 937500000000000001
? 5705 968750000000000001
? 5705 984375000000000001
? 5705 992187500000000001
? 5705 996093750000000001
? 5705 998046875000000001
? 5705 999023437500000001
? 5705 999511718750000001
? 570...

result:

ok Used 6538 queries

Test #25:

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

input:

8 4
building
building
building

output:

? 6 1
? 6 3
? 6 4
! 6 4

result:

ok Used 3 queries

Test #26:

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

input:

8 4
building
sky
sky
building
building
sky
sky
sky
building

output:

? 6 1
? 6 3
? 6 2
? 1 2
? 1 3
? 1 4
? 8 4
? 4 4
? 3 4
! 3 4

result:

ok Used 9 queries

Test #27:

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

input:

3 3
building
sky
sky
building
building

output:

? 2 1
? 2 2
? 1 2
? 3 2
? 3 3
! 3 3

result:

ok Used 5 queries

Test #28:

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

input:

3 3
sky
building
building
building

output:

? 2 1
? 1 1
? 1 2
? 1 3
! 1 3

result:

ok Used 4 queries

Test #29:

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

input:

5 5
building
sky
sky
building
building
building

output:

? 2 1
? 2 3
? 2 2
? 1 2
? 1 4
? 1 5
! 1 5

result:

ok Used 6 queries

Test #30:

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

input:

8 4
building
building
sky
sky
sky
sky
sky
sky
sky
building

output:

? 6 1
? 6 3
? 6 4
? 1 4
? 8 4
? 4 4
? 3 4
? 7 4
? 2 4
? 5 4
! 5 4

result:

ok Used 10 queries

Test #31:

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

input:

3 3
building
building
sky
sky
building

output:

? 2 1
? 2 2
? 2 3
? 1 3
? 3 3
! 3 3

result:

ok Used 5 queries

Test #32:

score: 0
Accepted
time: 36ms
memory: 3516kb

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
sky
building
sky
sky
sky
building
building
building
building
building
sky
building
sky
sky
sky
sky
building
sky
sky
sky
building
sky
building
sky
building
sky
sky
building
building
sky
building
building
building
building
building
build...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 562500000000000001
? 5705 593750000000000001
? 5705 578125000000000001
? 5705 570312500000000001
? 5705 574218750000000001
? 5705 572265625000000001
? 5705 571289062500000001
? 5705 570800781250000001
? 570...

result:

ok Used 10397 queries

Test #33:

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

input:

10000 1000000000000000000
building
sky
building
building
sky
building
building
sky
building
sky
sky
sky
sky
sky
sky
building
building
building
sky
building
sky
sky
sky
building
sky
sky
sky
sky
building
building
sky
sky
sky
building
building
sky
building
building
sky
building
building
building
buildi...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 375000000000000001
? 5705 437500000000000001
? 5705 406250000000000001
? 5705 421875000000000001
? 5705 429687500000000001
? 5705 425781250000000001
? 5705 427734375000000001
? 5705 426757812500000001
? 5705 426269531250000001
? 570...

result:

ok Used 10862 queries

Test #34:

score: 0
Accepted
time: 31ms
memory: 3544kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
sky
sky
building
building
sky
sky
building
sky
sky
building
sky
sky...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10418 queries

Test #35:

score: 0
Accepted
time: 11ms
memory: 3532kb

input:

10000 1000000000000000000
building
building
sky
sky
sky
building
sky
sky
building
building
sky
sky
building
sky
building
building
sky
building
building
sky
sky
building
sky
building
building
sky
building
building
sky
sky
sky
sky
sky
building
building
sky
building
sky
building
building
sky
sky
sky
sk...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 562500000000000001
? 5705 531250000000000001
? 5705 546875000000000001
? 5705 539062500000000001
? 5705 535156250000000001
? 5705 537109375000000001
? 5705 538085937500000001
? 5705 537597656250000001
? 570...

result:

ok Used 10278 queries

Test #36:

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

input:

10000 1000000000000000000
building
sky
sky
sky
building
sky
sky
building
building
sky
sky
sky
building
sky
sky
sky
building
sky
building
building
sky
sky
building
building
building
sky
sky
sky
building
building
building
building
building
sky
building
building
building
building
sky
building
building
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 93750000000000001
? 5705 78125000000000001
? 5705 70312500000000001
? 5705 74218750000000001
? 5705 76171875000000001
? 5705 75195312500000001
? 5705 74707031250000001
? 5705 744628...

result:

ok Used 10786 queries

Test #37:

score: 0
Accepted
time: 32ms
memory: 3540kb

input:

10000 1000000000000000000
building
building
sky
building
building
sky
building
building
sky
building
sky
building
sky
building
sky
building
building
building
building
building
sky
building
building
building
sky
sky
building
sky
building
building
sky
sky
sky
sky
sky
building
sky
building
sky
sky
sky
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 687500000000000001
? 5705 718750000000000001
? 5705 703125000000000001
? 5705 710937500000000001
? 5705 714843750000000001
? 5705 712890625000000001
? 5705 713867187500000001
? 5705 713378906250000001
? 570...

result:

ok Used 10496 queries

Test #38:

score: 0
Accepted
time: 18ms
memory: 3540kb

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
sky
sky
building
building
sky
sky
building
building
building
sky
sky
building
building
building
building
sky
sky
building
building
sky
building
sky
building
building
building
sky
building
building
building
sky
sky
building
building
bui...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 562500000000000001
? 5705 593750000000000001
? 5705 578125000000000001
? 5705 570312500000000001
? 5705 566406250000000001
? 5705 568359375000000001
? 5705 569335937500000001
? 5705 568847656250000001
? 570...

result:

ok Used 10398 queries

Test #39:

score: 0
Accepted
time: 22ms
memory: 3512kb

input:

10000 1000000000000000000
building
building
building
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
sky
building
sky
sky
building
building
building
building
sky
building
building
building
building
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
sky
building
building
building
b...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 875000000000000001
? 5705 812500000000000001
? 5705 781250000000000001
? 5705 765625000000000001
? 5705 757812500000000001
? 5705 753906250000000001
? 5705 751953125000000001
? 5705 752929687500000001
? 5705 752441406250000001
? 570...

result:

ok Used 10546 queries

Test #40:

score: 0
Accepted
time: 19ms
memory: 3472kb

input:

10000 1000000000000000000
building
building
building
building
building
sky
building
sky
sky
sky
sky
building
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
building
sky
sky
building
building
building
sky
sky
building
building
building
sky
building
building
building
sky
building
building
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 875000000000000001
? 5705 937500000000000001
? 5705 968750000000000001
? 5705 953125000000000001
? 5705 960937500000000001
? 5705 957031250000000001
? 5705 955078125000000001
? 5705 954101562500000001
? 5705 953613281250000001
? 570...

result:

ok Used 10378 queries

Test #41:

score: 0
Accepted
time: 33ms
memory: 3540kb

input:

10000 1000000000000000000
building
sky
building
sky
sky
sky
sky
building
sky
building
sky
building
sky
sky
building
building
building
sky
sky
building
building
building
sky
building
sky
sky
sky
building
building
building
sky
sky
sky
sky
sky
sky
sky
building
building
building
sky
building
building
sk...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 375000000000000001
? 5705 312500000000000001
? 5705 281250000000000001
? 5705 265625000000000001
? 5705 257812500000000001
? 5705 261718750000000001
? 5705 259765625000000001
? 5705 260742187500000001
? 5705 260253906250000001
? 570...

result:

ok Used 10486 queries

Test #42:

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

input:

10000 1000000000000000000
building
sky
building
building
sky
building
building
sky
building
sky
sky
building
building
sky
building
building
sky
building
building
building
building
sky
building
building
building
building
sky
sky
building
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 375000000000000001
? 5705 437500000000000001
? 5705 406250000000000001
? 5705 421875000000000001
? 5705 429687500000000001
? 5705 425781250000000001
? 5705 427734375000000001
? 5705 426757812500000001
? 5705 426269531250000001
? 570...

result:

ok Used 10862 queries

Test #43:

score: 0
Accepted
time: 7ms
memory: 3544kb

input:

10000 1000000000000000000
building
building
sky
building
sky
sky
sky
sky
building
sky
sky
sky
building
sky
building
building
sky
sky
sky
building
building
sky
building
building
sky
building
building
building
sky
building
sky
sky
building
building
sky
building
building
building
sky
building
sky
sky
s...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 687500000000000001
? 5705 656250000000000001
? 5705 640625000000000001
? 5705 632812500000000001
? 5705 628906250000000001
? 5705 630859375000000001
? 5705 629882812500000001
? 5705 629394531250000001
? 570...

result:

ok Used 10441 queries

Test #44:

score: 0
Accepted
time: 58ms
memory: 3544kb

input:

10000 1000000000000000000
building
building
building
building
building
sky
sky
building
building
building
sky
sky
building
sky
sky
sky
building
building
sky
building
building
sky
sky
building
sky
building
building
sky
sky
sky
building
building
sky
sky
sky
building
building
sky
sky
sky
sky
sky
buildi...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 875000000000000001
? 5705 937500000000000001
? 5705 968750000000000001
? 5705 953125000000000001
? 5705 945312500000000001
? 5705 949218750000000001
? 5705 951171875000000001
? 5705 952148437500000001
? 5705 951660156250000001
? 570...

result:

ok Used 10577 queries

Test #45:

score: 0
Accepted
time: 19ms
memory: 3468kb

input:

10000 1000000000000000000
building
sky
building
sky
sky
building
sky
building
sky
building
building
sky
sky
sky
building
sky
building
building
building
sky
sky
sky
building
sky
sky
building
building
building
sky
building
sky
building
sky
building
sky
sky
building
building
building
building
building
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 375000000000000001
? 5705 312500000000000001
? 5705 281250000000000001
? 5705 296875000000000001
? 5705 289062500000000001
? 5705 292968750000000001
? 5705 291015625000000001
? 5705 291992187500000001
? 5705 292480468750000001
? 570...

result:

ok Used 10861 queries

Test #46:

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

input:

10000 1000000000000000000
building
building
sky
sky
building
sky
sky
sky
building
building
sky
sky
sky
sky
building
sky
building
sky
building
building
building
sky
building
building
sky
sky
sky
sky
building
sky
building
sky
sky
sky
building
building
sky
sky
sky
building
building
building
building
sk...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 562500000000000001
? 5705 593750000000000001
? 5705 578125000000000001
? 5705 570312500000000001
? 5705 566406250000000001
? 5705 568359375000000001
? 5705 569335937500000001
? 5705 568847656250000001
? 570...

result:

ok Used 10398 queries

Test #47:

score: 0
Accepted
time: 3ms
memory: 3452kb

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
sky
sk...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 976562500000001
? 80 488281250000001
? 80 244140625000001
? 80 122070312500001
? ...

result:

ok Used 338 queries

Test #48:

score: 0
Accepted
time: 44ms
memory: 3512kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
sky
sky
building
sky
building
building
building
sky
building
building
building
sky
building
sky
sky
sky
building
building
building
sky
buil...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10240 queries

Test #49:

score: 0
Accepted
time: 4ms
memory: 3504kb

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
bui...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 976562500000001
? 80 488281250000001
? 80 244140625000001
? 80 122070312500001
? ...

result:

ok Used 309 queries

Test #50:

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

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
building
bui...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 330 queries

Test #51:

score: 0
Accepted
time: 6ms
memory: 3440kb

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
sky
sky
building
sky
building
building
building
sky
building
building
building
sky
building
sky
sky
sky
building
building
building
sky
bu...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 976562500000001
? 80 488281250000001
? 80 244140625000001
? 80 122070312500001
? ...

result:

ok Used 278 queries

Test #52:

score: 0
Accepted
time: 17ms
memory: 3412kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
building
sky
sky
building
building
building
sky
sky
building
sky...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10537 queries

Test #53:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building
building...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 976562500000001
? 80 488281250000001
? 80 244140625000001
? 80 122070312500001
? ...

result:

ok Used 320 queries

Test #54:

score: 0
Accepted
time: 4ms
memory: 3512kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
building
building
building
building
building
building
building
building
building
building
building
buil...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 123 queries

Test #55:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
building
sky
sky
sky
sky
sky
...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 976562500000001
? 80 488281250000001
? 80 244140625000001
? 80 122070312500001
? ...

result:

ok Used 399 queries

Test #56:

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

input:

100 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
building
sky
building
sky
sky
building
sky
building
building
sky
building
sky
building
building
building
sky
building
sky
building
building
sky
building
sky
sky
sky
building
sky
sky
sky
sky
sky
sk...

output:

? 80 1
? 80 500000000000000001
? 80 250000000000000001
? 80 125000000000000001
? 80 62500000000000001
? 80 31250000000000001
? 80 15625000000000001
? 80 7812500000000001
? 80 3906250000000001
? 80 1953125000000001
? 80 2929687500000001
? 80 2441406250000001
? 80 2685546875000001
? 80 256347656250000...

result:

ok Used 280 queries

Test #57:

score: 0
Accepted
time: 37ms
memory: 3544kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
building
sky
sky
building
building
sky
building
building
sky...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10599 queries

Test #58:

score: 0
Accepted
time: 58ms
memory: 3572kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
sky
building
building
sky
sky
building
building
building
building
sky
building
sky
sky
building
building
sky
building
building
sky
building
sky
building
sky
building
b...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10778 queries

Test #59:

score: 0
Accepted
time: 18ms
memory: 3540kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
building
sky
building
sky
building
sky
building
sky
building
building
building
building
building
building
sky
sky
building
sky
building
building
building
building
building
sky
building
building
building
...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 7324218750000...

result:

ok Used 10419 queries

Test #60:

score: 0
Accepted
time: 22ms
memory: 3540kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
building
building
building
sky
building
sky
sky
building
building
building
sky
sky
sky
building
sky
sky
sky
building
building
sky
sky
sky
sky
building
sky
building
sky
building
sky
sky
sky
building
building
building
building
building
sky
building
sk...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 46875000000000001
? 5705 54687500000000001
? 5705 58593750000000001
? 5705 56640625000000001
? 5705 57617187500000001
? 5705 57128906250000001
? 5705 568847...

result:

ok Used 10808 queries

Test #61:

score: 0
Accepted
time: 38ms
memory: 3560kb

input:

10000 1000000000000000000
building
building
sky
sky
building
building
building
sky
sky
sky
sky
building
sky
building
sky
sky
sky
building
sky
sky
sky
building
building
sky
sky
sky
building
building
building
sky
sky
building
building
building
building
building
building
sky
building
building
sky
sky
b...

output:

? 5705 1
? 5705 500000000000000001
? 5705 750000000000000001
? 5705 625000000000000001
? 5705 562500000000000001
? 5705 593750000000000001
? 5705 609375000000000001
? 5705 617187500000000001
? 5705 613281250000000001
? 5705 611328125000000001
? 5705 610351562500000001
? 5705 609863281250000001
? 570...

result:

ok Used 10320 queries

Test #62:

score: 0
Accepted
time: 28ms
memory: 3492kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
building
sky
sky
building
sky
sky
sky
building
sky
s...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 2441406250000...

result:

ok Used 10778 queries

Test #63:

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

input:

10000 1000000000000000000
building
sky
building
building
building
sky
sky
sky
building
building
sky
building
sky
building
building
sky
sky
sky
sky
building
building
sky
sky
sky
building
building
sky
building
sky
sky
building
building
building
building
sky
sky
sky
sky
sky
building
building
sky
buildi...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 375000000000000001
? 5705 437500000000000001
? 5705 468750000000000001
? 5705 453125000000000001
? 5705 445312500000000001
? 5705 441406250000000001
? 5705 443359375000000001
? 5705 444335937500000001
? 5705 443847656250000001
? 570...

result:

ok Used 10429 queries

Test #64:

score: 0
Accepted
time: 11ms
memory: 3540kb

input:

10000 1000000000000000000
building
sky
sky
sky
sky
sky
sky
sky
sky
sky
sky
building
sky
sky
sky
building
building
building
building
sky
sky
sky
building
sky
sky
building
building
building
building
building
building
building
building
sky
building
building
building
building
building
sky
building
sky
s...

output:

? 5705 1
? 5705 500000000000000001
? 5705 250000000000000001
? 5705 125000000000000001
? 5705 62500000000000001
? 5705 31250000000000001
? 5705 15625000000000001
? 5705 7812500000000001
? 5705 3906250000000001
? 5705 1953125000000001
? 5705 976562500000001
? 5705 488281250000001
? 5705 7324218750000...

result:

ok Used 10717 queries