Submission #1144576

#TimeUsernameProblemLanguageResultExecution timeMemory
1144576ibshaBroken Device (JOI17_broken_device)C++20
Compilation error
0 ms0 KiB
#include "Annalib.h" #define ll long long void Anna( int N, long long X, int K, int P[] ){ set<ll> se; for (int i = 0; i < K; i++) se.insert(P[i]); ll bit = 0; for (int i = 0; i < N/2; i++){ if (se.count(i*2) or (se.count(i*2+1))){ Set(i*2,0); Set(i*2+1,0); continue; } if (X & (1 << bit)){ Set(i*2,1); Set(i*2+1,0); } else{ Set(i*2,0); Set(i*2+1,1); } bit++; } }
#include "Brunolib.h" #define ll long long long long Bruno( int N, int A[] ){ ll bit=0; ll ret=0; for (int i=0;i<N/2; i++){ if (A[i*2] == A[i*2+1] and A[i*2] == 0) continue; if (A[i*2] == 0 and A[i*2+1] == 1); else if (A[i*2] == 1 and A[i*2+1] == 0) ret |= (1<<bit); bit++; } return ret; }

Compilation message (stderr)

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:4:5: error: 'set' was not declared in this scope; did you mean 'Set'?
    4 |     set<ll> se;
      |     ^~~
      |     Set
Anna.cpp:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
Anna.cpp:4:9: note: in expansion of macro 'll'
    4 |     set<ll> se;
      |         ^~
Anna.cpp:5:33: error: 'se' was not declared in this scope
    5 |     for (int i = 0; i < K; i++) se.insert(P[i]);
      |                                 ^~
Anna.cpp:8:13: error: 'se' was not declared in this scope
    8 |         if (se.count(i*2) or (se.count(i*2+1))){
      |             ^~