QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#276792#1405. VoltageSoyTony100 ✓21ms16780kbC++141.6kb2023-12-06 10:49:402023-12-06 10:49:41

Judging History

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

  • [2023-12-06 10:49:41]
  • 评测
  • 测评结果:100
  • 用时:21ms
  • 内存:16780kb
  • [2023-12-06 10:49:40]
  • 提交

answer

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

#define sec second
const int maxn=1e5+10;
const int maxm=2e5+10;

inline int read(){
    int x=0,w=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')w=-1;c=getchar();}
    while(c<='9'&&c>='0'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}
    return x*w;
}

int n,m;
struct edge{
    int to,nxt;
}e[maxm<<1];
int head[maxn],cnt;
inline void add_edge(int u,int v){
    e[++cnt].to=v,e[cnt].nxt=head[u],head[u]=cnt;
    e[++cnt].to=u,e[cnt].nxt=head[v],head[v]=cnt;
}
bool vis[maxn];
int pre[maxn],dep[maxn];
int tot[maxn][2];
void dfs(int u,int d,int pre){
    // printf("%d\n",u);
    vis[u]=true;
    dep[u]=d;
    for(int i=head[u],v;i;i=e[i].nxt){
        v=e[i].to;
        if((i^1)==pre) continue;
        if(!vis[v]){
            dfs(v,d+1,i);
            tot[u][0]+=tot[v][0],tot[u][1]+=tot[v][1];
        }
        else{
            if(dep[u]<dep[v]) continue;
            // printf("%d %d\n",u,v);
            if((dep[u]-dep[v])&1) ++tot[u][0],--tot[v][0];
            else{
                ++tot[0][1];
                ++tot[u][1],--tot[v][1];
            }
        }
    }
}
int ans;

int main(){
    // freopen("a.in","r",stdin);
    n=read(),m=read();
    cnt=1;
    for(int i=1;i<=m;++i){
        int u=read(),v=read();
        add_edge(u,v);
    }
    for(int i=1;i<=n;++i){
        if(!vis[i]) dfs(i,0,0);
    }
    for(int i=1;i<=n;++i){
        if(!dep[i]) continue;
        if(tot[i][1]==tot[0][1]&&!tot[i][0]) ++ans;
    }
    if(tot[0][1]==1) ++ans;
    printf("%d\n",ans);
    return 0;
}

// szs ak ioi

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 5892kb

input:

1000 2000
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 52
5...

output:

0

result:

ok single line: '0'

Test #2:

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

input:

1000 2000
840 908
840 908
840 908
840 908
908 840
840 908
840 908
840 908
908 840
840 908
908 840
840 908
908 840
840 908
840 908
908 840
840 908
908 840
908 840
840 908
840 908
840 908
908 840
840 908
908 840
840 908
840 908
908 840
840 908
840 908
908 840
908 840
840 908
908 840
908 840
840 908
84...

output:

0

result:

ok single line: '0'

Test #3:

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

input:

4 2000
1 4
1 4
4 1
1 3
4 1
4 1
3 1
3 1
3 1
3 1
4 1
1 3
4 1
1 4
1 3
4 1
3 1
4 1
3 1
1 3
1 4
3 1
3 1
1 4
1 3
3 1
3 1
1 4
4 1
1 4
1 4
1 3
1 3
1 4
1 3
1 3
1 4
1 4
4 1
1 3
3 1
4 1
1 4
1 3
4 1
1 4
3 1
1 4
4 1
3 1
1 4
4 1
1 4
1 4
1 3
4 1
3 1
4 1
4 1
3 1
1 3
1 3
3 1
1 4
1 4
4 1
4 1
1 4
3 1
4 1
1 3
1 4
3 1
4...

output:

2

result:

ok single line: '2'

Test #4:

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

input:

