# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
992345 | 2024-06-04T09:47:37 Z | Kalata_56 | Road Construction (JOI21_road_construction) | C++14 | 10000 ms | 2097152 KB |
#include<bits/stdc++.h> using namespace std; pair<long long,long long> kor[250001]; vector<long long> kol; int main(){ long long N,K; cin>>N>>K; for(long long i=0;i<N;i++){ cin>>kor[i].first>>kor[i].second; } sort(kor,kor+N); for(int k=1;k<N;k++){ for(long long i=k;i<N;i++){ long long raz=abs(kor[i].first-kor[i-k].first)+abs(kor[i].second-kor[i-k].second); kol.push_back(raz); } if(kol.size()>=K && k>=1000){ break; } } sort(kol.begin(),kol.end()); for(long long i=0;i<K;i++){ cout<<kol[i]<<endl; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 305 ms | 7096 KB | Output is correct |
2 | Correct | 295 ms | 7060 KB | Output is correct |
3 | Correct | 305 ms | 4956 KB | Output is correct |
4 | Correct | 277 ms | 5104 KB | Output is correct |
5 | Correct | 288 ms | 5840 KB | Output is correct |
6 | Correct | 14 ms | 5320 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1388 ms | 2097152 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1549 ms | 2097152 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1549 ms | 2097152 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 305 ms | 7096 KB | Output is correct |
2 | Correct | 295 ms | 7060 KB | Output is correct |
3 | Correct | 305 ms | 4956 KB | Output is correct |
4 | Correct | 277 ms | 5104 KB | Output is correct |
5 | Correct | 288 ms | 5840 KB | Output is correct |
6 | Correct | 14 ms | 5320 KB | Output is correct |
7 | Execution timed out | 10082 ms | 1055396 KB | Time limit exceeded |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 305 ms | 7096 KB | Output is correct |
2 | Correct | 295 ms | 7060 KB | Output is correct |
3 | Correct | 305 ms | 4956 KB | Output is correct |
4 | Correct | 277 ms | 5104 KB | Output is correct |
5 | Correct | 288 ms | 5840 KB | Output is correct |
6 | Correct | 14 ms | 5320 KB | Output is correct |
7 | Runtime error | 1388 ms | 2097152 KB | Execution killed with signal 9 |
8 | Halted | 0 ms | 0 KB | - |