Submission #983885

#TimeUsernameProblemLanguageResultExecution timeMemory
983885vjudge1Game (APIO22_game)C++17
0 / 100
1 ms2648 KiB
//#include "game.h" #include<bits/stdc++.h> #define sz size() #define ll int using namespace std; const ll N = 100100; vector<ll> v[N], us, ex; ll n, k, ok; void dfs(ll s) { if(ok) return; ++us[s]; for(ll t : v[s]) { if(us[t] && t <= k) ok = 1; if(us[t] == 2) return; dfs(t); } } void init(ll NN, ll KK) { n = NN; k = KK; ex.resize(n + 1); for(ll i = 1; i < k; ++i) v[i].push_back(i + 1); } ll add_teleporter(ll x, ll y) { if(ok) return 1; ++x, ++y; v[x].push_back(y); us = ex; dfs(1); return ok; } //signed main() //{ // ios_base::sync_with_stdio(0); // cin.tie(0), cout.tie(0); // solve(); //}
#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...