Submission #940700

# Submission time Handle Problem Language Result Execution time Memory
940700 2024-03-07T13:43:39 Z parlimoos Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
Compilation error
0 ms 0 KB
//Be Name KHODA
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
#define pb push_back
#define pp pop_back
#define lb lower_bound
#define ub upper_bound
#define cl clear
#define bg begin
#define arr(x) array<int , x>
#define endl '\n'

int md , n;
int sts[925];

void init(){
    int cnt = 0;
    for(int msk = (1 << 6) - 1 ; msk < (1 << 12) ; msk++){
        if(__builtin_popcount(msk) != 6) continue;
        sts[cnt++] = msk;
    }
}

int encode(int n , int x , int y){
    if(sts[0] == 0) init();
    int bit = (sts[x] ^ (sts[x] & sts[y]));
    return (__builtin_ctz((bit << 1)));
}
//Be Name KHODA
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
#define pb push_back
#define pp pop_back
#define lb lower_bound
#define ub upper_bound
#define cl clear
#define bg begin
#define arr(x) array<int , x>
#define endl '\n'

int md , n;
int sts[925];

void init(){
    int cnt = 0;
    for(int msk = (1 << 6) - 1 ; msk < (1 << 12) ; msk++){
        if(__builtin_popcount(msk) != 6) continue;
        sts[cnt++] = msk;
    }
}

int encode(int n , int q , int h){
    if(sts[0] == 0) init();
    return ((sts[q] >> (h - 1)) & 1);
}

Compilation message

/usr/bin/ld: /tmp/ccLZuT58.o: in function `main':
grader_decode.c:(.text.startup+0x22f): undefined reference to `decode(int, int, int)'
collect2: error: ld returned 1 exit status