제출 #733674

#제출 시각아이디문제언어결과실행 시간메모리
733674Erkinoff_Mohammed게임 (APIO22_game)C++17
0 / 100
0 ms208 KiB
#include "game.h" #include "bits/stdc++.h" using namespace std; #define INF 2000000000 #define INFLL 3000000000000000000LL #define ll long long int spec; bool b=0; vector<vector<int>>adj; vector<bool>vis; void dfs(int i){ vis[i]=1; for(int u:adj[i]){ if(u<spec){ b=1; return; } if(!vis[u]){ dfs(u); } } } void init(int n, int k) { adj.resize(n); vis.assign(n, 0); spec=k; for(int i=0;i<k;i++)vis[i]=1; } int add_teleporter(int u, int v) { adj[u].push_back(v); if(vis[u])dfs(u); return b; }
#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...