| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1353829 | mariza | Theseus (CEOI25_theseus) | C++20 | 268 ms | 476548 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=1e4;
vector<ll> g[N];
ll d[N];
void dfs(ll curr, ll prev){
for(auto nxt:g[curr]){
if(nxt!=prev){
d[nxt]=d[curr]+1;
dfs(nxt,curr);
}
}
}
vector<int> paint(int n, vector<pair<int,int>> e, int t){
t--;
for(auto i:e){
ll u, v;
tie(u,v)=i; u--; v--;
g[u].push_back(v);
g[v].push_back(u);
}
d[t]=0;
dfs(t,t);
vector<int> ans;
for(auto i:e){
ll u, v;
tie(u,v)=i; u--; v--;
if(d[max(u,v)]>d[min(u,v)]) ans.push_back(0);
else ans.push_back(1);
}
return ans;
}
int travel(int n, int u, vector<pair<int,int>> nxt) {
for(auto i:nxt){
if((i.second==1 && i.first>u) || (i.second==0 && i.first<u)) return i.first;
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
