#include "registers.h"
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
for(int i = 1; i <= k; i++) append_right(i, 0, i-1); // k
vector<bool> v(k*n);
for(int i = 0; i < k*n; i++) if(i%k) v[i] = 1;
append_store(k+1, v); // 1
append_store(k+3, {1});
for(int i = k; i >= 1; i--) {
append_or(i, i, k+1);
append_add(k+2, i, k+3);
append_right(k+2, k+2, k*n); // adicionar na resposta
append_add(i, i, k+2);
append_or(k+1, k+1, i);
if(i > 1) append_left(k+2, k+2, i-1);
if(i != k) append_add(0, 0, k+2);
else append_move(0, k+2);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Wrong answer detected in grader |
2 |
Halted |
0 ms |
0 KB |
- |