제출 #318791

#제출 시각아이디문제언어결과실행 시간메모리
318791Haruto810198게임 (IOI14_game)C++17
100 / 100
397 ms16616 KiB
#include <bits/stdc++.h> using namespace std; //#define int long long #define double long double #define vi vector<int> #define pii pair<int,int> #define si set<int> #define mii map<int,int> #define F first #define S second #define pb push_back #define pf push_front #define eb emplace_back #define ef emplace_front #define pob pop_back #define pof pop_front const int INF=2147483647; const int MOD=1000000007; const int mod=998244353; const double eps=1e-12; int cnt[1501]; int q; int v1,v2; void initialize(int n){ q=n*(n-1)/2; for(int i=0;i<n;i++){ cnt[i]=i; } } int hasEdge(int v1,int v2){ if(v1>v2) swap(v1,v2); cnt[v2]--; if( cnt[v2]==0 ){ /***debug*** cout<<"Yes"<<endl; ***debug***/ return 1; } else{ /***debug*** cout<<"No"<<endl; ***debug***/ return 0; } } /****** signed main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin>>n; initialize(n); for(int i=0;i<q;i++){ cin>>v1>>v2; hasEdge(v1,v2); } return 0; } ******/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...