제출 #563903

#제출 시각아이디문제언어결과실행 시간메모리
563903kartel레지스터 (IOI21_registers)C++17
0 / 100
1 ms296 KiB
#include <bits/stdc++.h>
//#include "grader.cpp"
#include "registers.h"
using namespace std;

void construct_instructions(int s, int n, int k, int q) {
    append_move(0, 1);
    append_move(0, 2);
    append_right(2, 2, k);
    append_move(2, 3);
    vector <bool> one = {1};
    while ((int)one.size() < 2000) {
        one.push_back(0);
    }

    /// get -b
    append_store(4, one);
    append_not(3, 3);
    append_add(3, 3, 4);

    ///get a-b
    append_add(1, 1, 3);
    append_move(1, 3);

    /// get if a <= b then register have -1 else 0
    append_right(3, 3, k);

    append_and(1, 1, 3);
    append_add(1, 1, 2);
    append_move(1, 0);
}
#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...