답안 #1082364

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

void compare(int al, int ar, int bl, int br) {
	vector<bool> anding(2000, false);
	for (int i = al; i < ar; ++i) {
		anding[i] = true;
	}
	append_store(1, anding);
	for (int i = al; i < ar; ++i) {
		anding[i] = false;
	}
	for (int i = bl; i < br; ++i) {
		anding[i] = true;
	}
	append_store(2, anding);
	append_and(1, 0, 1);
	append_and(2, 0, 2);
	append_right(1, 1, al);
	append_right(2, 2, bl);
	append_not(3, 1);
	append_add(3, 2, 3);
	append_not(4, 2);
	append_add(4, 1, 4);
	append_right(3, 3, 1000);
	append_right(4, 4, 1000);
	append_and(3, 2, 3);
	append_and(4, 1, 4);
}

void construct_instructions(int s, int n, int k, int q) {
	vector<bool> anding(2000, false);
	if (s == 0) {
		compare(0, k, k, k * 2);
		append_store(0, anding);
		append_or(0, 4);
		append_or(0, 3);
	} else {

	}
}

Compilation message

registers.cpp: In function 'void construct_instructions(int, int, int, int)':
registers.cpp:37:17: error: too few arguments to function 'void append_or(int, int, int)'
   37 |   append_or(0, 4);
      |                 ^
In file included from registers.cpp:1:
registers.h:6:6: note: declared here
    6 | void append_or(int t, int x, int y);
      |      ^~~~~~~~~
registers.cpp:38:17: error: too few arguments to function 'void append_or(int, int, int)'
   38 |   append_or(0, 3);
      |                 ^
In file included from registers.cpp:1:
registers.h:6:6: note: declared here
    6 | void append_or(int t, int x, int y);
      |      ^~~~~~~~~