제출 #659344

#제출 시각아이디문제언어결과실행 시간메모리
659344Do_you_copy게임 (IOI14_game)C++17
0 / 100
1 ms212 KiB
/* I find it wholesome to be alone the greater part of the time. To be in company, even with the best, is soon wearisome and dissipating. I love to be alone. I never found the companion that was so companionable as solitude. */ #include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define faster ios_base::sync_with_stdio(0); cin.tie(0); #include "game.h" using namespace std; using ll = long long; using ld = long double; using pii = pair <int, int>; const int maxN = 1e5 + 1; //const int Mod = 1e9 + 7; //const int inf = int n; int cnt[maxN]; int m; int c; int req = n - 1; void initialize(int _n){ n = _n; m = n * (n - 1) / 2; } int hasEdge(int u, int v){ ++c; ++cnt[u]; ++cnt[v]; if (c >= m - req || cnt[u] == n - 1 || cnt[v] == n - 1){ --req; return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...