제출 #1074739

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10747392024-08-25 13:29:32shmax열쇠 (IOI21_keys)C++17
67 / 100
3037 ms48432 KiB
#include <bits/stdc++.h>
//
//#pragma GCC optimize("O3")
//#pragma GCC target("avx,avx2,fma")
//#pragma GCC optimization("unroll-loops")
using namespace std;
using i32 = int;
#define len(x) (int)(x.size())
template<typename T>
using vec = vector<T>;
vector<i32> find_reachable(vector<i32> r, vector<i32> u1, vector<i32> v1, vector<i32> c) {
int n = len(r);
vec<vec<pair<int, int>>> g(n);
for (int i = 0; i < len(u1); i++) {
g[u1[i]].emplace_back(v1[i], c[i]);
g[v1[i]].emplace_back(u1[i], c[i]);
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
for (int i = 0; i < n; i++) {
shuffle(g[i].begin(), g[i].end(), rng);
}
vec<int> key_set;
vec<vec<int>> destinations(n);
vec<bool> keys(n, false);
vec<bool> keys1(n, false);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...