This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"communication.h"
#include <bits/stdc++.h>
using namespace std;
void encode(int n, int x) {
srand(654634);
int f=rand()%100+100;
while(f--){
if(send(0)==1)break;
}
send((x==1));
}
std::pair<int, int> decode(int n) {
srand(654634);
int f=rand()%100+100;
while(f--){
if(receive()==1)break;
}
if(receive())return {1,1};
return {3, 2};
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |