답안 #878815

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
878815 2023-11-25T09:26:31 Z niter Unique Cities (JOI19_ho_t5) C++14
0 / 100
3 ms 5212 KB
#include <bits/stdc++.h>
#define pb push_back
#define ins isnert
#define pii pair<int,int>
#define ff first
#define ss second
#define loop(i,a,b) for(int i = (a); i < (b); i ++)
#define op(x) cerr << #x << " = " << x << endl;
#define opa(x) cerr << #x << " = " << x << ", ";
#define ops(x) cerr << x;
#define spac cerr << ' ';
#define entr cerr << endl;
#define STL(x) cerr << #x << " : "; for(auto &qwe:x) cerr << qwe << ' '; cerr << endl;
#define ARR(x, nnn) cerr << #x << " : "; loop(qwe,0,nnn) cerr << x[qwe] << ' '; cerr << endl;
#define BAE(x) (x).begin(), (x).end()
#define bye exit(0);
using namespace std;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());

const int mxn = (int)(1e5) + 10;
vector<int> E[mxn];

void test_dfs(int v, int par){
    for(auto &u:E[v]){
        if(u == par) continue;
        test_dfs(u, v);
    }
}

int main(){
    ios::sync_with_stdio(false); cin.tie(0);
    int n, m; cin >> n >> m;
    loop(i,0,n-1){
        int a, b;
        cin >> a >> b;
        E[a].pb(b);
        E[b].pb(a);
    }
    loop(i,1,n+1){
        int tmp;
        cin >> tmp;
    }
    loop(i,1,n+1){
        test_dfs(i, -1);
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3 ms 5212 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3 ms 5212 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2652 KB Output isn't correct
2 Halted 0 ms 0 KB -