제출 #563855

#제출 시각아이디문제언어결과실행 시간메모리
563855doowey레지스터 (IOI21_registers)C++17
0 / 100
1 ms340 KiB
#include "registers.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define fi first
#define se second
#define mp make_pair

int b = 2000;

void construct_instructions(int s, int n, int k, int q) {
    vector<bool> ss(b);
    vector<bool> zz(b);
    for(int i = 0 ; i < b; i ++ ){
        if(i < k) ss[i] = 1;
        else ss[i] = 0;
    }
    vector<bool> qq(b);
    qq[k] = 1;
    append_store(1, ss);
    append_store(6, qq);
	for(int i = 1 ; i < n; i ++ ){
        // store minimum at 0
        // compare with i
        append_right(2, 0, i * k);
        append_move(3, 0);

        append_not(3, 3);

        append_and(2, 2, 1);
        append_and(3, 3, 1);

        append_add(4, 2, 3);
        append_not(3, 3);
        append_store(7, zz);
        for(int j = k; j >= 1; j -- ){
            append_right(8, 4, j);
            append_or(7, 7, 8);
        }
        append_and(3, 3, 7);
        append_not(7, 7);
        append_and(2, 2, 7);
        append_or(0, 0, 2);
        append_or(0, 0, 3);
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...