Submission #1034229

# Submission time Handle Problem Language Result Execution time Memory
1034229 2024-07-25T10:56:24 Z vjudge1 cmp (balkan11_cmp) C++17
64 / 100
929 ms 82652 KB
#include "cmp.h"
#include <bits/stdc++.h>
using namespace std;
 
string abc = "abcdefghijklmnopqrstuvwxyz";
 
// #define int long long
 
 
void remember(int a){
    
    int cur = 21, rr = 31;
    for(int i = 0; i < 11; i+=2){
        if((1<<i)&a && (1<<(i+1))&a){
            bit_set(cur+1);
        }
        else if((1<<i)&a){
            bit_set(i+1);
        }
        else if((1<<(i+1))&a){
            bit_set(i+1+1);
        }
        else{
            bit_set(rr+1);
        }
        cur++;
        rr++;
    }
 
}
 
int compare(int a){
    int cur = 27, rr = 37;
    for(int i = 11; i >= 1; i-=2){
        cur--;
        rr--;
        if(a&(1<<i) && a&(1<<(i-1))){
            int f = bit_get(cur+1);
            if(f) continue;
            return 1;
        }
        if(a&(1<<i)){
            int x = bit_get(i+1);
            if(x) continue;
            int y = bit_get(rr+1);
            if(y == 1) return 1;
            int z = bit_get(cur+1);
            if(z) return -1;
            else return 1;
        }
        if(a&(1<<(i-1))){
            int x = bit_get(i-1+1);
            if(x) continue;
            int y = bit_get(rr+1);
            if(y == 1) return 1;
            return -1;
            
        }
        int x = bit_get(rr+1);
        if(x == 0) return -1;
        continue;
    }
 
    return 0;
 
 
}
# Verdict Execution time Memory Grader output
1 Partially correct 929 ms 82652 KB Output is partially correct - maxAccess = 14, score = 64