Submission #1241105

#TimeUsernameProblemLanguageResultExecution timeMemory
1241105ZeroCoolBit Shift Registers (IOI21_registers)C++20
0 / 100
0 ms328 KiB
#include "registers.h"
#include <bits/stdc++.h>

using namespace std;

vector<bool> shit(2000);

void kur(int a,int b,int k){
	append_right(1, 0, a * k);
	append_right(2, 0, b * k);
	vector<bool> A(b, 0);
	for(int i = 0;i < k;i++)A[i] = 1;
	append_store(3, A);
	append_and(1, 1, 3);
	append_and(2, 2, 3);
	append_not(3, 1);
	A = vector<bool>(b, 0);
	A[0] = 1;
	append_store(4, A);
	append_add(4, 2, 4);
	append_add(4, 3, 4);
	append_right(4, 4, b-k);
	append_xor(5, 1, 2);
	append_and(5, 4, 5);
	append_left(6, 5, k*a);
	append_xor(0, 0, 6);
	append_left(6, 5, k*b);
	append_xor(0, 0, 6);
}

void construct_instructions(int s, int n, int k, int q) {
	if(s == 0){
		for(int i = n - 2;i >= 0;i--)kur(i, i + 1, k);
	}else{
		for(int i = 0;i < n;i++){
			for(int j = n - 2;j >= i;j--)kur(j, j+ 1,k);
		}
	}

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