Submission #564780

# Submission time Handle Problem Language Result Execution time Memory
564780 2022-05-19T15:59:38 Z katwamiaw Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
27 / 100
3083 ms 24124 KB
int encode (int n, int x, int y) {
    int r ;
    for(int i=0 ; i<10 ; i++){
        if((x&(1<<i))!=(y&(1<<i))){
            r=i+1 ;
            if((y&(1<<i))) r+=10 ;
            return (r) ;
        }
    }
    return 1 ;
}
int decode (int n, int q, int h) {
    h-- ;
	if(h>=10){
        h-=10 ;
        if((q&(1<<h))) return 0 ;
        return 1 ;
    }
    if((q&(1<<h))) return 1 ;
    return 0 ;
}
# Verdict Execution time Memory Grader output
1 Partially correct 3027 ms 24084 KB Output is partially correct - maxh = 20
2 Partially correct 3083 ms 24124 KB Output is partially correct - maxh = 20