답안 #564752

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
564752 2022-05-19T15:03:12 Z Majid 질문 (CEOI14_question_grader) C++17
0 / 100
1 ms 464 KB
#include<bits/stdc++.h>
using namespace std;
 
//Types
using ll = long long;
using db = double;
 
//Vectors
#define pb push_back
#define sz(vec) ((ll)vec.size())
#define all(vec) vec.begin(), vec.end()
 
//things
#define f first
#define s second
const int SMALLINF = 1e9 + 7;
const ll BIGINF = ((ll)1e18) + 7;
#define Speeed ios::sync_with_stdio(0);cin.tie(NULL); cout.tie(NULL);

int encode(int n, int x, int y){
	
        int num = -1, num2 = -1;
        
        for(ll i = 0; i < 10; i++){
            
            if  (x&(1<<i) and !(y&(1<<i)))num = i;
            else if(!(x&(1<<i)) and (y&(1<<i)))num2 = i;
        }
        
        if(num!=-1)return num;
        else return 10+num2;
}
#include<bits/stdc++.h>
using namespace std;
 
//Types
using ll = long long;
using db = double;
 
//Vectors
#define pb push_back
#define sz(vec) ((ll)vec.size())
#define all(vec) vec.begin(), vec.end()
 
//things
#define f first
#define s second
const int SMALLINF = 1e9 + 7;
const ll BIGINF = ((ll)1e18) + 7;
#define Speeed ios::sync_with_stdio(0);cin.tie(NULL); cout.tie(NULL);

int decode(int n, int q, int h){
	
    if(h<10)return (q&(1<<h));
    else return !(q&(1<<h));
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 464 KB the encoded value must be greater than or equal to 1
2 Incorrect 1 ms 420 KB the encoded value must be greater than or equal to 1