QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#484399#8711. TilesGuanYunchang19 19ms13216kbC++232.4kb2024-07-19 18:17:272024-07-19 18:17:28

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Runtime Error

Test #1:

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

input:

4 3
0 0
0 3
3 3
3 0

output:

0

result:

ok single line: '0'

Test #2:

score: -4
Runtime Error

input:

4 999999999
999999999 0
999999999 1000000000
0 1000000000
0 0

output:


result:


Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Runtime Error

Test #32:

score: 11
Accepted
time: 2ms
memory: 8316kb

input:

1551 1000
0 988
2 988
3 988
6 988
6 985
6 982
6 981
6 979
6 978
6 977
6 976
6 975
6 974
6 972
6 970
6 969
6 968
6 966
6 965
6 964
7 964
8 964
8 963
8 961
8 960
10 960
11 960
13 960
16 960
16 959
16 958
16 957
16 954
16 953
16 951
16 950
17 950
18 950
18 948
18 946
18 945
18 944
18 942
18 941
18 939
...

output:

164

result:

ok single line: '164'

Test #33:

score: -11
Runtime Error

input:

36221 1000000000
0 996776952
43916 996776952
43916 996301596
102050 996301596
102050 995243908
173144 995243908
173144 992639626
184542 992639626
184542 987461238
192474 987461238
192474 982703402
406098 982703402
406098 980100986
525272 980100986
525272 978443232
532708 978443232
532708 977775310
6...

output:


result:


Subtask #4:

score: 19
Accepted

Test #45:

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

input:

14 6
0 1
0 3
2 3
2 4
0 4
0 6
3 6
3 7
4 7
6 7
6 5
3 5
3 2
3 1

output:

2

result:

ok single line: '2'

Test #46:

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

input:

18 9
0 2
2 2
2 1
4 1
4 0
9 0
9 2
4 2
4 4
7 4
7 3
9 3
9 6
4 6
4 5
2 5
2 4
0 4

output:

6

result:

ok single line: '6'

Test #47:

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

input:

199996 966
752 702
754 702
754 700
756 700
756 702
758 702
758 700
760 700
760 702
762 702
762 700
764 700
764 702
766 702
766 700
768 700
768 702
770 702
770 700
772 700
772 702
774 702
774 700
776 700
776 702
778 702
778 700
780 700
780 702
782 702
782 700
784 700
784 702
786 702
786 700
788 700
7...

output:

0

result:

ok single line: '0'

Test #48:

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

input:

199996 966
748 702
750 702
750 700
752 700
752 702
754 702
754 700
756 700
756 702
758 702
758 700
760 700
760 702
762 702
762 700
764 700
764 702
766 702
766 700
768 700
768 702
770 702
770 700
772 700
772 702
774 702
774 700
776 700
776 702
778 702
778 700
780 700
780 702
782 702
782 700
784 700
7...

output:

962

result:

ok single line: '962'

Test #49:

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

input:

500 916
560 975
560 526
544 526
544 708
538 708
538 585
534 585
534 879
530 879
530 612
514 612
514 907
512 907
512 571
504 571
504 976
494 976
494 746
486 746
486 922
478 922
478 667
476 667
476 913
472 913
472 623
456 623
456 890
450 890
450 609
446 609
446 905
436 905
436 705
428 705
428 816
418 ...

output:

900

result:

ok single line: '900'

Test #50:

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

input:

500 980
421 481
453 481
453 479
32 479
32 477
453 477
453 461
353 461
353 451
403 451
403 441
176 441
176 435
314 435
314 429
128 429
128 417
129 417
129 413
31 413
31 401
136 401
136 399
130 399
130 398
130 391
217 391
217 383
6 383
6 369
105 369
105 365
84 365
84 353
178 353
178 345
0 345
0 343
26...

output:

0

result:

ok single line: '0'

Test #51:

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

input:

8480 1000
410 61
410 63
410 69
410 70
410 71
410 83
410 87
410 88
410 89
410 90
410 91
410 93
410 95
410 97
410 106
410 108
410 109
410 117
410 118
410 121
410 123
410 126
410 129
410 133
410 134
410 139
410 140
410 143
410 145
410 149
410 150
410 152
410 154
410 157
410 158
410 159
410 162
410 164
...

output:

1000

result:

ok single line: '1000'

Test #52:

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

input:

500 976
590 415
590 63
604 63
604 439
612 439
612 262
614 262
614 284
624 284
624 31
636 31
636 65
646 65
646 28
648 28
648 341
656 341
656 241
666 241
666 421
670 421
670 147
684 147
684 326
688 326
688 3
696 3
696 254
708 254
708 39
712 39
712 322
726 322
726 293
728 293
728 447
740 447
740 57
748...

output:

972

result:

ok single line: '972'

Test #53:

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

input:

502 993
993 0
991 0
991 4
989 4
989 8
987 8
987 12
985 12
985 16
983 16
983 20
981 20
981 24
979 24
979 28
977 28
977 32
975 32
975 36
973 36
973 40
971 40
971 44
969 44
969 48
967 48
967 52
965 52
965 56
963 56
963 60
961 60
961 64
959 64
959 68
957 68
957 72
955 72
955 76
953 76
953 80
951 80
951 ...

output:

494

result:

ok single line: '494'

Test #54:

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

input:

500 990
261 369
383 369
383 365
45 365
45 363
341 363
341 343
78 343
78 341
78 339
105 339
105 325
19 325
19 321
113 321
113 313
74 313
74 309
272 309
272 301
3 301
3 299
191 299
191 285
103 285
103 273
460 273
460 265
153 265
153 257
278 257
278 253
129 253
129 243
283 243
283 239
11 239
11 233
254...

output:

982

result:

ok single line: '982'

Test #55:

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

input:

1213 996
960 224
960 225
960 229
960 230
960 233
960 234
960 235
960 236
960 237
960 238
960 240
960 242
960 243
960 244
960 245
960 246
960 248
960 249
960 250
960 251
960 252
960 253
960 254
960 255
960 256
960 259
960 260
960 264
960 266
961 266
962 266
962 269
962 271
962 272
962 273
962 274
962...

output:

0

result:

ok single line: '0'

Test #56:

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

input:

1583 994
357 534
356 534
355 534
354 534
354 533
354 532
353 532
353 531
353 530
351 530
349 530
349 529
349 527
349 526
348 526
348 523
348 522
348 520
348 519
347 519
347 518
347 517
346 517
346 516
346 515
346 514
345 514
344 514
343 514
342 514
342 513
342 512
340 512
339 512
338 512
338 511
338...

output:

80

result:

ok single line: '80'

Test #57:

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

input:

12 984
697 599
0 599
0 913
697 913
697 1000
761 1000
761 977
984 977
984 311
761 311
761 68
697 68

output:

696

result:

ok single line: '696'

Test #58:

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

input:

200000 984
778 694
778 696
776 696
776 698
778 698
778 700
776 700
776 702
778 702
778 704
776 704
776 706
778 706
778 708
776 708
776 710
778 710
778 712
776 712
776 714
778 714
778 716
776 716
776 718
778 718
778 720
776 720
776 722
778 722
778 724
776 724
776 726
778 726
778 728
776 728
776 730
7...

output:

968

result:

ok single line: '968'

Test #59:

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

input:

200000 964
304 754
302 754
302 752
300 752
300 754
298 754
298 752
296 752
296 754
294 754
294 752
292 752
292 754
290 754
290 752
288 752
288 754
286 754
286 752
284 752
284 754
282 754
282 752
280 752
280 754
278 754
278 752
276 752
276 754
274 754
274 752
272 752
272 754
270 754
270 752
268 752
2...

output:

952

result:

ok single line: '952'

Test #60:

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

input:

8380 1000
929 192
929 193
929 194
923 194
914 194
910 194
899 194
875 194
869 194
864 194
840 194
835 194
810 194
803 194
795 194
794 194
789 194
778 194
773 194
771 194
765 194
762 194
741 194
740 194
735 194
728 194
719 194
718 194
716 194
693 194
676 194
652 194
632 194
611 194
609 194
588 194
58...

output:

0

result:

ok single line: '0'

Test #61:

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

input:

1056 582
0 0
2 0
2 1
6 1
6 2
8 2
8 3
12 3
12 4
14 4
14 5
16 5
16 6
18 6
18 16
20 16
20 17
24 17
24 18
26 18
26 19
28 19
28 20
32 20
32 21
34 21
34 22
36 22
36 23
38 23
38 24
40 24
40 28
42 28
42 29
44 29
44 30
46 30
46 31
48 31
48 32
50 32
50 39
54 39
54 40
56 40
56 41
58 41
58 42
60 42
60 43
62 43
...

output:

582

result:

ok single line: '582'

Test #62:

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

input:

852 466
0 0
2 0
2 1
4 1
4 2
6 2
6 3
8 3
8 4
10 4
10 5
12 5
12 6
14 6
14 7
16 7
16 8
18 8
18 9
20 9
20 10
22 10
22 11
24 11
24 14
26 14
26 15
28 15
28 16
30 16
30 17
32 17
32 18
34 18
34 19
36 19
36 25
38 25
38 26
40 26
40 27
44 27
44 28
46 28
46 29
48 29
48 43
50 43
50 44
52 44
52 45
56 45
56 46
58 ...

output:

200

result:

ok single line: '200'

Test #63:

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

input:

300 558
90 579
90 519
82 519
82 877
74 877
74 859
70 859
70 970
62 970
62 602
54 602
54 917
52 917
52 665
36 665
36 983
30 983
30 721
24 721
24 969
16 969
16 932
10 932
10 1000
0 1000
0 145
10 145
10 400
16 400
16 322
24 322
24 407
30 407
30 4
36 4
36 155
52 155
52 57
54 57
54 122
62 122
62 37
70 37...

output:

0

result:

ok single line: '0'

Test #64:

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

input:

2146 36
26 411
26 412
26 413
26 414
26 415
26 417
28 417
30 417
34 417
34 418
34 419
34 420
34 421
34 422
34 424
34 425
34 427
30 427
26 427
24 427
22 427
20 427
20 428
20 429
20 430
20 431
20 432
20 434
20 435
24 435
26 435
28 435
30 435
34 435
34 437
34 439
34 440
34 441
34 442
34 443
32 443
30 44...

output:

2

result:

ok single line: '2'

Test #65:

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

input:

199996 998
764 280
764 278
766 278
766 276
764 276
764 274
766 274
766 272
764 272
764 270
766 270
766 268
764 268
764 266
766 266
766 264
764 264
764 262
766 262
766 260
764 260
764 258
766 258
766 256
764 256
764 254
766 254
766 252
764 252
764 250
766 250
766 248
764 248
764 246
766 246
766 244
7...

output:

998

result:

ok single line: '998'

Test #66:

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

input:

199996 998
544 572
544 574
546 574
546 576
544 576
544 578
546 578
546 580
544 580
544 582
546 582
546 584
544 584
544 586
546 586
546 588
544 588
544 590
546 590
546 592
544 592
544 594
546 594
546 596
544 596
544 598
546 598
546 600
544 600
544 602
546 602
546 604
544 604
544 606
546 606
546 608
5...

output:

998

result:

ok single line: '998'

Test #67:

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

input:

199996 934
262 148
264 148
264 150
266 150
266 148
268 148
268 150
270 150
270 148
272 148
272 150
274 150
274 148
276 148
276 150
278 150
278 148
280 148
280 150
282 150
282 148
284 148
284 150
286 150
286 148
288 148
288 150
290 150
290 148
292 148
292 150
294 150
294 148
296 148
296 150
298 150
2...

output:

934

result:

ok single line: '934'

Test #68:

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

input:

199996 954
762 832
760 832
760 834
758 834
758 832
756 832
756 834
754 834
754 832
752 832
752 834
750 834
750 832
748 832
748 834
746 834
746 832
744 832
744 834
742 834
742 832
740 832
740 834
738 834
738 832
736 832
736 834
734 834
734 832
732 832
732 834
730 834
730 832
728 832
728 834
726 834
7...

output:

954

result:

ok single line: '954'

Test #69:

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

input:

12 824
511 122
511 64
191 64
191 122
0 122
0 710
191 710
191 882
511 882
511 710
824 710
824 122

output:

824

result:

ok single line: '824'

Test #70:

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

input:

8 8
0 0
0 3
2 3
2 6
8 6
8 3
6 3
6 0

output:

0

result:

ok single line: '0'

Test #71:

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

input:

9604 1000
856 342
856 344
856 345
856 347
856 348
856 349
856 350
862 350
863 350
865 350
867 350
873 350
875 350
878 350
885 350
886 350
887 350
894 350
897 350
899 350
901 350
912 350
917 350
934 350
941 350
949 350
958 350
968 350
974 350
977 350
978 350
983 350
985 350
987 350
988 350
993 350
99...

output:

1000

result:

ok single line: '1000'

Test #72:

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

input:

8542 980
130 84
130 83
130 81
130 80
130 79
130 78
130 77
130 76
128 76
125 76
122 76
115 76
113 76
110 76
108 76
102 76
100 76
98 76
93 76
81 76
78 76
76 76
73 76
71 76
70 76
69 76
58 76
57 76
49 76
47 76
46 76
44 76
42 76
41 76
39 76
27 76
22 76
21 76
15 76
14 76
10 76
7 76
6 76
6 75
6 73
6 72
6 7...

output:

0

result:

ok single line: '0'

Test #73:

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

input:

1994 499
489 978
488 978
488 976
487 976
487 974
486 974
486 972
485 972
485 970
484 970
484 968
483 968
483 966
482 966
482 964
481 964
481 962
480 962
480 960
479 960
479 958
478 958
478 956
477 956
477 954
476 954
476 952
475 952
475 950
474 950
474 948
473 948
473 946
472 946
472 944
471 944
471...

output:

0

result:

ok single line: '0'

Test #74:

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

input:

20 9
0 2
0 8
4 8
4 9
6 9
6 8
8 8
8 6
6 6
6 5
4 5
4 6
2 6
2 4
8 4
8 2
9 2
9 0
7 0
7 2

output:

9

result:

ok single line: '9'

Test #75:

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

input:

12 668
424 258
424 17
610 17
610 258
668 258
668 746
610 746
610 997
424 997
424 746
0 746
0 258

output:

668

result:

ok single line: '668'

Test #76:

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

input:

14 6
0 0
0 2
1 2
1 4
2 4
2 5
3 5
3 6
6 6
6 4
3 4
3 2
2 2
2 0

output:

0

result:

ok single line: '0'

Test #77:

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

input:

8 8
0 0
0 3
2 3
2 6
8 6
8 3
6 3
6 0

output:

0

result:

ok single line: '0'

Test #78:

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

input:

28 11
0 990
8 990
8 992
11 992
11 998
9 998
9 994
7 994
7 992
5 992
5 994
3 994
3 992
2 992
2 996
4 996
4 995
6 995
6 996
8 996
8 998
6 998
6 999
4 999
4 998
2 998
2 1000
0 1000

output:

11

result:

ok single line: '11'

Test #79:

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

input:

9988 936
270 806
269 806
267 806
266 806
265 806
264 806
262 806
261 806
260 806
259 806
258 806
257 806
256 806
256 815
256 821
256 829
256 832
256 835
256 841
256 843
256 854
256 856
256 858
256 860
256 862
256 865
256 872
256 878
256 881
256 882
256 886
256 890
256 904
256 909
256 918
256 940
256...

output:

936

result:

ok single line: '936'

Test #80:

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

input:

9869 980
9 785
9 784
9 783
9 782
9 781
9 779
17 779
18 779
20 779
25 779
30 779
33 779
34 779
35 779
40 779
42 779
43 779
56 779
61 779
65 779
75 779
78 779
80 779
82 779
83 779
86 779
101 779
107 779
109 779
111 779
120 779
121 779
124 779
130 779
143 779
154 779
164 779
165 779
170 779
170 778
170...

output:

0

result:

ok single line: '0'

Test #81:

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

input:

12 810
48 395
810 395
810 817
48 817
48 912
6 912
6 553
0 553
0 113
6 113
6 32
48 32

output:

810

result:

ok single line: '810'

Test #82:

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

input:

1707 980
980 10
980 9
980 8
980 7
980 6
980 4
980 2
980 1
980 0
968 0
965 0
926 0
916 0
900 0
859 0
848 0
820 0
772 0
763 0
760 0
743 0
730 0
725 0
694 0
688 0
632 0
609 0
603 0
597 0
596 0
581 0
483 0
474 0
439 0
437 0
419 0
373 0
367 0
363 0
362 0
345 0
330 0
272 0
260 0
253 0
241 0
220 0
200 0
17...

output:

0

result:

ok single line: '0'

Test #83:

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

input:

20 974
0 508
0 202
188 202
188 94
0 94
0 18
974 18
974 94
420 94
420 202
974 202
974 508
420 508
420 792
974 792
974 984
0 984
0 792
188 792
188 508

output:

974

result:

ok single line: '974'

Test #84:

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

input:

12 1000
0 1
0 999
1 999
1 1000
999 1000
999 999
1000 999
1000 1
999 1
999 0
1 0
1 1

output:

0

result:

ok single line: '0'

Test #85:

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

input:

906 980
544 788
544 789
544 790
546 790
547 790
550 790
551 790
552 790
553 790
554 790
555 790
556 790
556 791
556 792
558 792
560 792
560 793
560 794
561 794
564 794
565 794
566 794
567 794
568 794
568 795
568 796
569 796
570 796
570 797
570 798
571 798
572 798
574 798
574 799
574 800
574 802
575 ...

output:

0

result:

ok single line: '0'

Test #86:

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

input:

8 977
977 0
321 0
321 38
0 38
0 314
506 314
506 38
977 38

output:

977

result:

ok single line: '977'

Test #87:

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

input:

1992 996
642 177
642 176
644 176
644 175
646 175
646 174
648 174
648 173
650 173
650 172
652 172
652 171
654 171
654 170
656 170
656 169
658 169
658 168
660 168
660 167
662 167
662 166
664 166
664 165
666 165
666 164
668 164
668 163
670 163
670 162
672 162
672 161
674 161
674 160
676 160
676 159
678...

output:

996

result:

ok single line: '996'

Test #88:

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

input:

12 4
0 1
0 3
1 3
1 4
3 4
3 3
4 3
4 1
3 1
3 0
1 0
1 1

output:

0

result:

ok single line: '0'

Subtask #5:

score: 0
Runtime Error

Test #89:

score: 0
Runtime Error

input:

199996 198506138
31225688 248200160
31225688 248291950
28995282 248291950
28995282 248200160
26764876 248200160
26764876 248291950
24534470 248291950
24534470 248200160
22304064 248200160
22304064 248291950
20073658 248291950
20073658 248200160
17843252 248200160
17843252 248291950
15612846 24829195...

output:


result:


Subtask #6:

score: 0
Runtime Error

Test #118:

score: 0
Runtime Error

input:

200000 1000000000
1000000000 0
999990876 0
999990876 38
999972524 38
999972524 1510
999969180 1510
999969180 3734
999964780 3734
999964780 4138
999960464 4138
999960464 11052
999953728 11052
999953728 24478
999914972 24478
999914972 25892
999909864 25892
999909864 28102
999902920 28102
999902920 301...

output:


result:


Subtask #7:

score: 0
Skipped

Dependency #1:

0%