제출 #1006494

#제출 시각아이디문제언어결과실행 시간메모리
1006494devariaota게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define pb push_back #define repp(i,x,n) for(int i=x;i<=n;i++) #define repo(i,x,n) for(int i=x;i>=n;i--) #define cy cout<<"Yes"<<endl #define cn cout<<"No"<<endl #define r0 return 0 #define fi first #define se second #define liow ios_base::sync_with_stdio(false);cin.tie(NULL) #define jelek cout<<"jelek"<<endl #define pii pair<int,int> #define all(v) v.begin(),v.end() #define pi pair<pair<int,int>,pair<int,int>> #define p4 pair<pii,pii> #define fl fflush(stdout) using namespace std; const int mod=1e9+7,maxn=1e6+5,N=(1<<17),INF=1e18; int freq[1505]; int N; void initialize(int n){ n=N; } bool hasEdge(int u,int v){ if(max(freq[u],freq[v])==n-1) return true; else { freq[u]++,freq[v]++; return false; } return false; } //signed main() { // liow; // int t=1; //// cin>>t; // while(t--){ // solve(); // } //}

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

game.cpp:18:46: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   18 | const int mod=1e9+7,maxn=1e6+5,N=(1<<17),INF=1e18;
      |                                              ^~~~
game.cpp:21:5: error: conflicting declaration 'int N'
   21 | int N;
      |     ^
game.cpp:18:32: note: previous declaration as 'const int N'
   18 | const int mod=1e9+7,maxn=1e6+5,N=(1<<17),INF=1e18;
      |                                ^
game.cpp: In function 'bool hasEdge(int, int)':
game.cpp:27:28: error: 'n' was not declared in this scope
   27 |   if(max(freq[u],freq[v])==n-1) return true;
      |                            ^