General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
38236267 Contestant:
Kawaya
979D - 19 GNU C++11 Accepted 46 ms 3740 KB 2018-05-14 18:51:29 2018-05-14 20:39:50
 
 
→ Source
#include<iostream>
#include<cstring>
#include<vector>
#include<queue>
#include<cstdio>
#include<algorithm>
using namespace std;

#define LL long long

inline int read(){
	int x=0,f=1;char c=getchar();
	for(;!isdigit(c);c=getchar()) if(c=='-') f=-1;
	for(;isdigit(c);c=getchar()) x=x*10+c-'0';
	return x*f;
}
const int INF=9999999;
const int MAXN=300000;

int Q; bool vis[MAXN+1];

int main(){
	Q=read();
    while(Q--){
    	int opr=read();
    	if(opr==1){
    		int u=read(); vis[u]=true;
		}
		else{
			int x=read(),k=read(),s=read();
			if(x%k!=0){puts("-1"); continue;}
			int ans=-INF,tmp=0; int c=(int)((s-x)/k)*k;
			for(int i=c;i>=1;i-=k){
			    if(ans&&tmp-i>(x<<1)) break; 
				if(vis[i]&&(x^i)>ans) ans=x^i,tmp=i;
			}
			//for(int i=k;i<=s-x;i+=k){ if(vis[i]&&(x^i)>ans) ans=x^i,tmp=i; }
			if(tmp) printf("%d\n",tmp);
			else printf("-1\n");
		}
	}
	return 0;
}

 
 
1
Time: 0 ms, memory: 3708 KB
Verdict: OK
Input
5
1 1
1 2
2 1 1 3
2 1 1 2
2 1 1 1
Participant's output
2
1
-1
Jury's answer
2
1
-1
Checker comment
ok 3 lines
 
 
2
Time: 15 ms, memory: 3716 KB
Verdict: OK
Input
10
1 9
2 9 9 22
2 3 3 18
1 25
2 9 9 20
2 25 25 14
1 20
2 26 26 3
1 14
2 20 20 9
Participant's output
9
9
9
-1
-1
-1
Jury's answer
9
9
9
-1
-1
-1
Checker comment
ok 6 lines
 
 
3
Time: 15 ms, memory: 3724 KB
Verdict: OK
Input
3000
1 32577
2 21718 10859 77437
2 21718 10859 78404
2 32577 32577 97054
2 21718 10859 65518
1 10295
1 13438
1 1040
2 20590 10295 10227
1 9869
1 30418
1 32630
1 15280
1 30326
2 3820 1910 37422
1 29021
1 29349
2 84838 6526 100000
1 28009
1 12122
1 25726
1 580
2 28009 28009 84961
1 23340
2 70020 23340 95597
2 30305 6061 7094
2 33616 3056 69436
1 28283
1 18606
1 5448
2 41180 10295 4222
1 8500
1 26892
1 20702
2 49032 2724 60741
2 4482 4482 39034
1 20123
2 22827 3261 66484
...
Participant's output
32577
32577
32577
32577
-1
15280
-1
28009
23340
-1
15280
-1
5448
26892
29349
-1
23340
-1
-1
15280
5448
15280
12122
-1
18606
-1
-1
26892
-1
-1
5448
-1
-1
30326
30326
-1
-1
10295
-1
25627
-1
18606
15280
-1
17009
18606
26892
6119
18606
18606
-1
17009
-1
23340
26892
-1
10673
29349
-1
30326
-1
12356
8500
8500
25627
18606
10830
13438
580
29349
-1
24160
18606
31002
13438
17009
10830
23340
25726
24160
12256
31002
14063
5222
26892
...
Jury's answer
32577
32577
32577
32577
-1
15280
-1
28009
23340
-1
15280
-1
5448
26892
29349
-1
23340
-1
-1
15280
5448
15280
12122
-1
18606
-1
-1
26892
-1
-1
5448
-1
-1
30326
30326
-1
-1
10295
-1
25627
-1
18606
15280
-1
17009
18606
26892
6119
18606
18606
-1
17009
-1
23340
26892
-1
10673
29349
-1
30326
-1
12356
8500
8500
25627
18606
10830
13438
580
29349
-1
24160
18606
31002
13438
17009
10830
23340
25726
24160
12256
31002
14063
5222
26892
...
Checker comment
ok 1774 lines
 
 
4
Time: 0 ms, memory: 3728 KB
Verdict: OK
Input
3000
1 25860
2 19395 6465 62674
2 25860 25860 65346
2 20688 2586 77870
2 30905 30905 2024
2 77580 25860 100000
2 21550 4310 29484
2 4310 4310 58836
1 12310
1 29676
2 85338 431 100000
2 29676 7419 77921
1 17488
2 18102 862 32564
1 7802
1 25364
2 10930 2186 54895
1 12225
1 15861
2 82752 2586 100000
2 24450 12225 58314
1 14533
2 99290 19858 12682
1 4292
2 14838 4946 22489
2 37095 7419 741
1 10741
2 18465 6155 23703
1 8072
2 10741 10741 25981
2 4890 2445 25648
1 22455
2 8584 42...
Participant's output
25860
25860
25860
-1
-1
-1
25860
-1
29676
-1
17488
-1
12225
-1
-1
-1
-1
10741
12225
4292
25364
12310
-1
-1
12225
12225
8072
25860
25860
29676
18969
9570
10578
12225
-1
-1
17488
10578
9570
-1
11787
12310
-1
-1
-1
-1
14559
-1
8472
25315
25860
25364
-1
-1
-1
11787
7802
7802
18969
-1
-1
15861
4292
29676
-1
1110
8472
17007
12310
9570
7802
-1
9570
1110
9570
11787
10578
29676
10578
22051
9570
-1
910
12310
27160
17488
10669
1110...
Jury's answer
25860
25860
25860
-1
-1
-1
25860
-1
29676
-1
17488
-1
12225
-1
-1
-1
-1
10741
12225
4292
25364
12310
-1
-1
12225
12225
8072
25860
25860
29676
18969
9570
10578
12225
-1
-1
17488
10578
9570
-1
11787
12310
-1
-1
-1
-1
14559
-1
8472
25315
25860
25364
-1
-1
-1
11787
7802
7802
18969
-1
-1
15861
4292
29676
-1
1110
8472
17007
12310
9570
7802
-1
9570
1110
9570
11787
10578
29676
10578
22051
9570
-1
910
12310
27160
17488
10669
1110...
Checker comment
ok 1794 lines
 
 
5
Time: 0 ms, memory: 3724 KB
Verdict: OK
Input
3000
1 8955
2 26865 8955 10433
1 14648
1 19361
2 30845 995 69714
2 19361 19361 71351
1 16622
2 14648 14648 60637
1 19425
2 6475 6475 57216
2 38850 19425 81325
1 18170
2 24605 1295 66644
1 18130
1 5911
2 11655 3885 33713
1 16987
1 24114
2 64750 2590 25428
2 6370 490 47433
1 3940
1 23114
1 20673
2 37036 788 11619
1 8224
2 14648 14648 51512
2 43120 70 61353
2 19110 490 53606
1 4353
2 7324 7324 35249
2 11557 11557 52826
2 63005 31502 6560
1 3029
1 21873
2 1813 1813 29048
2 5...
Participant's output
-1
8955
19361
14648
19425
19425
19425
19425
-1
18130
-1
14648
18130
18130
14648
23114
-1
18130
8955
-1
21873
19425
18130
3940
24114
16622
-1
22304
28280
18170
19425
28280
28280
22254
-1
19425
-1
13534
-1
21404
-1
-1
-1
5710
21404
-1
-1
292
16622
23114
23114
13534
30498
4662
-1
19425
-1
5710
21404
-1
18130
-1
17010
20673
28335
27167
24114
-1
31175
19361
-1
18130
3940
14685
21873
30498
-1
21998
23114
-1
22254
16886
11330
16529...
Jury's answer
-1
8955
19361
14648
19425
19425
19425
19425
-1
18130
-1
14648
18130
18130
14648
23114
-1
18130
8955
-1
21873
19425
18130
3940
24114
16622
-1
22304
28280
18170
19425
28280
28280
22254
-1
19425
-1
13534
-1
21404
-1
-1
-1
5710
21404
-1
-1
292
16622
23114
23114
13534
30498
4662
-1
19425
-1
5710
21404
-1
18130
-1
17010
20673
28335
27167
24114
-1
31175
19361
-1
18130
3940
14685
21873
30498
-1
21998
23114
-1
22254
16886
11330
16529...
Checker comment
ok 1802 lines
 
 
6
Time: 0 ms, memory: 3736 KB
Verdict: OK
Input
3000
1 23228
2 11614 11614 9654
2 5807 5807 31958
2 5807 5807 56529
1 31923
2 23228 23228 74113
2 3547 3547 62196
1 32576
2 95769 3547 100000
1 2931
2 17421 5807 44999
2 79404 2036 100000
2 3547 3547 54888
2 63846 31923 97601
2 36648 4072 94253
2 41034 2931 60582
1 1870
1 28300
1 24545
2 10641 10641 31340
2 50490 374 60287
1 27858
2 7075 7075 39016
1 32250
2 42450 2830 73843
2 46430 9286 79325
2 6450 3225 13815
1 10228
1 14846
2 54191 10838 19421
1 32659
2 48375 16125 85749
...
Participant's output
-1
23228
23228
23228
31923
-1
23228
-1
31923
31923
32576
2931
-1
1870
28300
28300
27858
-1
-1
32250
32576
32250
32576
32250
23228
10228
7206
-1
-1
23228
32576
14805
32576
-1
21370
10228
12936
-1
27048
27048
-1
28300
10228
27048
-1
14805
27048
10228
-1
9408
-1
22874
21370
28300
9408
-1
-1
27048
11325
-1
23472
12936
-1
10228
14846
14805
-1
-1
-1
11325
18794
14805
-1
-1
17506
-1
10228
32493
23472
-1
10228
-1
32576
-1
-1
21010...
Jury's answer
-1
23228
23228
23228
31923
-1
23228
-1
31923
31923
32576
2931
-1
1870
28300
28300
27858
-1
-1
32250
32576
32250
32576
32250
23228
10228
7206
-1
-1
23228
32576
14805
32576
-1
21370
10228
12936
-1
27048
27048
-1
28300
10228
27048
-1
14805
27048
10228
-1
9408
-1
22874
21370
28300
9408
-1
-1
27048
11325
-1
23472
12936
-1
10228
14846
14805
-1
-1
-1
11325
18794
14805
-1
-1
17506
-1
10228
32493
23472
-1
10228
-1
32576
-1
-1
21010...
Checker comment
ok 1784 lines
 
 
7
Time: 15 ms, memory: 3724 KB
Verdict: OK
Input
3000
1 21928
1 24733
2 10964 10964 43248
1 18240
1 4602
1 17176
2 34352 17176 82960
2 54720 6080 89682
2 3040 1520 22713
2 68704 8588 16212
2 4864 608 40861
2 24320 3040 46305
1 24444
2 17176 17176 57624
2 12160 3040 58075
2 65139 32569 18262
1 5191
2 36666 12222 28633
2 48888 4074 94554
1 1523
1 10197
2 3648 3648 32471
2 96317 8756 31759
1 116
1 28181
1 16375
2 65784 10964 88200
2 76748 5482 99062
1 12650
1 13334
2 30360 2530 30177
2 12222 12222 55606
2 66502 22167 12255
...
Participant's output
21928
17176
18240
18240
-1
18240
18240
17176
18240
-1
-1
24444
18240
-1
21928
21928
-1
24444
-1
21928
-1
21928
-1
17176
18240
18240
-1
18240
18240
7620
10197
26969
17176
26969
-1
17176
13334
24444
18240
26969
4602
12650
24444
-1
21928
-1
7620
28516
18240
12650
30096
-1
12810
30096
15110
-1
24444
30096
24444
24444
5863
870
-1
12810
-1
17176
6617
-1
25530
-1
-1
6617
-1
-1
24444
32504
-1
25530
18386
-1
-1
-1
-1
30235
-1
12810...
Jury's answer
21928
17176
18240
18240
-1
18240
18240
17176
18240
-1
-1
24444
18240
-1
21928
21928
-1
24444
-1
21928
-1
21928
-1
17176
18240
18240
-1
18240
18240
7620
10197
26969
17176
26969
-1
17176
13334
24444
18240
26969
4602
12650
24444
-1
21928
-1
7620
28516
18240
12650
30096
-1
12810
30096
15110
-1
24444
30096
24444
24444
5863
870
-1
12810
-1
17176
6617
-1
25530
-1
-1
6617
-1
-1
24444
32504
-1
25530
18386
-1
-1
-1
-1
30235
-1
12810...
Checker comment
ok 1776 lines
 
 
8
Time: 15 ms, memory: 3720 KB
Verdict: OK
Input
3000
1 29780
1 3893
2 46159 1489 87671
1 1821
1 29756
2 59512 29756 98574
2 17868 5956 49045
2 3642 607 17293
2 59512 29756 93717
2 89268 29756 100000
2 10926 1821 9238
2 17868 2978 64156
1 28304
2 9280 464 8326
2 9342 346 40834
1 5562
2 28304 28304 87438
1 3635
1 28806
1 9181
2 99064 14152 100000
2 7076 7076 25326
2 4362 727 12096
2 2781 309 28561
1 23899
1 13234
1 2540
2 11912 1489 71295
2 14152 14152 21887
2 80800 16160 7764
2 28806 4801 85630
1 3290
2 35954 17977 5471
...
Participant's output
29780
29756
29780
1821
29756
-1
-1
29780
-1
29756
28304
-1
-1
3635
5562
29780
-1
-1
28806
-1
2540
-1
-1
29756
28304
-1
-1
29780
7608
19120
19120
19120
13234
29780
23899
9852
29780
28304
-1
28304
-1
19120
-1
23899
3290
-1
11571
13234
13234
2168
-1
7608
2540
10724
9852
-1
9181
9852
19120
9181
10724
12043
-1
31974
15486
9181
15633
19120
21125
-1
19377
10393
15486
29780
13037
14049
31974
6229
19377
23899
29780
-1
-1
-1
14651
3...
Jury's answer
29780
29756
29780
1821
29756
-1
-1
29780
-1
29756
28304
-1
-1
3635
5562
29780
-1
-1
28806
-1
2540
-1
-1
29756
28304
-1
-1
29780
7608
19120
19120
19120
13234
29780
23899
9852
29780
28304
-1
28304
-1
19120
-1
23899
3290
-1
11571
13234
13234
2168
-1
7608
2540
10724
9852
-1
9181
9852
19120
9181
10724
12043
-1
31974
15486
9181
15633
19120
21125
-1
19377
10393
15486
29780
13037
14049
31974
6229
19377
23899
29780
-1
-1
-1
14651
3...
Checker comment
ok 1806 lines
 
 
9
Time: 15 ms, memory: 3688 KB
Verdict: OK
Input
3000
1 22752
2 91008 11376 100000
1 29063
1 28930
1 32681
1 17886
2 11376 11376 60674
2 22752 22752 55025
2 22752 22752 76300
2 22752 11376 22562
2 17064 948 50117
2 17064 5688 62989
1 6902
2 90523 30174 1137
2 26987 26986 21133
1 5307
2 11376 11376 20663
1 24066
2 13272 948 3367
2 22752 22752 59318
1 28273
2 57157 14289 32699
1 3680
2 2528 2528 28072
2 27808 2528 77571
2 9756 1626 39014
1 14783
1 20335
1 23872
2 13804 6902 52166
2 6902 6902 39969
1 3058
2 13804 6902 39678
...
Participant's output
-1
22752
22752
22752
-1
22752
22752
-1
-1
-1
-1
22752
-1
22752
22752
17886
6902
6902
6902
5307
22752
3680
-1
22752
-1
22752
13010
13010
-1
-1
26595
9850
24066
23462
20562
21952
17488
-1
24776
-1
21952
24066
25315
19173
-1
7567
17886
19173
7802
13482
17488
7567
24066
23462
24776
-1
22752
11668
7567
3058
29063
23872
20562
13010
8928
25315
-1
22752
4245
22752
9763
-1
-1
3058
-1
10254
24776
21952
27209
24776
22752
5307
24776
368...
Jury's answer
-1
22752
22752
22752
-1
22752
22752
-1
-1
-1
-1
22752
-1
22752
22752
17886
6902
6902
6902
5307
22752
3680
-1
22752
-1
22752
13010
13010
-1
-1
26595
9850
24066
23462
20562
21952
17488
-1
24776
-1
21952
24066
25315
19173
-1
7567
17886
19173
7802
13482
17488
7567
24066
23462
24776
-1
22752
11668
7567
3058
29063
23872
20562
13010
8928
25315
-1
22752
4245
22752
9763
-1
-1
3058
-1
10254
24776
21952
27209
24776
22752
5307
24776
368...
Checker comment
ok 1769 lines
 
 
10
Time: 15 ms, memory: 3724 KB
Verdict: OK
Input
3000
1 14784
2 59136 14784 76475
2 61617 3243 12511
2 51744 7392 95187
1 12951
2 21585 4317 40908
2 77706 12951 94518
2 12992 448 31858
2 44352 4928 11146
1 20731
2 14784 7392 51528
1 10996
1 20018
2 15400 616 35057
1 9989
1 488
1 11802
2 41462 20731 86647
2 23232 2112 60279
1 16311
2 32648 616 54546
1 15600
2 40036 20018 66203
2 65976 10996 98695
2 29568 14784 63033
2 29568 7392 71851
2 3250 650 12147
2 10996 10996 45335
2 16640 520 48000
2 48613 16204 9115
2 8247 2749 5284
...
Participant's output
14784
-1
14784
12951
12951
14784
-1
14784
14784
20731
14784
14784
20018
10996
14784
14784
-1
10996
15600
-1
-1
14784
-1
15600
15600
29589
-1
15600
-1
-1
14784
14784
-1
19442
11802
15600
14784
-1
12951
15600
14784
19442
14784
19749
12951
14784
25146
15600
11802
-1
19749
16311
-1
-1
-1
15600
-1
5474
488
-1
5474
31248
5474
15600
-1
-1
23338
-1
-1
15600
17346
3610
14784
19442
28880
-1
19749
14784
15600
-1
21447
14784
23338
-1
2...
Jury's answer
14784
-1
14784
12951
12951
14784
-1
14784
14784
20731
14784
14784
20018
10996
14784
14784
-1
10996
15600
-1
-1
14784
-1
15600
15600
29589
-1
15600
-1
-1
14784
14784
-1
19442
11802
15600
14784
-1
12951
15600
14784
19442
14784
19749
12951
14784
25146
15600
11802
-1
19749
16311
-1
-1
-1
15600
-1
5474
488
-1
5474
31248
5474
15600
-1
-1
23338
-1
-1
15600
17346
3610
14784
19442
28880
-1
19749
14784
15600
-1
21447
14784
23338
-1
2...
Checker comment
ok 1841 lines
 
 
11
Time: 15 ms, memory: 3728 KB
Verdict: OK
Input
3000
1 23972
2 71916 23972 98235
2 35958 5993 68118
2 32578 32578 4416
1 12220
2 81766 27255 6519
2 17979 5993 51089
1 12067
1 21882
2 9873 1097 51087
2 21882 21882 70650
1 20508
2 51058 3647 96427
1 21359
1 21226
1 7601
2 59930 11986 98966
2 13672 6836 35329
1 7808
2 6252 1563 17529
1 1452
1 17007
1 26465
2 20508 20508 3947
1 28500
1 15481
2 51021 17007 90691
2 15202 7601 54875
2 47944 23972 83817
1 18230
2 46848 976 16079
2 3418 3418 47721
1 9817
1 30985
1 23796
1 2727...
Participant's output
23972
23972
-1
-1
23972
12067
21882
21882
23972
20508
-1
-1
17007
7601
23972
-1
20508
-1
28500
28500
26465
23972
21882
18230
-1
21882
28500
28500
25439
20508
28500
27412
28500
28500
26465
-1
21882
28500
26465
20454
23796
-1
20454
30985
28784
-1
20454
-1
14432
21882
23796
27279
28500
14432
28784
28500
20454
23796
11201
-1
27250
11660
12220
16496
-1
-1
28500
28784
28287
26940
18084
-1
28500
-1
26940
17007
22230
20454
28500
-1
269...
Jury's answer
23972
23972
-1
-1
23972
12067
21882
21882
23972
20508
-1
-1
17007
7601
23972
-1
20508
-1
28500
28500
26465
23972
21882
18230
-1
21882
28500
28500
25439
20508
28500
27412
28500
28500
26465
-1
21882
28500
26465
20454
23796
-1
20454
30985
28784
-1
20454
-1
14432
21882
23796
27279
28500
14432
28784
28500
20454
23796
11201
-1
27250
11660
12220
16496
-1
-1
28500
28784
28287
26940
18084
-1
28500
-1
26940
17007
22230
20454
28500
-1
269...
Checker comment
ok 1803 lines
 
 
12
Time: 15 ms, memory: 3736 KB
Verdict: OK
Input
3000
1 10302
2 14567 7283 27673
1 26648
1 5856
2 26648 6662 57190
1 22194
2 22692 244 61052
2 43920 1464 66750
2 22194 22194 55266
2 26648 26648 58642
1 16764
2 11176 254 60458
2 30906 10302 49558
2 59404 19801 5819
2 8382 4191 56594
2 4646 202 20424
2 22194 22194 9449
2 16764 16764 6082
1 17375
1 14522
1 398
2 10302 10302 51585
1 27574
2 92202 8382 100000
1 25720
1 8285
1 10701
1 5843
2 20604 10302 60484
1 10113
2 62865 4191 98929
2 16764 16764 53095
2 22194 22194 25122
2...
Participant's output
-1
26648
5856
5856
22194
26648
16764
10302
-1
16764
10302
-1
-1
10302
-1
10302
16764
16764
-1
-1
-1
10302
17375
16764
25720
-1
-1
25720
-1
31353
-1
-1
22059
16015
16015
18955
-1
398
10701
16764
31353
3656
31353
31035
16015
-1
8285
-1
3656
17935
29385
-1
3162
18955
25720
22059
-1
24767
17375
24858
-1
-1
18776
-1
-1
17375
-1
-1
16550
22776
2347
5538
24345
12325
29385
-1
22776
-1
31035
3162
10302
17375
-1
-1
14460
25720
-1
...
Jury's answer
-1
26648
5856
5856
22194
26648
16764
10302
-1
16764
10302
-1
-1
10302
-1
10302
16764
16764
-1
-1
-1
10302
17375
16764
25720
-1
-1
25720
-1
31353
-1
-1
22059
16015
16015
18955
-1
398
10701
16764
31353
3656
31353
31035
16015
-1
8285
-1
3656
17935
29385
-1
3162
18955
25720
22059
-1
24767
17375
24858
-1
-1
18776
-1
-1
17375
-1
-1
16550
22776
2347
5538
24345
12325
29385
-1
22776
-1
31035
3162
10302
17375
-1
-1
14460
25720
-1
...
Checker comment
ok 1795 lines
 
 
13
Time: 15 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 83160
1 98280
1 95760
1 92400
1 55440
1 65520
1 85680
1 75600
1 90720
1 73920
1 87360
1 60480
1 95040
1 50400
1 81900
1 79200
1 69300
1 80640
1 93600
1 70560
1 97020
1 88200
1 84240
1 99792
1 45360
1 71280
1 51480
1 64680
1 96600
1 32760
1 86400
1 46200
1 64260
1 63840
1 91080
1 54600
1 63360
1 78624
1 36960
1 74880
1 78540
1 63000
1 75240
1 52920
1 71400
1 79560
1 88920
1 97440
1 71820
1 86940
1 72072
1 27720
1 79800
1 94248
1 70200
1 30240
...
Participant's output
99998
Jury's answer
99998
Checker comment
ok single line: '99998'
 
 
14
Time: 31 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 83160
1 98280
1 95760
1 92400
1 55440
1 65520
1 85680
1 75600
1 90720
1 73920
1 87360
1 60480
1 95040
1 50400
1 81900
1 79200
1 69300
1 80640
1 93600
1 70560
1 97020
1 88200
1 84240
1 99792
1 45360
1 71280
1 51480
1 64680
1 96600
1 32760
1 86400
1 46200
1 64260
1 63840
1 91080
1 54600
1 63360
1 78624
1 36960
1 74880
1 78540
1 63000
1 75240
1 52920
1 71400
1 79560
1 88920
1 97440
1 71820
1 86940
1 72072
1 27720
1 79800
1 94248
1 70200
1 30240
...
Participant's output
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
...
Jury's answer
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
99999
...
Checker comment
ok 48811 lines
 
 
15
Time: 31 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 12165
1 6211
2 97320 4055 100000
2 59026 5366 24878
2 12165 12165 41049
2 72990 12165 98011
1 32479
1 19732
2 811 811 9208
1 30605
2 9732 2433 25057
1 25239
1 4277
2 20275 4055 26017
2 90896 11362 4017
2 97320 12165 100000
2 14799 4933 44628
2 4055 4055 38132
1 8778
1 15797
2 59944 472 13939
2 26334 2926 60704
2 58733 29366 20868
2 21301 179 32240
1 8194
2 24330 12165 43503
2 31594 15797 66867
1 19293
1 26970
2 23940 266 52547
2 11172 798 40746
2 69062 9866 30963
1...
Participant's output
-1
-1
12165
12165
-1
12165
-1
-1
-1
19732
12165
-1
8778
-1
-1
12165
15797
8778
8778
-1
-1
26970
-1
-1
25239
20174
12165
8194
-1
19293
12165
31232
31232
-1
26970
-1
18504
31232
-1
28427
-1
25239
31232
18504
20174
12165
1781
8778
22060
31232
5360
31232
18504
-1
10434
8778
6211
10434
8778
4277
22060
-1
-1
11185
20174
9825
22060
31232
12165
-1
26970
8778
9825
9825
21240
9825
23516
21240
21240
24420
-1
27034
8778
28775
19293
-1...
Jury's answer
-1
-1
12165
12165
-1
12165
-1
-1
-1
19732
12165
-1
8778
-1
-1
12165
15797
8778
8778
-1
-1
26970
-1
-1
25239
20174
12165
8194
-1
19293
12165
31232
31232
-1
26970
-1
18504
31232
-1
28427
-1
25239
31232
18504
20174
12165
1781
8778
22060
31232
5360
31232
18504
-1
10434
8778
6211
10434
8778
4277
22060
-1
-1
11185
20174
9825
22060
31232
12165
-1
26970
8778
9825
9825
21240
9825
23516
21240
21240
24420
-1
27034
8778
28775
19293
-1...
Checker comment
ok 60054 lines
 
 
16
Time: 31 ms, memory: 3708 KB
Verdict: OK
Input
100000
1 2414
2 26554 2414 45171
1 22074
2 6792 1698 29373
1 26293
1 9438
1 22408
2 74493 837 27471
1 13651
2 20196 187 62337
1 26252
1 31632
2 22074 22074 8675
1 31659
1 3581
1 25094
2 1207 1207 4450
1 4485
1 32585
1 21302
2 9074 9073 20656
2 66222 22074 27359
2 3325 665 55145
2 13455 4485 18491
2 9438 9438 26814
2 37641 12547 81345
2 13651 13651 19865
2 33111 11037 61362
1 7739
1 26281
1 10032
2 24140 1207 38271
2 8970 4485 40517
1 8755
1 25333
1 20491
1 12465
1 1610...
Participant's output
2414
22074
-1
13651
-1
2414
-1
-1
32585
4485
9438
25094
-1
22074
2414
4485
7739
8755
9438
-1
11415
-1
26252
-1
-1
-1
-1
16105
31632
-1
14755
26121
-1
26121
-1
31632
13677
-1
32585
9438
13651
-1
4485
-1
16168
10032
-1
-1
10032
32585
22408
-1
-1
9636
4485
31632
31410
5893
13650
14755
20588
-1
-1
20933
22408
-1
9385
-1
17375
11916
-1
20933
1834
-1
-1
17375
4740
-1
16168
12465
5457
31410
22074
26750
-1
18382
29128
-1
22408
...
Jury's answer
2414
22074
-1
13651
-1
2414
-1
-1
32585
4485
9438
25094
-1
22074
2414
4485
7739
8755
9438
-1
11415
-1
26252
-1
-1
-1
-1
16105
31632
-1
14755
26121
-1
26121
-1
31632
13677
-1
32585
9438
13651
-1
4485
-1
16168
10032
-1
-1
10032
32585
22408
-1
-1
9636
4485
31632
31410
5893
13650
14755
20588
-1
-1
20933
22408
-1
9385
-1
17375
11916
-1
20933
1834
-1
-1
17375
4740
-1
16168
12465
5457
31410
22074
26750
-1
18382
29128
-1
22408
...
Checker comment
ok 59750 lines
 
 
17
Time: 46 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 26384
1 6755
2 13192 13192 47885
2 34144 776 71941
2 6596 6596 60258
2 8106 1351 28672
2 16490 3298 51166
1 24520
2 18747 18746 30419
2 45934 1351 30042
2 39576 3298 85463
2 24520 12260 55788
1 11977
2 9195 3065 17638
2 24520 4904 53818
1 8206
2 29682 1649 85365
2 16412 8206 26840
2 6130 6130 34873
2 24520 24520 66417
1 15433
1 31235
1 16097
1 18765
2 13192 13192 14040
2 35931 11977 49088
2 43038 27 4113
1 17197
1 4800
2 26384 13192 25730
2 3065 3065 36872
2 36927 4...
Participant's output
26384
26384
26384
6755
26384
-1
-1
26384
24520
-1
24520
26384
8206
24520
24520
-1
11977
-1
-1
24520
-1
18765
11977
-1
4800
9831
26384
18765
15433
26384
8206
9831
18765
-1
24520
-1
-1
-1
-1
-1
5783
18025
17197
26855
4800
3408
-1
18616
-1
27468
14924
3408
-1
8206
27468
25135
27468
-1
27468
26855
2913
21409
11977
9831
28772
26384
-1
30072
23261
-1
6644
18616
3408
-1
28772
3456
28772
23261
-1
-1
12225
21981
21981
3456
-1
-1
1...
Jury's answer
26384
26384
26384
6755
26384
-1
-1
26384
24520
-1
24520
26384
8206
24520
24520
-1
11977
-1
-1
24520
-1
18765
11977
-1
4800
9831
26384
18765
15433
26384
8206
9831
18765
-1
24520
-1
-1
-1
-1
-1
5783
18025
17197
26855
4800
3408
-1
18616
-1
27468
14924
3408
-1
8206
27468
25135
27468
-1
27468
26855
2913
21409
11977
9831
28772
26384
-1
30072
23261
-1
6644
18616
3408
-1
28772
3456
28772
23261
-1
-1
12225
21981
21981
3456
-1
-1
1...
Checker comment
ok 59991 lines
 
 
18
Time: 46 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 22586
1 9869
2 59214 9869 10854
2 22089 22089 31232
2 88821 9869 99733
1 15847
2 19738 9869 51178
1 29633
2 15847 15847 18462
2 49345 9869 67015
1 4826
2 4826 4826 30330
2 1964 491 5923
2 9869 9869 38991
1 893
2 38608 4826 56745
2 53232 17744 10157
2 24130 2413 52019
2 39476 9869 56352
2 2413 2413 21346
2 29633 29633 78966
2 45172 22586 87683
1 22871
1 26609
2 7239 2413 40854
1 23147
2 47541 15847 75511
1 24680
2 45172 22586 82945
1 23733
2 15822 7911 24606
2 22586 ...
Participant's output
-1
-1
9869
9869
-1
9869
4826
-1
9869
4826
-1
4826
9869
4826
29633
22586
4826
15847
22586
-1
-1
9869
24680
-1
-1
24680
-1
15847
-1
22455
-1
22455
-1
-1
-1
29633
-1
4826
-1
24680
-1
22455
22455
22455
31140
-1
31140
-1
-1
22455
25827
22455
18011
31140
-1
6763
-1
-1
23759
-1
22455
31140
19901
3344
31140
13824
31140
29633
-1
31140
4500
19006
19006
14046
31140
-1
11902
-1
13824
-1
969
-1
-1
-1
25184
-1
-1
-1
4500
27720
-1
...
Jury's answer
-1
-1
9869
9869
-1
9869
4826
-1
9869
4826
-1
4826
9869
4826
29633
22586
4826
15847
22586
-1
-1
9869
24680
-1
-1
24680
-1
15847
-1
22455
-1
22455
-1
-1
-1
29633
-1
4826
-1
24680
-1
22455
22455
22455
31140
-1
31140
-1
-1
22455
25827
22455
18011
31140
-1
6763
-1
-1
23759
-1
22455
31140
19901
3344
31140
13824
31140
29633
-1
31140
4500
19006
19006
14046
31140
-1
11902
-1
13824
-1
969
-1
-1
-1
25184
-1
-1
-1
4500
27720
-1
...
Checker comment
ok 60028 lines
 
 
19
Time: 46 ms, memory: 3684 KB
Verdict: OK
Input
100000
1 822
2 97768 24442 29229
1 2195
2 26076 26076 17492
1 26142
2 8714 4357 65352
2 70961 14192 13749
2 34856 8714 22745
2 26142 26142 53264
1 276
2 78426 13071 100000
1 29809
2 30499 4357 75968
1 15397
1 18967
2 822 822 1473
1 11979
2 18906 822 47364
1 15468
2 61588 15397 87269
2 15468 3867 33750
2 13071 13071 58079
2 37934 18967 86310
2 52284 8714 90066
1 8885
1 25880
2 39617 173 9179
1 24886
1 22867
1 3137
1 7702
2 11979 11979 32052
2 71170 6470 97350
2 59895 11979 ...
Participant's output
-1
-1
26142
-1
-1
26142
-1
26142
-1
822
15397
15468
26142
18967
26142
-1
11979
25880
-1
25139
7702
26142
-1
-1
-1
-1
-1
30039
15397
15468
3137
3137
25880
-1
-1
15468
-1
-1
19600
-1
4362
15397
-1
-1
26142
25880
-1
-1
-1
-1
13734
-1
24886
-1
31160
15397
9458
6085
11452
25880
-1
13734
-1
-1
-1
17827
11452
2438
-1
5145
28764
24886
9458
9458
27056
15316
-1
-1
-1
19222
-1
-1
30070
-1
30070
23230
5145
26142
19522
-1
13347
-...
Jury's answer
-1
-1
26142
-1
-1
26142
-1
26142
-1
822
15397
15468
26142
18967
26142
-1
11979
25880
-1
25139
7702
26142
-1
-1
-1
-1
-1
30039
15397
15468
3137
3137
25880
-1
-1
15468
-1
-1
19600
-1
4362
15397
-1
-1
26142
25880
-1
-1
-1
-1
13734
-1
24886
-1
31160
15397
9458
6085
11452
25880
-1
13734
-1
-1
-1
17827
11452
2438
-1
5145
28764
24886
9458
9458
27056
15316
-1
-1
-1
19222
-1
-1
30070
-1
30070
23230
5145
26142
19522
-1
13347
-...
Checker comment
ok 59839 lines
 
 
20
Time: 31 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 17934
2 62769 8967 91699
1 21908
2 5477 5477 172
1 14455
2 32862 5477 84587
1 13452
2 17934 17934 47652
1 32712
2 73289 18322 7631
2 21908 21908 46443
2 53808 6726 79478
1 1453
2 40356 6726 83272
1 20759
1 17733
1 25532
2 16356 16356 79422
2 16356 5452 18432
2 98136 32712 30567
2 10904 5452 55159
1 10218
1 24294
1 21698
1 20766
1 8556
2 76635 5109 88626
1 9754
2 18925 5 47056
1 21009
2 49100 1964 6113
2 77656 25885 23101
2 24294 12147 58873
2 43816 21908 80322
1 ...
Participant's output
17934
-1
21908
17934
-1
21908
13452
13452
32712
-1
-1
32712
10218
14455
-1
-1
24294
21908
25532
17934
13452
20759
-1
-1
10218
29792
32712
20766
-1
-1
32712
15073
-1
29792
13452
-1
13452
-1
31830
14455
-1
24294
8556
6562
25065
17934
31830
-1
28458
25532
20759
-1
24294
13452
29792
14455
-1
23013
16767
-1
-1
-1
-1
28458
13452
-1
-1
20759
8556
28458
31830
32712
21009
20766
-1
12768
-1
21698
29792
-1
-1
14455
32712
-1
17733
-1
...
Jury's answer
17934
-1
21908
17934
-1
21908
13452
13452
32712
-1
-1
32712
10218
14455
-1
-1
24294
21908
25532
17934
13452
20759
-1
-1
10218
29792
32712
20766
-1
-1
32712
15073
-1
29792
13452
-1
13452
-1
31830
14455
-1
24294
8556
6562
25065
17934
31830
-1
28458
25532
20759
-1
24294
13452
29792
14455
-1
23013
16767
-1
-1
-1
-1
28458
13452
-1
-1
20759
8556
28458
31830
32712
21009
20766
-1
12768
-1
21698
29792
-1
-1
14455
32712
-1
17733
-1
...
Checker comment
ok 59995 lines
 
 
21
Time: 30 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 30117
1 18917
2 40156 10039 93345
2 10039 10039 67381
2 20078 10039 68648
2 10039 10039 45254
2 56751 18917 82620
2 30117 10039 92024
1 4068
1 29967
1 12356
2 2034 678 3308
2 21264 21263 6452
1 26671
1 4891
1 11894
1 16124
1 15633
2 3892 556 18607
1 21141
2 17005 179 76325
2 46899 15633 62716
1 25083
1 8196
1 14645
1 29797
1 28574
2 15633 5211 41373
2 27198 9066 11885
2 23788 11894 27185
1 7031
2 4068 452 23582
2 12356 6178 36298
1 28877
1 28814
2 18917 18917 58...
Participant's output
30117
30117
30117
30117
18917
30117
-1
-1
-1
26671
15633
15633
-1
-1
4068
12356
18917
4891
-1
11894
-1
7031
8196
4891
7031
11894
4068
14645
29967
-1
11086
18286
8196
-1
-1
25950
14708
29967
25395
11894
7031
14708
26671
4891
25950
-1
22861
14624
-1
5847
26883
15633
13531
14996
-1
-1
4845
25083
-1
8560
14624
-1
-1
21434
28346
25395
20118
16124
7995
25950
-1
25395
-1
8491
-1
25950
4891
25950
21141
28574
25083
25395
14624
-1
17...
Jury's answer
30117
30117
30117
30117
18917
30117
-1
-1
-1
26671
15633
15633
-1
-1
4068
12356
18917
4891
-1
11894
-1
7031
8196
4891
7031
11894
4068
14645
29967
-1
11086
18286
8196
-1
-1
25950
14708
29967
25395
11894
7031
14708
26671
4891
25950
-1
22861
14624
-1
5847
26883
15633
13531
14996
-1
-1
4845
25083
-1
8560
14624
-1
-1
21434
28346
25395
20118
16124
7995
25950
-1
25395
-1
8491
-1
25950
4891
25950
21141
28574
25083
25395
14624
-1
17...
Checker comment
ok 59809 lines
 
 
22
Time: 46 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 28308
2 35385 7077 64454
2 10970 10970 11129
1 12903
2 96211 32070 25059
2 56616 7077 95023
2 8088 674 61363
1 29159
2 4044 4044 30253
2 21231 7077 27944
1 14640
2 47180 9436 81296
2 24400 610 17362
2 56616 7077 93929
1 8245
2 21231 2359 58618
2 51612 12903 30622
2 94524 7877 19872
1 22789
2 51612 12903 78918
1 25976
2 13480 674 54319
2 45578 22789 76875
1 581
2 56616 4044 14157
1 16790
2 7320 3660 50489
2 4880 4880 39766
1 10377
1 28818
2 28308 28308 79955
2 29159 ...
Participant's output
28308
-1
-1
28308
28308
-1
-1
28308
-1
28308
28308
-1
-1
12903
28308
22789
-1
14640
14640
28308
-1
10377
14640
-1
25976
-1
8909
25976
-1
14640
24585
28068
28308
10377
-1
-1
-1
24960
16790
24960
-1
25976
24767
-1
14640
9417
-1
-1
28308
-1
20610
31108
11283
-1
18057
-1
31108
-1
18000
18000
31108
18000
29260
-1
-1
-1
24960
13600
-1
-1
-1
24960
12903
23532
31108
-1
-1
16320
26614
10974
27125
24960
25260
10974
-1
-1
9472
2830...
Jury's answer
28308
-1
-1
28308
28308
-1
-1
28308
-1
28308
28308
-1
-1
12903
28308
22789
-1
14640
14640
28308
-1
10377
14640
-1
25976
-1
8909
25976
-1
14640
24585
28068
28308
10377
-1
-1
-1
24960
16790
24960
-1
25976
24767
-1
14640
9417
-1
-1
28308
-1
20610
31108
11283
-1
18057
-1
31108
-1
18000
18000
31108
18000
29260
-1
-1
-1
24960
13600
-1
-1
-1
24960
12903
23532
31108
-1
-1
16320
26614
10974
27125
24960
25260
10974
-1
-1
9472
2830...
Checker comment
ok 60061 lines
 
 
23
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 12608
2 29944 1576 60529
2 9456 3152 3736
2 74860 788 88891
1 16175
2 31520 3152 51223
2 18912 6304 11644
2 63648 2448 5226
2 31520 6304 9171
2 32350 16175 75383
2 42552 10638 1378
2 3152 3152 32136
1 31299
2 26426 175 19994
1 30841
2 25216 12608 37870
2 56736 6304 11586
1 28084
1 14441
1 32170
2 56168 28084 99434
2 4126 2063 37437
2 56168 7021 87411
2 12608 6304 2380
1 27982
2 15760 1576 24658
2 83946 27982 100000
1 11468
2 19752 1646 58665
2 27758 27757 23762
2 312...
Participant's output
12608
-1
12608
12608
-1
-1
-1
16175
-1
12608
-1
12608
-1
28084
14441
28084
-1
-1
-1
27982
-1
31299
32170
11468
-1
8442
-1
32170
25991
8442
-1
8442
27982
13717
-1
12608
-1
12608
21308
21308
-1
8442
21308
12053
-1
-1
12053
13717
26361
22715
-1
8442
26364
29601
-1
11468
30418
28084
13717
25595
-1
28084
21308
29601
22715
21308
32170
-1
26364
-1
25991
7788
-1
-1
4287
7788
-1
7788
-1
29601
24034
16467
12608
14522
-1
-1
-1
2559...
Jury's answer
12608
-1
12608
12608
-1
-1
-1
16175
-1
12608
-1
12608
-1
28084
14441
28084
-1
-1
-1
27982
-1
31299
32170
11468
-1
8442
-1
32170
25991
8442
-1
8442
27982
13717
-1
12608
-1
12608
21308
21308
-1
8442
21308
12053
-1
-1
12053
13717
26361
22715
-1
8442
26364
29601
-1
11468
30418
28084
13717
25595
-1
28084
21308
29601
22715
21308
32170
-1
26364
-1
25991
7788
-1
-1
4287
7788
-1
7788
-1
29601
24034
16467
12608
14522
-1
-1
-1
2559...
Checker comment
ok 59950 lines
 
 
24
Time: 31 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 17052
2 59682 8526 98742
1 6217
2 17052 17052 39406
2 36709 18354 31903
2 4872 2436 38507
2 92968 13281 27584
2 51156 17052 13192
1 20227
1 16546
2 16546 8273 60111
1 29847
2 52780 812 77994
1 21675
1 21118
1 28327
2 14450 7225 43463
2 8670 4335 42171
2 43519 6217 78885
2 21315 4263 61405
1 2875
2 8273 8273 30107
2 60681 20227 82835
2 84981 28327 100000
2 21118 21118 58363
2 33092 16546 62948
2 16546 16546 47588
1 24714
2 20227 20227 31760
1 5115
2 8092 289 39199
2 ...
Participant's output
17052
17052
-1
17052
-1
-1
16546
17052
21675
21675
6217
17052
16546
20227
-1
21118
16546
16546
-1
21675
-1
5115
-1
-1
29847
-1
-1
-1
5115
-1
7216
25584
24714
17052
-1
25584
17052
-1
20227
21675
-1
18571
18114
25584
-1
-1
23855
-1
23855
21675
30699
-1
27385
25584
14552
22547
25584
-1
24714
-1
17052
13826
25584
17052
24714
24714
-1
14552
-1
29847
24714
-1
32162
21118
25584
28665
-1
5980
-1
-1
28665
-1
-1
-1
-1
23855
5980
2...
Jury's answer
17052
17052
-1
17052
-1
-1
16546
17052
21675
21675
6217
17052
16546
20227
-1
21118
16546
16546
-1
21675
-1
5115
-1
-1
29847
-1
-1
-1
5115
-1
7216
25584
24714
17052
-1
25584
17052
-1
20227
21675
-1
18571
18114
25584
-1
-1
23855
-1
23855
21675
30699
-1
27385
25584
14552
22547
25584
-1
24714
-1
17052
13826
25584
17052
24714
24714
-1
14552
-1
29847
24714
-1
32162
21118
25584
28665
-1
5980
-1
-1
28665
-1
-1
-1
-1
23855
5980
2...
Checker comment
ok 60029 lines
 
 
25
Time: 46 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 26261
2 52522 26261 16560
2 52522 26261 15128
1 22250
1 30105
2 30105 30105 75309
2 44500 22250 96766
1 31326
1 2369
2 15663 681 69621
1 18913
2 8028 2007 48232
2 11125 11125 49446
1 18651
2 10035 3345 29595
2 26700 4450 78108
2 9790 445 37393
2 19135 445 65765
2 26105 5221 85748
2 33375 11125 58892
1 23756
2 20884 10442 64528
2 53520 3345 92255
2 15663 15663 51314
2 15663 15663 76306
2 40140 10035 79099
2 50175 10035 80876
2 20070 10035 65770
2 44500 22250 85932
1 23...
Participant's output
-1
-1
30105
22250
31326
30105
22250
-1
22250
22250
22250
31326
22250
31326
30105
31326
31326
30105
30105
30105
22250
22250
-1
-1
-1
24878
23508
-1
31326
24878
2055
-1
-1
-1
24878
-1
30105
1794
23508
7351
20036
23508
17460
5875
23756
30105
31620
-1
17460
-1
-1
18142
-1
-1
-1
-1
31868
12142
-1
-1
26426
-1
26732
17460
13716
-1
-1
-1
-1
13716
5875
2369
17460
31326
-1
-1
8874
23508
23508
-1
26732
-1
4838
16547
-1
2369
-1
2673...
Jury's answer
-1
-1
30105
22250
31326
30105
22250
-1
22250
22250
22250
31326
22250
31326
30105
31326
31326
30105
30105
30105
22250
22250
-1
-1
-1
24878
23508
-1
31326
24878
2055
-1
-1
-1
24878
-1
30105
1794
23508
7351
20036
23508
17460
5875
23756
30105
31620
-1
17460
-1
-1
18142
-1
-1
-1
-1
31868
12142
-1
-1
26426
-1
26732
17460
13716
-1
-1
-1
-1
13716
5875
2369
17460
31326
-1
-1
8874
23508
23508
-1
26732
-1
4838
16547
-1
2369
-1
2673...
Checker comment
ok 60034 lines
 
 
26
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 8775
2 52650 8775 87853
1 13847
2 13650 325 1918
1 25230
2 42050 8410 12965
2 8410 8410 30401
1 23383
1 10269
2 46766 23383 91834
1 13015
2 93532 23383 100000
2 50460 8410 82114
2 31476 6295 28918
2 45276 7546 32562
2 8775 2925 48848
2 4095 195 26263
2 31949 31948 1870
2 67280 8410 92874
2 20538 10269 53206
2 46561 7760 7142
2 46766 23383 86235
2 46766 23383 84532
2 10269 10269 9429
2 5046 5046 14466
2 8410 4205 58870
2 17550 8775 6569
1 26724
1 849
1 8524
2 70149 23...
Participant's output
8775
-1
-1
-1
23383
-1
25230
-1
-1
8775
8775
-1
25230
10269
-1
23383
23383
-1
-1
25230
-1
23383
23383
-1
-1
-1
19995
-1
-1
26724
25230
25230
-1
23506
26724
-1
25230
21076
19995
28300
25230
28300
10269
-1
25230
-1
27237
28300
13015
8775
25230
-1
26724
-1
19995
25230
-1
10269
-1
18146
28300
18984
18984
-1
-1
27237
8775
21076
-1
-1
8524
23506
-1
-1
-1
-1
6891
27237
-1
-1
24584
21050
5016
4421
5491
4421
5571
10524
-1
-1
-...
Jury's answer
8775
-1
-1
-1
23383
-1
25230
-1
-1
8775
8775
-1
25230
10269
-1
23383
23383
-1
-1
25230
-1
23383
23383
-1
-1
-1
19995
-1
-1
26724
25230
25230
-1
23506
26724
-1
25230
21076
19995
28300
25230
28300
10269
-1
25230
-1
27237
28300
13015
8775
25230
-1
26724
-1
19995
25230
-1
10269
-1
18146
28300
18984
18984
-1
-1
27237
8775
21076
-1
-1
8524
23506
-1
-1
-1
-1
6891
27237
-1
-1
24584
21050
5016
4421
5491
4421
5571
10524
-1
-1
-...
Checker comment
ok 59990 lines
 
 
27
Time: 31 ms, memory: 3680 KB
Verdict: OK
Input
100000
1 20645
2 20645 20645 9492
2 4129 4129 38673
1 22851
1 21713
2 60936 7617 94738
2 20312 2539 47207
1 14149
2 7617 2539 51303
1 511
2 14149 14149 8938
2 17995 5998 11104
1 27999
2 15234 7617 31343
2 28903 4129 74822
1 3643
2 41290 20645 64170
2 55998 27999 91703
2 18666 9333 69368
2 38556 459 72391
2 7617 7617 9301
2 38085 7617 83317
2 21858 3643 41471
2 7617 7617 2038
2 39528 1647 79436
2 34587 1647 85474
2 4941 1647 38374
1 21705
1 9846
1 21261
1 31820
2 63668 1447 9...
Participant's output
-1
20645
22851
22851
22851
-1
-1
-1
20645
20645
27999
27999
27999
-1
22851
3643
-1
27999
27999
27999
21705
14149
9846
-1
31820
31820
14149
31820
14149
31820
29012
12033
-1
-1
-1
12033
-1
-1
3643
31820
29236
-1
-1
9012
-1
14149
-1
12033
-1
-1
31820
-1
9012
23187
-1
-1
6571
16863
-1
20892
13030
9846
-1
16863
-1
-1
20892
-1
11271
-1
11271
12866
29012
9846
-1
-1
22618
27999
-1
31820
20277
24748
10935
-1
20277
11896
25592
138...
Jury's answer
-1
20645
22851
22851
22851
-1
-1
-1
20645
20645
27999
27999
27999
-1
22851
3643
-1
27999
27999
27999
21705
14149
9846
-1
31820
31820
14149
31820
14149
31820
29012
12033
-1
-1
-1
12033
-1
-1
3643
31820
29236
-1
-1
9012
-1
14149
-1
12033
-1
-1
31820
-1
9012
23187
-1
-1
6571
16863
-1
20892
13030
9846
-1
16863
-1
-1
20892
-1
11271
-1
11271
12866
29012
9846
-1
-1
22618
27999
-1
31820
20277
24748
10935
-1
20277
11896
25592
138...
Checker comment
ok 59961 lines
 
 
28
Time: 31 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 15063
2 45189 15063 14028
2 30126 15063 77048
2 30126 15063 58695
2 54529 18176 14864
1 25400
2 15063 5021 16806
2 38859 19429 28411
2 25400 25400 69830
1 29181
1 16283
2 29181 29181 83507
2 28194 28193 23962
1 13732
2 35147 5021 69817
2 17780 2540 51399
2 57733 1698 546
1 20020
1 21093
1 21686
1 14221
2 25400 25400 77498
2 27940 2540 28109
1 14868
1 12487
2 25400 25400 18124
2 28834 14417 1084
1 31228
2 7434 2478 38749
2 25400 6350 80106
2 74585 14917 493
2 31228 1...
Participant's output
-1
15063
15063
-1
-1
-1
25400
29181
-1
15063
25400
-1
25400
-1
-1
-1
14868
25400
-1
31228
-1
-1
7480
20020
25400
25400
13732
29181
-1
13732
-1
-1
-1
25400
25400
5332
-1
7480
-1
27201
-1
-1
-1
31228
-1
7480
21093
-1
-1
20020
-1
14868
27965
-1
3205
-1
7480
25400
20778
20020
21686
-1
-1
13732
14868
20010
-1
14586
5332
20010
-1
14868
20010
-1
17516
4140
25882
21686
17516
28660
23598
31228
5332
-1
-1
20375
25400
-1
23598
-1...
Jury's answer
-1
15063
15063
-1
-1
-1
25400
29181
-1
15063
25400
-1
25400
-1
-1
-1
14868
25400
-1
31228
-1
-1
7480
20020
25400
25400
13732
29181
-1
13732
-1
-1
-1
25400
25400
5332
-1
7480
-1
27201
-1
-1
-1
31228
-1
7480
21093
-1
-1
20020
-1
14868
27965
-1
3205
-1
7480
25400
20778
20020
21686
-1
-1
13732
14868
20010
-1
14586
5332
20010
-1
14868
20010
-1
17516
4140
25882
21686
17516
28660
23598
31228
5332
-1
-1
20375
25400
-1
23598
-1...
Checker comment
ok 60009 lines
 
 
29
Time: 15 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 13600
2 13600 13600 46726
1 10448
1 4761
1 14772
2 68000 13600 95870
2 73860 14772 30427
1 8689
2 29458 29458 23384
2 39392 4924 70608
2 14932 14931 12400
1 484
2 19044 4761 29282
1 9099
1 23392
2 59840 680 74291
2 70176 23392 95851
2 3267 121 25174
2 14772 14772 56119
2 11696 5848 56456
2 41792 10448 67613
1 1300
2 84458 242 87358
1 904
2 32017 8004 18707
2 47611 5290 28678
1 28187
1 10354
2 83708 2462 98888
2 24620 2462 60706
1 18902
1 31264
2 13600 6800 57292
2...
Participant's output
13600
13600
-1
-1
14772
-1
4761
13600
23392
484
14772
23392
10448
484
-1
-1
14772
14772
13600
-1
9099
23505
14772
-1
-1
13600
13600
14772
13600
-1
484
-1
-1
10354
18902
31264
13600
10448
13917
23392
14772
-1
9099
-1
18035
18035
-1
13767
20530
13600
19250
-1
13600
10338
12124
-1
13767
23392
10448
-1
7109
12124
26862
18902
22826
22826
111
14772
19250
26862
-1
7815
14772
13600
28786
32425
-1
27657
16845
7815
26862
-1
-1
13600
...
Jury's answer
13600
13600
-1
-1
14772
-1
4761
13600
23392
484
14772
23392
10448
484
-1
-1
14772
14772
13600
-1
9099
23505
14772
-1
-1
13600
13600
14772
13600
-1
484
-1
-1
10354
18902
31264
13600
10448
13917
23392
14772
-1
9099
-1
18035
18035
-1
13767
20530
13600
19250
-1
13600
10338
12124
-1
13767
23392
10448
-1
7109
12124
26862
18902
22826
22826
111
14772
19250
26862
-1
7815
14772
13600
28786
32425
-1
27657
16845
7815
26862
-1
-1
13600
...
Checker comment
ok 59934 lines
 
 
30
Time: 46 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 31190
1 2733
2 5466 2733 36687
2 46461 2733 60056
2 31190 15595 93402
2 31190 15595 73882
2 15595 15595 19656
1 26711
2 911 911 26017
1 18126
2 20140 2014 43661
2 24270 24269 6915
2 15595 15595 75759
2 49194 2733 56390
1 15941
2 29264 29264 25834
1 23451
1 31442
2 36252 6042 69951
1 21359
1 6966
2 15595 15595 49469
1 20391
2 24472 24472 2948
1 13431
1 29977
2 36252 9063 55913
2 11610 2322 42112
2 38262 2733 59800
1 16035
2 8056 2014 46185
2 21380 5345 69266
2 1643 ...
Participant's output
2733
2733
31190
31190
-1
2733
18126
-1
31190
2733
-1
18126
31190
-1
18126
6966
2733
18126
16035
21359
-1
18126
23451
31190
-1
-1
26711
-1
26711
16035
6966
20391
-1
1208
20218
6966
18126
30291
21359
-1
-1
31032
26780
-1
31032
16396
6966
18126
-1
-1
29960
13431
28421
20218
-1
-1
-1
8388
17793
16035
7272
26780
-1
-1
31190
29150
-1
30291
-1
29960
-1
-1
10833
29150
8388
-1
30788
18424
7272
12217
-1
18424
26780
-1
20391
-1
-1
...
Jury's answer
2733
2733
31190
31190
-1
2733
18126
-1
31190
2733
-1
18126
31190
-1
18126
6966
2733
18126
16035
21359
-1
18126
23451
31190
-1
-1
26711
-1
26711
16035
6966
20391
-1
1208
20218
6966
18126
30291
21359
-1
-1
31032
26780
-1
31032
16396
6966
18126
-1
-1
29960
13431
28421
20218
-1
-1
-1
8388
17793
16035
7272
26780
-1
-1
31190
29150
-1
30291
-1
29960
-1
-1
10833
29150
8388
-1
30788
18424
7272
12217
-1
18424
26780
-1
20391
-1
-1
...
Checker comment
ok 60027 lines
 
 
31
Time: 31 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 5711
2 5711 5711 40368
1 25109
2 25109 25109 79355
1 1804
1 1221
1 15117
2 14348 3587 71286
1 13520
2 30234 5039 52632
2 2392 104 19625
2 12844 338 57525
2 27040 13520 46467
2 40560 13520 72949
1 12793
1 23767
2 55569 3473 24961
1 25133
2 50700 3380 10773
1 4758
2 12793 12793 51876
1 31369
1 31156
2 76758 12793 90659
1 7542
2 37180 338 13114
2 35448 1477 75617
2 12675 845 50877
1 12549
2 21648 451 54852
2 8856 164 24895
1 21144
1 24517
2 20280 3380 41911
1 23871
...
Participant's output
5711
25109
25109
15117
13520
13520
13520
13520
-1
-1
12793
12793
-1
25109
13520
1804
1804
13520
21144
13520
-1
21144
23871
7542
7542
21144
18948
-1
-1
25109
-1
4758
-1
-1
-1
18948
18948
13520
12549
18948
4758
-1
-1
21144
-1
-1
21144
12549
7542
12418
-1
13520
31369
-1
7209
15117
13520
-1
15117
29800
-1
16545
8524
-1
32676
23767
31156
-1
-1
14919
13520
8524
7209
32676
1221
25109
28786
12549
19010
12418
1028
-1
-1
-1
13520
-1...
Jury's answer
5711
25109
25109
15117
13520
13520
13520
13520
-1
-1
12793
12793
-1
25109
13520
1804
1804
13520
21144
13520
-1
21144
23871
7542
7542
21144
18948
-1
-1
25109
-1
4758
-1
-1
-1
18948
18948
13520
12549
18948
4758
-1
-1
21144
-1
-1
21144
12549
7542
12418
-1
13520
31369
-1
7209
15117
13520
-1
15117
29800
-1
16545
8524
-1
32676
23767
31156
-1
-1
14919
13520
8524
7209
32676
1221
25109
28786
12549
19010
12418
1028
-1
-1
-1
13520
-1...
Checker comment
ok 59947 lines
 
 
32
Time: 31 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 20300
1 14120
1 30913
2 92739 30913 100000
1 7007
1 13117
1 22842
2 27720 140 54027
2 70095 14019 23764
2 10590 3530 4637
1 2181
2 13117 13117 804
1 29380
1 29026
2 7007 1001 4528
2 3530 3530 21234
2 24360 2030 5698
1 26565
1 20856
2 26565 8855 55964
1 13171
2 64362 1262 97989
2 10428 3476 5768
2 30450 10150 8335
2 93192 1412 100000
1 8802
2 29546 1738 61763
2 88020 8802 97282
1 15726
2 11421 11421 9471
2 26565 26565 84285
1 5305
2 20300 20300 71407
2 26565 26565 ...
Participant's output
-1
20300
-1
-1
-1
-1
14120
-1
26565
29026
-1
-1
-1
20856
8802
-1
26565
20300
-1
-1
-1
23674
22842
-1
14238
14120
8802
-1
-1
-1
-1
20856
22842
19468
14238
-1
22842
14238
14238
-1
-1
15726
-1
22842
30435
-1
14896
14238
-1
20856
8802
8802
-1
-1
19468
-1
10763
14238
26565
-1
26565
27792
-1
15726
-1
14896
20389
20856
9422
7007
-1
20856
20300
-1
28205
-1
14238
18060
27510
6248
29380
-1
23623
24800
9180
-1
-1
20856
-1
-1
-1
...
Jury's answer
-1
20300
-1
-1
-1
-1
14120
-1
26565
29026
-1
-1
-1
20856
8802
-1
26565
20300
-1
-1
-1
23674
22842
-1
14238
14120
8802
-1
-1
-1
-1
20856
22842
19468
14238
-1
22842
14238
14238
-1
-1
15726
-1
22842
30435
-1
14896
14238
-1
20856
8802
8802
-1
-1
19468
-1
10763
14238
26565
-1
26565
27792
-1
15726
-1
14896
20389
20856
9422
7007
-1
20856
20300
-1
28205
-1
14238
18060
27510
6248
29380
-1
23623
24800
9180
-1
-1
20856
-1
-1
-1
...
Checker comment
ok 60151 lines
 
 
33
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 20025
2 20025 20025 61875
2 80100 20025 100000
1 22598
2 33897 11299 81794
2 16425 225 57963
1 4076
1 14911
2 62159 1019 8369
2 19499 1147 20451
2 60058 30029 29862
2 6448 403 31507
2 74386 2755 4572
2 45196 22598 9177
2 11299 11299 40762
2 11299 11299 41301
2 79888 9986 23756
2 66750 2225 22153
1 17476
2 21845 4369 51412
1 6431
1 22819
2 67794 22598 97570
2 25724 6431 37085
2 78642 8738 98408
2 57879 6431 78213
2 8738 8738 39286
2 44055 4005 86889
1 6040
2 22598 2259...
Participant's output
20025
-1
22598
20025
-1
-1
-1
14911
-1
-1
22598
22598
-1
-1
17476
22598
6431
17476
6431
17476
20025
22598
-1
4076
4076
14911
18380
6431
-1
31786
31786
16849
-1
-1
-1
6431
5830
31434
13760
-1
22598
13760
31434
28705
18380
6040
-1
-1
18380
31434
12710
12710
31434
-1
-1
-1
-1
32580
26394
28316
16849
12710
20025
-1
-1
12710
-1
31434
31434
124
18380
21372
28316
12710
17476
25572
-1
12710
-1
18380
5830
5830
-1
22598
-1
12710
14...
Jury's answer
20025
-1
22598
20025
-1
-1
-1
14911
-1
-1
22598
22598
-1
-1
17476
22598
6431
17476
6431
17476
20025
22598
-1
4076
4076
14911
18380
6431
-1
31786
31786
16849
-1
-1
-1
6431
5830
31434
13760
-1
22598
13760
31434
28705
18380
6040
-1
-1
18380
31434
12710
12710
31434
-1
-1
-1
-1
32580
26394
28316
16849
12710
20025
-1
-1
12710
-1
31434
31434
124
18380
21372
28316
12710
17476
25572
-1
12710
-1
18380
5830
5830
-1
22598
-1
12710
14...
Checker comment
ok 60088 lines
 
 
34
Time: 15 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 1669
2 6676 1669 27269
1 18914
2 87125 21781 223
2 18914 18914 62350
1 9630
2 9618 14 41426
2 92280 18456 24941
2 64791 12958 9540
1 11362
1 12399
1 25950
2 25950 25950 1045
2 37828 18914 65719
2 12975 12975 52240
2 10808 2702 35261
2 2123 193 21077
1 18931
1 5596
1 24053
2 4815 1605 17552
2 5190 865 32691
1 2822
2 18914 18914 44048
2 8650 8650 42403
2 17300 4325 47486
2 46710 5190 73561
2 7785 2595 35389
2 61556 5596 93696
2 72748 5596 83276
2 29722 1351 75080
1 60...
Participant's output
1669
-1
18914
18914
-1
-1
-1
18914
25950
18914
18914
9630
25950
18914
25950
25950
25950
25950
5596
5596
18914
25950
18439
-1
-1
-1
24053
30636
30636
-1
-1
9630
-1
-1
9828
26328
25950
-1
24053
30636
6060
-1
5596
-1
-1
28600
-1
11362
30636
-1
-1
8148
-1
-1
18914
30636
-1
30636
-1
30636
18309
-1
31726
14864
24048
10373
-1
12399
14864
28600
28600
30636
-1
5125
16789
11362
28600
-1
9630
26873
26873
18914
18914
-1
-1
-1
24048
...
Jury's answer
1669
-1
18914
18914
-1
-1
-1
18914
25950
18914
18914
9630
25950
18914
25950
25950
25950
25950
5596
5596
18914
25950
18439
-1
-1
-1
24053
30636
30636
-1
-1
9630
-1
-1
9828
26328
25950
-1
24053
30636
6060
-1
5596
-1
-1
28600
-1
11362
30636
-1
-1
8148
-1
-1
18914
30636
-1
30636
-1
30636
18309
-1
31726
14864
24048
10373
-1
12399
14864
28600
28600
30636
-1
5125
16789
11362
28600
-1
9630
26873
26873
18914
18914
-1
-1
-1
24048
...
Checker comment
ok 60045 lines
 
 
35
Time: 31 ms, memory: 3740 KB
Verdict: OK
Input
100000
1 14610
2 9740 4870 28538
2 14610 14610 50455
1 21987
1 3962
1 7876
2 87948 21987 100000
1 6434
2 52805 179 30723
2 21915 7305 66001
1 10143
1 28104
1 10437
2 13772 13772 31155
2 28104 28104 20514
1 17101
2 21987 21987 75496
2 93933 10437 100000
2 80119 13353 32601
2 40096 716 54730
2 11814 1969 47078
2 2898 483 23272
2 17532 2922 10931
2 19480 4870 56985
1 19598
1 11215
2 9368 4684 23749
2 14052 4684 72837
1 16531
2 56208 28104 85519
1 9109
2 23206 566 28300
2 40572...
Participant's output
14610
14610
-1
-1
14610
-1
-1
21987
-1
-1
7876
7876
10143
-1
14610
-1
28104
28104
3962
10143
19598
28104
-1
2801
-1
10143
-1
28104
-1
7225
21987
-1
11215
6211
-1
-1
5559
6434
21079
7876
-1
14203
-1
18849
-1
949
18849
19598
28104
-1
-1
16531
-1
6434
5559
-1
6211
27636
4484
-1
6434
-1
9109
27636
22566
-1
27636
-1
-1
-1
23724
-1
10143
31516
12094
22566
-1
21987
17230
6211
-1
27636
-1
-1
10143
-1
-1
-1
-1
-1
2801
14203
...
Jury's answer
14610
14610
-1
-1
14610
-1
-1
21987
-1
-1
7876
7876
10143
-1
14610
-1
28104
28104
3962
10143
19598
28104
-1
2801
-1
10143
-1
28104
-1
7225
21987
-1
11215
6211
-1
-1
5559
6434
21079
7876
-1
14203
-1
18849
-1
949
18849
19598
28104
-1
-1
16531
-1
6434
5559
-1
6211
27636
4484
-1
6434
-1
9109
27636
22566
-1
27636
-1
-1
-1
23724
-1
10143
31516
12094
22566
-1
21987
17230
6211
-1
27636
-1
-1
10143
-1
-1
-1
-1
-1
2801
14203
...
Checker comment
ok 59938 lines
 
 
36
Time: 46 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 3170
2 6340 3170 23829
2 19020 3170 2287
2 68255 6205 5853
2 31700 3170 35235
2 28530 3170 18661
2 50720 3170 77567
1 21951
2 29268 7317 76982
1 2012
2 73170 7317 27446
1 32669
2 43902 21951 1729
2 4667 4667 16909
1 32327
2 55475 1585 83502
1 26560
1 25180
2 78673 13112 23355
2 7128 27 15505
2 12590 12590 64162
2 21248 5312 61946
2 4667 4667 63594
2 17073 2439 63735
2 55396 5036 84265
2 9334 4667 65204
1 25510
2 21951 21951 74097
2 21951 21951 68430
2 16977 4244 15888...
Participant's output
3170
-1
-1
3170
-1
3170
21951
-1
-1
-1
3170
-1
-1
25180
26560
32669
21951
25180
32669
21951
21951
-1
-1
25180
25180
25180
3170
32669
21951
17422
25180
-1
-1
6390
6340
25180
25180
-1
-1
25180
-1
17422
25180
5288
-1
26560
13585
2012
6340
-1
-1
21951
-1
-1
18107
-1
-1
-1
32669
-1
-1
17422
19137
20412
29346
12560
-1
20412
6390
26560
2012
-1
-1
6390
3170
-1
20412
12560
6390
7905
-1
-1
-1
-1
32669
-1
1900
2012
-1
12560
6390...
Jury's answer
3170
-1
-1
3170
-1
3170
21951
-1
-1
-1
3170
-1
-1
25180
26560
32669
21951
25180
32669
21951
21951
-1
-1
25180
25180
25180
3170
32669
21951
17422
25180
-1
-1
6390
6340
25180
25180
-1
-1
25180
-1
17422
25180
5288
-1
26560
13585
2012
6340
-1
-1
21951
-1
-1
18107
-1
-1
-1
32669
-1
-1
17422
19137
20412
29346
12560
-1
20412
6390
26560
2012
-1
-1
6390
3170
-1
20412
12560
6390
7905
-1
-1
-1
-1
32669
-1
1900
2012
-1
12560
6390...
Checker comment
ok 59904 lines
 
 
37
Time: 30 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 14801
1 14191
1 8398
1 18184
2 51493 221 2429
1 28449
2 19127 617 60894
2 34771 3161 64972
1 29294
2 8398 8398 42718
1 5194
2 16796 4199 35918
2 67227 22409 8978
2 2273 2273 31839
2 27276 9092 54093
2 2522 194 50262
1 25235
1 3620
2 28449 28449 71857
1 14936
1 25019
2 16796 8398 25342
2 85146 14191 99655
2 56392 742 12278
2 23373 2597 41383
1 18521
2 41630 1810 16269
2 71060 646 8622
1 21943
1 28606
2 14420 3605 16116
2 21943 21943 75382
2 28382 14191 73539
2 3636...
Participant's output
-1
14191
28449
8398
8398
-1
18184
18184
29294
28449
8398
14191
-1
5194
-1
-1
-1
21943
14191
-1
-1
25019
8398
14191
25235
22395
19476
16260
25235
-1
477
-1
14191
16260
22395
477
-1
3620
12207
-1
-1
17933
-1
19928
14936
-1
-1
-1
1790
4598
-1
4598
8914
-1
28449
-1
17933
25551
-1
11688
21690
29294
-1
-1
8398
16260
5194
16063
7219
23710
21195
-1
-1
14191
-1
-1
-1
7350
12397
-1
28752
17220
-1
3390
8914
-1
-1
-1
4504
-1
8398...
Jury's answer
-1
14191
28449
8398
8398
-1
18184
18184
29294
28449
8398
14191
-1
5194
-1
-1
-1
21943
14191
-1
-1
25019
8398
14191
25235
22395
19476
16260
25235
-1
477
-1
14191
16260
22395
477
-1
3620
12207
-1
-1
17933
-1
19928
14936
-1
-1
-1
1790
4598
-1
4598
8914
-1
28449
-1
17933
25551
-1
11688
21690
29294
-1
-1
8398
16260
5194
16063
7219
23710
21195
-1
-1
14191
-1
-1
-1
7350
12397
-1
28752
17220
-1
3390
8914
-1
-1
-1
4504
-1
8398...
Checker comment
ok 59948 lines
 
 
38
Time: 46 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 32002
2 96006 16001 100000
1 19217
1 8274
2 41912 20956 25586
1 4005
2 5910 394 4327
2 13790 2758 2363
2 24822 8274 55578
2 22458 1182 13856
2 22403 11201 17056
2 5910 1182 40106
2 20114 89 16998
2 46725 445 25675
2 57651 19217 89129
2 41370 8274 25884
2 32002 16001 68977
1 16471
1 18485
1 10882
2 59998 29999 10286
2 8274 8274 7140
1 31685
1 17431
2 16001 16001 48690
1 1775
2 67551 267 30396
2 10882 10882 2663
1 26876
2 84724 28241 19790
1 17959
2 40314 13438 77581
...
Participant's output
-1
-1
-1
-1
8274
-1
-1
8274
-1
-1
19217
-1
32002
-1
-1
32002
-1
-1
-1
26876
-1
22848
-1
-1
22848
-1
6259
22848
-1
-1
14754
-1
-1
4005
8274
-1
-1
-1
14754
31685
32002
28662
-1
-1
10882
20846
8274
-1
14754
-1
10882
31862
2592
22848
-1
-1
-1
9468
3313
9468
-1
10882
9468
-1
14754
-1
8274
-1
4005
22848
14970
-1
-1
4729
3318
-1
-1
2592
6259
16471
-1
4005
19217
-1
22848
14754
9468
-1
2748
22848
-1
17268
26236
31685
9468
...
Jury's answer
-1
-1
-1
-1
8274
-1
-1
8274
-1
-1
19217
-1
32002
-1
-1
32002
-1
-1
-1
26876
-1
22848
-1
-1
22848
-1
6259
22848
-1
-1
14754
-1
-1
4005
8274
-1
-1
-1
14754
31685
32002
28662
-1
-1
10882
20846
8274
-1
14754
-1
10882
31862
2592
22848
-1
-1
-1
9468
3313
9468
-1
10882
9468
-1
14754
-1
8274
-1
4005
22848
14970
-1
-1
4729
3318
-1
-1
2592
6259
16471
-1
4005
19217
-1
22848
14754
9468
-1
2748
22848
-1
17268
26236
31685
9468
...
Checker comment
ok 59882 lines
 
 
39
Time: 46 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 9960
1 17823
2 15936 1992 54271
2 47528 5941 90304
2 79866 26622 12084
1 14229
2 35646 17823 71046
1 20578
2 61734 20578 93112
2 9486 4743 25769
2 9960 9960 38894
2 20578 20578 63529
2 41156 20578 84513
2 2490 2490 28584
1 19913
1 9782
2 20578 20578 68334
2 39128 9782 29036
2 19564 9782 59970
1 1919
2 9486 4743 54741
2 4743 4743 46151
2 26690 26690 12742
1 14494
1 10994
1 21301
2 53286 83 93274
1 14696
2 48910 9782 28436
1 27339
1 9754
2 36452 9113 77832
2 88215 29...
Participant's output
9960
17823
-1
17823
20578
14229
9960
20578
20578
9960
20578
-1
9782
14229
14229
-1
9960
-1
27339
-1
14229
27339
20578
9754
14494
14494
24254
9540
9960
17823
9960
9540
-1
-1
14229
-1
14494
17823
-1
-1
-1
14494
29500
30600
-1
30600
-1
9540
29500
10994
14696
-1
14229
-1
-1
9540
22374
14696
24254
-1
10994
-1
-1
-1
9540
27339
31318
8153
29500
-1
-1
24254
-1
-1
14229
-1
-1
22374
10994
-1
19913
9960
28674
-1
-1
30600
-1
26859
...
Jury's answer
9960
17823
-1
17823
20578
14229
9960
20578
20578
9960
20578
-1
9782
14229
14229
-1
9960
-1
27339
-1
14229
27339
20578
9754
14494
14494
24254
9540
9960
17823
9960
9540
-1
-1
14229
-1
14494
17823
-1
-1
-1
14494
29500
30600
-1
30600
-1
9540
29500
10994
14696
-1
14229
-1
-1
9540
22374
14696
24254
-1
10994
-1
-1
-1
9540
27339
31318
8153
29500
-1
-1
24254
-1
-1
14229
-1
-1
22374
10994
-1
19913
9960
28674
-1
-1
30600
-1
26859
...
Checker comment
ok 59834 lines
 
 
40
Time: 30 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 30868
1 20005
1 9553
2 30868 30868 92125
2 23151 7717 77349
2 30868 30868 5610
1 14101
1 6116
2 7717 7717 39820
1 12345
2 20005 4001 5867
2 62689 1529 73925
1 20858
2 88211 17642 29667
1 18780
1 30284
2 7571 7571 62961
2 16790 8395 29734
2 90852 30284 100000
1 3314
2 45426 7571 1773
1 13850
2 12232 6116 33117
2 74070 12345 25669
2 9390 4695 43745
1 31720
2 36478 1586 73726
1 11572
2 22570 610 75656
1 32713
2 9390 4695 51496
2 95316 8665 13526
2 6344 6344 67776
2 6...
Participant's output
30868
30868
-1
30868
-1
6116
-1
30284
-1
-1
-1
6116
-1
18780
31720
31720
18780
-1
31720
13850
18780
-1
-1
13485
12345
-1
24350
32271
6116
28912
-1
19950
-1
13485
11572
24350
13850
-1
24350
-1
30284
-1
26635
-1
-1
32718
-1
-1
32271
28912
-1
24302
13485
32271
-1
25503
20005
18780
-1
-1
11572
26635
-1
20858
24350
18780
19950
11572
-1
23150
-1
-1
17935
-1
-1
3936
19950
9553
10745
-1
4400
20005
-1
-1
4400
27840
17766
-1
-1
...
Jury's answer
30868
30868
-1
30868
-1
6116
-1
30284
-1
-1
-1
6116
-1
18780
31720
31720
18780
-1
31720
13850
18780
-1
-1
13485
12345
-1
24350
32271
6116
28912
-1
19950
-1
13485
11572
24350
13850
-1
24350
-1
30284
-1
26635
-1
-1
32718
-1
-1
32271
28912
-1
24302
13485
32271
-1
25503
20005
18780
-1
-1
11572
26635
-1
20858
24350
18780
19950
11572
-1
23150
-1
-1
17935
-1
-1
3936
19950
9553
10745
-1
4400
20005
-1
-1
4400
27840
17766
-1
-1
...
Checker comment
ok 60181 lines
 
 
41
Time: 46 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 17811
1 3744
1 24444
2 24444 8148 79638
2 16296 8148 56040
2 24444 24444 26280
1 8188
2 12222 12222 15001
2 48888 12222 86984
1 31496
1 20304
1 16202
2 3556 508 8012
2 22315 11157 10014
1 4991
2 52380 1746 84368
2 33840 6768 67486
2 31356 468 48405
2 24444 24444 80559
1 24244
1 28663
1 823
1 2607
2 9982 4991 46830
2 20304 6768 31520
2 38916 1692 69216
2 81216 20304 100000
1 15071
2 16565 8282 18791
2 13536 6768 40108
1 20932
1 26061
1 10160
2 86614 7874 30638
1 1...
Participant's output
24444
24444
-1
-1
24444
-1
-1
24444
20304
3744
24444
4991
-1
20304
-1
-1
20304
-1
-1
16202
24244
-1
-1
15071
823
-1
24244
4991
22306
-1
11744
17270
23733
-1
8188
20038
17270
26061
20304
15071
-1
20304
-1
24444
22849
3744
-1
-1
23412
26061
9246
20304
26061
20038
17270
20304
20304
3744
20304
-1
31496
20038
24444
-1
17811
-1
-1
-1
20304
-1
-1
17646
16133
26061
22849
-1
-1
7607
23412
19376
19376
26076
-1
-1
-1
13278
-1
-1
2...
Jury's answer
24444
24444
-1
-1
24444
-1
-1
24444
20304
3744
24444
4991
-1
20304
-1
-1
20304
-1
-1
16202
24244
-1
-1
15071
823
-1
24244
4991
22306
-1
11744
17270
23733
-1
8188
20038
17270
26061
20304
15071
-1
20304
-1
24444
22849
3744
-1
-1
23412
26061
9246
20304
26061
20038
17270
20304
20304
3744
20304
-1
31496
20038
24444
-1
17811
-1
-1
-1
20304
-1
-1
17646
16133
26061
22849
-1
-1
7607
23412
19376
19376
26076
-1
-1
-1
13278
-1
-1
2...
Checker comment
ok 60220 lines
 
 
42
Time: 46 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 12473
2 50942 25471 16005
1 24828
2 24828 6207 78648
1 10833
2 86518 28839 11771
1 7752
2 49656 24828 75038
2 24828 24828 81670
2 31035 6207 68287
1 15830
1 10807
1 17510
2 3230 646 30803
1 20256
2 26586 1266 68811
2 70040 17510 87747
1 23719
2 43449 6207 73159
2 7752 7752 29984
2 70147 23382 729
2 10128 10128 41734
1 20853
1 30145
1 10568
2 12058 6029 50958
2 90363 6951 100000
1 4394
2 30145 30145 90149
1 6551
1 21613
1 4444
2 20853 20853 60527
2 15504 7752 38819...
Participant's output
-1
24828
-1
24828
24828
24828
7752
20256
17510
24828
7752
-1
20256
30145
-1
30145
20853
7752
-1
15339
-1
-1
-1
15830
17510
7752
7752
20256
5882
-1
20256
7752
7752
24828
-1
14972
17510
-1
24828
20682
14972
-1
20256
19338
24828
7610
19338
10833
-1
20853
19338
12079
20256
20853
15350
-1
-1
15350
4628
19338
19338
-1
20853
-1
-1
19338
27537
14972
11939
-1
4394
20682
-1
24046
22633
10807
14972
11939
-1
14972
2296
-1
24828
15830
2...
Jury's answer
-1
24828
-1
24828
24828
24828
7752
20256
17510
24828
7752
-1
20256
30145
-1
30145
20853
7752
-1
15339
-1
-1
-1
15830
17510
7752
7752
20256
5882
-1
20256
7752
7752
24828
-1
14972
17510
-1
24828
20682
14972
-1
20256
19338
24828
7610
19338
10833
-1
20853
19338
12079
20256
20853
15350
-1
-1
15350
4628
19338
19338
-1
20853
-1
-1
19338
27537
14972
11939
-1
4394
20682
-1
24046
22633
10807
14972
11939
-1
14972
2296
-1
24828
15830
2...
Checker comment
ok 59924 lines
 
 
43
Time: 31 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 18954
1 19847
1 22572
1 22420
2 8037 171 45831
1 1457
2 1254 627 29231
2 18954 9477 32126
2 82764 7524 32058
2 66339 9477 15243
2 8742 1457 22616
1 28446
1 3927
1 4730
1 7052
1 22288
1 29224
2 66339 9477 23791
2 28446 28446 79739
2 26904 4484 81895
2 4212 2106 4062
2 75816 6318 97303
2 56892 28446 88066
1 19687
2 33432 11144 64604
2 52001 13000 21513
2 40356 2242 75664
1 31333
1 30797
1 11604
2 14612 14612 67121
2 22288 22288 65734
2 7524 2508 15095
2 53637 26818 ...
Participant's output
22572
22572
-1
-1
-1
1457
-1
28446
22420
-1
18954
28446
22288
-1
22420
29224
22288
-1
-1
11604
-1
18954
29224
-1
28250
-1
19923
22288
15150
18954
-1
28029
-1
-1
22572
18954
18954
8823
28446
31702
22572
24855
11604
22288
22420
9918
9918
11604
22288
18954
11604
-1
-1
-1
28029
-1
29224
22099
6618
4730
28029
30618
-1
-1
11604
22288
-1
10212
15150
-1
4368
22099
-1
10569
28029
7162
9918
20863
22420
11604
-1
10212
6908
-1
-1
-1
...
Jury's answer
22572
22572
-1
-1
-1
1457
-1
28446
22420
-1
18954
28446
22288
-1
22420
29224
22288
-1
-1
11604
-1
18954
29224
-1
28250
-1
19923
22288
15150
18954
-1
28029
-1
-1
22572
18954
18954
8823
28446
31702
22572
24855
11604
22288
22420
9918
9918
11604
22288
18954
11604
-1
-1
-1
28029
-1
29224
22099
6618
4730
28029
30618
-1
-1
11604
22288
-1
10212
15150
-1
4368
22099
-1
10569
28029
7162
9918
20863
22420
11604
-1
10212
6908
-1
-1
-1
...
Checker comment
ok 60101 lines
 
 
44
Time: 31 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 31859
2 31859 31859 95211
2 41460 13820 6227
1 9630
1 32416
1 13949
2 31859 31859 79452
2 31859 31859 67355
2 64200 1605 77720
2 86670 4815 98987
1 9626
1 15779
1 11397
2 11707 509 52077
1 26261
2 45588 11397 20093
2 6420 3210 34752
2 52965 1605 94057
2 8767 2922 32318
2 27653 13826 19576
2 67382 9626 79364
2 57771 393 20049
1 17748
2 8874 8874 47716
2 22185 4437 65423
2 59943 377 77057
1 30621
1 10836
2 96013 24003 15200
2 58672 29336 18893
2 93090 3210 9484
1 3161...
Participant's output
31859
-1
31859
31859
9630
9630
15779
-1
9630
9630
-1
-1
9626
-1
17748
17748
13949
-1
-1
-1
17748
9626
-1
-1
-1
26261
13949
-1
9630
-1
13949
9626
30621
-1
-1
13949
9630
-1
10836
-1
17748
26261
30621
17748
15780
8432
9626
15780
29940
25748
9626
15780
8432
-1
-1
-1
-1
16488
20545
15780
29940
12595
13949
-1
-1
-1
15780
19448
-1
32416
-1
20545
-1
-1
10836
-1
29940
2668
9626
16488
-1
22989
17748
-1
25634
-1
-1
22989
18028
31...
Jury's answer
31859
-1
31859
31859
9630
9630
15779
-1
9630
9630
-1
-1
9626
-1
17748
17748
13949
-1
-1
-1
17748
9626
-1
-1
-1
26261
13949
-1
9630
-1
13949
9626
30621
-1
-1
13949
9630
-1
10836
-1
17748
26261
30621
17748
15780
8432
9626
15780
29940
25748
9626
15780
8432
-1
-1
-1
-1
16488
20545
15780
29940
12595
13949
-1
-1
-1
15780
19448
-1
32416
-1
20545
-1
-1
10836
-1
29940
2668
9626
16488
-1
22989
17748
-1
25634
-1
-1
22989
18028
31...
Checker comment
ok 60006 lines
 
 
45
Time: 31 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 28556
2 15576 1298 52477
1 7801
2 28556 28556 59710
2 44132 1298 73513
2 21417 7139 11045
2 57112 7139 87090
1 5
1 1605
2 21417 7139 10120
2 29854 1298 6086
1 11527
2 28556 28556 77877
2 42834 14278 73512
2 5192 1298 57104
2 64735 535 15817
2 63602 1298 93016
1 15902
2 27258 1298 13433
2 34581 11527 2693
2 28556 28556 57879
1 30021
2 28556 7139 80300
2 68782 4046 11445
2 31510 6302 1235
2 21417 7139 17218
2 31152 2596 74071
2 31152 2596 81477
2 18172 2596 48325
2 2855...
Participant's output
28556
28556
28556
-1
28556
-1
-1
28556
28556
28556
-1
28556
-1
-1
28556
28556
-1
-1
-1
28556
28556
28556
28556
28556
28556
28556
20122
15902
28556
-1
-1
9696
26418
26418
9696
28556
13277
9696
9696
26418
26418
-1
26418
-1
-1
28556
25824
16359
25824
-1
-1
27438
-1
-1
26418
26418
11527
25824
3379
-1
-1
22657
-1
16184
-1
11527
7590
25824
-1
-1
-1
13392
13198
-1
-1
26418
-1
-1
-1
17233
-1
13198
26418
-1
-1
26418
25824
-1
321...
Jury's answer
28556
28556
28556
-1
28556
-1
-1
28556
28556
28556
-1
28556
-1
-1
28556
28556
-1
-1
-1
28556
28556
28556
28556
28556
28556
28556
20122
15902
28556
-1
-1
9696
26418
26418
9696
28556
13277
9696
9696
26418
26418
-1
26418
-1
-1
28556
25824
16359
25824
-1
-1
27438
-1
-1
26418
26418
11527
25824
3379
-1
-1
22657
-1
16184
-1
11527
7590
25824
-1
-1
-1
13392
13198
-1
-1
26418
-1
-1
-1
17233
-1
13198
26418
-1
-1
26418
25824
-1
321...
Checker comment
ok 59882 lines
 
 
46
Time: 31 ms, memory: 3684 KB
Verdict: OK
Input
100000
1 5769
2 11538 5769 4789
2 5769 5769 1037
2 40383 5769 77917
1 22578
2 22578 22578 76323
1 4885
2 318 318 32437
2 29310 4885 44390
2 4885 4885 15463
1 30266
2 78160 4885 84706
1 24
1 20662
2 5769 5769 1340
1 28425
1 23075
2 10006 10006 20619
2 12425 1775 64732
1 30887
2 31950 1775 58229
2 20662 20662 49433
2 11289 11289 2355
2 3763 3763 49946
2 20662 20662 45852
2 56850 28425 91170
1 7042
2 60532 15133 9521
1 20655
1 28500
1 23716
2 19845 27 57663
2 42750 14250 22084...
Participant's output
-1
-1
5769
22578
22578
4885
4885
4885
-1
-1
23075
23075
20662
-1
22578
20662
28425
-1
20655
-1
28425
20655
20662
5769
20662
20662
28500
20662
-1
28425
28500
-1
-1
-1
19246
23075
28425
-1
-1
31614
22112
-1
22950
4012
23485
32440
-1
22950
28500
-1
28500
20655
32440
32440
22950
-1
-1
22578
8699
-1
-1
4980
-1
-1
23945
4012
20818
-1
27122
29140
-1
32440
22112
23485
-1
22950
22578
6454
-1
28425
20662
20662
23716
-1
-1
-1
-1
22...
Jury's answer
-1
-1
5769
22578
22578
4885
4885
4885
-1
-1
23075
23075
20662
-1
22578
20662
28425
-1
20655
-1
28425
20655
20662
5769
20662
20662
28500
20662
-1
28425
28500
-1
-1
-1
19246
23075
28425
-1
-1
31614
22112
-1
22950
4012
23485
32440
-1
22950
28500
-1
28500
20655
32440
32440
22950
-1
-1
22578
8699
-1
-1
4980
-1
-1
23945
4012
20818
-1
27122
29140
-1
32440
22112
23485
-1
22950
22578
6454
-1
28425
20662
20662
23716
-1
-1
-1
-1
22...
Checker comment
ok 60197 lines
 
 
47
Time: 30 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 20370
2 20370 20370 31197
1 19763
2 39526 19763 84405
1 13756
1 22188
2 19763 19763 41001
1 7600
1 28212
2 15200 950 44439
2 13756 13756 49512
1 7580
1 5404
2 34920 1455 73694
2 96292 13756 100000
1 9890
2 43684 14561 32289
2 19763 19763 49019
2 77658 11094 99861
2 5547 1849 35221
2 13775 475 15582
2 16975 3395 66545
2 48636 5404 77463
1 16578
1 15492
2 724 724 40915
1 4132
1 18354
2 51722 4702 94423
1 15465
2 32592 4074 74511
1 10008
2 11094 11094 45619
2 36961 6...
Participant's output
-1
19763
19763
7600
13756
20370
-1
-1
19763
22188
22188
-1
20370
5404
13756
28212
20370
22188
-1
5404
17450
-1
15492
22188
-1
20370
-1
-1
18354
28212
22188
7580
10008
7600
-1
28212
9890
15720
22188
18354
15720
-1
27408
18354
27408
-1
16744
19763
6598
10008
-1
16744
27408
22931
27408
11262
21800
23187
6598
-1
-1
20370
16578
31096
7600
-1
27408
22931
12012
23187
9890
20892
27408
4132
29391
-1
-1
3878
-1
-1
-1
23581
26024
18354...
Jury's answer
-1
19763
19763
7600
13756
20370
-1
-1
19763
22188
22188
-1
20370
5404
13756
28212
20370
22188
-1
5404
17450
-1
15492
22188
-1
20370
-1
-1
18354
28212
22188
7580
10008
7600
-1
28212
9890
15720
22188
18354
15720
-1
27408
18354
27408
-1
16744
19763
6598
10008
-1
16744
27408
22931
27408
11262
21800
23187
6598
-1
-1
20370
16578
31096
7600
-1
27408
22931
12012
23187
9890
20892
27408
4132
29391
-1
-1
3878
-1
-1
-1
23581
26024
18354...
Checker comment
ok 59970 lines
 
 
48
Time: 30 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 5046
1 3168
2 10092 5046 6580
2 65598 5046 93640
2 40368 5046 49847
2 30276 5046 45922
2 38016 792 689
2 35322 5046 54205
2 40368 5046 47768
1 24017
2 24017 24017 75602
1 151
1 20710
1 28131
1 18229
1 24470
1 13315
1 20856
2 79200 792 87584
2 15800 632 4421
1 6235
2 5887 841 38910
1 30946
1 6984
2 18754 9377 2757
1 29253
1 13730
2 9377 9377 31849
1 8221
2 48034 24017 79743
2 72051 24017 98588
2 26630 13315 19083
2 10355 10355 36222
2 19929 511 4774
2 48034 24017 ...
Participant's output
-1
5046
5046
5046
-1
5046
5046
24017
3168
-1
5046
-1
-1
24017
24017
-1
20710
-1
-1
20856
6235
5046
-1
20398
-1
-1
24470
-1
24017
6984
18229
6235
-1
-1
-1
27998
29100
20856
13730
-1
-1
8945
13722
-1
-1
-1
11456
-1
-1
20710
-1
-1
8945
20710
25020
-1
-1
-1
13722
25586
25020
21082
25586
-1
20856
27998
25586
29100
20856
26565
9345
13722
13722
8221
18057
26565
20856
14917
15513
-1
26565
20710
-1
20856
20710
-1
3168
-1
-1
-1
...
Jury's answer
-1
5046
5046
5046
-1
5046
5046
24017
3168
-1
5046
-1
-1
24017
24017
-1
20710
-1
-1
20856
6235
5046
-1
20398
-1
-1
24470
-1
24017
6984
18229
6235
-1
-1
-1
27998
29100
20856
13730
-1
-1
8945
13722
-1
-1
-1
11456
-1
-1
20710
-1
-1
8945
20710
25020
-1
-1
-1
13722
25586
25020
21082
25586
-1
20856
27998
25586
29100
20856
26565
9345
13722
13722
8221
18057
26565
20856
14917
15513
-1
26565
20710
-1
20856
20710
-1
3168
-1
-1
-1
...
Checker comment
ok 60057 lines
 
 
49
Time: 30 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 14318
1 9294
2 13941 4647 47616
1 4642
1 24595
1 28552
2 85656 28552 100000
1 30030
1 12168
2 6006 6006 45845
2 24595 24595 51736
1 9451
1 20290
2 29063 29063 5660
2 39259 3569 94451
2 61014 30507 32002
1 6861
2 20280 4056 60371
1 11561
2 34683 11561 27189
2 18568 4642 31668
2 99932 7138 14562
2 9294 9294 25629
1 28162
1 26643
2 36036 6006 93338
2 12168 4056 7494
2 19110 2730 55084
1 21831
2 68640 1430 99655
2 34983 1521 9116
1 8115
1 23068
1 7317
2 51480 2145 95...
Participant's output
9294
-1
30030
24595
-1
28552
-1
12168
-1
4642
-1
9294
30030
-1
30030
30030
-1
30030
-1
26643
30030
24595
-1
18277
-1
-1
30030
12168
-1
9062
23068
12168
26643
19492
21814
30030
28162
6861
-1
-1
-1
-1
12168
-1
-1
9948
21831
12168
-1
21814
22773
-1
14525
-1
11255
11561
6778
9451
-1
-1
28552
32550
12168
30030
9948
-1
12168
-1
-1
30030
32550
-1
-1
9062
-1
-1
13956
19492
11255
30030
25584
-1
25584
18277
30030
12168
14525
9948
...
Jury's answer
9294
-1
30030
24595
-1
28552
-1
12168
-1
4642
-1
9294
30030
-1
30030
30030
-1
30030
-1
26643
30030
24595
-1
18277
-1
-1
30030
12168
-1
9062
23068
12168
26643
19492
21814
30030
28162
6861
-1
-1
-1
-1
12168
-1
-1
9948
21831
12168
-1
21814
22773
-1
14525
-1
11255
11561
6778
9451
-1
-1
28552
32550
12168
30030
9948
-1
12168
-1
-1
30030
32550
-1
-1
9062
-1
-1
13956
19492
11255
30030
25584
-1
25584
18277
30030
12168
14525
9948
...
Checker comment
ok 60212 lines
 
 
50
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 9167
2 9167 9167 47666
1 9010
2 6307 901 47177
2 13515 4505 7449
1 15062
2 19822 1802 32688
2 58565 4505 73444
2 15062 15062 23372
1 342
1 12466
2 18699 6233 20556
1 22588
1 23582
1 27037
2 11294 11294 40564
2 22588 22588 29847
1 25112
2 27030 4505 40242
2 5647 5647 40729
2 55509 27754 20371
1 1568
2 4505 4505 16576
2 54060 9010 83887
2 77749 682 24526
1 10841
2 15062 15062 40102
2 21345 1423 65368
2 9167 9167 44700
2 3078 342 26897
2 2658 886 9332
2 15062 15062 546...
Participant's output
9167
9010
-1
9010
9010
-1
-1
22588
-1
9010
22588
-1
9010
9010
-1
15062
27037
9167
342
-1
15062
-1
-1
25112
27037
15062
9010
11124
9010
10308
11890
9167
21751
11519
28516
23582
10308
-1
15320
12466
12466
11124
-1
17399
-1
25112
20220
23582
9010
11124
26752
-1
-1
-1
9917
4630
21751
12466
8687
28142
-1
25112
-1
11124
26752
19229
3009
-1
15320
25112
-1
-1
10260
-1
-1
28756
28530
23582
28142
1568
30634
-1
-1
17399
-1
-1
23582
...
Jury's answer
9167
9010
-1
9010
9010
-1
-1
22588
-1
9010
22588
-1
9010
9010
-1
15062
27037
9167
342
-1
15062
-1
-1
25112
27037
15062
9010
11124
9010
10308
11890
9167
21751
11519
28516
23582
10308
-1
15320
12466
12466
11124
-1
17399
-1
25112
20220
23582
9010
11124
26752
-1
-1
-1
9917
4630
21751
12466
8687
28142
-1
25112
-1
11124
26752
19229
3009
-1
15320
25112
-1
-1
10260
-1
-1
28756
28530
23582
28142
1568
30634
-1
-1
17399
-1
-1
23582
...
Checker comment
ok 59840 lines
 
 
51
Time: 30 ms, memory: 3740 KB
Verdict: OK
Input
100000
1 30965
1 12565
2 30965 30965 89092
1 31270
2 37695 12565 68023
1 3765
2 12565 12565 34946
1 24253
2 70005 1795 95294
2 16155 1795 56028
2 15635 15635 69948
2 43351 6193 13110
2 97012 24253 100000
2 48506 24253 84084
2 15060 3765 48592
2 31270 15635 87464
2 12386 6193 72323
2 24772 6193 15467
2 43713 14571 19228
2 14310 530 67789
2 15635 15635 74603
2 50260 12565 85672
2 48506 24253 24254
1 9175
2 18579 6193 70482
1 2930
1 10759
2 15635 15635 78098
2 27525 9175 60484
2 ...
Participant's output
30965
12565
12565
12565
12565
31270
-1
-1
24253
3765
31270
30965
-1
-1
31270
31270
12565
-1
30965
31270
9175
10759
-1
12565
21565
-1
-1
-1
21425
21565
-1
-1
3765
11924
11289
9175
-1
11289
-1
7026
10759
14881
12565
-1
9175
14881
-1
21425
18471
-1
10759
-1
21565
29327
-1
14881
-1
24253
9175
-1
21565
31270
27227
11289
16989
-1
-1
-1
-1
7736
14022
-1
-1
12565
12565
-1
-1
11289
9175
30965
-1
26590
-1
13072
-1
7736
20953
-1
-...
Jury's answer
30965
12565
12565
12565
12565
31270
-1
-1
24253
3765
31270
30965
-1
-1
31270
31270
12565
-1
30965
31270
9175
10759
-1
12565
21565
-1
-1
-1
21425
21565
-1
-1
3765
11924
11289
9175
-1
11289
-1
7026
10759
14881
12565
-1
9175
14881
-1
21425
18471
-1
10759
-1
21565
29327
-1
14881
-1
24253
9175
-1
21565
31270
27227
11289
16989
-1
-1
-1
-1
7736
14022
-1
-1
12565
12565
-1
-1
11289
9175
30965
-1
26590
-1
13072
-1
7736
20953
-1
-...
Checker comment
ok 59748 lines
 
 
52
Time: 46 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 6185
1 19162
2 61053 15263 12117
2 37110 6185 30749
2 98960 6185 100000
2 17420 1742 52525
2 28743 9581 57896
1 24523
2 9581 9581 50324
2 24740 6185 62757
2 21373 737 15745
1 28173
1 10861
1 29538
2 3282 3282 8248
1 3777
2 19162 19162 52760
2 14769 4923 65295
1 764
2 29538 14769 82352
2 9391 9391 62982
2 76648 19162 97811
1 17580
2 59076 14769 9479
2 17580 2930 66702
1 12947
2 72991 1622 13729
1 16980
2 1742 1742 29151
2 17580 5860 60450
2 12034 547 53571
2 84519 28...
Participant's output
-1
-1
-1
19162
19162
19162
6185
-1
-1
19162
29538
29538
28173
19162
-1
17580
-1
19162
17580
29538
-1
29538
-1
-1
16980
19162
-1
23493
29538
29538
28173
16898
29538
29538
19162
24596
16980
11121
-1
-1
-1
31068
-1
-1
24596
-1
3777
14142
16980
14142
14142
-1
-1
-1
-1
11121
-1
24596
16980
19162
25902
23493
17580
16980
-1
24596
-1
8122
17994
16898
31068
26323
17580
-1
29538
14142
24596
-1
17580
23300
-1
-1
25902
-1
16980
24510
...
Jury's answer
-1
-1
-1
19162
19162
19162
6185
-1
-1
19162
29538
29538
28173
19162
-1
17580
-1
19162
17580
29538
-1
29538
-1
-1
16980
19162
-1
23493
29538
29538
28173
16898
29538
29538
19162
24596
16980
11121
-1
-1
-1
31068
-1
-1
24596
-1
3777
14142
16980
14142
14142
-1
-1
-1
-1
11121
-1
24596
16980
19162
25902
23493
17580
16980
-1
24596
-1
8122
17994
16898
31068
26323
17580
-1
29538
14142
24596
-1
17580
23300
-1
-1
25902
-1
16980
24510
...
Checker comment
ok 60088 lines
 
 
53
Time: 30 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 15279
2 40224 6704 30924
2 15279 15279 41462
2 10186 5093 27115
1 2903
1 21302
2 42604 10651 31489
2 54818 27409 912
2 10651 10651 34039
2 34288 17144 13809
2 63906 10651 91610
1 23272
2 42604 10651 75942
1 3249
2 31947 1389 73134
2 10651 10651 43248
2 29241 3249 32408
2 11552 361 2042
2 15279 15279 55234
2 10651 10651 57675
1 24666
1 6511
1 9637
2 1710 171 11055
2 21302 10651 1348
1 22220
1 6861
2 35651 5093 81238
2 4111 4111 59930
2 66660 2222 94056
2 11913 361 307...
Participant's output
-1
15279
15279
-1
-1
21302
-1
21302
21302
15279
21302
-1
-1
15279
21302
3249
-1
15279
24666
22220
3249
-1
-1
21302
24666
6511
6511
-1
22220
31099
9637
31099
21302
24666
-1
9637
9234
23171
21302
24666
-1
-1
-1
16735
24666
15279
-1
31325
5538
10327
-1
21632
-1
7695
-1
-1
21632
19724
6861
31099
8643
27447
-1
5538
9234
27464
10052
24666
30959
31325
5161
15188
24666
-1
24666
24696
8643
16735
19724
-1
3249
-1
9234
9637
27318
274...
Jury's answer
-1
15279
15279
-1
-1
21302
-1
21302
21302
15279
21302
-1
-1
15279
21302
3249
-1
15279
24666
22220
3249
-1
-1
21302
24666
6511
6511
-1
22220
31099
9637
31099
21302
24666
-1
9637
9234
23171
21302
24666
-1
-1
-1
16735
24666
15279
-1
31325
5538
10327
-1
21632
-1
7695
-1
-1
21632
19724
6861
31099
8643
27447
-1
5538
9234
27464
10052
24666
30959
31325
5161
15188
24666
-1
24666
24696
8643
16735
19724
-1
3249
-1
9234
9637
27318
274...
Checker comment
ok 59686 lines
 
 
54
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 29094
2 77584 9698 1579
2 67886 4849 10561
2 14547 14547 74623
1 24091
1 11112
2 29094 14547 70867
1 24566
1 30064
2 16668 5556 53259
2 29094 14547 60216
1 7790
2 83340 2778 29775
2 4476 2238 55157
2 24245 4849 3840
1 20855
2 97530 6502 16239
2 29632 3704 72873
1 7291
2 88116 29372 2848
2 9698 4849 60919
1 1776
1 718
1 9857
1 29231
1 18264
2 23370 779 58589
1 5770
2 29094 29094 73261
1 2262
2 11190 2238 46467
2 88713 9857 98883
2 59358 4566 85116
2 36849 12283 809...
Participant's output
-1
-1
29094
29094
11112
29094
-1
29094
-1
-1
11112
-1
29094
7790
29094
29094
9857
18264
24566
718
7291
-1
-1
2212
8823
-1
-1
-1
-1
-1
1776
-1
5402
11112
29094
-1
-1
19369
11112
5770
11112
1776
-1
-1
-1
-1
13574
-1
5402
-1
28714
-1
20100
20855
19369
-1
5402
-1
-1
21415
26489
20100
24091
2212
20100
18264
-1
23706
10300
-1
19369
29094
24566
-1
-1
1535
2212
8447
-1
21009
-1
18264
6880
28752
31708
-1
-1
15088
-1
28752
1750...
Jury's answer
-1
-1
29094
29094
11112
29094
-1
29094
-1
-1
11112
-1
29094
7790
29094
29094
9857
18264
24566
718
7291
-1
-1
2212
8823
-1
-1
-1
-1
-1
1776
-1
5402
11112
29094
-1
-1
19369
11112
5770
11112
1776
-1
-1
-1
-1
13574
-1
5402
-1
28714
-1
20100
20855
19369
-1
5402
-1
-1
21415
26489
20100
24091
2212
20100
18264
-1
23706
10300
-1
19369
29094
24566
-1
-1
1535
2212
8447
-1
21009
-1
18264
6880
28752
31708
-1
-1
15088
-1
28752
1750...
Checker comment
ok 60027 lines
 
 
55
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 31943
2 31943 31943 2896
2 95829 31943 100000
1 30276
2 15138 5046 32427
2 13456 841 3412
1 3034
2 17661 2523 52187
1 19734
1 31407
1 22773
1 15585
2 7569 7569 52046
2 59202 19734 26346
2 36432 506 83327
1 17860
1 20097
1 32096
2 32096 8024 82464
1 28393
1 5475
1 2106
2 26796 6699 10621
1 24832
1 29415
2 88245 29415 100000
2 8932 2233 49221
2 57880 14470 9216
2 70596 5883 10469
1 31986
2 5046 5046 45268
2 22707 7569 62054
1 26322
1 15865
2 54549 2871 80944
2 657...
Participant's output
-1
-1
-1
-1
30276
30276
-1
19734
32096
-1
-1
20097
-1
-1
30276
30276
20097
19734
32096
-1
26322
30276
-1
-1
26322
-1
-1
7713
17860
26322
30276
32096
14634
20097
26322
14634
30276
15585
-1
19734
11934
-1
3328
-1
31089
11934
5368
26322
22773
10264
-1
11934
17571
31407
-1
31943
3034
-1
7713
7315
-1
-1
21621
11934
20052
-1
31986
-1
-1
5475
31986
8596
32096
-1
31089
25406
-1
11934
8596
-1
31943
31986
-1
26948
30276
8596
-1
23...
Jury's answer
-1
-1
-1
-1
30276
30276
-1
19734
32096
-1
-1
20097
-1
-1
30276
30276
20097
19734
32096
-1
26322
30276
-1
-1
26322
-1
-1
7713
17860
26322
30276
32096
14634
20097
26322
14634
30276
15585
-1
19734
11934
-1
3328
-1
31089
11934
5368
26322
22773
10264
-1
11934
17571
31407
-1
31943
3034
-1
7713
7315
-1
-1
21621
11934
20052
-1
31986
-1
-1
5475
31986
8596
32096
-1
31089
25406
-1
11934
8596
-1
31943
31986
-1
26948
30276
8596
-1
23...
Checker comment
ok 59759 lines
 
 
56
Time: 31 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 12751
2 38253 12751 68793
1 18160
1 14064
1 9908
1 15035
2 9080 9080 53901
2 22700 2270 57401
1 32463
2 49540 9908 87442
2 25784 586 66610
1 27295
2 13620 4540 51302
1 9605
2 22700 4540 66762
2 6014 3007 43872
1 28118
2 78275 2525 7383
2 41632 20816 11072
2 1758 1758 35512
2 32463 32463 75074
1 5035
1 1099
1 30718
2 23079 1099 33218
1 21814
1 27185
2 7032 7032 47315
2 14059 14059 16744
1 23607
2 7032 7032 31402
1 11175
2 14059 14059 68529
1 16103
2 14059 14059 71...
Participant's output
12751
18160
18160
9908
14064
18160
18160
15035
-1
-1
14064
32463
1099
14064
-1
14064
28118
28118
32463
25716
-1
23607
28118
23607
5035
25716
14064
16103
-1
-1
-1
11175
14064
14064
11175
12751
-1
23607
15240
26579
23224
14064
32463
25856
-1
10884
-1
-1
15240
12751
19398
27185
21814
-1
18160
-1
-1
25716
15240
-1
1099
25856
-1
18609
-1
-1
-1
-1
-1
-1
17115
21158
-1
-1
17115
-1
17115
-1
24695
-1
32463
18160
-1
-1
21814
-1
171...
Jury's answer
12751
18160
18160
9908
14064
18160
18160
15035
-1
-1
14064
32463
1099
14064
-1
14064
28118
28118
32463
25716
-1
23607
28118
23607
5035
25716
14064
16103
-1
-1
-1
11175
14064
14064
11175
12751
-1
23607
15240
26579
23224
14064
32463
25856
-1
10884
-1
-1
15240
12751
19398
27185
21814
-1
18160
-1
-1
25716
15240
-1
1099
25856
-1
18609
-1
-1
-1
-1
-1
-1
17115
21158
-1
-1
17115
-1
17115
-1
24695
-1
32463
18160
-1
-1
21814
-1
171...
Checker comment
ok 60073 lines
 
 
57
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 26966
2 53932 13483 88715
2 67415 13483 96501
2 40449 13483 16703
2 26966 13483 11301
1 9898
2 54514 194 95946
2 3535 707 39204
1 6149
2 13483 13483 31187
2 49490 9898 68576
2 59388 9898 93864
2 9898 4949 25693
2 14847 4949 24846
2 49490 1414 85567
1 23932
1 25330
2 71796 11966 98652
2 26966 26966 57620
1 27944
2 97794 16299 5086
1 30664
2 28610 14305 9720
1 18683
1 23879
2 9898 4949 5534
2 7984 1996 38209
2 59830 11966 85864
2 18683 18683 52075
2 23879 23879 64299
2...
Participant's output
26966
26966
-1
-1
26966
9898
-1
9898
9898
9898
9898
9898
23932
26966
-1
-1
-1
27944
23932
18683
23879
23932
-1
27944
25330
16496
-1
-1
23714
-1
18648
-1
-1
-1
15201
11690
25330
11690
16266
11690
18648
16266
25330
10274
-1
-1
9898
30664
27944
18683
11310
9898
1776
18648
-1
11038
-1
14824
20364
27832
11038
24695
18648
14824
18990
-1
-1
-1
26966
25119
1805
-1
11310
13026
-1
-1
-1
-1
11310
-1
27826
6149
-1
22120
-1
27826
1549...
Jury's answer
26966
26966
-1
-1
26966
9898
-1
9898
9898
9898
9898
9898
23932
26966
-1
-1
-1
27944
23932
18683
23879
23932
-1
27944
25330
16496
-1
-1
23714
-1
18648
-1
-1
-1
15201
11690
25330
11690
16266
11690
18648
16266
25330
10274
-1
-1
9898
30664
27944
18683
11310
9898
1776
18648
-1
11038
-1
14824
20364
27832
11038
24695
18648
14824
18990
-1
-1
-1
26966
25119
1805
-1
11310
13026
-1
-1
-1
-1
11310
-1
27826
6149
-1
22120
-1
27826
1549...
Checker comment
ok 60059 lines
 
 
58
Time: 31 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 16916
2 16916 16916 34296
2 12687 4229 60134
2 29603 4229 64116
2 84580 16916 100000
1 5026
2 33832 8458 59891
2 50748 16916 72911
1 12345
2 25374 8458 63368
1 2911
1 14816
1 5092
1 21976
2 7408 7408 22891
1 21975
1 6529
2 21976 21976 54183
1 5734
2 13642 718 22700
1 16223
2 48669 16223 83850
2 97896 8158 4246
2 8230 4115 49952
1 14015
2 43950 21975 94627
2 21975 21975 62346
2 21975 21975 58694
1 10944
1 1707
2 25536 3648 62609
2 18117 61 49801
2 2469 2469 10632
2...
Participant's output
16916
16916
16916
-1
16916
16916
16916
14816
21976
5026
16223
-1
12345
21975
21975
21975
10944
5734
-1
14816
21975
12345
-1
4384
16916
-1
21975
12345
21975
4384
10944
21975
16223
10944
5090
-1
5026
11235
16223
-1
10944
-1
15355
-1
11235
-1
-1
10944
-1
21975
21975
10944
29395
25466
10944
12368
12345
-1
28493
11235
-1
21975
5734
19073
-1
-1
31257
21139
9499
12345
-1
21976
14196
26004
27755
-1
10944
-1
27755
14196
16916
-1
31610...
Jury's answer
16916
16916
16916
-1
16916
16916
16916
14816
21976
5026
16223
-1
12345
21975
21975
21975
10944
5734
-1
14816
21975
12345
-1
4384
16916
-1
21975
12345
21975
4384
10944
21975
16223
10944
5090
-1
5026
11235
16223
-1
10944
-1
15355
-1
11235
-1
-1
10944
-1
21975
21975
10944
29395
25466
10944
12368
12345
-1
28493
11235
-1
21975
5734
19073
-1
-1
31257
21139
9499
12345
-1
21976
14196
26004
27755
-1
10944
-1
27755
14196
16916
-1
31610...
Checker comment
ok 60090 lines
 
 
59
Time: 46 ms, memory: 3700 KB
Verdict: OK
Input
100000
1 25140
2 25140 25140 73379
1 18403
1 28102
2 31425 6285 58880
2 58660 4190 84370
2 28102 28102 88965
2 25140 12570 14454
1 11202
1 11028
1 5762
2 18403 1673 6947
2 58660 8380 85287
1 3452
2 50280 838 92376
1 6299
1 25689
2 22626 1257 65661
1 9149
2 55140 5514 78759
2 27447 9149 44938
2 21105 335 15529
1 31055
2 94764 23691 17080
2 16730 1673 40435
1 10398
2 62850 2514 28228
2 50280 8380 17124
1 16738
1 23878
2 3452 3452 5868
1 23371
1 31125
1 15106
1 5641
2 14051...
Participant's output
25140
25140
25140
28102
-1
-1
25140
25140
25140
11028
9149
-1
-1
18403
-1
-1
-1
28102
-1
23371
23878
-1
28102
-1
10398
-1
23371
-1
12100
-1
21355
28102
-1
-1
31055
15106
15106
15106
-1
12100
17878
25771
15106
15106
31125
-1
25140
13385
-1
5103
28102
10168
10168
11415
3452
18403
10398
9149
20663
11340
11340
26027
-1
10168
15776
-1
-1
12100
17706
-1
29970
32268
5302
-1
16738
-1
-1
-1
-1
7041
5302
11340
26663
10980
17878
-1
...
Jury's answer
25140
25140
25140
28102
-1
-1
25140
25140
25140
11028
9149
-1
-1
18403
-1
-1
-1
28102
-1
23371
23878
-1
28102
-1
10398
-1
23371
-1
12100
-1
21355
28102
-1
-1
31055
15106
15106
15106
-1
12100
17878
25771
15106
15106
31125
-1
25140
13385
-1
5103
28102
10168
10168
11415
3452
18403
10398
9149
20663
11340
11340
26027
-1
10168
15776
-1
-1
12100
17706
-1
29970
32268
5302
-1
16738
-1
-1
-1
-1
7041
5302
11340
26663
10980
17878
-1
...
Checker comment
ok 60047 lines
 
 
60
Time: 31 ms, memory: 3700 KB
Verdict: OK
Input
100000
1 15704
2 15704 7852 48224
1 1231
2 47112 3926 87511
1 6504
2 31408 15704 76970
2 33604 1084 64965
1 14957
2 26016 6504 21334
2 6504 6504 39887
2 43902 1626 59978
2 89742 14957 100000
1 26922
1 23560
1 27154
1 6392
1 21141
2 11780 11780 42843
2 28188 7047 64748
2 47754 23877 32445
2 23560 23560 2252
2 47120 11780 31965
2 53844 1923 92417
2 11780 11780 49039
1 20331
2 70680 2945 94617
1 17584
2 11780 1178 42417
1 25073
2 23556 7852 44805
1 4998
2 26922 1923 55523
1 17...
Participant's output
15704
15704
15704
6504
-1
6504
6504
-1
23560
21141
-1
-1
-1
26922
23560
23560
23560
15704
26922
17040
-1
6392
26922
-1
23560
-1
4998
-1
-1
-1
5440
6504
-1
-1
17040
17040
15704
26922
20331
27775
5553
-1
-1
26922
5440
-1
-1
-1
18492
-1
26922
-1
-1
-1
17202
18492
-1
-1
26922
18492
4608
-1
23560
21141
18492
17202
-1
17040
-1
6392
14562
5440
-1
17040
-1
2230
17040
17040
22810
22423
17040
15489
-1
-1
17040
-1
14931
-1
-1
-1
...
Jury's answer
15704
15704
15704
6504
-1
6504
6504
-1
23560
21141
-1
-1
-1
26922
23560
23560
23560
15704
26922
17040
-1
6392
26922
-1
23560
-1
4998
-1
-1
-1
5440
6504
-1
-1
17040
17040
15704
26922
20331
27775
5553
-1
-1
26922
5440
-1
-1
-1
18492
-1
26922
-1
-1
-1
17202
18492
-1
-1
26922
18492
4608
-1
23560
21141
18492
17202
-1
17040
-1
6392
14562
5440
-1
17040
-1
2230
17040
17040
22810
22423
17040
15489
-1
-1
17040
-1
14931
-1
-1
-1
...
Checker comment
ok 59913 lines
 
 
61
Time: 46 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 32372
2 16186 8093 58902
2 32372 16186 82880
2 24279 8093 24325
1 19347
2 19347 6449 45787
2 32372 16186 96437
2 16186 16186 3919
2 48558 16186 89386
1 3999
2 46272 23136 172
1 8998
2 12898 6449 28753
1 29923
2 16186 16186 59327
1 14965
2 63140 205 5478
1 14968
2 8093 8093 71664
2 56651 8093 93255
2 5204 1301 45532
1 12910
1 28356
2 71547 23849 3312
2 44904 1871 75382
1 9720
2 80810 16162 6768
2 14178 4726 53575
2 28356 7089 75285
1 22365
1 16997
2 62986 8998 77161
...
Participant's output
32372
32372
-1
19347
32372
-1
32372
-1
-1
32372
-1
32372
32372
29923
-1
14968
-1
28356
28356
8998
22365
-1
-1
-1
19347
28356
-1
-1
12910
12910
9720
32350
-1
23870
22365
-1
12910
23870
22365
23870
22365
17774
-1
27981
9720
21706
-1
32372
3999
26111
28356
-1
-1
-1
11828
28356
23870
-1
-1
-1
22365
23870
-1
11828
28356
-1
8656
-1
23870
3693
-1
32372
19347
9720
15043
3332
-1
12910
-1
-1
-1
15915
9720
9720
3332
23870
-1
-1
17...
Jury's answer
32372
32372
-1
19347
32372
-1
32372
-1
-1
32372
-1
32372
32372
29923
-1
14968
-1
28356
28356
8998
22365
-1
-1
-1
19347
28356
-1
-1
12910
12910
9720
32350
-1
23870
22365
-1
12910
23870
22365
23870
22365
17774
-1
27981
9720
21706
-1
32372
3999
26111
28356
-1
-1
-1
11828
28356
23870
-1
-1
-1
22365
23870
-1
11828
28356
-1
8656
-1
23870
3693
-1
32372
19347
9720
15043
3332
-1
12910
-1
-1
-1
15915
9720
9720
3332
23870
-1
-1
17...
Checker comment
ok 59900 lines
 
 
62
Time: 15 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 30443
2 60886 30443 92320
2 91329 30443 100000
2 93340 7180 4334
1 27701
2 59613 14903 28055
1 21950
2 8780 2195 35037
2 19316 878 59835
2 40388 878 85179
1 30786
2 66965 16741 9085
1 5045
2 43490 4349 86280
2 1317 439 37939
1 7628
2 57210 3814 76225
2 57210 3814 79145
2 1907 1907 2579
2 8796 1466 62463
1 10508
1 12423
2 10090 5045 47419
2 19755 2195 53701
2 10508 10508 28931
1 21248
1 23747
1 22702
1 29447
2 57794 2627 89605
1 3232
2 7024 439 55305
2 27701 27701 6...
Participant's output
30443
-1
-1
-1
21950
21950
21950
-1
30443
21950
7628
7628
-1
30786
5045
21950
10508
10508
21950
27701
21248
30786
3232
5045
30786
21248
25370
7628
7628
-1
7628
30786
-1
-1
21248
5204
9279
-1
-1
5204
-1
12991
30443
12423
21248
26487
-1
-1
7092
3232
21950
20299
-1
20299
25370
26487
-1
12991
29801
-1
11444
-1
5045
20299
5045
-1
-1
-1
3232
26487
-1
-1
25370
3232
5045
11278
-1
9049
28647
30786
21950
10774
21950
22446
-1
20299
...
Jury's answer
30443
-1
-1
-1
21950
21950
21950
-1
30443
21950
7628
7628
-1
30786
5045
21950
10508
10508
21950
27701
21248
30786
3232
5045
30786
21248
25370
7628
7628
-1
7628
30786
-1
-1
21248
5204
9279
-1
-1
5204
-1
12991
30443
12423
21248
26487
-1
-1
7092
3232
21950
20299
-1
20299
25370
26487
-1
12991
29801
-1
11444
-1
5045
20299
5045
-1
-1
-1
3232
26487
-1
-1
25370
3232
5045
11278
-1
9049
28647
30786
21950
10774
21950
22446
-1
20299
...
Checker comment
ok 60121 lines
 
 
63
Time: 46 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 27607
2 26154 1453 9107
2 55214 27607 15090
1 4153
2 94735 15789 18574
1 1709
1 19823
1 15254
1 5991
2 789 263 34136
1 16680
2 30508 7627 72857
2 68643 7627 83964
2 79292 19823 21457
1 25464
1 19729
1 11859
2 22881 7627 43100
1 9861
2 11120 5560 28169
1 27763
1 14388
2 3183 1061 52996
2 40032 3336 72770
1 18328
1 9535
2 3336 1112 38493
2 5721 1907 25332
1 14772
1 23617
1 22815
2 6312 526 45579
1 19722
2 19722 19722 53084
2 47675 9535 72608
1 10131
1 17101
1 46...
Participant's output
-1
-1
-1
15254
15254
15254
-1
15254
16680
25464
16680
16680
9535
15254
19722
9535
-1
19722
-1
11859
11859
19722
5991
27607
16680
-1
14388
-1
17101
19722
21521
-1
5184
14772
11859
10131
27474
5184
22815
16680
7017
11859
16680
25464
5991
25464
-1
18328
25464
-1
322
-1
-1
14388
16680
19722
22815
15462
25464
-1
-1
25135
7017
-1
-1
-1
11859
-1
19404
-1
4692
19076
-1
-1
-1
11859
26956
-1
-1
11859
22617
1629
-1
13176
11042
-1
-1...
Jury's answer
-1
-1
-1
15254
15254
15254
-1
15254
16680
25464
16680
16680
9535
15254
19722
9535
-1
19722
-1
11859
11859
19722
5991
27607
16680
-1
14388
-1
17101
19722
21521
-1
5184
14772
11859
10131
27474
5184
22815
16680
7017
11859
16680
25464
5991
25464
-1
18328
25464
-1
322
-1
-1
14388
16680
19722
22815
15462
25464
-1
-1
25135
7017
-1
-1
-1
11859
-1
19404
-1
4692
19076
-1
-1
-1
11859
26956
-1
-1
11859
22617
1629
-1
13176
11042
-1
-1...
Checker comment
ok 59937 lines
 
 
64
Time: 31 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 15326
1 20113
1 25200
2 5040 5040 35705
2 46800 3600 89920
2 42000 8400 89237
1 28209
1 10734
2 15326 7663 54490
2 25046 3578 8796
2 40226 20113 64478
2 8400 1200 34532
2 64404 1789 79825
2 37800 12600 90050
1 3636
1 4463
2 24500 700 79188
2 7156 3578 36405
2 22989 7663 57286
1 7329
2 21468 3578 24157
2 35280 5040 12973
2 86748 21687 11271
2 18900 6300 45169
1 15106
2 50400 4200 88576
2 16800 4200 61137
2 45600 1200 27865
2 6720 560 48807
1 6787
2 32202 10734 68248
...
Participant's output
25200
25200
25200
15326
-1
20113
25200
10734
25200
25200
10734
15326
-1
-1
-1
25200
25200
25200
-1
25200
10734
25200
6787
25200
25200
9196
25200
6787
-1
16108
-1
-1
28217
10734
-1
25200
-1
10734
25200
27993
17125
-1
8957
3636
14060
22099
17760
25200
14060
24620
-1
17125
15106
9713
-1
16785
-1
16785
-1
26977
-1
1738
-1
18340
-1
17760
815
-1
5994
28217
815
17760
15326
16108
-1
-1
25200
-1
-1
17760
18340
-1
24620
5809
-1
-1
...
Jury's answer
25200
25200
25200
15326
-1
20113
25200
10734
25200
25200
10734
15326
-1
-1
-1
25200
25200
25200
-1
25200
10734
25200
6787
25200
25200
9196
25200
6787
-1
16108
-1
-1
28217
10734
-1
25200
-1
10734
25200
27993
17125
-1
8957
3636
14060
22099
17760
25200
14060
24620
-1
17125
15106
9713
-1
16785
-1
16785
-1
26977
-1
1738
-1
18340
-1
17760
815
-1
5994
28217
815
17760
15326
16108
-1
-1
25200
-1
-1
17760
18340
-1
24620
5809
-1
-1
...
Checker comment
ok 59969 lines
 
 
65
Time: 46 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 22162
2 22162 11081 13143
1 9783
2 6332 1583 55108
2 29349 9783 42984
2 72818 1583 96843
2 41158 3166 84078
1 17864
2 22162 22162 68936
2 33243 11081 29309
2 89320 8932 100000
2 33243 11081 62794
2 53592 638 76250
1 17056
2 15428 406 49467
1 937
2 22162 22162 57210
1 4844
2 9498 3166 62723
1 3171
2 55396 27698 15969
1 5232
1 28504
1 17755
1 7882
1 17927
1 29887
1 20441
1 20456
2 42756 14252 96090
2 2552 2552 47191
1 7848
1 19324
2 28504 28504 88142
2 48310 9662 8...
Participant's output
-1
22162
9783
22162
22162
22162
-1
-1
22162
17864
17864
22162
22162
-1
28504
17864
28504
19324
19324
17056
-1
-1
21021
9783
20456
17755
5232
19324
17056
-1
4844
4844
-1
14048
17864
21021
-1
17056
31692
21021
27538
-1
15733
4844
-1
-1
17864
-1
29887
-1
-1
27538
7451
-1
28504
22162
-1
-1
25311
-1
-1
22734
-1
19207
-1
22162
17927
17116
12747
-1
-1
9392
-1
12747
16083
17116
-1
-1
17864
17755
25856
-1
9783
17927
4844
14048
221...
Jury's answer
-1
22162
9783
22162
22162
22162
-1
-1
22162
17864
17864
22162
22162
-1
28504
17864
28504
19324
19324
17056
-1
-1
21021
9783
20456
17755
5232
19324
17056
-1
4844
4844
-1
14048
17864
21021
-1
17056
31692
21021
27538
-1
15733
4844
-1
-1
17864
-1
29887
-1
-1
27538
7451
-1
28504
22162
-1
-1
25311
-1
-1
22734
-1
19207
-1
22162
17927
17116
12747
-1
-1
9392
-1
12747
16083
17116
-1
-1
17864
17755
25856
-1
9783
17927
4844
14048
221...
Checker comment
ok 59925 lines
 
 
66
Time: 30 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 7255
2 7255 7255 34149
2 72550 7255 83672
2 14510 7255 4044
2 29020 7255 43699
1 11863
2 35589 11863 64414
2 11863 11863 37722
2 35589 11863 49509
2 10977 10977 28643
2 43530 7255 56014
1 18272
2 4568 4568 39155
2 92880 10320 9377
2 18272 18272 51290
1 12356
2 4568 4568 10904
1 29611
1 9024
2 47376 1128 63742
1 32566
1 27920
2 47452 11863 20077
1 7004
2 91411 2770 29233
2 83760 2792 20052
2 55840 27920 98277
1 25083
2 9024 4512 41993
2 41880 3490 74680
2 16722 8361 2...
Participant's output
7255
7255
-1
7255
11863
11863
11863
-1
7255
18272
-1
18272
-1
9024
-1
-1
-1
27920
9024
27920
-1
9024
12720
12356
-1
25083
7004
12720
12720
32396
-1
-1
-1
-1
24523
32396
12263
12720
16602
32396
32396
24346
-1
18272
12720
-1
13268
32396
27920
23186
-1
-1
32694
18431
-1
32396
-1
-1
13268
24541
32694
-1
-1
7004
27920
-1
-1
-1
19956
12720
-1
31535
23186
6073
31535
-1
24346
-1
18272
-1
31535
32694
16602
9024
31535
-1
-1
3894
...
Jury's answer
7255
7255
-1
7255
11863
11863
11863
-1
7255
18272
-1
18272
-1
9024
-1
-1
-1
27920
9024
27920
-1
9024
12720
12356
-1
25083
7004
12720
12720
32396
-1
-1
-1
-1
24523
32396
12263
12720
16602
32396
32396
24346
-1
18272
12720
-1
13268
32396
27920
23186
-1
-1
32694
18431
-1
32396
-1
-1
13268
24541
32694
-1
-1
7004
27920
-1
-1
-1
19956
12720
-1
31535
23186
6073
31535
-1
24346
-1
18272
-1
31535
32694
16602
9024
31535
-1
-1
3894
...
Checker comment
ok 60061 lines
 
 
67
Time: 46 ms, memory: 3712 KB
Verdict: OK
Input
100000
1 1617
1 3680
1 3944
2 31552 3944 44979
2 17296 368 37105
1 9310
2 4048 368 25252
1 18207
1 28317
2 27930 9310 46394
1 19457
2 6069 6069 35831
2 10404 2601 31305
1 23487
1 15990
2 29440 115 22561
1 1298
2 15990 15990 52835
2 11040 3680 7694
2 15606 2601 35058
2 21320 5330 28135
2 36708 92 71260
1 26514
2 70461 7829 94618
1 8216
1 8918
1 19582
2 19149 1473 13054
2 25760 3680 49818
2 41244 2946 91319
1 31313
1 22409
1 846
1 24337
2 13257 13257 25587
1 22011
2 13257...
Participant's output
3944
3680
3680
9310
18207
18207
-1
15990
-1
18207
-1
3680
23487
-1
3680
26514
-1
-1
3680
-1
15990
15990
-1
846
32277
26514
-1
-1
19582
11544
-1
15990
2686
-1
-1
22011
-1
-1
-1
23487
-1
24272
-1
7456
3882
-1
11544
-1
-1
-1
26514
23487
3680
3680
-1
20929
-1
26514
-1
10120
-1
-1
16762
5660
-1
7456
10120
26514
15990
32277
846
-1
-1
-1
27792
28140
29584
9310
28140
19582
27792
27792
-1
-1
-1
-1
30088
14386
18603
-1
-1
-1
...
Jury's answer
3944
3680
3680
9310
18207
18207
-1
15990
-1
18207
-1
3680
23487
-1
3680
26514
-1
-1
3680
-1
15990
15990
-1
846
32277
26514
-1
-1
19582
11544
-1
15990
2686
-1
-1
22011
-1
-1
-1
23487
-1
24272
-1
7456
3882
-1
11544
-1
-1
-1
26514
23487
3680
3680
-1
20929
-1
26514
-1
10120
-1
-1
16762
5660
-1
7456
10120
26514
15990
32277
846
-1
-1
-1
27792
28140
29584
9310
28140
19582
27792
27792
-1
-1
-1
-1
30088
14386
18603
-1
-1
-1
...
Checker comment
ok 59923 lines
 
 
68
Time: 31 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 15387
1 1872
2 34632 936 68555
2 5129 5129 42820
2 15387 15387 39978
1 11990
2 50358 2398 70473
1 10499
2 77390 1090 15030
2 65945 5995 97848
2 59950 11990 98742
1 29546
1 11878
2 41032 5129 85645
2 20516 5129 49156
2 52495 10499 68071
2 10499 10499 1797
1 12000
1 14579
2 71268 11878 95129
1 13824
2 86328 2398 99219
1 28868
2 42000 3000 65038
2 12096 1728 40981
2 28868 28868 65665
2 32256 4608 61230
2 3456 3456 17588
2 45625 22812 12859
2 28868 28868 25938
1 4660
2 ...
Participant's output
1872
15387
15387
11990
-1
11990
11990
15387
15387
10499
-1
11878
11990
12000
13824
28868
13824
13824
-1
-1
28868
-1
18490
28868
13824
-1
13824
-1
13824
10499
12000
15387
-1
13824
11878
-1
15387
-1
26358
12000
-1
-1
-1
15087
29546
15087
-1
-1
13824
11878
11990
12000
13824
12000
-1
11878
28095
29546
-1
-1
12000
-1
11990
23359
-1
12000
-1
22200
-1
-1
10499
-1
23359
12000
19515
19515
2292
10499
-1
12000
26358
22200
-1
-1
-1
26...
Jury's answer
1872
15387
15387
11990
-1
11990
11990
15387
15387
10499
-1
11878
11990
12000
13824
28868
13824
13824
-1
-1
28868
-1
18490
28868
13824
-1
13824
-1
13824
10499
12000
15387
-1
13824
11878
-1
15387
-1
26358
12000
-1
-1
-1
15087
29546
15087
-1
-1
13824
11878
11990
12000
13824
12000
-1
11878
28095
29546
-1
-1
12000
-1
11990
23359
-1
12000
-1
22200
-1
-1
10499
-1
23359
12000
19515
19515
2292
10499
-1
12000
26358
22200
-1
-1
-1
26...
Checker comment
ok 60045 lines
 
 
69
Time: 30 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 23524
1 31351
1 10799
2 10986 10986 16669
2 51459 17153 25064
2 23524 23524 77537
2 31351 31351 31232
1 19862
2 19862 19862 52860
2 5881 5881 35801
2 10799 10799 50234
2 5881 5881 53303
1 21609
2 29793 9931 67104
1 5595
2 7203 7203 5005
2 45825 22912 24623
2 27975 5595 35770
1 8157
2 11762 11762 37923
2 99310 19862 100000
1 16714
2 19862 19862 65213
1 30294
2 90456 18091 17100
2 33695 293 70717
2 31603 187 70718
1 17816
2 19862 19862 66128
1 4821
2 15147 15147 76851
...
Participant's output
-1
-1
23524
-1
19862
23524
10799
23524
19862
-1
-1
5595
23524
-1
19862
-1
31351
30294
19862
30294
19862
21609
-1
-1
16714
30294
17816
17816
-1
-1
23524
16714
-1
21592
17564
5097
-1
-1
17816
-1
-1
-1
6578
-1
21609
21609
4821
20531
-1
-1
17816
-1
-1
6578
-1
26642
26642
10680
-1
30294
14682
17816
-1
-1
-1
18099
-1
-1
-1
-1
-1
-1
10680
16744
-1
25425
-1
14682
26642
6578
23524
6678
-1
-1
25425
-1
17564
30052
-1
28601
30294...
Jury's answer
-1
-1
23524
-1
19862
23524
10799
23524
19862
-1
-1
5595
23524
-1
19862
-1
31351
30294
19862
30294
19862
21609
-1
-1
16714
30294
17816
17816
-1
-1
23524
16714
-1
21592
17564
5097
-1
-1
17816
-1
-1
-1
6578
-1
21609
21609
4821
20531
-1
-1
17816
-1
-1
6578
-1
26642
26642
10680
-1
30294
14682
17816
-1
-1
-1
18099
-1
-1
-1
-1
-1
-1
10680
16744
-1
25425
-1
14682
26642
6578
23524
6678
-1
-1
25425
-1
17564
30052
-1
28601
30294...
Checker comment
ok 60012 lines
 
 
70
Time: 31 ms, memory: 3708 KB
Verdict: OK
Input
100000
1 141
2 5499 141 7642
1 3630
1 15806
2 7903 7903 51983
1 21314
2 21780 1815 16197
2 32065 605 61592
2 47190 3630 52016
2 23709 7903 13792
1 10392
2 36372 5196 57083
2 58888 3464 97458
2 31612 7903 16907
1 17593
1 14344
1 2280
1 16138
2 51960 3464 65601
1 32452
1 18998
1 28884
2 21091 23 44677
1 30107
2 43032 14344 80421
2 14344 14344 29384
2 28688 7172 57143
1 5867
2 28884 28884 85012
2 12948 996 56086
2 9499 9499 29637
1 13155
1 7343
2 18998 9499 12132
2 18998 189...
Participant's output
141
15806
-1
3630
3630
-1
10392
10392
-1
10392
18998
14344
14344
14344
28884
28884
18998
-1
-1
18998
15806
-1
10392
5867
-1
-1
-1
13121
14344
28884
-1
30630
16138
30630
30630
15806
13155
8540
2280
11226
28884
-1
-1
31577
14064
-1
-1
10648
18998
16820
8235
21314
16820
8540
12804
9527
-1
25230
30630
5867
-1
17745
13128
13128
11226
24035
17745
24035
5867
-1
3867
10999
28884
-1
15806
14064
21314
16820
24035
16820
26702
17096
2262...
Jury's answer
141
15806
-1
3630
3630
-1
10392
10392
-1
10392
18998
14344
14344
14344
28884
28884
18998
-1
-1
18998
15806
-1
10392
5867
-1
-1
-1
13121
14344
28884
-1
30630
16138
30630
30630
15806
13155
8540
2280
11226
28884
-1
-1
31577
14064
-1
-1
10648
18998
16820
8235
21314
16820
8540
12804
9527
-1
25230
30630
5867
-1
17745
13128
13128
11226
24035
17745
24035
5867
-1
3867
10999
28884
-1
15806
14064
21314
16820
24035
16820
26702
17096
2262...
Checker comment
ok 59874 lines
 
 
71
Time: 46 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 17270
2 8635 8635 27347
2 34540 8635 83654
2 69080 17270 97382
2 86350 8635 100000
2 43175 8635 93167
1 12491
1 30720
2 38400 7680 79169
1 26709
1 31221
2 80127 26709 100000
2 61440 3840 92794
1 9289
1 12232
2 25600 5120 59735
1 15225
2 10150 5075 37968
1 18871
2 26709 26709 85969
1 27191
2 53418 26709 87443
2 58880 2560 22824
1 8854
1 14112
1 10607
2 26709 26709 6716
1 26526
1 18147
2 23040 7680 30061
1 19015
2 9289 9289 12309
1 32337
1 21205
1 3514
1 21118
2 ...
Participant's output
17270
17270
17270
-1
17270
30720
-1
30720
30720
15225
26709
26709
-1
-1
-1
-1
14112
-1
-1
-1
-1
18147
18147
15225
15225
14112
14112
-1
30720
14685
-1
17270
30720
18871
-1
14112
17787
14112
17270
-1
-1
-1
17270
16128
-1
-1
21205
18871
30720
-1
-1
26474
12232
26474
32337
-1
8270
-1
26474
17739
26474
12232
15225
16128
-1
16128
21738
8194
-1
-1
30800
14112
-1
22879
30800
30720
3674
26526
5532
16660
7593
21738
9289
-1
-1
5532
...
Jury's answer
17270
17270
17270
-1
17270
30720
-1
30720
30720
15225
26709
26709
-1
-1
-1
-1
14112
-1
-1
-1
-1
18147
18147
15225
15225
14112
14112
-1
30720
14685
-1
17270
30720
18871
-1
14112
17787
14112
17270
-1
-1
-1
17270
16128
-1
-1
21205
18871
30720
-1
-1
26474
12232
26474
32337
-1
8270
-1
26474
17739
26474
12232
15225
16128
-1
16128
21738
8194
-1
-1
30800
14112
-1
22879
30800
30720
3674
26526
5532
16660
7593
21738
9289
-1
-1
5532
...
Checker comment
ok 60173 lines
 
 
72
Time: 46 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 19019
2 19019 19019 12409
1 1535
2 19019 1463 11800
2 57057 19019 31953
2 86086 1001 100000
1 27230
1 13232
2 5446 778 15867
2 38038 19019 6048
1 9551
1 13807
2 23340 1945 74318
2 65352 5446 93789
1 16160
1 28171
2 9824 32 41248
2 80800 16160 99468
2 3890 3890 40052
2 16338 5446 44576
2 13232 13232 36226
2 64640 16160 32326
1 10161
2 30261 30261 11157
2 25340 70 59301
1 24402
1 13266
2 10897 10897 18976
1 20800
2 2080 2080 32179
2 32000 1600 79716
2 65047 32523 2915...
Participant's output
-1
-1
-1
-1
-1
-1
27230
27230
16160
16160
27230
27230
13232
-1
-1
27230
-1
20800
20800
-1
20800
9551
-1
28171
-1
27230
-1
13232
19068
-1
-1
-1
19068
19068
19019
10161
19068
27284
19068
-1
19068
-1
-1
15160
19068
17521
19068
-1
-1
24753
30050
19068
20800
26306
19019
19658
-1
19068
28171
13232
-1
-1
27284
6140
20800
14714
20800
8075
12130
30050
6140
12130
3306
19019
-1
-1
3306
17521
8075
19068
19068
-1
15828
-1
-1
-1
-1
-1...
Jury's answer
-1
-1
-1
-1
-1
-1
27230
27230
16160
16160
27230
27230
13232
-1
-1
27230
-1
20800
20800
-1
20800
9551
-1
28171
-1
27230
-1
13232
19068
-1
-1
-1
19068
19068
19019
10161
19068
27284
19068
-1
19068
-1
-1
15160
19068
17521
19068
-1
-1
24753
30050
19068
20800
26306
19019
19658
-1
19068
28171
13232
-1
-1
27284
6140
20800
14714
20800
8075
12130
30050
6140
12130
3306
19019
-1
-1
3306
17521
8075
19068
19068
-1
15828
-1
-1
-1
-1
-1...
Checker comment
ok 60189 lines
 
 
73
Time: 31 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 5864
2 46912 5864 14741
2 2932 2932 15475
1 25683
2 70368 5864 83708
2 11728 5864 37938
1 31466
1 17308
1 5774
2 4892 1223 55029
1 16358
2 22014 1223 79994
2 57253 8179 505
1 25352
1 8351
2 25352 25352 14211
2 38028 12676 93290
1 3645
1 4290
2 79365 2145 94455
2 76056 6338 100000
2 53625 715 90025
1 29563
2 12420 135 43737
2 65432 16358 90849
2 17322 2887 5163
2 21242 21242 30434
1 8740
2 4290 286 25949
2 16358 16358 37828
2 25352 25352 24016
1 29304
2 8561 8561 29...
Participant's output
-1
5864
5864
5864
25683
25683
-1
-1
25352
4290
-1
4290
3645
16358
-1
-1
4290
16358
-1
-1
29304
29304
25352
5774
-1
-1
3645
4290
28214
-1
-1
29304
24945
25352
5774
29304
-1
-1
-1
-1
13513
21266
-1
16358
-1
21266
17718
3963
-1
-1
-1
32598
21234
8740
-1
-1
16358
-1
24945
21234
29304
-1
21266
-1
16358
15927
1804
11813
27235
-1
-1
-1
-1
-1
32130
25352
-1
29304
6182
-1
29304
11633
-1
29304
-1
-1
9925
32130
-1
30128
10038
2...
Jury's answer
-1
5864
5864
5864
25683
25683
-1
-1
25352
4290
-1
4290
3645
16358
-1
-1
4290
16358
-1
-1
29304
29304
25352
5774
-1
-1
3645
4290
28214
-1
-1
29304
24945
25352
5774
29304
-1
-1
-1
-1
13513
21266
-1
16358
-1
21266
17718
3963
-1
-1
-1
32598
21234
8740
-1
-1
16358
-1
24945
21234
29304
-1
21266
-1
16358
15927
1804
11813
27235
-1
-1
-1
-1
-1
32130
25352
-1
29304
6182
-1
29304
11633
-1
29304
-1
-1
9925
32130
-1
30128
10038
2...
Checker comment
ok 60127 lines
 
 
74
Time: 46 ms, memory: 3724 KB
Verdict: OK
Input
100000
1 8235
2 8235 915 1013
1 14505
2 8235 2745 1471
1 21419
2 92826 5157 11381
1 13819
1 13156
1 4537
2 23023 3289 63929
1 2341
2 66798 11133 5854
2 26312 13156 52532
2 55276 13819 87866
2 13611 4537 17336
2 13611 4537 37911
2 1104 92 2011
2 21419 21419 49948
1 4564
2 13156 13156 36013
2 55276 13819 82836
2 13611 4537 1054
2 45287 253 70271
2 11895 915 47787
2 26312 13156 68739
2 64239 32119 19054
2 9150 915 40802
2 19734 6578 17094
2 5853 532 1885
2 42838 21419 95797
2 48...
Participant's output
-1
-1
-1
13156
-1
13156
13819
-1
4537
-1
21419
13156
13819
-1
13156
8235
13156
-1
8235
-1
-1
21419
-1
8235
-1
-1
-1
8235
21419
-1
21419
-1
13819
-1
8700
-1
-1
30429
-1
30429
-1
8700
-1
-1
21346
10438
-1
-1
-1
-1
2490
-1
24788
10438
-1
-1
-1
32050
-1
16266
-1
8700
32050
-1
-1
24788
23040
20537
-1
24788
-1
30429
-1
-1
21022
11137
24788
16266
-1
9666
25832
20537
-1
21022
2864
-1
-1
25788
23040
-1
21408
22539
-1
-1
17...
Jury's answer
-1
-1
-1
13156
-1
13156
13819
-1
4537
-1
21419
13156
13819
-1
13156
8235
13156
-1
8235
-1
-1
21419
-1
8235
-1
-1
-1
8235
21419
-1
21419
-1
13819
-1
8700
-1
-1
30429
-1
30429
-1
8700
-1
-1
21346
10438
-1
-1
-1
-1
2490
-1
24788
10438
-1
-1
-1
32050
-1
16266
-1
8700
32050
-1
-1
24788
23040
20537
-1
24788
-1
30429
-1
-1
21022
11137
24788
16266
-1
9666
25832
20537
-1
21022
2864
-1
-1
25788
23040
-1
21408
22539
-1
-1
17...
Checker comment
ok 59949 lines
 
 
75
Time: 46 ms, memory: 3684 KB
Verdict: OK
Input
100000
1 28042
2 14021 14021 17959
2 24036 4006 27395
1 18186
1 10889
2 8012 4006 67395
2 90930 9093 100000
2 19918 866 39816
1 6368
1 23339
2 30310 6062 50975
1 32750
2 72744 9093 93199
2 12018 4006 67924
2 6062 6062 33280
2 54558 18186 76551
2 27279 9093 67451
2 70017 23339 96098
2 18186 6062 66506
1 29960
1 17065
1 29127
2 37036 18518 28090
1 11926
2 8448 4224 24192
2 5963 5963 43353
2 28042 28042 13413
1 9
1 32296
2 55784 2936 14475
2 14980 14980 77326
1 5028
1 17939
2...
Participant's output
-1
-1
28042
-1
18186
18186
18186
28042
18186
18186
18186
23339
18186
-1
-1
11926
-1
-1
29960
-1
-1
27398
27398
28042
-1
11926
-1
32296
5028
31905
-1
-1
-1
-1
-1
26868
18186
12881
5976
27398
11926
-1
6368
5976
7200
-1
32750
11926
-1
7200
10889
7200
7200
-1
16645
-1
20364
-1
26868
26868
29960
7200
25466
10889
-1
26868
-1
-1
12881
-1
29960
-1
12881
20364
-1
15420
27713
31905
5838
-1
-1
-1
28954
20170
7200
7200
-1
26868
-1
...
Jury's answer
-1
-1
28042
-1
18186
18186
18186
28042
18186
18186
18186
23339
18186
-1
-1
11926
-1
-1
29960
-1
-1
27398
27398
28042
-1
11926
-1
32296
5028
31905
-1
-1
-1
-1
-1
26868
18186
12881
5976
27398
11926
-1
6368
5976
7200
-1
32750
11926
-1
7200
10889
7200
7200
-1
16645
-1
20364
-1
26868
26868
29960
7200
25466
10889
-1
26868
-1
-1
12881
-1
29960
-1
12881
20364
-1
15420
27713
31905
5838
-1
-1
-1
28954
20170
7200
7200
-1
26868
-1
...
Checker comment
ok 59942 lines
 
 
76
Time: 31 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 5602
2 5602 5602 11694
2 5602 5602 24179
2 44816 5602 82513
2 57439 28719 11479
1 23526
2 40517 1307 96106
1 25881
1 24139
2 23526 23526 9643
1 16172
2 43540 1244 7432
1 11867
2 76606 25535 12754
2 24139 24139 7403
1 6258
1 26846
1 32513
1 17414
1 2488
2 76817 4043 2686
1 1433
2 64688 16172 95801
1 18314
1 22942
1 3180
2 45892 2086 54971
2 47052 7842 92111
1 4151
1 14568
1 29171
1 31034
2 29171 29171 29428
1 4791
2 1908 636 1274
2 34828 17414 84663
1 4562
1 11...
Participant's output
5602
5602
5602
-1
23526
-1
-1
-1
-1
-1
16172
6258
23526
-1
-1
17414
22942
4791
23526
23526
-1
6258
-1
-1
-1
5602
31034
4791
25881
31034
22942
18186
14568
14553
23526
-1
4562
-1
25881
-1
19012
-1
-1
18186
9885
-1
-1
11772
25210
-1
29171
3180
25210
6258
3180
-1
3180
-1
13337
-1
14553
-1
-1
9885
-1
-1
-1
17414
4151
29171
16172
-1
-1
-1
-1
-1
25210
24524
-1
14568
-1
27162
29133
18314
26832
25210
26832
3518
30279
-1
32513
...
Jury's answer
5602
5602
5602
-1
23526
-1
-1
-1
-1
-1
16172
6258
23526
-1
-1
17414
22942
4791
23526
23526
-1
6258
-1
-1
-1
5602
31034
4791
25881
31034
22942
18186
14568
14553
23526
-1
4562
-1
25881
-1
19012
-1
-1
18186
9885
-1
-1
11772
25210
-1
29171
3180
25210
6258
3180
-1
3180
-1
13337
-1
14553
-1
-1
9885
-1
-1
-1
17414
4151
29171
16172
-1
-1
-1
-1
-1
25210
24524
-1
14568
-1
27162
29133
18314
26832
25210
26832
3518
30279
-1
32513
...
Checker comment
ok 59876 lines
 
 
77
Time: 46 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 5992
2 65912 5992 95351
1 10901
2 41944 2996 55622
1 4817
2 6104 14 17590
2 65406 10901 27514
2 4817 4817 27165
1 12672
2 5992 5992 12457
1 9143
1 5191
2 10901 10901 41854
2 12672 12672 55158
1 27496
2 27496 13748 60537
1 4697
2 71808 528 22847
2 5992 2996 3640
2 12672 12672 26740
1 17270
2 17270 8635 41000
2 35952 5992 64011
2 17270 1727 62664
1 25141
2 34540 8635 83436
1 12776
2 45715 9143 66855
2 8635 8635 15323
1 16309
1 20582
1 16160
2 89880 2996 98149
2 4299...
Participant's output
5992
5992
5992
-1
4817
5992
10901
12672
27496
-1
-1
12672
17270
5992
17270
17270
9143
-1
5992
-1
-1
5992
27496
4697
12672
-1
-1
-1
13230
-1
13230
31706
16160
17270
28704
26940
26940
-1
12672
28704
28704
17270
-1
12672
-1
26940
5992
4697
-1
27496
27496
27496
16309
4697
-1
12776
26940
17270
21355
-1
28910
22805
12672
17270
17270
15623
28704
28704
15623
26940
-1
-1
28704
20582
-1
17536
-1
13230
14060
5992
18861
27496
-1
26940
...
Jury's answer
5992
5992
5992
-1
4817
5992
10901
12672
27496
-1
-1
12672
17270
5992
17270
17270
9143
-1
5992
-1
-1
5992
27496
4697
12672
-1
-1
-1
13230
-1
13230
31706
16160
17270
28704
26940
26940
-1
12672
28704
28704
17270
-1
12672
-1
26940
5992
4697
-1
27496
27496
27496
16309
4697
-1
12776
26940
17270
21355
-1
28910
22805
12672
17270
17270
15623
28704
28704
15623
26940
-1
-1
28704
20582
-1
17536
-1
13230
14060
5992
18861
27496
-1
26940
...
Checker comment
ok 60102 lines
 
 
78
Time: 46 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 19334
1 5654
2 19334 9667 46615
2 38668 19334 64511
2 38668 9667 89638
2 33924 5654 48298
2 24858 2762 52306
1 29324
1 9008
2 4504 2252 38531
2 87972 29324 100000
1 15152
1 23301
1 10795
1 25843
1 7355
1 5073
2 62103 127 87575
1 7204
1 31287
2 68184 3788 88765
2 8763 127 20674
1 13278
2 7767 2589 52554
1 7769
1 166
2 2589 2589 55286
2 1028 514 29858
1 25658
1 15402
1 21208
1 21628
2 29324 14662 76886
2 14408 3602 51143
2 4318 2159 44372
2 5889 453 44078
1 30574...
Participant's output
19334
19334
19334
5654
19334
9008
-1
10795
15152
10795
23301
23301
5654
29324
7204
10795
15402
7204
15402
15402
-1
29324
19334
5073
13278
-1
13278
21208
-1
13278
29324
11403
7355
-1
-1
-1
-1
15402
9008
15152
29324
26344
13278
-1
-1
5654
-1
-1
19314
-1
-1
19314
16287
-1
7204
-1
5654
-1
10795
19314
11403
19314
9008
-1
9008
20992
19314
3001
13278
-1
20992
-1
7610
15402
26344
20992
-1
19912
9008
15402
-1
7204
19314
18745
-1
-1...
Jury's answer
19334
19334
19334
5654
19334
9008
-1
10795
15152
10795
23301
23301
5654
29324
7204
10795
15402
7204
15402
15402
-1
29324
19334
5073
13278
-1
13278
21208
-1
13278
29324
11403
7355
-1
-1
-1
-1
15402
9008
15152
29324
26344
13278
-1
-1
5654
-1
-1
19314
-1
-1
19314
16287
-1
7204
-1
5654
-1
10795
19314
11403
19314
9008
-1
9008
20992
19314
3001
13278
-1
20992
-1
7610
15402
26344
20992
-1
19912
9008
15402
-1
7204
19314
18745
-1
-1...
Checker comment
ok 60227 lines
 
 
79
Time: 30 ms, memory: 3736 KB
Verdict: OK
Input
100000
1 26170
2 91595 2617 100000
1 5760
1 12797
2 51188 12797 32602
2 7680 1920 5567
2 62855 31427 17803
1 2638
1 26493
2 90118 30039 24066
2 20736 1152 55578
2 5760 5760 37902
2 26170 26170 54040
2 2880 2880 15901
1 14201
1 1847
2 16623 1847 11550
1 30565
2 73276 5234 99941
1 5493
2 52340 26170 89000
2 7452 2484 28899
2 60191 2617 88119
2 10468 2617 22708
2 8250 30 29093
1 5696
2 17662 8831 55847
2 5493 5493 5072
2 20400 240 31942
2 26170 2617 66030
1 15507
2 26170 26170 ...
Participant's output
-1
-1
-1
-1
-1
5760
5760
26170
5760
-1
26170
26170
-1
26170
-1
5760
26493
-1
5760
26170
-1
26170
26170
5696
26493
15507
9382
26493
5760
26493
-1
30565
26170
30565
-1
-1
12797
10914
15288
5696
15288
23767
15123
-1
-1
15288
-1
-1
17461
-1
26170
10914
2350
10914
15288
-1
5760
17796
17796
-1
10914
-1
5760
15507
-1
12797
15288
17461
-1
14201
25387
-1
25760
17796
3140
24910
-1
12797
-1
12200
12200
28165
-1
-1
28165
-1
-1
29994...
Jury's answer
-1
-1
-1
-1
-1
5760
5760
26170
5760
-1
26170
26170
-1
26170
-1
5760
26493
-1
5760
26170
-1
26170
26170
5696
26493
15507
9382
26493
5760
26493
-1
30565
26170
30565
-1
-1
12797
10914
15288
5696
15288
23767
15123
-1
-1
15288
-1
-1
17461
-1
26170
10914
2350
10914
15288
-1
5760
17796
17796
-1
10914
-1
5760
15507
-1
12797
15288
17461
-1
14201
25387
-1
25760
17796
3140
24910
-1
12797
-1
12200
12200
28165
-1
-1
28165
-1
-1
29994...
Checker comment
ok 59859 lines
 
 
80
Time: 30 ms, memory: 3720 KB
Verdict: OK
Input
100000
1 29736
2 15222 354 66823
1 29438
2 3717 3717 24254
2 88314 29438 100000
1 13559
2 14868 7434 65102
1 6461
2 29736 14868 77830
2 27258 826 60853
1 24938
1 20919
2 23998 923 37194
2 4956 1652 54878
2 18880 236 57879
2 29438 14719 59147
2 9912 9912 13890
1 1371
1 24169
1 11542
2 69384 3304 99325
1 28740
1 5205
2 20919 20919 27994
2 4404 1101 43954
1 3334
2 1593 531 42825
2 9912 9912 57553
1 29236
2 13880 1735 33952
2 24169 24169 61178
2 48338 24169 76424
2 29736 2478 6...
Participant's output
29736
-1
-1
29736
29736
29736
6461
29736
29736
29438
-1
29736
-1
20919
29736
29736
5205
24169
24169
29736
-1
29736
11542
24938
6461
14496
24169
20919
28740
26754
-1
-1
14496
-1
20919
28740
17800
-1
14496
-1
28868
-1
26754
31428
26754
18878
-1
-1
28740
20919
28740
-1
27798
11934
-1
22694
6461
24838
13250
15484
14496
10230
28868
5482
11542
28740
-1
13250
30484
17800
-1
29736
-1
6461
11542
5022
-1
18878
5482
20919
22694
13250
17...
Jury's answer
29736
-1
-1
29736
29736
29736
6461
29736
29736
29438
-1
29736
-1
20919
29736
29736
5205
24169
24169
29736
-1
29736
11542
24938
6461
14496
24169
20919
28740
26754
-1
-1
14496
-1
20919
28740
17800
-1
14496
-1
28868
-1
26754
31428
26754
18878
-1
-1
28740
20919
28740
-1
27798
11934
-1
22694
6461
24838
13250
15484
14496
10230
28868
5482
11542
28740
-1
13250
30484
17800
-1
29736
-1
6461
11542
5022
-1
18878
5482
20919
22694
13250
17...
Checker comment
ok 59824 lines
 
 
81
Time: 30 ms, memory: 3732 KB
Verdict: OK
Input
100000
1 3494
2 20964 3494 45784
2 31446 3494 45447
1 3495
2 24465 3495 16210
2 59415 3495 87775
2 41940 3495 71393
2 6990 699 3694
2 87375 3495 91875
1 18510
2 37020 6170 61595
1 25365
2 76890 1165 84558
2 55530 18510 91806
2 55530 18510 83517
2 3115 445 57605
2 46275 9255 19268
2 55530 18510 74434
1 27286
1 27174
1 32379
1 26260
2 33820 8455 68526
2 27816 6954 20887
1 14656
2 95539 31846 21164
2 46956 129 96641
2 24465 1165 42817
2 33820 8455 72835
2 60620 30310 814
2 40775...
Participant's output
3494
3494
-1
3495
3495
-1
3495
18510
3495
18510
18510
25365
-1
18510
25365
-1
-1
32379
3495
25365
-1
3495
-1
18510
-1
-1
-1
25365
-1
26260
26260
25365
27174
-1
16892
18510
23124
-1
26260
25365
23124
-1
14656
14656
400
25365
-1
8398
-1
-1
-1
26260
-1
-1
-1
27174
32379
9811
-1
-1
8398
8398
23124
8398
20464
3494
12765
27174
12765
14656
-1
-1
-1
6079
-1
3762
23124
12261
28684
-1
-1
8750
18510
-1
-1
-1
18510
14926
-1
11756
...
Jury's answer
3494
3494
-1
3495
3495
-1
3495
18510
3495
18510
18510
25365
-1
18510
25365
-1
-1
32379
3495
25365
-1
3495
-1
18510
-1
-1
-1
25365
-1
26260
26260
25365
27174
-1
16892
18510
23124
-1
26260
25365
23124
-1
14656
14656
400
25365
-1
8398
-1
-1
-1
26260
-1
-1
-1
27174
32379
9811
-1
-1
8398
8398
23124
8398
20464
3494
12765
27174
12765
14656
-1
-1
-1
6079
-1
3762
23124
12261
28684
-1
-1
8750
18510
-1
-1
-1
18510
14926
-1
11756
...
Checker comment
ok 59877 lines
 
 
82
Time: 30 ms, memory: 3728 KB
Verdict: OK
Input
100000
1 31896
2 63792 15948 95748
2 10632 10632 12922
2 5316 1772 46835
2 21264 10632 56478
2 46417 3868 27255
2 47844 15948 94579
2 31896 31896 92131
1 278
1 26741
1 1709
2 15948 15948 76717
1 27910
2 15851 121 69691
2 70499 221 97456
2 7974 7974 15152
1 3229
2 37752 1573 21088
1 20717
2 20717 20717 60323
1 31190
2 74424 5316 100000
2 22800 22800 30394
2 7974 3987 18006
2 12476 6238 63622
2 31896 7974 63873
2 15062 886 51733
2 83730 13955 29985
2 31896 5316 84681
2 53482 267...
Participant's output
31896
-1
31896
31896
-1
31896
31896
31896
26741
26741
-1
-1
20717
-1
-1
-1
31190
31896
31896
-1
31896
26741
-1
31896
11092
26741
20717
-1
-1
-1
31896
-1
-1
13575
13778
26741
26741
31896
8825
1322
24380
1374
14660
20192
20192
13979
13575
522
28968
-1
22580
3229
28968
8825
-1
522
14660
14660
16337
1374
7670
27910
-1
4634
-1
24380
16337
5715
7670
-1
31896
-1
21814
-1
31896
13979
-1
31896
24380
22712
21814
20717
22580
28968
-1
...
Jury's answer
31896
-1
31896
31896
-1
31896
31896
31896
26741
26741
-1
-1
20717
-1
-1
-1
31190
31896
31896
-1
31896
26741
-1
31896
11092
26741
20717
-1
-1
-1
31896
-1
-1
13575
13778
26741
26741
31896
8825
1322
24380
1374
14660
20192
20192
13979
13575
522
28968
-1
22580
3229
28968
8825
-1
522
14660
14660
16337
1374
7670
27910
-1
4634
-1
24380
16337
5715
7670
-1
31896
-1
21814
-1
31896
13979
-1
31896
24380
22712
21814
20717
22580
28968
-1
...
Checker comment
ok 60013 lines
 
 
83
Time: 31 ms, memory: 3716 KB
Verdict: OK
Input
100000
1 18531
2 18531 18531 63429
2 11502 639 28935
2 92655 6177 100000
2 37062 6177 70733
1 1993
1 8314
2 66997 16749 23551
1 7315
1 4131
1 23096
2 37062 18531 74459
2 12393 4131 40406
2 51852 4321 30047
2 38340 639 87708
2 61783 1993 75941
2 2754 1377 9461
1 9890
2 8314 8314 28640
1 15293
1 6620
2 58781 29390 11180
2 12354 6177 43554
2 13240 6620 44659
2 55593 18531 91968
1 9941
1 32100
2 70227 4131 8643
1 19220
1 21184
1 26321
2 57660 19220 86216
1 21434
2 43656 1284 9...
Participant's output
18531
-1
-1
18531
-1
18531
4131
-1
18531
1993
4131
8314
-1
18531
6620
18531
-1
19220
32100
-1
8778
8778
21184
894
23096
23096
19220
-1
18531
-1
23096
-1
-1
18531
27064
4131
19135
1687
-1
14904
-1
-1
9890
32100
27336
19135
8314
25709
29292
-1
31098
-1
32100
8631
-1
29292
8631
12093
32100
4131
-1
15340
11868
28098
7590
8631
2615
-1
27336
-1
23096
9890
-1
27064
-1
17965
27064
27064
32100
23096
27064
32100
-1
8275
6620
28098
...
Jury's answer
18531
-1
-1
18531
-1
18531
4131
-1
18531
1993
4131
8314
-1
18531
6620
18531
-1
19220
32100
-1
8778
8778
21184
894
23096
23096
19220
-1
18531
-1
23096
-1
-1
18531
27064
4131
19135
1687
-1
14904
-1
-1
9890
32100
27336
19135
8314
25709
29292
-1
31098
-1
32100
8631
-1
29292
8631
12093
32100
4131
-1
15340
11868
28098
7590
8631
2615
-1
27336
-1
23096
9890
-1
27064
-1
17965
27064
27064
32100
23096
27064
32100
-1
8275
6620
28098
...
Checker comment
ok 60067 lines
 
 
84
Time: 0 ms, memory: 3724 KB
Verdict: OK
Input
2
1 4
2 1 2 100
Participant's output
-1
Jury's answer
-1
Checker comment
ok single line: '-1'