Submission #1002600

# Submission time Handle Problem Language Result Execution time Memory
1002600 2024-06-19T16:52:10 Z c2zi6 cmp (balkan11_cmp) C++14
Compilation error
0 ms 0 KB
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
#define reprl(i, a, b) for (int i = int(a); i >= int(b); --i)
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define mkp(a, b) make_pair(a, b)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<VPI> VVPI;
typedef pair<ll, ll> PLL;
typedef vector<ll> VL;
typedef vector<PLL> VPL;
typedef vector<VL> VVL;
typedef vector<VVL> VVVL;
typedef vector<VPL> VVPL;
template<class T> T setmax(T& a, T b) {if (a < b) return a = b; return a;}
template<class T> T setmin(T& a, T b) {if (a < b) return a; return a = b;}
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template<class T>
using indset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#include ″cmp.h″

VI delta = {5460, 5456, 5440, 5376, 5120, 4096, 0};

int pref(int x, int i) {
    return (x >> (5-i)*2);
}


void remember(int n) {
    rep(i, 6) {
        bit_set(pref(n, i) + delta[i]);
    }
}

int compare(int b) {
    int d = 6;
    rep(i, 6) {
        if (!bit_get(pref(b, i) + delta[i])) {
            d = i;
            break;
        }
    }
    if (d == 6) return 0;
    int his;
    if (bit_get(pref(b, d-1)*4 + 0 + delta[d])) his = 0;
    if (bit_get(pref(b, d-1)*4 + 1 + delta[d])) his = 1;
    if (bit_get(pref(b, d-1)*4 + 2 + delta[d])) his = 2;
    if (bit_get(pref(b, d-1)*4 + 3 + delta[d])) his = 3;
    int my = pref(b, d)%4;
    if (my > his) return +1;
    return -1;
}

Compilation message

cmp.cpp:33:10: error: extended character ″ is not valid in an identifier
   33 | #include ″cmp.h″
      |          ^
cmp.cpp:33:10: error: #include expects "FILENAME" or <FILENAME>
   33 | #include ″cmp.h″
      |          ^~~~
cmp.cpp:33:17: error: extended character ″ is not valid in an identifier
   33 | #include ″cmp.h″
      |               ^
cmp.cpp: In function 'void remember(int)':
cmp.cpp:44:9: error: 'bit_set' was not declared in this scope
   44 |         bit_set(pref(n, i) + delta[i]);
      |         ^~~~~~~
cmp.cpp: In function 'int compare(int)':
cmp.cpp:51:14: error: 'bit_get' was not declared in this scope
   51 |         if (!bit_get(pref(b, i) + delta[i])) {
      |              ^~~~~~~
cmp.cpp:58:9: error: 'bit_get' was not declared in this scope
   58 |     if (bit_get(pref(b, d-1)*4 + 0 + delta[d])) his = 0;
      |         ^~~~~~~
cmp.cpp:59:9: error: 'bit_get' was not declared in this scope
   59 |     if (bit_get(pref(b, d-1)*4 + 1 + delta[d])) his = 1;
      |         ^~~~~~~
cmp.cpp:60:9: error: 'bit_get' was not declared in this scope
   60 |     if (bit_get(pref(b, d-1)*4 + 2 + delta[d])) his = 2;
      |         ^~~~~~~
cmp.cpp:61:9: error: 'bit_get' was not declared in this scope
   61 |     if (bit_get(pref(b, d-1)*4 + 3 + delta[d])) his = 3;
      |         ^~~~~~~