Submission #829156

#TimeUsernameProblemLanguageResultExecution timeMemory
829156vjudge1Bitaro’s Party (JOI18_bitaro)C++17
Compilation error
0 ms0 KiB
#ifdef Home #define _GLIBCXX_DEBUG #endif // Home #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 100100; const int SQ = 316; vector < int > adj[N], dp(N), calc[N], use(N); int True; main() { #ifdef Home freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif // Home ios_base::sync_with_stdio(0); cin.tie(0); int n, m, q, u, v; for(cin >> n >> m >> q; m --> 0;) { cin >> u >> v; adj[u].push_back(v); } for(int T, Y, C; q --> 0;) { ++ True; for(cin >> T >> Y; Y --> 0;) { cin >> C; use[C] = True; } if(false) { } else { for(int i = n; i; dp[i --] = -1); for(int i = 1; i <= n; ++ i) { dp[i] += use[i] != True || dp[i] != -1; for(auto &j : adj[i]) { dp[j] = max(dp[j], dp[i]); } } cout << (dp[T] == -1 ? -1 : dp[T]) << '\n'; } }

Compilation message (stderr)

bitaro.cpp:18:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main() {
      | ^~~~
bitaro.cpp: In function 'int main()':
bitaro.cpp:49:5: error: expected '}' at end of input
   49 |     }
      |     ^
bitaro.cpp:18:8: note: to match this '{'
   18 | main() {
      |        ^