Submission #603956

# Submission time Handle Problem Language Result Execution time Memory
603956 2022-07-24T13:59:27 Z MohamedAhmed04 Flight to the Ford (BOI22_communication) C++17
0 / 100
12 ms 248 KB
#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 -