Submission #601681

#TimeUsernameProblemLanguageResultExecution timeMemory
601681SlavicG레지스터 (IOI21_registers)C++17
0 / 100
1 ms212 KiB
#include "registers.h"
#include "bits/stdc++.h"
using namespace std;

const int b = 2000;
void construct_instructions(int s, int n, int k, int q) {
	vector<bool> A(b, 0), B(b, 0), C(b, 0), D(b, 0);
	D[k] = 1;
	append_store(6, D);
	C[0] = 1;
    append_store(5, C);
	for(int i = 0; i < k; ++i) A[i] = 1;
	for(int i = k; i < 2 * k; ++i) B[i] = 1;
	append_store(1, A);
	append_store(2, B);
	append_and(1, 0, 1);
	append_and(2, 0, 2);
    append_left(2, 2, k);
	append_not(3, 2);
    append_add(3, 3, 5);
    append_add(3, 3, 1);

    append_and(3, 3, 6);
    for(int i = k; i >= 0; --i) {
        append_and(4, 4, 3);
        if(i) append_left(3, 3, 1);
    }
    append_and(1, 2, 4);
    append_not(4, 4);
    append_and(2, 1, 4);
    append_or(0, 1, 2);
}
#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...