제출 #997465

#제출 시각아이디문제언어결과실행 시간메모리
997465MarwenElarbiPolitical Development (BOI17_politicaldevelopment)C++17
4 / 100
4 ms5212 KiB
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ll long long #define pb push_back #define ii pair<int,int> const int nax=2e5+5; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); vector<int> adj[nax]; int main(){ int n,k; cin>>n>>k; bool test=false; for (int i = 0; i < n; ++i) { int s; cin>>s; if(s>0) test=true; for (int j = 0; j < s; ++j) { int x; cin>>x; adj[x].pb(i); adj[i].pb(x); } } if(test) cout <<2<<endl; else cout <<1<<endl; }
#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...