Submission #1040490

# Submission time Handle Problem Language Result Execution time Memory
1040490 2024-08-01T06:03:24 Z 김은성(#10995) How to Avoid Disqualification in 75 Easy Steps (CEOI23_avoid) C++17
0 / 100
1 ms 344 KB
#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 = 30;
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 1 ms 344 KB Correct: 30 robot(s) used, 1 hour(s) passed
# 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 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 -