제출 #1126487

#제출 시각아이디문제언어결과실행 시간메모리
1126487AndrijaMBitaro’s Party (JOI18_bitaro)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' const int maxn=2e5+10; const int mod=1e9+7; vector<int>g[maxn]; int dp[maxn]; int c[maxn]; vector<int>v[maxn]; int pdp[maxn]; void dfs(int node,int par) { for(auto ax:g[node]) { if(ax==par)continue; dfs(ax,node); dp[node]=max(dp[node],dp[ax]+1); } } signed main() { ios::sync_with_stdio(false); int n,m,q; cin>>n>>m>>q; for(int i=0;i<m;i++) { int a,b; cin>>a>>b; a--;b--; g[b].push_back(a); } for(int i=0;i<n;i++) { if(!) { f(i); } } while(q--) { int st; int kol; cin>>st>>kol; st--; memset(dp,0,sizeof dp); for(int i=0;i<kol;i++) { cin>>c[i]; c[i]--; dp[c[i]]=-1e9; } if(kol>350) { ///memset(dp,0,sizeof dp); dfs(st,-1); cout<<dp[st]<<endl; continue; } } return 0; }

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

bitaro.cpp: In function 'int main()':
bitaro.cpp:42:13: error: expected primary-expression before ')' token
   42 |         if(!)
      |             ^
bitaro.cpp:44:13: error: 'f' was not declared in this scope
   44 |             f(i);
      |             ^