QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#409118 | #7680. Subway | light_ink_dots# | WA | 1ms | 3988kb | C++14 | 958b | 2024-05-11 19:09:09 | 2024-05-11 19:09:10 |
Judging History
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.x + 2 * B * x.y < y.x + 2 * B * y.y; });
printf("%d\n", mx);
for (int l = mx; l; l--) {
int dx = (1 - 2 * (B + l * 10)) * B - 1000, dy = B + l * 10;
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3716kb
input:
3 1 2 1 2 1 2 3 3 2
output:
2 5 2 1 -200390998 10021 -200390999 10022 3 3 -200390997 10023 6 2 1 -200190998 10011 1 2 -200190999 10012 3 3 -200190997 10013
result:
ok ok Sum L = 11
Test #2:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
1 1 1 1
output:
1 2 1 1 -200190999 10011
result:
ok ok Sum L = 2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
1 1 1 50
output:
50 2 1 1 -209990999 10501 2 1 1 -209790999 10491 2 1 1 -209590999 10481 2 1 1 -209390999 10471 2 1 1 -209190999 10461 2 1 1 -208990999 10451 2 1 1 -208790999 10441 2 1 1 -208590999 10431 2 1 1 -208390999 10421 2 1 1 -208190999 10411 2 1 1 -207990999 10401 2 1 1 -207790999 10391 2 1 1 -207590999 1038...
result:
ok ok Sum L = 100
Test #4:
score: -100
Wrong Answer
time: 1ms
memory: 3988kb
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 52 -209990039 9581 -209991306 9603 -209990666 9607 -209991371 9688 -209991885 9725 -209991668 9775 -209991462 9781 -209990798 9798 -870 -697 -209991870 9803 -209991888 9833 -209991548 9848 -209990338 9933 -209990264 9949 -209991784 9963 -209991579 10063 -209990652 10178 -209990383 10195 -3 -296 -...
result:
wrong answer Polyline 23 intersects with previous polylines.