제출 #1139296

#제출 시각아이디문제언어결과실행 시간메모리
1139296mychecksedadGame (IOI14_game)C++17
0 / 100
0 ms328 KiB
#include "game.h" #include<bits/stdc++.h> using namespace std; #define ll long long int #define MOD (1000000000+7) #define MOD1 (998244353) #define pb push_back #define all(x) x.begin(), x.end() #define en cout << '\n' #define ff first #define ss second #define pii pair<int,int> #define vi vector<int> const int N = 1000+100, M = 1e5+10, K = 52, MX = 30; vector<int> c; bitset<N> b[N]; int x = 0, nn = 0; void initialize(int n) { c.resize(n, n-1); x = 0; nn =n; for(int j = 0 ;j < n; ++j) b[j][j] = 1; } int hasEdge(int u, int v) { --c[u], --c[v]; b[u][v] = 1; b[v][u] = 1; // cout << c[u] << ' ' << c[v] << ' '; if(c[u] == 1){ for(int j = 0; j < nn; ++j) if(b[u][j] == 0){ --c[j]; } } if(c[v] == 1){ for(int j = 0; j < nn; ++j) if(b[v][j] == 0){ --c[j]; } } if(c[u] <= 0 || c[v] <= 0) return 1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...