Submission #927662

# Submission time Handle Problem Language Result Execution time Memory
927662 2024-02-15T08:27:04 Z MuntherCarrot cmp (balkan11_cmp) C++17
46 / 100
1316 ms 107028 KB
#include <bits/stdc++.h>
#include "cmp.h"
using namespace std;

// void bit_set(int add)
// int bit_get(int add);

void remember(int a){
    for(int i = 0; i < 6; i++){
        bit_set(a % 4 + i * 4 + 1);
        a /= 4;
    }
}
int compare(int b){
    int dig[6];
    for(int i = 0; i < 6; i++){
        dig[i] = b % 4;
        b /= 4;
    }
    int i = 5;
    for(; i >= 0; i--){
        int x = bit_get(dig[i] + i * 4 + 1);
        if(x == 0) break;
    }
    if(i == -1){
        return 0;
    }
    else{
        for(int j = 0; j < 4; j++){
            int x = bit_get(j + i * 4 + 1);
            if(x){
                return dig[i] > j ? 1 : -1;
            }
        }
    }
    return 0;
}

// by me
# Verdict Execution time Memory Grader output
1 Partially correct 1316 ms 107028 KB Output is partially correct - maxAccess = 16, score = 46