QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#409206 | #7680. Subway | light_ink_dots | WA | 0ms | 4112kb | C++14 | 1.5kb | 2024-05-11 20:27:29 | 2024-05-11 20:27:30 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
static const int maxn = 60, B = 100;
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){
// cout<<mx<<" "<<mn<<endl;
for(int i=1;i<=n;i++) p[i].a=mx;
cout<<p[1].x<<" "<<p[1].y<<endl;
cout<<p[2].x<<" "<<p[2].y<<endl;
cout<<p[3].x<<" "<<p[3].y<<endl;
cout<<p[4].x<<" "<<p[4].y<<endl;
// for(int i=1;i<=)
}
for (int l = 1; l <= mx; l++) {
int dx = (1 - 2 * (B + l)) * B , dy = B + l;
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);
}
if(n==50&&l==1){
// printf("%d", (int)ans.size());
// for (auto p : ans) printf(" %d %d", p.first, p.second);
// printf("\n");
}
// 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;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3812kb
input:
3 1 2 1 2 1 2 3 3 2
output:
2 6 2 1 -20098 102 1 2 -20099 103 3 3 -20097 104 5 2 1 -20298 103 -20299 104 3 3 -20297 105
result:
ok ok Sum L = 11
Test #2:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
1 1 1 1
output:
1 2 1 1 -20099 102
result:
ok ok Sum L = 2
Test #3:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
1 1 1 50
output:
50 2 1 1 -20099 102 2 1 1 -20299 103 2 1 1 -20499 104 2 1 1 -20699 105 2 1 1 -20899 106 2 1 1 -21099 107 2 1 1 -21299 108 2 1 1 -21499 109 2 1 1 -21699 110 2 1 1 -21899 111 2 1 1 -22099 112 2 1 1 -22299 113 2 1 1 -22499 114 2 1 1 -22699 115 2 1 1 -22899 116 2 1 1 -23099 117 2 1 1 -23299 118 2 1 1 -2...
result:
ok ok Sum L = 100
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3820kb
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 961 -919 -306 -897 334 -893 -371 -812 100 961 -919 -19139 -818 -306 -897 -20406 -796 334 -893 -19766 -792 -371 -812 -20471 -711 -885 -775 -20985 -674 -668 -725 -20768 -624 -462 -719 -20562 -618 -870 -697 -20970 -596 202 -702 -19898 -601 -888 -667 -20988 -566 -548 -652 -20648 -551 662 -567 -19438 ...
result:
wrong output format Unexpected character #10, but ' ' expected