제출 #381634

#제출 시각아이디문제언어결과실행 시간메모리
381634ritul_kr_singhGame (IOI14_game)C++17
0 / 100
1 ms364 KiB
#include "game.h" #include "bits/stdc++.h" using namespace std; vector<int> e; int n, total; void initialize(int N){ n = N; total = 0; e.assign(n+1, 1); } int hasEdge(int u, int v){ ++e[u], ++e[v]; return (e[u]==n or e[v]==n and total*2LL<(n*(n-1LL))); }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:16:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   16 |  return (e[u]==n or e[v]==n and total*2LL<(n*(n-1LL)));
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...