Submission #398894

# Submission time Handle Problem Language Result Execution time Memory
398894 2021-05-04T21:55:49 Z almothana05 Cop and Robber (BOI14_coprobber) C++14
Compilation error
0 ms 0 KB
#include "coprobber.h"
#include<bits\stdc++.h>
#include<vector>
using namespace std;
int menge = 0 , jet = 0 , r = 0;
	int cmp = 0 ;
bool done = 0;
vector<vector<int> >num ;
vector<vector<bool> >  a;
vector<int >vis(500+10 , 0), comp;
int dfs(int x , int R){
	cmp = 0;
	if(x == R){
		r = 1;
	}
	vis[x] = 1;
	comp.push_back(x);
	for(int i = 0 ; i < num[x].size() ; i++){
		if(vis[i] == 0 ){
			cmp++;
			if( dfs(x , R) == -1){
				return -1;
			}
		}
	}
	if(cmp == 0 && r == 1 ){
		return -1;
	}
	comp.pop_back();
	vis[x] = 0;
}
int start(int N, bool A[MAX_N][MAX_N])
{
	for(int i =  0 ;i < N ; i++){
		a.push_back(vector<bool>());
		num.push_back(vector<int>());
		for(int  j = 0 ; j < N  ; j++){
			a[i].push_back(A[i][j]);
			if(a[i][j] == 1){
				num[i].push_back(j);
			}
		}
	}
	menge = N;
    return 0;
}

int nextMove(int R)
{
	if(R == jet){
		return jet;
	}
	if(num[jet][R] == 1){
	    return R;
	    
	}
	else{
		if(done == 0){
			dfs(jet , R);
			reverse(comp.begin()  , comp.end());
			done = 1;
		}
		cmp = comp[comp.size() - 1];
		comp.pop_back();
		return cmp;
	}
	return jet;
}

Compilation message

coprobber.cpp:2:9: fatal error: bits\stdc++.h: No such file or directory
    2 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.