| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1032167 | amine_aroua | cmp (balkan11_cmp) | C++17 | 1357 ms | 105428 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cmp.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> delta = {1, 4097, 5121, 5377, 5441, 5457};
int pow4(int n , int i )
{
    return (n >> (2 * i));
}
void remember(int n) {
    for(int i = 0 ; i < 6 ; i++)
    {
        bit_set(pow4(n , i)+delta[i]);
    }
}
int compare(int b) 
{
    int lo = 0 , hi = 7;
    while(lo + 1 < hi)
    {
        int mid = (lo + hi)/2;
        if(bit_get(delta[mid - 1] + pow4(b , mid - 1)))
            hi = mid;
        else
            lo = mid;
    }
    hi--;
    if(hi == 0)
    {
        return 0;
    }
    int nb = 4 * pow4(b , hi);
    int bit = pow4(b , hi - 1) - nb;
    for(int i = 0 ; i < 4 ; i++)
    {
        if(i == bit)
            continue;
        if(bit_get(delta[hi - 1] + nb + i))
        {
            if(i < bit)
            {
                return 1;
            }
            else
                return -1;
        }
    }
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
