#include <bits/stdc++.h>
#include "registers.h"
using namespace std;
#define rep(i, k, n) for (int i=k; i<n; i++)
void construct_instructions(int s, int n, int k, int q) {
{
vector<bool> tmp(2000);
fill(tmp.begin()+n*k, tmp.end(), true);
append_store(1, tmp);
append_or(0, 0, 1);
}
int l = 8*sizeof(n) - __builtin_clz(n-1);
n = (1 << l);
if (s==0) {
{
vector<bool> tmp(2000);
for (int i = 0; i < 2000; i += k) tmp[i] = true;
append_store(99, tmp);
}
while (n > 1) {
append_right(1, 0, n/2*k);
append_xor(2, 0, 1);
append_not(3, 0);
append_add(3, 3, 1);
append_xor(3, 3, 2);
append_and(3, 3, 99);
append_right(4, 3, k);
append_not(4, 4);
append_add(3, 3, 4);
append_and(2, 2, 3);
append_xor(0, 0, 2);
n /= 2;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |