QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#409073#7680. Subwaylight_ink_dots#WA 1ms3832kbC++14920b2024-05-11 17:30:332024-05-11 17:30:33

Judging History

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

  • [2024-05-11 17:30:33]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3832kb
  • [2024-05-11 17:30:33]
  • 提交

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 B * x.x + x.y < B * y.x + y.y; });
    printf("%d\n", mx);
    for (int l = mx; l; l--) {
        int dx = l - B, dy = 1 - dx * B;
        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;
}

詳細信息

Test #1:

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

input:

3
1 2 1
2 1 2
3 3 2

output:

2
4 2 1 -9996 99980002 3 3 -9995 99980004
6 1 2 -9998 99990003 2 1 -9997 99990002 3 3 -9996 99990004

result:

ok ok Sum L = 10

Test #2:

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

input:

1
1 1 1

output:

1
2 1 1 -9998 99990002

result:

ok ok Sum L = 2

Test #3:

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

input:

1
1 1 50

output:

50
2 1 1 -9949 99500002
2 1 1 -9950 99510002
2 1 1 -9951 99520002
2 1 1 -9952 99530002
2 1 1 -9953 99540002
2 1 1 -9954 99550002
2 1 1 -9955 99560002
2 1 1 -9956 99570002
2 1 1 -9957 99580002
2 1 1 -9958 99590002
2 1 1 -9959 99600002
2 1 1 -9960 99610002
2 1 1 -9961 99620002
2 1 1 -9962 99630002
2 1...

result:

ok ok Sum L = 100

Test #4:

score: -100
Wrong Answer
time: 1ms
memory: 3692kb

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
4 -870 -697 -10820 99499304 -3 -296 -9953 99499705
8 -870 -697 -10821 99509304 -182 810 -10133 99510811 -3 -296 -9954 99509705 135 -187 -9816 99509814
12 -870 -697 -10822 99519304 -182 810 -10134 99520811 -3 -296 -9955 99519705 135 -187 -9817 99519814 662 -567 -9290 99519434 853 245 -9099 9952024...

result:

wrong answer Polyline 2 intersects with previous polylines.