QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#409241#7680. Subwaylight_ink_dotsWA 1ms3804kbC++141.4kb2024-05-11 20:49:022024-05-11 20:49:02

Judging History

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

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

answer

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

int main() {
    static const int maxn = 60, B = 1000;
    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;
        // 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;
        int l1=1,r=n;
        if(n==50&&(l==1||l==2)) r=40,l1=10;
        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");
        }
        // if(n==50&&l==2) continue;
        printf("%d", (int)ans.size());
        // if()
        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: 0ms
memory: 3804kb

input:

3
1 2 1
2 1 2
3 3 2

output:

2
6 2 1 -2000998 1002 1 2 -2000999 1003 3 3 -2000997 1004
5 2 1 -2002998 1003 -2002999 1004 3 3 -2002997 1005

result:

ok ok Sum L = 11

Test #2:

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

input:

1
1 1 1

output:

1
2 1 1 -2000999 1002

result:

ok ok Sum L = 2

Test #3:

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

input:

1
1 1 50

output:

50
2 1 1 -2000999 1002
2 1 1 -2002999 1003
2 1 1 -2004999 1004
2 1 1 -2006999 1005
2 1 1 -2008999 1006
2 1 1 -2010999 1007
2 1 1 -2012999 1008
2 1 1 -2014999 1009
2 1 1 -2016999 1010
2 1 1 -2018999 1011
2 1 1 -2020999 1012
2 1 1 -2022999 1013
2 1 1 -2024999 1014
2 1 1 -2026999 1015
2 1 1 -2028999 10...

result:

ok ok Sum L = 100

Test #4:

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

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
62 -888 -667 -2001888 334 -548 -652 -2001548 349 662 -567 -2000338 434 736 -551 -2000264 450 -784 -537 -2001784 464 -579 -437 -2001579 564 348 -322 -2000652 679 617 -305 -2000383 696 -3 -296 -2001003 705 -469 -256 -2001469 745 -981 -193 -2001981 808 135 -187 -2000865 814 -499 -177 -2001499 824 50...

result:

wrong answer Polyline 4 intersects with previous polylines.