제출 #1196288

#제출 시각아이디문제언어결과실행 시간메모리
1196288Amr레지스터 (IOI21_registers)C++20
10 / 100
0 ms328 KiB
#include "registers.h"
#include<bits/stdc++.h>
using namespace std;
void construct_instructions(int s, int n, int k, int q) {

    if(k==1)
    {
        append_right(1,0,1);
        append_and(0,0,1);
    }
    else
    {
        append_not(40,0);
        vector<bool> v(2000,0);
        v[0] = 1;
       // 0 1 0 1
        append_store(50,v);
        append_move(1,0);
        append_right(2,1,1);


        append_and(2,2,50);
        append_and(1,1,50);
        append_xor(49,1,2); // in 49

        v[0] = 0, v[0] = 1;
        append_store(50,v);
       // append_print(50);
        append_move(3,0);
        append_right(3,3,2);
        append_not(41,3);
        append_and(42,41,0);
        append_and(43,40,3);
        append_print(42);
        append_print(43);
        append_or(43,43,42);

        append_right(4,3,1);
        append_and(3,3,50);
        append_and(4,4,50);
        append_xor(48,3,4);
        append_and(49,48,49);
        append_and(49,49,43);
        //append_left(49,49,1);
        append_right(5,0,2);
        append_and(0,0,5);
        append_or(0,0,49);
        append_print(49);
    }

}
#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...