제출 #1167373

#제출 시각아이디문제언어결과실행 시간메모리
1167373trandangquangBroken Device (JOI17_broken_device)C++20
컴파일 에러
0 ms0 KiB
#include"Annalib.h"

#include<bits/stdc++.h>
using namespace std;

void Anna(int N, long long X, int K, int P[]){
    vector<int> A(N,0);
    for(int i=0; i<K; ++i) A[P[i]]=1;
    deque<int> dq;
    for(int i=0; i<60; ++i){
        dq.push_back(X>>i&1);
    }
    for(int i=0; i<120; ++i) dq.push_back(0);

    for(int i=0; i<N; i+=3){
        int t=A[i]+A[i+1]+A[i+2];
        if(t>=2){
            hihi(i,0);
        }
        else if(t==1){
            if(A[i]==1){
                if(dq[0]) hihi(i,6);
                else hihi(i,2);
                dq.pop_front();
            }
            else if(A[i+1]==1){
                if(dq[0]){
                    hihi(i,1);
                    dq.pop_front();
                }
                else{
                    if(dq[1]) hihi(i,3);
                    else hihi(i,4);

                    dq.pop_front(); dq.pop_front();
                }
            }
            else{
                if(dq[0]) hihi(i,1);
                else hihi(i,2);
                dq.pop_front();
            }
        }
        else{
            if(!dq[0]&&!dq[1]) hihi(i,4);
            else if(!dq[0]&&dq[1]) hihi(i,3);
            else if(dq[0]&&!dq[1]) hihi(i,5);
            else hihi(i,7);

            dq.pop_front(); dq.pop_front();
        }
    }
}
#include "Brunolib.h"

#include <bits/stdc++.h>
using namespace std;

long long Bruno(int N, int A[]){
    vector<int>v;
    for(int i=0; i<N; i+=3){
        int t=A[i]+A[i+1]*2+A[i+2]*4;
        if(t==1) v.emplace_back(1);
        if(t==2) v.emplace_back(0);
        if(t==3) v.emplace_back(0), v.emplace_back(1);
        if(t==4) v.emplace_back(0), v.emplace_back(0);
        if(t==5) v.emplace_back(1), v.emplace_back(0);
        if(t==6) v.emplace_back(1);
        if(t==7) v.emplace_back(1), v.emplace_back(1);
    }

    long long X=0;
    for(int i=0; i<60; ++i){
        X|=(1LL*v[i])<<i;
    }
    return X;
}

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:18:13: error: 'hihi' was not declared in this scope
   18 |             hihi(i,0);
      |             ^~~~
Anna.cpp:22:27: error: 'hihi' was not declared in this scope
   22 |                 if(dq[0]) hihi(i,6);
      |                           ^~~~
Anna.cpp:23:22: error: 'hihi' was not declared in this scope
   23 |                 else hihi(i,2);
      |                      ^~~~
Anna.cpp:28:21: error: 'hihi' was not declared in this scope
   28 |                     hihi(i,1);
      |                     ^~~~
Anna.cpp:32:31: error: 'hihi' was not declared in this scope
   32 |                     if(dq[1]) hihi(i,3);
      |                               ^~~~
Anna.cpp:33:26: error: 'hihi' was not declared in this scope
   33 |                     else hihi(i,4);
      |                          ^~~~
Anna.cpp:39:27: error: 'hihi' was not declared in this scope
   39 |                 if(dq[0]) hihi(i,1);
      |                           ^~~~
Anna.cpp:40:22: error: 'hihi' was not declared in this scope
   40 |                 else hihi(i,2);
      |                      ^~~~
Anna.cpp:45:32: error: 'hihi' was not declared in this scope
   45 |             if(!dq[0]&&!dq[1]) hihi(i,4);
      |                                ^~~~
Anna.cpp:46:36: error: 'hihi' was not declared in this scope
   46 |             else if(!dq[0]&&dq[1]) hihi(i,3);
      |                                    ^~~~
Anna.cpp:47:36: error: 'hihi' was not declared in this scope
   47 |             else if(dq[0]&&!dq[1]) hihi(i,5);
      |                                    ^~~~
Anna.cpp:48:18: error: 'hihi' was not declared in this scope
   48 |             else hihi(i,7);
      |                  ^~~~