#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) {
if (k == 1) {
append_move(1, 0);
append_right(1, 1, 1);
append_and(0, 0, 1);
} else {
append_move(1, 0);
append_move(2, 0);
append_right(2, 2, 2);
append_and(3, 1, 2);//this contains the result of a[0] & a[1]
append_or(7, 1, 2);
vector<bool> v(b, 0);
v[0] = 1;
append_store(8, v);
append_and(7, 7, 8);//this contains the result of a[0][0] | a[1][0];
append_move(4, 0);
append_right(4, 4, 1);
append_xor(4, 0, 4);
for (int i = 0; i < b; ++i) {
v[i] = 1;
}
v[1] = 1;
append_store(8, v);
append_and(4, 4, 8);
append_move(5, 4);
append_right(5, 5, 2);
append_and(6, 4, 5);//this now contains (a[0][0] ^ a[0][1]) & (a[1][0] ^ a[1][1])
append_and(7, 6, 7);
append_or(3, 3, 7);
append_move(3, 0);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Incorrect min value |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect sorting |
2 |
Halted |
0 ms |
0 KB |
- |