QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#409539#7680. Subwaylight_ink_dotsAC ✓1ms4116kbC++14943b2024-05-12 11:00:562024-05-12 11:00:56

Judging History

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

  • [2024-05-12 11:00:56]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4116kb
  • [2024-05-12 11:00:56]
  • 提交

answer

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

int main() {
    static const int maxn = 60, B = 10000;
    int n, mx = 0;
    scanf("%d", &n);
    struct point {
        int x, y, a;
    };
    static point p[maxn];
    for (int i = 1; i <= n; i++) scanf("%d %d %d", &p[i].x, &p[i].y, &p[i].a), mx = max(mx, p[i].a);
    sort(p + 1, p + n + 1, [](const point x, const point y) { return x.y != y.y ? x.y < y.y : x.x < y.x; });
    printf("%d\n", mx);
    for (int l = 1; l <= mx; l++) {
        int dx = B + 1 - l * (B << 1 | 1), dy = (l << 1) - 1;
        vector<pair<int, int>> ans;
        for (int i = 1; i <= n; i++) {
            if (p[i].a >= l)
                ans.emplace_back(p[i].x, p[i].y);
            ans.emplace_back(p[i].x + dx, p[i].y + dy);
        }
        printf("%d", (int)ans.size());
        for (auto p : ans) printf(" %d %d", p.first, p.second);
        printf("\n");
    }
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1 2 1
2 1 2
3 3 2

output:

2
6 2 1 -9998 2 1 2 -9999 3 3 3 -9997 4
5 2 1 -29999 4 -30000 5 3 3 -29998 6

result:

ok ok Sum L = 11

Test #2:

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

input:

1
1 1 1

output:

1
2 1 1 -9999 2

result:

ok ok Sum L = 2

Test #3:

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

input:

1
1 1 50

output:

50
2 1 1 -9999 2
2 1 1 -30000 4
2 1 1 -50001 6
2 1 1 -70002 8
2 1 1 -90003 10
2 1 1 -110004 12
2 1 1 -130005 14
2 1 1 -150006 16
2 1 1 -170007 18
2 1 1 -190008 20
2 1 1 -210009 22
2 1 1 -230010 24
2 1 1 -250011 26
2 1 1 -270012 28
2 1 1 -290013 30
2 1 1 -310014 32
2 1 1 -330015 34
2 1 1 -350016 36
2...

result:

ok ok Sum L = 100

Test #4:

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

input:

50
662 -567 48
728 -120 7
307 669 27
-885 -775 21
100 242 9
-784 -537 41
940 198 46
736 -551 30
-449 456 16
-945 382 18
-182 810 49
213 187 44
853 245 48
617 -305 19
-81 261 3
617 208 8
-548 -652 6
-888 -667 14
-371 -812 43
202 -702 10
-668 -725 5
961 -919 33
-870 -697 50
428 810 29
560 405 7
348 -3...

output:

50
100 961 -919 -9039 -918 -306 -897 -10306 -896 334 -893 -9666 -892 -371 -812 -10371 -811 -885 -775 -10885 -774 -668 -725 -10668 -724 -462 -719 -10462 -718 202 -702 -9798 -701 -870 -697 -10870 -696 -888 -667 -10888 -666 -548 -652 -10548 -651 662 -567 -9338 -566 736 -551 -9264 -550 -784 -537 -10784 ...

result:

ok ok Sum L = 3693

Test #5:

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

input:

50
-772 697 1
-756 -909 1
659 923 1
850 471 1
260 -24 1
473 -639 1
-575 393 1
-466 197 1
333 -637 1
-192 -890 1
103 546 1
749 -723 1
-573 613 1
214 -138 1
277 928 1
266 291 1
911 275 1
-680 -67 1
69 190 1
-197 -795 1
684 618 1
729 -115 1
-658 -229 1
-595 -470 1
898 -172 1
401 81 1
133 685 1
223 400 ...

output:

1
100 -162 -959 -10162 -958 -756 -909 -10756 -908 -192 -890 -10192 -889 30 -869 -9970 -868 -197 -795 -10197 -794 749 -723 -9251 -722 -571 -716 -10571 -715 -216 -711 -10216 -710 -273 -672 -10273 -671 473 -639 -9527 -638 333 -637 -9667 -636 360 -630 -9640 -629 -135 -509 -10135 -508 -595 -470 -10595 -4...

result:

ok ok Sum L = 100

Test #6:

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

input:

50
-56 747 3
993 -490 4
930 -139 1
-298 -330 1
938 -351 5
-973 100 5
-472 44 4
345 628 5
481 -91 4
789 581 5
457 -29 4
871 -799 1
692 994 4
699 854 2
893 -33 1
-483 256 3
-962 -540 2
846 -893 1
830 609 5
845 -383 2
-552 -966 1
-544 -51 1
564 186 4
-615 -675 1
618 -911 3
-561 -302 4
-293 667 3
-334 -...

output:

5
100 356 -986 -9644 -985 348 -975 -9652 -974 -552 -966 -10552 -965 618 -911 -9382 -910 846 -893 -9154 -892 594 -847 -9406 -846 674 -804 -9326 -803 -637 -801 -10637 -800 871 -799 -9129 -798 17 -757 -9983 -756 -615 -675 -10615 -674 840 -638 -9160 -637 -792 -625 -10792 -624 -888 -613 -10888 -612 -962 ...

result:

ok ok Sum L = 391

Test #7:

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

input:

50
600 997 5
-893 -204 3
408 443 1
-560 -748 7
-647 161 6
-285 -980 1
87 -582 7
-48 -721 7
997 285 2
-189 -728 8
525 222 4
-324 816 9
760 317 3
753 -480 10
-813 -921 3
-325 -875 8
-747 816 10
-627 605 7
775 786 6
136 -54 2
274 948 10
216 -113 7
924 68 3
101 576 8
60 -501 2
898 801 8
-767 -974 10
-99...

output:

10
100 -313 -996 -10313 -995 -285 -980 -10285 -979 -767 -974 -10767 -973 932 -941 -9068 -940 -258 -938 -10258 -937 -813 -921 -10813 -920 -325 -875 -10325 -874 -19 -845 -10019 -844 166 -766 -9834 -765 -560 -748 -10560 -747 -397 -741 -10397 -740 -189 -728 -10189 -727 -48 -721 -10048 -720 269 -705 -973...

result:

ok ok Sum L = 781

Test #8:

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

input:

50
24 -889 49
117 418 49
25 524 44
980 -416 43
-494 357 41
-287 -285 46
151 574 41
-289 68 49
-515 -540 41
-367 -178 47
-887 151 45
197 -272 47
714 724 45
-737 94 49
810 830 47
808 -695 41
537 -637 49
-142 -167 44
-749 -631 47
445 -444 42
801 910 43
59 363 42
-912 466 50
-649 -479 48
-958 -511 49
88...

output:

50
100 75 -958 -9925 -957 -282 -917 -10282 -916 24 -889 -9976 -888 173 -857 -9827 -856 273 -830 -9727 -829 808 -695 -9192 -694 537 -637 -9463 -636 -749 -631 -10749 -630 938 -596 -9062 -595 -515 -540 -10515 -539 -958 -511 -10958 -510 -649 -479 -10649 -478 139 -450 -9861 -449 531 -449 -9469 -448 445 -...

result:

ok ok Sum L = 4768

Test #9:

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

input:

50
151 -171 50
-367 -951 50
808 569 50
150 -618 50
27 -476 50
-846 729 50
549 -456 50
50 646 50
294 -70 50
-571 104 50
128 -265 50
913 -700 50
267 -965 50
896 846 50
-2 713 50
21 679 50
-515 975 50
168 180 50
-369 -98 50
676 115 50
643 -779 50
920 -237 50
-324 450 50
149 -378 50
-882 -602 50
-126 -7...

output:

50
100 -302 -989 -10302 -988 267 -965 -9733 -964 -367 -951 -10367 -950 417 -944 -9583 -943 197 -923 -9803 -922 481 -873 -9519 -872 -126 -799 -10126 -798 643 -779 -9357 -778 913 -700 -9087 -699 498 -636 -9502 -635 150 -618 -9850 -617 -882 -602 -10882 -601 895 -564 -9105 -563 27 -476 -9973 -475 421 -4...

result:

ok ok Sum L = 5000

Test #10:

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

input:

50
4 5 34
1 -5 24
-4 -4 32
-3 3 28
0 -1 21
1 -4 25
0 0 30
0 -4 42
-3 -2 44
-5 -3 37
4 -1 46
5 2 20
2 2 37
-2 5 35
-2 -1 39
2 4 32
-4 -3 42
0 3 32
3 5 47
-4 1 2
5 -1 17
-5 -4 5
-2 2 29
-5 1 11
2 -5 43
4 4 14
-5 0 9
0 -5 17
5 1 27
-3 0 24
-1 4 16
5 0 50
3 -2 18
1 -2 6
2 -1 29
-1 3 38
1 5 36
-3 1 28
-3...

output:

50
100 -2 -5 -10002 -4 0 -5 -10000 -4 1 -5 -9999 -4 2 -5 -9998 -4 -5 -4 -10005 -3 -4 -4 -10004 -3 -1 -4 -10001 -3 0 -4 -10000 -3 1 -4 -9999 -3 5 -4 -9995 -3 -5 -3 -10005 -2 -4 -3 -10004 -2 -3 -3 -10003 -2 0 -3 -10000 -2 2 -3 -9998 -2 -3 -2 -10003 -1 0 -2 -10000 -1 1 -2 -9999 -1 3 -2 -9997 -1 -3 -1 -...

result:

ok ok Sum L = 3924

Test #11:

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

input:

50
2 0 2
2 -3 2
4 1 2
-3 -3 2
-5 1 2
5 3 2
-5 -3 2
-3 -2 2
2 -1 2
2 3 2
4 4 1
1 -4 1
5 -1 2
-4 1 2
3 -2 1
-1 2 2
5 -5 2
-2 1 2
-5 -1 2
-2 -1 2
-1 -2 2
5 5 1
0 -2 2
1 1 1
2 2 2
3 5 2
-2 -4 1
-3 5 1
4 2 2
-4 -4 2
-3 2 1
5 0 2
-2 -2 2
-4 4 1
-2 5 2
2 5 1
3 -5 2
-4 5 2
-5 5 2
-2 4 2
-5 -5 2
-2 2 2
-3 -4...

output:

2
100 -5 -5 -10005 -4 3 -5 -9997 -4 5 -5 -9995 -4 -4 -4 -10004 -3 -3 -4 -10003 -3 -2 -4 -10002 -3 -1 -4 -10001 -3 1 -4 -9999 -3 2 -4 -9998 -3 -5 -3 -10005 -2 -3 -3 -10003 -2 2 -3 -9998 -2 3 -3 -9997 -2 -3 -2 -10003 -1 -2 -2 -10002 -1 -1 -2 -10001 -1 0 -2 -10000 -1 1 -2 -9999 -1 2 -2 -9998 -1 3 -2 -9...

result:

ok ok Sum L = 186

Test #12:

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

input:

50
4 3 49
-5 -3 49
0 -3 50
-2 -4 49
-5 -5 50
4 0 49
-1 -2 49
-2 0 49
1 2 50
-1 -5 50
-5 -1 50
-5 5 49
2 0 50
-2 -3 50
-4 -5 50
0 -2 50
-5 4 50
-1 1 49
-1 -4 49
-3 -1 49
1 -3 50
-4 1 50
0 5 50
1 -2 50
-1 5 50
4 2 50
4 -3 49
1 -4 49
-1 -1 49
-3 -5 50
4 -4 50
3 2 49
3 -3 49
0 2 50
-3 -4 49
5 -1 49
-3 5...

output:

50
100 -5 -5 -10005 -4 -4 -5 -10004 -4 -3 -5 -10003 -4 -1 -5 -10001 -4 1 -5 -9999 -4 2 -5 -9998 -4 -3 -4 -10003 -3 -2 -4 -10002 -3 -1 -4 -10001 -3 0 -4 -10000 -3 1 -4 -9999 -3 4 -4 -9996 -3 -5 -3 -10005 -2 -2 -3 -10002 -2 0 -3 -10000 -2 1 -3 -9999 -2 3 -3 -9997 -2 4 -3 -9996 -2 5 -3 -9995 -2 -1 -2 -...

result:

ok ok Sum L = 4977

Test #13:

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

input:

50
114 514 30
115 514 41
116 514 6
117 514 49
118 514 10
119 514 49
120 514 1
121 514 7
122 514 3
123 514 4
124 514 1
125 514 12
126 514 15
127 514 16
128 514 34
129 514 24
130 514 49
131 514 43
132 514 25
133 514 12
134 514 26
135 514 13
136 514 12
137 514 15
138 514 7
139 514 25
140 514 5
141 514 ...

output:

49
100 114 514 -9886 515 115 514 -9885 515 116 514 -9884 515 117 514 -9883 515 118 514 -9882 515 119 514 -9881 515 120 514 -9880 515 121 514 -9879 515 122 514 -9878 515 123 514 -9877 515 124 514 -9876 515 125 514 -9875 515 126 514 -9874 515 127 514 -9873 515 128 514 -9872 515 129 514 -9871 515 130 5...

result:

ok ok Sum L = 3602

Test #14:

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

input:

50
191 981 19
191 980 41
191 979 20
191 978 14
191 977 2
191 976 49
191 975 40
191 974 3
191 973 20
191 972 6
191 971 13
191 970 4
191 969 4
191 968 47
191 967 32
191 966 11
191 965 34
191 964 30
191 963 3
191 962 16
191 961 24
191 960 30
191 959 34
191 958 31
191 957 24
191 956 29
191 955 42
191 95...

output:

49
100 191 932 -9809 933 191 933 -9809 934 191 934 -9809 935 191 935 -9809 936 191 936 -9809 937 191 937 -9809 938 191 938 -9809 939 191 939 -9809 940 191 940 -9809 941 191 941 -9809 942 191 942 -9809 943 191 943 -9809 944 191 944 -9809 945 191 945 -9809 946 191 946 -9809 947 191 947 -9809 948 191 9...

result:

ok ok Sum L = 3602

Test #15:

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

input:

50
-123 456 47
-122 457 35
-121 458 25
-120 459 35
-119 460 30
-118 461 33
-117 462 21
-116 463 31
-115 464 21
-114 465 35
-113 466 20
-112 467 17
-111 468 25
-110 469 3
-109 470 29
-108 471 35
-107 472 4
-106 473 44
-105 474 4
-104 475 28
-103 476 49
-102 477 9
-101 478 39
-100 479 9
-99 480 21
-98...

output:

50
100 -123 456 -10123 457 -122 457 -10122 458 -121 458 -10121 459 -120 459 -10120 460 -119 460 -10119 461 -118 461 -10118 462 -117 462 -10117 463 -116 463 -10116 464 -115 464 -10115 465 -114 465 -10114 466 -113 466 -10113 467 -112 467 -10112 468 -111 468 -10111 469 -110 469 -10110 470 -109 470 -101...

result:

ok ok Sum L = 3706

Test #16:

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

input:

50
321 -525 46
322 -526 14
323 -527 16
324 -528 38
325 -529 22
326 -530 24
327 -531 48
328 -532 5
329 -533 7
330 -534 30
331 -535 25
332 -536 2
333 -537 13
334 -538 1
335 -539 33
336 -540 8
337 -541 9
338 -542 2
339 -543 29
340 -544 17
341 -545 41
342 -546 39
343 -547 9
344 -548 47
345 -549 47
346 -...

output:

50
100 370 -574 -9630 -573 369 -573 -9631 -572 368 -572 -9632 -571 367 -571 -9633 -570 366 -570 -9634 -569 365 -569 -9635 -568 364 -568 -9636 -567 363 -567 -9637 -566 362 -566 -9638 -565 361 -565 -9639 -564 360 -564 -9640 -563 359 -563 -9641 -562 358 -562 -9642 -561 357 -561 -9643 -560 356 -560 -964...

result:

ok ok Sum L = 3712

Test #17:

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

input:

50
-444 -555 23
-445 -556 32
-446 -557 36
-447 -558 29
-448 -559 4
-449 -560 25
-450 -561 29
-451 -562 5
-452 -563 9
-453 -564 28
-454 -565 35
-455 -566 26
-456 -567 22
-457 -568 39
-458 -569 13
-459 -570 50
-460 -571 37
-461 -572 14
-462 -573 26
-463 -574 49
-464 -575 23
-465 -576 44
-466 -577 2
-4...

output:

50
100 -493 -604 -10493 -603 -492 -603 -10492 -602 -491 -602 -10491 -601 -490 -601 -10490 -600 -489 -600 -10489 -599 -488 -599 -10488 -598 -487 -598 -10487 -597 -486 -597 -10486 -596 -485 -596 -10485 -595 -484 -595 -10484 -594 -483 -594 -10483 -593 -482 -593 -10482 -592 -481 -592 -10481 -591 -480 -5...

result:

ok ok Sum L = 3661

Test #18:

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

input:

50
-142 0 48
-143 1 22
-144 2 45
-145 3 9
-146 4 36
-147 5 46
-148 6 26
-149 7 26
-150 8 9
-151 9 19
-152 10 22
-153 11 14
-154 12 8
-155 13 20
-156 14 41
-157 15 47
-158 16 22
-159 17 50
-160 18 3
-161 19 12
-162 20 15
-163 21 32
-164 22 46
-165 23 45
-166 24 3
-167 25 27
-168 26 33
-169 27 17
-170...

output:

50
100 -142 0 -10142 1 -143 1 -10143 2 -144 2 -10144 3 -145 3 -10145 4 -146 4 -10146 5 -147 5 -10147 6 -148 6 -10148 7 -149 7 -10149 8 -150 8 -10150 9 -151 9 -10151 10 -152 10 -10152 11 -153 11 -10153 12 -154 12 -10154 13 -155 13 -10155 14 -156 14 -10156 15 -157 15 -10157 16 -158 16 -10158 17 -159 1...

result:

ok ok Sum L = 3811

Test #19:

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

input:

12
1000 1000 50
1000 -1000 50
1000 999 50
999 1000 50
999 -1000 50
-999 1000 50
1000 -999 50
-999 -1000 50
-1000 1000 50
-1000 -1000 50
-1000 -999 50
-1000 999 50

output:

50
24 -1000 -1000 -11000 -999 -999 -1000 -10999 -999 999 -1000 -9001 -999 1000 -1000 -9000 -999 -1000 -999 -11000 -998 1000 -999 -9000 -998 -1000 999 -11000 1000 1000 999 -9000 1000 -1000 1000 -11000 1001 -999 1000 -10999 1001 999 1000 -9001 1001 1000 1000 -9000 1001
24 -1000 -1000 -31001 -997 -999 ...

result:

ok ok Sum L = 1200

Test #20:

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

input:

4
1000 1000 50
1000 -1000 50
-1000 1000 50
-1000 -1000 50

output:

50
8 -1000 -1000 -11000 -999 1000 -1000 -9000 -999 -1000 1000 -11000 1001 1000 1000 -9000 1001
8 -1000 -1000 -31001 -997 1000 -1000 -29001 -997 -1000 1000 -31001 1003 1000 1000 -29001 1003
8 -1000 -1000 -51002 -995 1000 -1000 -49002 -995 -1000 1000 -51002 1005 1000 1000 -49002 1005
8 -1000 -1000 -71...

result:

ok ok Sum L = 400

Extra Test:

score: 0
Extra Test Passed