1000 999
893 562
94 924
222 562
751 127
899 128
23 532
567 748
66 430
348 955
335 554
857 246
589 355
324 544
613 230
223 194
996 732
676 700
19 822
141 970
971 442
248 381
273 89
1 189
926 14
226 255
750 496
142 782
686 593
486 514
765 40
159 489
320 738
958 981
722 124
610 670
409 587
463 85
593 7...

output:

999

result:

ok single line: '999'

Test #5:

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

input:

1000 2000
446 681
650 174
660 735
839 462
605 935
735 660
660 735
349 918
835 124
735 660
804 421
660 735
804 416
660 542
95 761
735 660
542 660
660 542
537 709
41 170
524 569
660 735
648 925
770 639
666 393
424 891
660 735
413 224
996 133
556 526
257 13
660 735
733 892
380 595
660 735
958 924
409 5...

output:

215

result:

ok single line: '215'

Test #6:

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

input:

1000 2000
914 718
238 284
695 612
70 462
621 138
90 645
622 697
138 564
10 503
539 143
132 592
636 368
619 800
146 964
883 898
777 380
503 238
797 914
497 900
456 732
539 845
239 820
164 914
257 22
118 478
238 78
494 988
533 927
539 951
246 997
866 298
811 970
959 503
609 440
990 34
3 448
973 82
97 ...

output:

825

result:

ok single line: '825'

Test #7:

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

input:

1000 2000
916 877
48 173
642 120
389 408
875 246
736 808
178 795
67 347
287 462
437 787
754 119
448 757
511 13
820 800
546 220
869 330
95 965
46 608
392 940
283 994
254 928
869 961
630 192
82 128
329 923
261 438
641 10
509 794
414 55
919 184
291 638
636 50
699 810
213 814
814 541
389 802
361 150
710...

output:

341

result:

ok single line: '341'

Test #8:

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

input:

1000 2000
322 1000
629 151
771 722
236 676
157 629
19 349
722 54
799 228
957 450
124 950
75 795
75 758
795 75
421 514
257 308
503 314
236 75
75 236
795 75
15 47
496 585
795 75
940 90
563 869
394 193
764 961
491 247
415 153
236 75
164 51
740 666
965 525
958 795
191 996
792 660
236 75
551 287
755 10
7...

output:

6

result:

ok single line: '6'

Test #9:

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

input:

1000 2000
663 729
663 377
753 148
192 663
663 365
663 585
224 821
365 663
516 395
663 124
663 365
924 360
663 193
355 663
731 663
690 218
455 663
561 832
663 657
210 860
663 192
886 663
334 87
663 192
663 133
127 663
182 67
663 925
780 663
246 663
156 663
729 663
780 663
681 636
744 487
663 124
377 ...

output:

422

result:

ok single line: '422'

Test #10:

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

input:

1000 2000
684 960
961 207
341 893
698 335
28 869
91 689
969 902
319 915
182 829
72 262
217 456
604 557
508 78
615 273
23 193
99 462
759 95
275 509
304 74
128 918
822 162
607 342
821 977
351 879
802 766
656 820
589 274
353 971
648 83
702 415
979 511
80 291
538 458
169 429
156 97
583 552
607 339
37 49...

output:

76

result:

ok single line: '76'

Test #11:

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

input:

1000 2000
223 895
154 805
496 911
84 487
595 14
439 378
488 314
361 825
431 899
653 973
736 662
409 356
155 963
338 624
766 289
164 313
398 739
380 59
690 987
407 936
656 558
931 141
621 434
43 408
869 198
870 972
413 322
619 85
201 297
551 797
709 51
342 527
931 938
242 565
711 762
462 385
562 841
...

output:

0

result:

ok single line: '0'

Test #12:

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

input:

1000 2000
300 311
134 338
97 178
361 688
611 183
434 844
688 273
397 11
131 707
930 688
102 730
413 532
48 869
453 222
466 516
623 102
595 147
550 786
683 57
762 778
191 670
626 563
244 406
482 385
258 759
532 458
749 416
130 828
995 311
283 988
68 7
872 562
891 613
964 829
831 609
207 297
852 263
6...

output:

0

result:

ok single line: '0'

Subtask #2:

score: 10
Accepted

Test #13:

score: 10
Accepted
time: 5ms
memory: 7892kb

input:

100000 100000
89366 54168
89366 81301
11704 89366
84401 89366
9798 89366
89366 38777
89366 15693
75785 89366
89366 90409
13262 89366
80980 89366
17248 89366
48676 89366
64597 89366
89366 66137
89366 94228
89366 18556
66826 89366
89366 25631
89366 55768
64503 89366
89366 45012
89366 44341
22317 89366...

output:

99998

result:

ok single line: '99998'

Test #14:

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

input:

100000 100000
76803 6996
6078 42455
2031 67458
10878 35718
23191 88170
72317 73308
3330 7515
75513 20085
95291 34524
29454 82677
96807 84931
11028 46796
22898 89111
92737 81992
36963 68303
36744 54848
74607 52985
66999 36513
28375 57847
33211 8615
90190 79316
35741 74383
77749 34758
71207 37993
7972...

output:

99998

result:

ok single line: '99998'

Test #15:

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

input:

100000 100000
30247 59665
55994 59665
59665 35498
59665 25194
9875 59665
59665 97286
59665 65817
28850 59665
80681 59665
66529 59665
25534 59665
59665 10100
59665 75549
54450 59665
85805 59665
87057 59665
75557 59665
35075 59665
59665 1224
28941 59665
2887 59665
59665 19356
59665 88789
8182 59665
59...

output:

3

result:

ok single line: '3'

Test #16:

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

input:

100000 100000
59350 36025
14169 88531
34863 84369
91040 34468
98166 91217
82441 26142
83929 82727
77080 43800
97409 13780
88971 26223
91910 3729
90511 44459
38155 12023
32283 81369
57537 84866
17840 25494
86020 28037
79980 59857
62921 43618
30044 19573
48295 33385
92095 94156
45412 9704
47977 74284
...

output:

3

result:

ok single line: '3'

Test #17:

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

input:

11111 11111
4839 709
45 7300
1553 10402
6229 1773
10136 1057
3431 9817
6235 3687
11026 10404
471 4755
3891 9967
7649 5767
4077 3993
7463 10802
7289 5372
1275 3143
88 572
3827 2822
2096 9118
10586 9661
8589 4893
9460 4595
4527 9549
10359 7457
4950 3474
3081 2137
9692 9714
5130 7345
3188 10553
251 618...

output:

3333

result:

ok single line: '3333'

Test #18:

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

input:

100000 100000
59230 42299
23766 42710
19631 97959
48455 58314
65118 51141
51050 51503
96861 84887
20232 64844
39821 60998
96032 86397
78614 48226
65276 92370
29060 38629
71009 82068
95222 63025
25235 28068
82601 97420
46775 79246
61153 92722
53621 30338
51363 47270
46924 49436
66059 7841
65989 35600...

output:

67686

result:

ok single line: '67686'

Test #19:

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

input:

100000 100000
88042 43995
39903 16403
36557 32043
32376 78115
47188 84498
28064 50714
1383 34933
6615 88149
21948 93317
26227 9371
4266 34087
74360 30714
83870 23834
44631 53511
47585 80337
31113 59840
81366 43920
27151 97686
75791 88006
9543 24153
42568 56824
95249 71883
8555 78493
93753 15263
8781...

output:

99999

result:

ok single line: '99999'

Test #20:

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

input:

100000 100000
26471 10563
99838 83054
1980 6426
26517 73939
75305 67703
93419 96417
75156 39455
28743 93521
79787 87640
75327 99826
47716 52429
23114 93131
87335 68103
43684 79145
14065 17769
3620 290
10562 49392
81645 53027
86738 4572
81720 69970
21466 5887
49137 70208
99786 99342
96659 10423
99198...

output:

0

result:

ok single line: '0'

Subtask #3:

score: 35
Accepted

Dependency #2:

100%
Accepted

Test #21:

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

input:

100000 99999
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
...

output:

99999

result:

ok single line: '99999'

Test #22:

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

input:

100000 99999
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 5...

output:

99999

result:

ok single line: '99999'

Test #23:

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

input:

100000 100100
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 ...

output:

99898

result:

ok single line: '99898'

Test #24:

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

input:

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

output:

9

result:

ok single line: '9'

Test #25:

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

input:

80000 80100
28686 69550
58614 43765
48074 22588
5036 51352
77680 32491
35352 5563
77113 11554
19656 51738
66131 12785
13282 62037
29153 57513
43184 53201
74638 24446
48295 43902
59618 51154
61235 5140
64183 25155
20997 13577
1214 69316
11812 72286
15585 53942
40802 22928
44407 76315
69319 76364
4338...

output:

39899

result:

ok single line: '39899'

Test #26:

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

input:

100000 99999
24274 34785
45771 7831
79753 70971
83616 66177
20414 60636
56600 32126
8988 41293
54698 4371
38316 17820
51576 42660
337 98855
84596 38525
60060 99537
25913 37851
29483 44929
13079 80112
75892 16100
56579 20912
90641 36707
15412 5606
88095 2379
36286 52350
61335 98266
8396 14747
62020 4...

output:

99999

result:

ok single line: '99999'

Test #27:

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

input:

100000 100100
56602 17098
35351 31884
44199 13256
31494 24258
98263 84036
51059 2559
87342 42878
45832 40084
5757 46291
52966 81905
55628 13892
64683 31520
13685 85345
83845 20491
59488 87901
56570 69129
46102 28663
83014 87665
28731 64499
71898 64965
55327 46379
47722 98437
27399 19921
83480 99547
...

output:

77736

result:

ok single line: '77736'

Test #28:

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

input:

100000 100100
14759 40989
75323 20233
28697 35409
12986 5364
20768 9920
93017 79182
50729 15920
66246 50691
12279 48259
20874 32962
31772 16399
31259 79229
1493 45973
8705 5757
29039 35329
36119 65290
56773 12398
61150 11411
92317 37825
72373 58494
26438 6644
43868 69001
75765 7046
48023 60645
44020...

output:

19676

result:

ok single line: '19676'

Test #29:

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

input:

100000 100100
77873 66189
32202 81174
40410 51794
35979 3215
43325 61367
40386 97976
818 30645
85311 8727
14066 71443
22113 96411
96806 91351
12697 354
69278 43028
62369 78781
7151 5754
11499 63130
9382 11435
64589 11696
88835 32174
4794 39059
50140 66905
41293 70920
66392 16107
79996 23245
84063 60...

output:

55249

result:

ok single line: '55249'

Test #30:

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

input:

100000 100100
47830 4447
13218 61265
80118 93569
69358 2632
8420 76679
87882 19774
14436 55276
63031 69139
92899 98733
88859 13697
69413 14676
60563 20802
90944 72799
93670 37373
15344 10388
44239 27655
38294 53855
99907 73053
95103 78954
9616 56721
31238 58223
1158 8493
10248 52662
33526 51684
4650...

output:

27551

result:

ok single line: '27551'

Test #31:

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

input:

100000 100100
84849 29898
71394 96976
97599 10852
93469 58803
55003 6007
56842 53309
3600 95442
43113 83971
62442 77019
76636 45151
66686 80679
1187 54506
69986 51924
59175 66716
7627 36804
40015 58881
72771 60738
10527 63123
41647 43217
25630 54127
98736 59457
37713 26345
7141 62274
58050 99855
989...

output:

4

result:

ok single line: '4'

Test #32:

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

input:

