Submission #567214

#TimeUsernameProblemLanguageResultExecution timeMemory
567214birthdaycakeBitaro’s Party (JOI18_bitaro)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define mod 1000000007
#define boost ios_base::sync_with_stdio(false), cin.tie(NULL);
using namespace std;
 
 
 
 
vector<int>adj[200001],radj[200001];
int no[200001],dis[200001];
signed main(){
    boost;
    
    
    int n,m,q; cin >> n >> m >> q;
    for(int i = 0; i < m; i++){
        int a,b; cin >> a >> b;
        adj[a].push_back(b);
        radj[b].push_back(a);
        
    }
    while(q--){
        int t,y, ans = -1; cin >>  t >> y;
        
        for(int i = 1; i <= n; i++) {
            no[i] = 0;
            dis[i] = 0;
        }
        for(int i = 0; i < y; i++){
            int x; cin >> x;
            no[x] = 1;
        }
        queue<int>x;
        x.push(t);
        while(x.size()){
            auto s = x.front();
            x.pop();
            if(!no[s]) ans = max(ans,dis[s]);
            for(auto e:radj[s]){
                if(dis[e] == 0){
                    dis[e] = dis[s] + 1;
                    x.push(e);
                }
            }
        }
        cout << ans << endl;
    }
    
    
    return 0;
}
v

Compilation message (stderr)

bitaro.cpp:54:1: error: 'v' does not name a type
   54 | v
      | ^