답안 #564780

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
564780 2022-05-19T15:59:38 Z katwamiaw 질문 (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 ;
}
# 결과 실행 시간 메모리 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