100000 100100
47732 34078
40780 90428
37387 91555
57409 87945
55175 89596
76048 73789
86352 3373
6325 5696
61314 23777
71279 99056
67122 19987
2958 82141
30435 32663
63086 37721
42095 23127
76470 65283
97856 24144
42033 29588
98912 9982
46480 35010
18807 84702
51606 53125
69415 62327
72323 21228
404...

output:

1

result:

ok single line: '1'

Subtask #4:

score: 45
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #33:

score: 45
Accepted
time: 6ms
memory: 8976kb

input:

100000 200000
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60...

output:

0

result:

ok single line: '0'

Test #34:

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

input:

100000 200000
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
51 ...

output:

0

result:

ok single line: '0'

Test #35:

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

input:

100000 1
87216 88103

output:

1

result:

ok single line: '1'

Test #36:

score: 0
Accepted
time: 12ms
memory: 12060kb

input:

100000 109000
39191 68658
21372 58345
47061 88080
78406 75094
14395 72292
79896 40428
20544 17823
31515 41049
8321 4509
87692 61716
54399 95109
71517 90951
26738 57012
3631 5820
85448 1974
90275 28213
30475 76493
89728 43656
58414 21821
15614 42601
55488 35155
36314 6225
56885 62796
40622 13717
5544...

output:

38180

result:

ok single line: '38180'

Test #37:

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

input:

100000 109000
129 32243
62505 15111
84600 9413
25089 68210
29231 85725
89381 40573
26434 45620
63207 29419
43302 5823
47045 52583
95104 22700
13704 91263
50935 33759
61371 42444
75192 60632
99871 72612
57714 42707
18761 61155
62083 80213
90826 48328
13033 51649
71232 79816
15376 8787
27323 27548
41 ...

output:

67021

result:

ok single line: '67021'

Test #38:

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

input:

100000 109000
31592 1626
80878 33277
58375 9215
77262 30335
59097 6298
56651 50095
70024 95988
48956 79951
46416 39967
34089 36365
56577 73300
20926 27108
17107 80552
13402 1519
69499 70703
4073 40406
17265 45327
47274 18487
28724 80989
31394 89610
67979 29294
23549 51328
94813 83270
80431 66495
511...

output:

24969

result:

ok single line: '24969'

Test #39:

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

input:

100000 200000
47992 88296
57609 91103
53721 91489
21419 60487
2567 3088
82540 34007
96754 65358
5688 34986
2884 20697
96254 91254
59398 31645
36751 48977
25142 25882
89131 74988
99614 20835
47660 24498
33385 23030
45452 59075
60161 93037
54043 35620
33633 4571
33290 10101
31703 45728
69572 64552
313...

output:

34704

result:

ok single line: '34704'

Test #40:

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

input:

100000 200000
46964 36581
40648 44496
57833 47690
61548 66384
47227 17623
57634 2169
48351 99071
76023 23592
2192 77826
58340 49319
84957 30754
24719 16625
15641 58543
8045 27955
97600 92056
57031 99515
55632 35789
13678 3546
61145 94583
5101 59923
52025 12130
81564 22385
19427 68869
9793 37230
4795...

output:

43360

result:

ok single line: '43360'

Test #41:

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

input:

100000 200000
18351 40185
11433 44853
81235 64407
68454 7284
40460 28995
74542 10851
39476 88989
88843 51918
81235 88770
32495 35557
33838 87989
37470 65164
20770 13269
21128 97965
16125 83022
40457 43886
17806 39280
6981 97891
90450 76345
91752 2583
33654 12110
19328 24395
60311 16113
66196 52177
9...

output:

17389

result:

ok single line: '17389'

Test #42:

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

input:

100000 200000
68553 97977
23343 32916
64130 7272
3657 8094
75237 56951
21034 9412
7272 62134
8045 42507
24420 467
3902 11116
70144 84462
86153 36034
37415 86170
95058 14433
91140 69447
56525 16811
40037 40558
63689 26296
8838 80270
2937 56415
24243 4923
81161 51682
50065 27064
25680 14103
82928 2232...

output:

4648

result:

ok single line: '4648'

Test #43:

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

input:

100000 200000
32946 43378
38316 55190
97032 11070
11064 32946
66817 78699
83365 39567
77907 29950
11070 21800
19130 72407
33700 44883
77764 39987
65915 38313
48135 13224
79677 9592
54977 31153
86405 36348
83767 32946
55824 17353
75723 3272
83957 10984
56507 94667
39633 53700
74320 91485
49580 56680
...

output:

0

result:

ok single line: '0'

Test #44:

score: 0
Accepted
time: 15ms
memory: 14012kb

input:

100000 200000
75689 80735
290 73181
68588 78974
90520 98165
61613 94525
35541 97268
43369 67651
83577 87936
10337 32078
55548 78005
52914 71509
49069 6357
60940 66722
26733 98478
53779 25924
23178 49684
92242 89231
851 26248
42068 69287
80780 46835
93865 25336
30967 80994
69422 18211
28192 19763
291...

output:

1

result:

ok single line: '1'

Test #45:

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

input:

100000 200000
93489 79951
88193 70740
32019 79951
70390 20224
30144 60771
76960 80537
49725 54207
48541 45046
95369 63292
79951 9862
97590 88830
32019 79951
79951 9862
43861 85038
64948 94800
44574 80403
71941 24397
47257 21330
79951 9862
26115 38745
62739 63443
56982 56226
82217 81280
97720 60067
7...

output:

18

result:

ok single line: '18'

Test #46:

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

input:

100000 200000
47563 99696
52803 65735
38330 51726
37045 76184
45656 18177
28591 47659
7223 69786
33440 22594
70284 39418
24210 25423
52193 55649
29740 31041
74535 9460
53357 21058
41704 27005
55132 83833
2332 13206
79658 42221
70143 91737
12119 76539
52174 26283
12417 80266
58997 3691
59641 7965
798...

output:

57034

result:

ok single line: '57034'

Test #47:

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

input:

100000 200000
41900 63845
99960 89332
6798 91196
53829 87636
63522 80511
53680 78504
30924 9886
63326 60730
10936 11045
21823 73662
40737 4840
36973 16432
55476 40926
53117 15227
84284 97237
12142 78326
6366 14821
80668 38186
73835 15164
16790 61987
77464 18251
51816 97632
5973 18665
33098 25694
993...

output:

0

result:

ok single line: '0'

Test #48:

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

input:

100000 200000
34917 51331
1314 34917
24229 78632
18402 65171
55848 88013
64981 1314
74103 98466
73649 75763
25609 53035
1314 93056
40489 39288
68104 89228
95598 1314
43537 46904
46795 17307
67715 1314
29660 14586
22648 79837
34917 1314
1266 90593
19682 1314
54890 33904
15336 81640
14125 34917
34917 ...

output:

33845

result:

ok single line: '33845'

Test #49:

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

input:

100000 200000
30916 52927
51847 19398
57595 11977
89653 74487
99856 17366
77134 39124
18629 67092
95630 6341
54597 71700
56852 51367
99268 97139
42267 12156
47068 83994
64494 73645
309 4496
8053 90329
97700 44580
1054 17585
4354 98436
58764 82204
51806 85616
14725 9796
24998 26857
83393 94267
35565 ...

output:

12567

result:

ok single line: '12567'

Test #50:

score: 0
Accepted
time: 12ms
memory: 12316kb

input:

100000 200000
63115 17357
3718 53888
63115 89483
43810 88409
76381 68961
91839 63115
64583 63115
63115 36650
88298 60663
5845 63115
93958 89023
89995 63115
63115 6294
20068 63115
79262 81503
83082 24524
25821 63115
29899 96208
79155 63115
63115 94813
63115 35580
77446 63115
25264 63115
34744 63115
8...

output:

35184

result:

ok single line: '35184'

Extra Test:

score: 0
Extra Test Passed