#include "avoid.h"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#include <time.h>
#include <random>
using namespace std;
const int robot = 75;
bool ch[100][1009];
std::pair<int, int> scout(int R, int H) {
srand(time(NULL));
int i, j, k;
for(i=0; i<robot; i++){
vector<int> vec;
for(j=1; j<=1000; j++){
if(rand() % 2){
ch[i][j] = 1;
vec.push_back(j);
}
}
send(vec);
}
vector<int> ret = wait();
for(i=1; i<=1000; i++){
for(j=1; j<=1000; j++){
for(k=0; k<robot; k++){
if(ret[k] != (ch[k][i] || ch[k][j]))
break;
}
if(k==robot)
return make_pair(i, j);
}
}
return make_pair(-1, -1);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Correct: 75 robot(s) used, 1 hour(s) passed |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
344 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |