# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1059651 | 2024-08-15T06:44:50 Z | tolbi | 가장 긴 여행 (IOI23_longesttrip) | C++17 | 210 ms | 344 KB |
#include "longesttrip.h" //bool are_connected(std::vector<int> A, std::vector<int> B); bool sor(int x, int y){ std::vector<int> ilk; std::vector<int> iki; ilk.push_back(x); iki.push_back(y); return are_connected(ilk,iki); } std::vector<int> longest_trip(int N, int D) { std::vector<int> ans; ans.push_back(0); std::vector<bool> vis(N,false); vis[0]=true; while (ans.size()<N){ for (int i = 0; i < N; i++){ if (vis[i]) continue; if (sor(ans.back(),i)){ ans.push_back(i); vis[i]=true; break; } } } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 188 ms | 344 KB | too many calls |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 344 KB | Output is correct |
2 | Correct | 7 ms | 344 KB | Output is correct |
3 | Correct | 5 ms | 344 KB | Output is correct |
4 | Correct | 4 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 344 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 344 KB | Output is correct |
2 | Correct | 5 ms | 344 KB | Output is correct |
3 | Correct | 5 ms | 344 KB | Output is correct |
4 | Correct | 5 ms | 344 KB | Output is correct |
5 | Correct | 9 ms | 344 KB | Output is correct |
6 | Incorrect | 193 ms | 344 KB | too many calls |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 344 KB | Output is correct |
2 | Correct | 6 ms | 344 KB | Output is correct |
3 | Correct | 5 ms | 344 KB | Output is correct |
4 | Correct | 5 ms | 344 KB | Output is correct |
5 | Correct | 5 ms | 344 KB | Output is correct |
6 | Incorrect | 210 ms | 344 KB | too many calls |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 344 KB | Output is correct |
2 | Correct | 6 ms | 344 KB | Output is correct |
3 | Correct | 8 ms | 344 KB | Output is correct |
4 | Correct | 5 ms | 344 KB | Output is correct |
5 | Correct | 7 ms | 344 KB | Output is correct |
6 | Incorrect | 154 ms | 344 KB | too many calls |
7 | Halted | 0 ms | 0 KB | - |