답안 #1056873

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1056873 2024-08-13T12:01:31 Z user736482 레지스터 (IOI21_registers) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#include "registers.h"
/#include "grader.cpp"
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(98,a,98);
    append_add(t,98,t);

    /*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_store(99,jeden4);
    append_right(1,0,(n-1)*k);
        append_and(1,99,1);
    for(int i=n-2;i>=0;i--){
        append_right(2,0,i*k);
        append_and(2,99,2);
        minimum(1,2,3);
        append_move(1,3);
    }



    minimum(0,1,3);
    append_move(0,3);
}

Compilation message

registers.cpp:3:2: error: stray '#' in program
    3 | /#include "grader.cpp"
      |  ^
registers.cpp:3:1: error: expected unqualified-id before '/' token
    3 | /#include "grader.cpp"
      | ^
registers.cpp:6:1: error: 'vector' does not name a type
    6 | vector<bool>zera,jeden4;
      | ^~~~~~
registers.cpp: In function 'void construct_instructions(int, int, int, int)':
registers.cpp:33:9: error: 'zera' was not declared in this scope
   33 |         zera.push_back(0);
      |         ^~~~
registers.cpp:34:9: error: 'jeden4' was not declared in this scope
   34 |         jeden4.push_back(0);
      |         ^~~~~~
registers.cpp:41:21: error: 'jeden4' was not declared in this scope
   41 |     append_store(99,jeden4);
      |                     ^~~~~~