QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#222368#7608. Cliquesucup-team570#TL 2723ms33496kbC++1747.7kb2023-10-21 16:56:162023-10-21 16:56:16

詳細信息

Test #1:

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

input:

5
1 2
5 1
2 3
4 2
6
+ 4 5
+ 2 2
+ 1 3
- 2 2
+ 2 3
+ 4 4

output:

1
3
7
3
7
9

result:

ok 6 lines

Test #2:

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

input:

20
8 7
19 10
12 14
3 16
17 13
7 10
5 6
1 9
15 12
5 2
16 13
3 11
20 14
18 6
1 14
16 20
11 10
3 4
20 6
30
+ 10 20
+ 14 20
+ 12 17
- 14 20
- 12 17
+ 4 6
+ 8 20
+ 3 6
- 10 20
+ 2 17
+ 1 16
+ 6 10
+ 9 10
+ 5 15
+ 7 8
- 7 8
+ 2 5
+ 3 18
+ 1 20
+ 8 16
- 3 18
- 5 15
+ 4 20
+ 14 16
- 4 6
+ 8 19
+ 4 7
- 1 16
...

output:

1
3
7
3
1
3
7
15
7
15
31
63
127
255
257
255
259
515
1027
1283
643
385
769
1537
769
785
865
481
737
369

result:

ok 30 lines

Test #3:

score: 0
Accepted
time: 275ms
memory: 25596kb

input:

131072
3641 72511
10338 18718
8949 15478
79108 62887
42154 28540
65359 102645
93744 48493
3277 103211
43542 61315
93315 118634
24021 57937
31034 436
30411 6208
1388 25159
93424 128520
119820 87281
5860 97559
59648 8225
57244 58766
119685 13716
130165 60958
79806 116338
97486 80167
101963 95499
51263...

output:

1
2
4
8
13
27
43
67
119
215
359
423
847
1167
1935
2447
2975
4511
5023
8639
6911
13759
12991
15103
23295
43775
47999
91647
85375
167295
169343
301695
600703
666239
1332351
2664575
2678911
2687103
5374207
5898495
11731455
11731967
22283263
22807551
21955327
43910399
43911423
44207359
44207360
44469504...

result:

ok 46368 lines

Test #4:

score: 0
Accepted
time: 369ms
memory: 31008kb

input:

131073
52869 122762
63296 22816
9889 23435
9452 109352
95210 125504
104234 105533
42422 123259
31189 77343
88679 25422
13860 61424
49617 27681
71743 44108
2612 55383
89088 79225
49508 86216
45176 26493
60940 104568
10733 11047
118351 29678
6184 107897
69675 73910
39495 78910
14871 125941
64731 68683...

output:

1
3
7
11
15
19
31
35
71
143
287
511
1023
1031
1991
1031
1287
1927
2055
3151
4687
4943
9295
17999
18959
37775
73759
74559
148031
148095
296191
151743
160063
110399
110463
127103
63615
63679
64191
90303
138431
212479
212607
423551
423583
426527
770591
865599
1054015
1794879
3587647
3587903
5168959
743...

result:

ok 38380 lines

Test #5:

score: 0
Accepted
time: 473ms
memory: 22932kb

input:

131072
110424 92279
34180 5104
64611 102341
17972 86901
20410 11042
71530 94889
66017 30180
70335 127390
32167 60823
78004 53470
19518 71917
13638 77859
126902 86404
129728 102154
94425 4299
65248 60503
30607 39590
122443 91908
131032 83134
74541 32476
57016 45547
99821 43007
46700 115397
61041 7605...

output:

1
3
4
8
10
12
18
30
32
43
85
133
267
535
791
927
1567
1663
1791
2111
3391
4031
8063
4031
8063
10111
11263
22527
22543
36879
73487
146959
165391
185871
300559
272655
273183
448031
224015
252431
256527
440847
459279
501791
623647
1069087
1265695
2451487
2455583
4911167
3469375
4341823
4620351
7536767
...

result:

ok 41717 lines

Test #6:

score: 0
Accepted
time: 643ms
memory: 28172kb

input:

131073
67110 38301
121636 116046
93081 73335
44685 130771
105514 33619
39372 105681
75426 78839
116548 46901
69485 76621
124381 35376
22485 127299
100526 68870
59214 63623
65534 67039
7351 74453
99617 88460
99785 107786
105070 57072
122179 1357
125230 70014
95838 127074
119211 24691
41698 112488
502...

output:

1
3
5
11
13
14
18
28
40
52
60
62
122
210
340
532
1032
1192
1448
1968
3393
3391
5471
5631
10303
11071
11199
13183
26239
52223
52735
53759
69375
113407
117503
232191
236287
470271
748799
748807
1410567
2790919
1676807
3155975
6178823
6026759
6068743
12075527
20988423
21185031
42340871
42332419
8409549...

result:

ok 42683 lines

Test #7:

score: 0
Accepted
time: 691ms
memory: 22012kb

input:

131071
73178 110293
100318 26012
15854 39905
73704 8141
15422 88351
37522 86820
75177 113252
27007 40876
114342 57373
114214 99629
77119 106699
111052 54010
7544 43524
6414 93020
81451 90262
65947 86220
34831 11736
54471 103491
42146 26136
11584 28666
50699 22506
114316 26350
106262 53089
31102 8196...

output:

1
3
5
9
4
6
10
18
34
66
85
123
127
255
143
279
559
1007
1535
2559
5023
9375
18655
35167
70335
79039
40031
21599
42079
84063
168127
168831
177919
341759
503295
1006591
1072127
1070079
1976319
2107391
1173503
2347007
4694015
4800511
9601023
18022399
9011199
17563647
34078719
65011711
129564671
1349386...

result:

ok 48590 lines

Test #8:

score: 0
Accepted
time: 1266ms
memory: 21244kb

input:

131071
39479 96391
14017 23321
50455 14012
126360 118197
113346 92912
48354 86690
78318 34265
94323 55989
30079 44311
2276 30025
16215 90233
34881 85139
57791 13323
50082 125534
36843 69732
104952 39061
82716 2282
63268 42779
35368 9502
17575 123815
2726 43663
123675 93945
4192 64707
87905 123819
40...

output:

1
3
7
11
23
47
95
111
191
159
319
159
319
321
449
705
1409
2817
1409
2817
2945
5761
11521
11649
23297
46593
62979
96771
96775
190983
381959
762887
1295367
1295623
1296139
2574091
1287051
1549579
2606859
4721419
8950543
17896975
35793935
35810319
71604247
142661655
285274135
570515495
140973600
20810...

result:

ok 48889 lines

Test #9:

score: 0
Accepted
time: 2709ms
memory: 33496kb

input:

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

output:

1
3
5
6
10
20
25
41
35
67
68
133
137
269
295
347
178
340
436
836
1636
882
1636
3236
6212
8580
4356
8580
16648
16652
32780
65036
65040
65052
99364
197668
391204
391348
395445
395509
329941
325844
594140
602352
602344
602896
603184
1148592
2279408
4507632
8964976
17878384
35706480
69575344
139043504
2...

result:

ok 50000 lines

Test #10:

score: 0
Accepted
time: 2723ms
memory: 33484kb

input:

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

output:

1
0
1
0
1
3
5
6
9
17
29
53
105
109
219
359
719
687
815
1471
767
799
1567
2815
2819
3395
5895
11015
6407
4099
7747
12099
7747
15043
15299
7811
8067
15427
30467
30483
47891
47923
94515
48051
82915
163811
162675
299939
598947
601155
601027
598883
1173155
2246435
2213667
4327459
8620099
8883779
9411139
...

result:

ok 50000 lines

Test #11:

score: 0
Accepted
time: 2686ms
memory: 33492kb

input:

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

output:

1
3
4
8
17
33
35
69
71
103
199
391
777
1545
2573
4629
4645
4677
5205
9813
9849
19065
37529
38073
71913
74057
78345
149065
289737
306249
597065
1185097
2340169
4663881
9309769
18601033
18633865
37218441
74387593
74388617
147846281
164639881
299873417
299881609
570361105
111320074
193238035
384761861
...

result:

ok 50000 lines

Test #12:

score: -100
Time Limit Exceeded

input:

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

output:

1
3
7
15
31
63
127
255
511
1023
2047
4095
8191
16383
32767
65535
131071
262143
524287
1048575
2097151
4194303
8388607
16777215
33554431
67108863
134217727
268435455
536870911
73741816
147483633
294967267
589934535
179869064
359738129
719476259
438952512
877905025
755810044
511620082
23240158
4648031...

result: