Submission #398875

#TimeUsernameProblemLanguageResultExecution timeMemory
398875almothana05Cop and Robber (BOI14_coprobber)C++14
0 / 100
1 ms1352 KiB
#include "coprobber.h" #include<iostream> #include<vector> using namespace std; int menge = 0 , jet = 0; vector<vector<bool> >num; vector<vector<int> >vis(500+10 , vector<int>(500 + 10 , 0)); int start(int N, bool A[MAX_N][MAX_N]) { for(int i = 0 ;i < N ; i++){ num.push_back(vector<bool>()); for(int j = 0 ; j < N ; j++){ num[i].push_back(A[i][j]); } } menge = N; return 0; } int nextMove(int R) { if(R == jet){ return jet; } if(num[jet][R] == 1){ return R; } else{ for(int i = 0 ; i < menge ; i++){ if(vis[jet][i] == 0 && num[jet][i] == 1){ vis[jet][i] = 1; return i; } } } }

Compilation message (stderr)

coprobber.cpp: In function 'int nextMove(int)':
coprobber.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
   37 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...