제출 #1039999

#제출 시각아이디문제언어결과실행 시간메모리
1039999LaMatematica14Split the Attractions (IOI19_split)C++17
0 / 100
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) { vector<int> g(n); vector<vector<int>> adj(n, vector<int> (n, 3)); queue<int> nx; nx.push(0); while (!nx.empty()) { int att = nx.front(); nx.pop(); for (int i : adj[att]) { if (b == 0) break; if (g[i] == 2) continue; nx.push(i); g[i] = 2; b--; } if (b == 0) break; } for (int i = 0; i < n; i++) { if (g[i] == 3) { g[i] = 1; break; } } return g; }
#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...