답안 #992272

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
992272 2024-06-04T08:04:17 Z Kalata_56 Road Construction (JOI21_road_construction) C++14
5 / 100
1561 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;
    }
    for(long long i=0;i<N;i++){
        for(long long j=i+1;j<N;j++){
            long long raz=abs(kor[i].first-kor[j].first)+abs(kor[i].second-kor[j].second);
            kol.push_back(raz);
        }
    }
    sort(kol.begin(),kol.end());
    for(long long i=0;i<K;i++){
        cout<<kol[i]<<endl;
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 286 ms 7092 KB Output is correct
2 Correct 298 ms 7096 KB Output is correct
3 Correct 266 ms 5160 KB Output is correct
4 Correct 269 ms 5052 KB Output is correct
5 Correct 283 ms 6092 KB Output is correct
6 Correct 20 ms 5064 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1561 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1422 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1422 ms 2097152 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 286 ms 7092 KB Output is correct
2 Correct 298 ms 7096 KB Output is correct
3 Correct 266 ms 5160 KB Output is correct
4 Correct 269 ms 5052 KB Output is correct
5 Correct 283 ms 6092 KB Output is correct
6 Correct 20 ms 5064 KB Output is correct
7 Runtime error 1338 ms 2097152 KB Execution killed with signal 9
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 286 ms 7092 KB Output is correct
2 Correct 298 ms 7096 KB Output is correct
3 Correct 266 ms 5160 KB Output is correct
4 Correct 269 ms 5052 KB Output is correct
5 Correct 283 ms 6092 KB Output is correct
6 Correct 20 ms 5064 KB Output is correct
7 Runtime error 1561 ms 2097152 KB Execution killed with signal 9
8 Halted 0 ms 0 KB -