# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
657879 | 2022-11-11T15:54:16 Z | activedeltorre | 즐거운 행로 (APIO20_fun) | C++14 | 2 ms | 2644 KB |
#include "fun.h" #include <vector> using namespace std; int cnt=0; int poz[100005]; vector<int>adj[100005]; void dfs(int curr) { int i,k; for(i=0;i<adj[curr].size();i++) { k=adj[curr][i]; dfs(k); } poz[cnt]=curr; cnt++; } vector<int> createFunTour(int n, int q) { int i,st,dr; vector<int>vec; for(i=1; i<n; i++) { adj[(i-1)/2].push_back(i); } dfs(0); st=0; dr=n-1; while(st<dr) { vec.push_back(poz[st]); vec.push_back(poz[dr]); dr--; st++; } if(st==dr) { vec.push_back(poz[st]); } return vec; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 2644 KB | Tour is not fun |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 2644 KB | Tour is not fun |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Correct | 1 ms | 2644 KB | Output is correct |
3 | Incorrect | 1 ms | 2644 KB | Tour is not fun |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 2644 KB | Output is correct |
2 | Correct | 1 ms | 2644 KB | Output is correct |
3 | Correct | 2 ms | 2644 KB | Output is correct |
4 | Incorrect | 2 ms | 2644 KB | Tour is not fun |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 2644 KB | Tour is not fun |
2 | Halted | 0 ms | 0 KB | - |