#include "communication.h"
#include <bits/stdc++.h>
using namespace std ;
void encode(int n, int x)
{
if(x == 1 || x == 3)
send(1) , send(1) , send(1) ;
else
send(0) , send(0) , send(0) ;
}
std::pair<int, int> decode(int n)
{
int cnt = receive() ;
cnt += receive() ;
cnt += receive() ;
if(cnt >= 2)
return {1 , 3} ;
else
return {2 , 3} ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
12 ms |
200 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |