# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
812445 | 2023-08-07T08:48:35 Z | Andrey | 철로 (IOI14_rail) | C++14 | 3000 ms | 197556 KB |
#include "rail.h" #include<bits/stdc++.h> using namespace std; priority_queue<pair<int,pair<int,int>>> idk; void findLocation(int n, int first, int location[], int stype[]) { location[0] = first; stype[0] = 1; for(int i = 1; i < n; i++) { location[i] = -1; } for(int i = 1; i < n; i++) { idk.push({-getDistance(0,i),{0,i}}); } int a,b,c,t,p; while(!idk.empty()) { a = -idk.top().first; b = idk.top().second.first; c = idk.top().second.second; idk.pop(); if(location[c] != -1) { continue; } t = stype[b]; if(t == 1) { location[c] = location[b]+a; stype[c] = 2; } else { location[c] = location[b]-a; stype[c] = 1; } for(int i = 0; i < n; i++) { if(location[i] == -1) { idk.push({-getDistance(c,i),{c,i}}); } } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 468 KB | Output is correct |
2 | Correct | 1 ms | 468 KB | Output is correct |
3 | Correct | 1 ms | 468 KB | Output is correct |
4 | Correct | 1 ms | 468 KB | Output is correct |
5 | Correct | 1 ms | 468 KB | Output is correct |
6 | Correct | 1 ms | 596 KB | Output is correct |
7 | Correct | 1 ms | 468 KB | Output is correct |
8 | Correct | 1 ms | 468 KB | Output is correct |
9 | Correct | 1 ms | 468 KB | Output is correct |
10 | Correct | 1 ms | 468 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 468 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 468 KB | Output is correct |
5 | Correct | 1 ms | 468 KB | Output is correct |
6 | Correct | 1 ms | 464 KB | Output is correct |
7 | Correct | 1 ms | 468 KB | Output is correct |
8 | Correct | 1 ms | 468 KB | Output is correct |
9 | Correct | 1 ms | 468 KB | Output is correct |
10 | Correct | 1 ms | 468 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3064 ms | 197556 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3060 ms | 197552 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |