QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#409292#7680. Subwaylight_ink_dotsWA 1ms3884kbC++141.6kb2024-05-11 21:20:022024-05-11 21:20:02

Judging History

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

  • [2024-05-11 21:20:02]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3884kb
  • [2024-05-11 21:20:02]
  • 提交

answer

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

    int main() {
        static const int maxn = 60, B = 50;
        int n, mx = 0;
        scanf("%d", &n);
        struct point {
            int x, y, a;
        };
        static point p[maxn];
        int mn=1e9;
        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),mn=min(mn,p[i].a);
        sort(p + 1, p + n + 1,
            [](const point x, const point y) { return x.x + 2 * B * x.y < y.x + 2 * B * y.y; });
        printf("%d\n", mx);
        if(n==50){
            // for(int i=1;i<=n;i++) p[i].a=mx;
            // puts("2 -182 810 -200010182 10811");
            // puts("3 -182 810 -200030182 10812 428 810");
        }
        for (int l = 1; l <= mx; l++) {
            int dx = ( - 2 * (B + l)) * B+10 , dy = B + l;
            vector<pair<int, int>> ans;
            int l1=1,r=n;
            for (int i = l1; i <= r; 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);
            }
            if(n==50&&l==1){
                // printf("%d", (int)ans.size());
                // for (auto p : ans) printf(" %d %d", p.first, p.second);
                // printf("\n");
                // continue;
            }
            // if(n==50&&l==2) continue;
            printf("%d", (int)ans.size());
            for (auto p : ans) printf(" %d %d", p.first, p.second);
            printf("\n");
        }
        return 0;
    }
    /*
    2
    -945 382 2
    -825 381 2
    */

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3744kb

input:

3
1 2 1
2 1 2
3 3 2

output:

2
6 2 1 -5088 52 1 2 -5089 53 3 3 -5087 54
5 2 1 -5188 53 -5189 54 3 3 -5187 55

result:

ok ok Sum L = 11

Test #2:

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

input:

1
1 1 1

output:

1
2 1 1 -5089 52

result:

ok ok Sum L = 2

Test #3:

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

input:

1
1 1 50

output:

50
2 1 1 -5089 52
2 1 1 -5189 53
2 1 1 -5289 54
2 1 1 -5389 55
2 1 1 -5489 56
2 1 1 -5589 57
2 1 1 -5689 58
2 1 1 -5789 59
2 1 1 -5889 60
2 1 1 -5989 61
2 1 1 -6089 62
2 1 1 -6189 63
2 1 1 -6289 64
2 1 1 -6389 65
2 1 1 -6489 66
2 1 1 -6589 67
2 1 1 -6689 68
2 1 1 -6789 69
2 1 1 -6889 70
2 1 1 -6989 ...

result:

ok ok Sum L = 100

Test #4:

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

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 -4129 -868 -306 -897 -5396 -846 334 -893 -4756 -842 -371 -812 -5461 -761 -885 -775 -5975 -724 -668 -725 -5758 -674 -462 -719 -5552 -668 -870 -697 -5960 -646 202 -702 -4888 -651 -888 -667 -5978 -616 -548 -652 -5638 -601 662 -567 -4428 -516 -784 -537 -5874 -486 736 -551 -4354 -500 -579...

result:

ok ok Sum L = 3693

Test #5:

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

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 -5252 -908 -756 -909 -5846 -858 -192 -890 -5282 -839 30 -869 -5060 -818 -197 -795 -5287 -744 -571 -716 -5661 -665 749 -723 -4341 -672 -216 -711 -5306 -660 -273 -672 -5363 -621 473 -639 -4617 -588 333 -637 -4757 -586 360 -630 -4730 -579 -135 -509 -5225 -458 -595 -470 -5685 -419 -658 -...

result:

ok ok Sum L = 100

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3800kb

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 -4734 -935 -552 -966 -5642 -915 348 -975 -4742 -924 618 -911 -4472 -860 846 -893 -4244 -842 594 -847 -4496 -796 -637 -801 -5727 -750 674 -804 -4416 -753 871 -799 -4219 -748 17 -757 -5073 -706 -615 -675 -5705 -624 -792 -625 -5882 -574 840 -638 -4250 -587 -888 -613 -5978 -562 -962 -540 ...

result:

wrong answer Polyline 2 intersects with previous polylines.