Submission #1129712

#TimeUsernameProblemLanguageResultExecution timeMemory
1129712gygNestabilnost (COI23_nestabilnost)C++20
0 / 100
290 ms21368 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define arr array #define vec vector const int N = 3e5 + 5, INF = 1e18; int n; arr<int, N> vl, cst; arr<vec<int>, N> adj; signed main() { // freopen("a.in", "r", stdin); cin >> n; for (int u = 1; u <= n; u++) cin >> vl[u]; for (int c = 1; c <= n; c++) cin >> cst[c]; for (int i = 1; i < n; i++) { int u, v; cin >> u >> v; adj[u].push_back(v), adj[v].push_back(u); } assert(n == 1 || (adj[1].size() == 1 && adj[n].size() == 1)); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...