#include "registers.h"
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<typename T>
using matrix= vector<vector<T>>;
const int T = 10000;
void getbit(int bit, int to){
append_move(to,0);
append_right(to,to,bit);
}
void construct_instructions(int s, int n, int k, int q) {
if(k == 1){
append_move(1,0);
append_right(1,1,1);
append_and(0,0,1);
return;
}
getbit(0,1);
getbit(1,2);
getbit(2,3);
getbit(3,4);
for(int i = 0; i <= 4; i++){
append_print(i);
}
append_and(5,2,4);
append_or(6,1,3);
append_xor(7,2,5);
append_or(7,1,7);
append_xor(8,4,5);
append_or(8,3,8);
append_and(6,6,7);
append_and(6,6,8);
append_left(6,6,1999);
append_right(0,6,1999);
append_left(5,5,1);
append_or(0,0,5);
}
// 0: resposta
// 1: a1
// 2: a0
// 3: b1
// 4: b0
// 5: a0 and b0 = r0
// 6: a1 or b1 -> r1
// 7: (a0 xor r0) or a1
// 8: (b0 xor r0) or b1
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |