답안 #1056827

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1056827 2024-08-13T11:36:45 Z user736482 레지스터 (IOI21_registers) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
//#include "registers.h"
using namespace std;

vector<bool>zera,jeden4;

void minimum(int a,int b,int t){
    append_store(t,zera);
   //   append_move(98,a);
    append_not(98,a);
    append_add(98,b,98);
    append_right(98,98,10);
    append_and(t,b,98);
    append_not(98,98);
    append_and(t,a,98);

    /*zera[0]=1;
    append_store(98,zera);
    zera[0]=0;
    append_add(98,b,98);
    append_not(98);
    append_add(98,a,98);
    append_left(98,10,98);
    append_and(t,b,98);*/
}


void construct_instructions(int s, int n, int k, int q){
    for(int i=0;i<2000;i++){
        zera.push_back(0);
        jeden4.push_back(0);
        if(i<k)
            jeden4[i]=1;
    }
    //append_right(0,k,0);

    //append_move(1,0);
    append_right(1,0,k);
    append_store(2,jeden4);
    append_and(0,2,0);
    minimum(0,1,3);
    append_move(0,3);
}

Compilation message

registers.cpp: In function 'void minimum(int, int, int)':
registers.cpp:8:5: error: 'append_store' was not declared in this scope
    8 |     append_store(t,zera);
      |     ^~~~~~~~~~~~
registers.cpp:10:5: error: 'append_not' was not declared in this scope
   10 |     append_not(98,a);
      |     ^~~~~~~~~~
registers.cpp:11:5: error: 'append_add' was not declared in this scope
   11 |     append_add(98,b,98);
      |     ^~~~~~~~~~
registers.cpp:12:5: error: 'append_right' was not declared in this scope
   12 |     append_right(98,98,10);
      |     ^~~~~~~~~~~~
registers.cpp:13:5: error: 'append_and' was not declared in this scope
   13 |     append_and(t,b,98);
      |     ^~~~~~~~~~
registers.cpp: In function 'void construct_instructions(int, int, int, int)':
registers.cpp:38:5: error: 'append_right' was not declared in this scope
   38 |     append_right(1,0,k);
      |     ^~~~~~~~~~~~
registers.cpp:39:5: error: 'append_store' was not declared in this scope
   39 |     append_store(2,jeden4);
      |     ^~~~~~~~~~~~
registers.cpp:40:5: error: 'append_and' was not declared in this scope
   40 |     append_and(0,2,0);
      |     ^~~~~~~~~~
registers.cpp:42:5: error: 'append_move' was not declared in this scope
   42 |     append_move(0,3);
      |     ^~~~~~~~~~~