QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#139385#1351. Koosaga's ProblemCrysflyAC ✓294ms73376kbC++171.5kb2023-08-13 10:55:542023-08-13 10:55:57

Judging History

你现在查看的是测评时间为 2023-08-13 10:55:57 的历史记录

  • [2023-08-13 22:54:23]
  • 管理员手动重测本题所有得分≥97分的提交记录
  • 测评结果:AC
  • 用时:322ms
  • 内存:74900kb
  • [2023-08-13 22:53:38]
  • 管理员手动重测该提交记录
  • 测评结果:100
  • 用时:301ms
  • 内存:76068kb
  • [2023-08-13 10:55:57]
  • 评测
  • 测评结果:0
  • 用时:294ms
  • 内存:73376kb
  • [2023-08-13 10:55:54]
  • 提交

answer

// what is matter? never mind. 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2") 
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
//#define int long long
#define ull unsigned long long
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 500005
#define inf 0x3f3f3f3f

int n,m;
vector<pii>e[maxn];
ull c[maxn],val[maxn],odd;
mt19937_64 rnd(114);

int cnte;
int fa[maxn],fe[maxn],dep[maxn];
void dfs(int u){
	for(auto [v,w]:e[u]){
		if(w==fe[u])continue;
		if(!dep[v]){
			dep[v]=dep[u]+1,fa[v]=u,fe[v]=w;
			dfs(v);
			val[u]^=val[v];
		}
		else if(dep[v]<dep[u]){
			c[w]=rnd();
			val[u]^=c[w],val[v]^=c[w];
			if((dep[u]-dep[v])%2==0)odd^=c[w];
		}
	}
	c[fe[u]]=val[u];
}

signed main()
{
	n=read(),m=read();
	For(i,1,m){
		int u=read(),v=read();
		e[u].pb(mkp(v,i)),e[v].pb(mkp(u,i));
	}
	dep[1]=1,dfs(1);
	if(!odd)puts("1"),exit(0);
	ull res=0;
//	For(i,1,m)For(j,i+1,m)res+=(c[i]^c[j])==odd;
	For(i,1,m)res+=(c[i]==odd);
	if(res)cout<<res,exit(0);
	map<ull,int>mp;
	For(i,1,m)res+=mp[c[i]^odd],++mp[c[i]];
	cout<<res;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 5ms
memory: 21360kb

input:

3 2
1 2
2 3

output:

1

result:

ok answer is '1'

Test #2:

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

input:

4 6
1 2
1 3
1 4
2 3
2 4
3 4

output:

3

result:

ok answer is '3'

Test #3:

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

input:

5 9
1 2
1 3
1 4
2 3
2 4
2 5
3 4
3 5
4 5

output:

0

result:

ok answer is '0'

Test #4:

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

input:

12 16
1 2
2 3
3 4
4 1
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 5
1 5
2 7
3 9
4 11

output:

2

result:

ok answer is '2'

Test #5:

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

input:

3 3
1 2
2 3
3 1

output:

3

result:

ok answer is '3'

Test #6:

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

input:

6 9
1 4
1 5
1 6
2 4
2 5
2 6
3 4
3 5
3 6

output:

1

result:

ok answer is '1'

Test #7:

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

input:

13 16
2 8
10 11
3 10
2 3
5 9
9 11
2 6
4 7
1 3
5 6
4 10
1 6
8 13
11 12
8 12
6 13

output:

3

result:

ok answer is '3'

Test #8:

score: 0
Accepted
time: 5ms
memory: 22428kb

input:

4 3
3 4
2 3
1 2

output:

1

result:

ok answer is '1'

Test #9:

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

input:

4 5
3 4
1 2
1 3
2 4
1 4

output:

1

result:

ok answer is '1'

Test #10:

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

input:

32 53
28 29
17 32
17 23
11 32
7 16
21 29
19 20
6 22
1 8
13 26
13 24
18 27
4 11
3 31
7 25
6 21
20 32
6 28
12 26
10 15
11 29
3 20
6 20
4 20
21 23
4 17
17 29
20 23
22 29
11 23
3 17
2 12
10 25
5 19
10 11
3 28
14 26
12 19
8 12
6 17
4 22
20 29
4 28
1 30
23 28
23 31
6 11
22 32
9 30
27 30
21 32
4 21
9 15

output:

9

result:

ok answer is '9'

Test #11:

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

input:

4 4
2 4
1 3
1 2
1 4

output:

3

result:

ok answer is '3'

Test #12:

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

input:

1000 999
937 938
606 607
767 768
235 236
827 828
894 895
901 902
349 350
217 218
63 64
947 948
128 129
657 658
108 109
253 254
535 536
321 322
261 262
78 79
590 591
625 626
115 116
244 245
610 611
760 761
378 379
268 269
283 284
10 11
596 597
440 441
493 494
107 108
918 919
130 131
621 622
144 145
4...

output:

1

result:

ok answer is '1'

Test #13:

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

input:

1000 999
119 296
688 168
975 848
264 196
488 866
302 56
525 224
983 731
761 476
825 334
840 908
496 697
71 964
877 138
171 426
799 792
861 337
515 368
66 70
825 365
205 55
768 66
17 276
118 415
620 930
166 860
879 155
817 1
495 405
359 579
121 485
961 742
916 704
859 135
302 894
291 97
389 942
618 4...

output:

1

result:

ok answer is '1'

Test #14:

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

input:

1000 999
680 809
34 44
243 877
355 589
273 691
458 643
193 464
198 632
478 570
320 457
309 866
636 721
181 475
278 565
567 616
138 490
335 554
293 663
246 769
765 769
148 694
384 406
689 712
84 879
268 418
239 806
376 827
247 862
576 848
309 926
140 886
750 989
240 701
347 599
227 599
369 441
187 39...

output:

1

result:

ok answer is '1'

Test #15:

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

input:

1000 1176
133 835
227 953
33 449
196 934
171 587
659 790
256 605
72 393
438 601
599 922
177 221
28 84
156 782
17 48
49 302
198 613
142 154
156 601
788 898
295 431
714 982
374 990
394 539
45 837
73 340
203 371
46 239
159 621
26 424
193 249
623 777
43 184
257 308
582 994
419 420
237 895
373 963
206 58...

output:

6

result:

ok answer is '6'

Test #16:

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

input:

1000 1339
451 789
544 936
344 681
87 823
381 404
734 917
427 956
731 802
78 928
21 201
521 783
685 845
526 850
37 124
94 749
222 449
122 463
97 606
26 787
251 806
644 771
39 778
90 924
259 1000
339 938
758 935
100 722
105 762
4 969
254 420
174 969
908 964
36 304
438 444
46 410
267 433
51 942
938 960...

output:

1

result:

ok answer is '1'

Test #17:

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

input:

1000 1802
298 921
626 905
238 766
63 715
257 513
417 926
288 548
414 791
63 220
674 815
327 931
863 977
539 845
25 922
540 570
746 751
504 971
73 238
22 220
166 599
386 970
27 777
478 760
177 380
238 425
425 665
74 143
78 363
5 528
169 814
112 760
449 487
25 761
296 759
34 78
180 782
34 503
453 841
...

output:

825

result:

ok answer is '825'

Test #18:

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

input:

1000 1988
270 957
545 952
218 483
60 416
241 396
395 456
258 340
392 940
56 362
570 582
306 603
659 839
791 881
832 924
487 762
604 993
464 582
67 866
18 603
167 648
359 876
710 756
446 604
171 528
215 807
405 755
70 418
75 425
4 694
712 813
122 912
425 445
25 822
265 296
32 256
174 379
37 276
426 9...

output:

341

result:

ok answer is '341'

Test #19:

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

input:

1000 1032
593 809
799 834
878 896
154 226
625 931
92 334
9 812
878 348
817 948
335 874
38 215
331 978
306 997
614 573
661 614
459 38
6 625
220 364
145 682
435 876
891 601
200 244
228 407
743 915
28 612
174 372
579 730
313 347
445 717
702 836
938 983
655 704
955 981
272 988
123 332
165 305
866 939
14...

output:

422

result:

ok answer is '422'

Test #20:

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

input:

1000 1924
278 453
582 584
221 304
65 800
240 566
396 623
267 566
393 689
59 881
603 738
315 708
711 787
885 895
25 450
522 834
642 930
489 627
74 180
16 312
167 947
373 796
776 972
462 760
174 489
217 836
405 923
76 481
81 509
4 720
779 829
119 648
439 744
24 869
270 965
33 507
177 341
37 943
445 73...

output:

1

result:

ok answer is '1'

Test #21:

score: 0
Accepted
time: 5ms
memory: 22628kb

input:

1000 1991
274 347
551 797
218 772
57 468
235 442
388 740
258 961
387 513
52 289
574 876
304 348
669 746
780 872
820 909
500 646
621 744
477 857
62 979
19 688
159 350
361 528
719 821
452 583
166 633
217 261
398 587
65 190
69 405
2 794
723 751
110 890
421 637
26 306
268 514
33 212
169 339
36 225
424 9...

output:

1

result:

ok answer is '1'

Test #22:

score: 0
Accepted
time: 5ms
memory: 21668kb

input:

1000 1928
84 196
802 973
25 622
803 916
108 189
419 440
814 950
688 903
525 530
333 688
442 953
720 991
489 688
465 688
36 860
128 785
89 419
98 291
958 980
187 546
364 733
615 780
243 642
438 518
48 706
452 952
35 130
102 641
718 875
451 592
341 443
564 632
164 719
325 392
253 618
154 261
510 688
1...

output:

1

result:

ok answer is '1'

Test #23:

score: 0
Accepted
time: 9ms
memory: 26508kb

input:

100000 99999
89366 91622
12603 89366
86750 89366
8842 89366
14641 89366
41203 89366
31920 89366
89366 96734
28360 89366
48647 89366
85444 89366
75710 89366
36384 89366
6809 89366
89366 99332
32985 89366
48165 89366
57853 89366
73019 89366
32883 89366
20435 89366
63504 89366
46656 89366
57078 89366
6...

output:

1

result:

ok answer is '1'

Test #24:

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

input:

100000 99999
71282 97287
6507 99996
63733 64001
4506 60541
7606 92192
23327 63373
17503 21051
81910 97724
15366 81994
28382 68815
61930 90677
50752 70896
20255 67892
3458 79406
91827 97753
18154 40474
28047 97399
35085 83025
48103 83796
18096 73695
10801 27327
39595 42221
27005 46333
34491 51621
446...

output:

1

result:

ok answer is '1'

Test #25:

score: 0
Accepted
time: 13ms
memory: 26060kb

input:

100000 100000
52047 59665
59665 69113
59665 83945
13174 59665
59665 81134
59665 77600
27421 59665
59665 74469
59665 93945
59665 96712
32872 59665
59665 74329
59665 65436
59665 75171
59665 77952
59665 64008
59665 97796
14487 59665
59665 97693
59665 75034
19220 59665
59665 98010
4435 59665
10973 59665...

output:

3

result:

ok answer is '3'

Test #26:

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

input:

100000 100000
30703 90118
44336 63774
59821 74990
6812 21932
56433 89435
52608 79768
14774 22164
49427 53632
75357 95298
81814 95624
18048 91245
49308 51112
41129 48169
50151 93302
52995 82860
39929 79509
85110 97680
7513 27749
84734 92761
50016 90975
10100 29613
85899 93623
2240 68812
5629 22277
35...

output:

3

result:

ok answer is '3'

Test #27:

score: 0
Accepted
time: 24ms
memory: 32616kb

input:

100000 100000
30801 97154
44545 92438
60073 67655
6844 66945
56812 76338
52854 78197
14849 43566
49691 51780
75319 81189
81710 83599
18136 73974
49554 91764
41278 51954
50388 87338
53197 92982
40075 50827
84981 96946
7545 14303
84669 94070
50264 80902
10143 34482
85760 88357
2253 56982
5668 94218
35...

output:

1

result:

ok answer is '1'

Test #28:

score: 0
Accepted
time: 35ms
memory: 34880kb

input:

100000 100000
30767 54574
44372 55699
59799 72152
6805 97532
56345 84698
52578 83040
14767 17335
49396 89978
75314 81383
81872 96865
18041 35132
49275 66296
41136 94667
50109 85455
52930 55282
39926 51211
85260 96775
7503 55024
84902 93487
49980 73902
10088 84202
86028 97726
2233 71708
5623 28086
35...

output:

99999

result:

ok answer is '99999'

Test #29:

score: 0
Accepted
time: 24ms
memory: 36392kb

input:

100000 100000
30755 85428
44468 93421
59964 92461
6832 76372
56581 92396
52662 96850
14822 74330
49499 65067
75573 91512
82096 98550
18106 42397
49356 93201
41234 42805
50157 89066
53042 61629
40003 68235
85442 94576
7545 14446
85137 89150
50022 53680
10140 58315
86140 87230
2251 85077
5664 66161
35...

output:

1

result:

ok answer is '1'

Test #30:

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

input:

100000 99999
1 91622
1 12604
1 86751
1 8843
1 14642
1 41204
1 31921
1 96734
1 28361
1 48648
1 85445
1 75711
1 36385
1 6810
1 99332
1 32986
1 48166
1 57854
1 73020
1 32884
1 20436
1 63505
1 46657
1 57079
1 69281
1 9861
1 71914
1 75015
1 428
1 28193
1 8160
1 423
1 570
1 37464
1 88808
1 92439
1 99644
1...

output:

1

result:

ok answer is '1'

Test #31:

score: 0
Accepted
time: 27ms
memory: 38120kb

input:

100000 99999
91621 91622
12603 12604
86750 86751
8842 8843
14641 14642
41203 41204
31920 31921
96733 96734
28360 28361
48647 48648
85444 85445
75710 75711
36384 36385
6809 6810
99331 99332
32985 32986
48165 48166
57853 57854
73019 73020
32883 32884
20435 20436
63504 63505
46656 46657
57078 57079
692...

output:

1

result:

ok answer is '1'

Test #32:

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

input:

80000 80100
13286 16329
24065 70002
52355 57389
37245 43482
8840 25494
4906 60032
41115 55707
28608 78206
39841 44270
38935 67724
11316 18353
57632 65172
1744 36717
8868 76871
43070 46272
25385 42621
16159 73810
12402 57325
70208 79471
39418 68162
53789 74306
70143 75178
13873 64120
50415 73417
1163...

output:

39899

result:

ok answer is '39899'

Test #33:

score: 0
Accepted
time: 8ms
memory: 28016kb

input:

100000 99999
71031 77964
6512 55622
63593 80053
4533 13744
7596 33726
23296 83405
17462 62129
81827 95744
15397 50270
28269 68836
61797 78346
50650 59379
20128 83438
3494 27599
91809 91961
18083 77637
27926 85255
35024 79875
48040 65352
18029 63639
10796 34096
39479 60599
26950 61478
34422 36660
445...

output:

1

result:

ok answer is '1'

Test #34:

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

input:

100000 100100
3219 47727
82510 87616
34527 95559
51772 81628
25606 43364
16608 98054
12305 40411
13702 60209
18874 56075
64069 68780
12628 53125
22764 58332
3946 29805
9985 30781
19125 34047
53814 72897
27669 36609
30254 96597
88307 90955
94803 99930
33463 42386
22761 68939
22937 40625
73957 89169
5...

output:

1

result:

ok answer is '1'

Test #35:

score: 0
Accepted
time: 27ms
memory: 30796kb

input:

100000 100100
3192 69847
82628 86144
34584 82913
51799 69422
25591 98822
16536 47671
12259 98927
13664 92773
18789 62163
64032 85891
12600 94482
22740 83198
3909 25631
9941 95009
19036 98184
53856 98302
27677 73503
30275 42880
88467 95690
95277 97614
33518 61897
22738 32636
22911 95932
73953 76551
5...

output:

19676

result:

ok answer is '19676'

Test #36:

score: 0
Accepted
time: 27ms
memory: 32364kb

input:

100000 100100
3245 35185
82655 91380
34544 44074
51864 84518
25635 42996
16561 26376
12285 66381
13685 59022
18827 82358
64133 74224
12624 25164
22733 88104
3946 56773
9942 25895
19078 38891
53993 74263
27663 86511
30214 67752
88507 94773
94988 98737
33452 54813
22730 97029
22897 42466
74001 91609
5...

output:

55249

result:

ok answer is '55249'

Test #37:

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

input:

100000 100100
3187 82234
82779 87397
34522 42196
51678 95389
25561 70821
16536 56652
12253 17066
13689 79288
18801 94797
63897 92516
12601 65144
22715 28149
3897 68881
9916 21294
19046 75231
53772 86987
27626 62438
30210 33140
88515 95534
94822 98585
33500 47514
22711 88166
22891 50469
73923 89009
5...

output:

1

result:

ok answer is '1'

Test #38:

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

input:

100000 100086
42854 79349
35449 90716
24753 79104
48422 53549
3207 51247
50043 90570
69369 76898
45547 69511
27794 56980
27984 64590
60656 70939
20932 39458
20007 24572
16475 16773
35104 98562
8691 32704
8468 59411
38934 98796
31804 40062
10467 35694
2029 59590
93891 97624
21166 54812
94419 94563
38...

output:

4

result:

ok answer is '4'

Test #39:

score: 0
Accepted
time: 21ms
memory: 29148kb

input:

100000 100100
3175 35751
82677 95396
34483 50051
51619 67979
25584 44543
16574 46319
12266 33146
13697 64508
18843 60636
63880 64592
12609 19737
22767 59740
3878 65570
9926 65822
19086 87768
53679 57893
27681 51713
30190 99403
88203 96811
94815 99355
33427 68879
22763 67711
22946 32672
73817 78915
5...

output:

1

result:

ok answer is '1'

Test #40:

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

input:

100000 99999
1 91622
1 12604
1 86751
1 8843
1 14642
1 41204
1 31921
1 96734
1 28361
1 48648
1 85445
1 75711
1 36385
1 6810
1 99332
1 32986
1 48166
1 57854
1 73020
1 32884
1 20436
1 63505
1 46657
1 57079
1 69281
1 9861
1 71914
1 75015
1 428
1 28193
1 8160
1 423
1 570
1 37464
1 88808
1 92439
1 99644
1...

output:

1

result:

ok answer is '1'

Test #41:

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

input:

100000 99999
70980 79865
6504 49942
63509 81202
4501 7353
7600 81618
23296 48498
17387 34066
81867 84806
15316 38945
28375 85802
61821 83191
50690 57429
20159 48596
3449 89694
91771 99815
18056 63239
28043 45976
35206 39102
48132 75644
17989 72324
10790 94281
39717 84138
26986 51782
34613 67866
4471...

output:

1

result:

ok answer is '1'

Test #42:

score: 0
Accepted
time: 25ms
memory: 34960kb

input:

100000 108983
21404 28497
13689 70925
71958 74068
2781 97683
46835 69049
17997 38493
21756 76722
6630 95872
639 58783
28329 31299
24091 35440
40913 82273
38109 62691
4771 19453
62755 70375
74893 92009
9025 17849
1191 99151
51850 69612
40615 60737
69125 86355
70084 86364
64153 97666
53694 77948
27564...

output:

38180

result:

ok answer is '38180'

Test #43:

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

input:

100000 109000
27707 68530
592 32866
30670 38748
27262 52892
51114 94895
34640 93889
12424 22032
41275 98947
7912 29103
11149 40882
14235 47607
16048 49440
2472 25164
10378 81306
37728 65110
42214 62280
18595 94650
16802 98910
37660 82493
41491 89104
13152 84110
4558 90674
62853 70767
48530 50013
128...

output:

24969

result:

ok answer is '24969'

Test #44:

score: 0
Accepted
time: 39ms
memory: 35880kb

input:

100000 190844
13585 67402
32308 38320
31641 32411
12059 42183
40368 46576
49145 83830
23435 67024
48554 65783
360 41809
49690 61779
44873 85071
29405 54993
36235 90782
2419 68841
14362 83379
66794 96037
48566 60148
5026 91369
22289 94901
54891 55832
76527 86739
674 17495
26947 52337
17013 59294
3129...

output:

1

result:

ok answer is '1'

Test #45:

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

input:

100000 194584
87732 90808
42047 76222
13420 43242
9782 50201
6923 34878
2663 21591
55883 66067
54331 88112
88915 94705
57706 65336
59704 60396
34732 60683
21225 51922
55132 74153
3067 11247
5344 88565
39971 87907
63857 72342
37163 98822
20807 94565
51333 59071
26480 37289
4289 60980
18177 55294
3432...

output:

43360

result:

ok answer is '43360'

Test #46:

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

input:

100000 199939
70416 73740
75586 75638
71450 85096
63327 65018
48442 90771
8530 15589
37382 38390
37283 63532
16780 20903
24930 56513
65124 85977
44246 99362
45945 82907
4014 15561
31426 47134
31466 52535
282 40706
6200 15065
21886 28276
905 39852
46000 54889
73239 76576
19036 55173
17378 53119
13358...

output:

17389

result:

ok answer is '17389'

Test #47:

score: 0
Accepted
time: 27ms
memory: 37704kb

input:

100000 199984
7447 46857
9557 11457
7059 72433
28315 41209
10160 13204
62259 79002
7077 79377
88037 94214
1186 96505
31099 88035
31748 66238
11862 38368
71669 92960
72455 90720
7839 51902
1163 77623
58255 83799
52348 98051
39071 52755
17802 44490
32995 36579
3751 91493
187 77278
49537 75024
17719 80...

output:

1

result:

ok answer is '1'

Test #48:

score: 0
Accepted
time: 161ms
memory: 49244kb

input:

100000 181221
35628 99578
16271 95829
40 50284
78559 91482
27156 66558
12769 77608
72263 86992
72285 96603
37106 49734
38810 92181
53380 79666
22183 33285
44440 58562
53515 78880
54362 68580
9625 44440
36721 81728
29548 42240
42359 96705
23802 97034
4824 63574
38313 83808
10981 80801
54362 82136
307...

output:

0

result:

ok answer is '0'

Test #49:

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

input:

100000 199998
39600 42845
49274 57272
2834 91710
79755 80684
3558 53829
34319 65614
77081 91491
55299 91569
57795 59532
60832 75080
71661 86774
29469 29706
4639 71454
28919 48586
85159 93732
61677 94036
21529 70066
10551 97127
49909 86898
13907 97182
62244 99362
27728 89866
15911 69916
16252 71910
1...

output:

1

result:

ok answer is '1'

Test #50:

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

input:

100000 121568
22260 85459
29201 53730
474 37110
24532 65787
43760 48458
93174 98132
14910 72987
22191 49743
25448 98205
25101 62908
1666 38234
34791 97563
70105 84319
14123 88571
26885 27688
28637 88796
36019 60891
46484 52698
83717 91334
267 18279
24162 69211
11203 87216
2606 26133
6888 76567
1952 ...

output:

18

result:

ok answer is '18'

Test #51:

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

input:

100000 199949
60578 76731
74607 78617
18117 24307
47943 82642
47348 69863
5542 46076
31872 54566
48983 78464
43345 47633
29569 63294
32012 96520
22995 55339
35519 99963
79577 95442
6898 57819
12497 85659
32310 61160
52125 80084
47746 97712
17999 91141
17526 46999
11624 74672
84407 99933
164 53742
49...

output:

57034

result:

ok answer is '57034'

Test #52:

score: 0
Accepted
time: 192ms
memory: 59916kb

input:

100000 200250
78758 86284
30024 43760
2646 73259
71370 96998
27840 52149
12430 18266
29089 77209
32901 40834
24514 32003
42334 84288
16518 95701
96080 97449
5771 78386
20554 72594
25863 92024
8212 21491
31245 82796
2738 4249
31771 70957
5355 33958
19064 32627
13144 25358
45464 56436
5470 44208
74036...

output:

2

result:

ok answer is '2'

Test #53:

score: 0
Accepted
time: 27ms
memory: 38280kb

input:

100000 165921
1314 24368
14863 22958
3710 34917
52168 53729
95968 99700
62454 65065
24995 29987
39213 87819
88822 91217
77302 84671
23649 65261
64686 80889
34930 83075
13703 99743
10432 77473
37655 98488
1977 34917
67125 98339
17423 85726
33473 55054
38293 39656
27558 37084
34442 45799
9186 56044
13...

output:

33845

result:

ok answer is '33845'

Test #54:

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

input:

100000 232906
50906 56521
68568 77835
6911 35687
76633 93558
61931 79821
26845 44191
49195 54111
15123 88339
5390 32629
18812 21113
73522 99560
10800 88429
30151 97522
21059 92541
23 94739
5840 66669
22070 97159
59273 68563
16516 64067
19219 66675
54839 60838
48936 89769
85887 94665
52613 86854
3217...

output:

1

result:

ok answer is '1'

Test #55:

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

input:

100000 104176
15843 69599
16816 88180
35504 63115
1736 49154
84922 91033
45336 57072
46033 70225
6560 80104
39194 99327
1323 81518
19003 21864
11105 83683
29295 75822
20853 36582
19432 25652
46660 48401
60429 83647
89064 91255
26673 44271
65939 76831
18450 49031
3489 75716
3393 71935
32820 92602
212...

output:

35184

result:

ok answer is '35184'

Test #56:

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

input:

100 104
16 80
80 91
4 91
16 4
6 47
16 77
36 47
36 34
67 34
35 67
35 92
92 42
42 74
44 74
98 44
98 77
37 23
33 80
22 37
79 22
100 79
100 10
90 10
90 28
28 81
94 81
94 88
88 33
49 83
91 45
83 53
53 13
13 63
75 63
18 75
18 68
68 99
99 46
54 46
54 45
24 40
4 12
5 24
5 93
96 93
96 84
11 84
11 48
48 1
1 8...

output:

288

result:

ok answer is '288'

Test #57:

score: 0
Accepted
time: 5ms
memory: 20852kb

input:

190 194
98 137
134 137
174 134
174 98
76 84
77 98
114 84
114 157
157 182
182 24
78 24
187 78
187 117
117 67
67 149
149 163
8 163
8 125
167 125
165 167
38 165
38 56
56 17
63 17
85 63
85 77
54 102
137 96
36 102
43 36
113 43
113 21
12 21
146 12
146 170
91 170
42 91
185 42
185 173
158 173
150 158
87 150...

output:

968

result:

ok answer is '968'

Test #58:

score: 0
Accepted
time: 5ms
memory: 22460kb

input:

490 494
447 358
88 447
249 88
249 358
169 428
358 167
169 439
372 439
372 385
385 31
31 73
73 417
401 417
253 401
342 253
342 280
142 280
321 142
426 321
81 426
81 48
48 35
35 86
156 86
156 66
66 130
130 274
274 311
472 311
63 472
63 479
479 67
67 443
443 136
136 157
157 18
18 179
179 7
7 285
80 285...

output:

7200

result:

ok answer is '7200'

Test #59:

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

input:

490 60024
58 121
58 236
56 236
121 56
310 195
121 468
327 310
327 341
405 341
290 405
290 14
85 14
366 85
116 366
147 116
147 246
312 246
312 278
278 408
175 408
175 60
313 60
146 313
146 353
353 449
356 449
203 356
203 284
41 284
41 281
281 406
189 406
26 189
212 26
212 221
221 208
208 276
433 276
...

output:

0

result:

ok answer is '0'

Test #60:

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

input:

4900 4904
4396 4471
4396 2987
4016 2987
4016 4471
4265 4192
4471 4757
3026 4192
3965 3026
3965 2851
2851 3244
3244 4583
922 4583
922 160
160 915
2416 915
2416 4406
4406 1279
4389 1279
1252 4389
4185 1252
4185 1055
2997 1055
3210 2997
4862 3210
4862 1880
1880 4217
1521 4217
1521 2964
4303 2964
4303 2...

output:

749088

result:

ok answer is '749088'

Test #61:

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

input:

4900 5000
1814 2573
2573 1336
369 1336
1814 369
1758 2511
1177 1814
2511 409
4320 409
3986 4320
1728 3986
1728 1375
4449 1375
4449 1007
1007 2519
2519 1723
1199 1723
1199 3445
3445 2058
1859 2058
173 1859
2172 173
4133 2172
888 4133
2198 888
2198 946
2678 946
4064 2678
4064 338
338 3352
3352 3697
32...

output:

1

result:

ok answer is '1'

Test #62:

score: 0
Accepted
time: 261ms
memory: 61884kb

input:

4900 250000
3411 4897
3668 3411
3668 1635
4897 1635
1786 555
3874 4897
3378 1786
3378 1137
1137 3748
1519 3748
1519 2385
2631 2385
2631 72
72 4380
4380 80
80 280
280 1368
1394 1368
1394 4042
2845 4042
1363 2845
597 1363
1582 597
1582 2623
4127 2623
4127 3931
84 3931
84 2316
4011 2316
628 4011
3247 6...

output:

0

result:

ok answer is '0'

Test #63:

score: 0
Accepted
time: 269ms
memory: 59152kb

input:

4900 240000
546 3766
3766 1945
1977 1945
1977 546
3240 4148
4662 546
193 3240
193 2563
3602 2563
3602 3319
4075 3319
4075 1738
1738 4843
4843 4454
3971 4454
1395 3971
1395 660
2970 660
3523 2970
1637 3523
4765 1637
4765 508
508 3866
1112 3866
523 1112
311 523
3291 311
3291 3549
3098 3549
3098 1582
2...

output:

0

result:

ok answer is '0'

Test #64:

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

input:

100000 100004
36171 26687
26687 5215
58764 5215
58764 36171
19752 10537
98364 36171
82656 10537
82656 80943
80943 70795
70795 54795
16740 54795
16740 55138
55138 38173
11160 38173
41409 11160
34851 41409
34851 54301
58782 54301
6685 58782
19792 6685
28868 19792
28868 83341
19361 83341
7278 19361
727...

output:

312500000

result:

ok answer is '312500000'

Test #65:

score: 0
Accepted
time: 294ms
memory: 73376kb

input:

100000 250000
82100 73901
73901 81778
81778 66062
66062 82100
17240 65761
82100 44942
95027 17240
78407 95027
16629 78407
16629 94367
94367 54004
78562 54004
78562 63638
63638 75398
62119 75398
33265 62119
33265 26587
75813 26587
34756 75813
34756 10352
10352 40589
40589 18861
18861 69930
23584 6993...

output:

0

result:

ok answer is '0'

Test #66:

score: 0
Accepted
time: 24ms
memory: 36760kb

input:

100000 100200
69871 68949
68949 59779
10238 59779
10238 69871
30874 18991
69871 4542
36490 18991
36490 68599
76141 68599
76141 42745
86716 42745
86716 92294
92294 49277
20505 49277
20505 53300
53300 47675
95673 47675
95673 87582
19445 87582
19445 24950
25239 24950
10225 25239
10225 51730
90007 51730...

output:

20706

result:

ok answer is '20706'

Test #67:

score: 0
Accepted
time: 59ms
memory: 57400kb

input:

249700 249900
112573 62051
220612 62051
220612 149429
149429 112573
6050 151192
188206 112573
231593 6050
46268 231593
46268 210321
210321 27335
101279 27335
80501 101279
80501 112364
112364 42269
42269 59274
168806 59274
168806 39620
39620 94374
94374 6587
6587 87922
115009 87922
115009 248684
2205...

output:

57860

result:

ok answer is '57860'

Test #68:

score: -100
Time Limit Exceeded

input:



output:


result: