QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#512237#9177. String and Nailsucup-team3282#WA 157ms7832kbC++20443b2024-08-10 13:54:322024-08-10 13:54:33

Judging History

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

  • [2024-08-10 13:54:33]
  • 评测
  • 测评结果:WA
  • 用时:157ms
  • 内存:7832kb
  • [2024-08-10 13:54:32]
  • 提交

answer

#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;

pair<long long,pair<int,int>>ch[1000050];

int main(){
    int n;cin>>n;
    for(int i=1;i<=n;i++){
        long long x,y;cin>>x>>y;
        ch[i]=make_pair(x*x+y*y,make_pair(x,y));
    }
    sort(ch+1,ch+n+1);
    cout<<"YES\n";
    for(int i=1;i<n;i++){
        cout<<ch[i].second.first<<" "<<ch[i].second.second<<endl;
    }
    cout<<endl;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3664kb

input:

3
1 1
2 4
3 1

output:

YES
1 1
3 1


result:

ok Everything ok

Test #2:

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

input:

1
1000000000 0

output:

YES


result:

ok Everything ok

Test #3:

score: -100
Wrong Answer
time: 157ms
memory: 7832kb

input:

200000
500000000 500000000
500244009 499720246
500488018 499440492
500732027 499160738
500976036 498880984
501220045 498601230
501464054 498321476
501708063 498041722
501952072 497761968
502196081 497482214
502440090 497202460
502684099 496922706
502928108 496642952
503172117 496363198
503416126 496...

output:

YES
531721170 463631980
531477161 463911734
531965179 463352226
531233152 464191488
532209188 463072472
530989143 464471242
532453197 462792718
530745134 464750996
532697206 462512964
530501125 465030750
532941215 462233210
530257116 465310504
533185224 461953456
530013107 465590258
533429233 461673...

result:

wrong answer Wrong answer