#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
void construct_instructions(int s, int n, int k, int q) {
//only seperate when needed to save space
vector<bool> v(2000);
v[0] = 1;
append_store(98,v);
for(int i = 0; i<k; i++) v[i] = 1;
append_store(99,v);
for(int j = 0; j<n; j++){
append_move(1,99);
for(int i = 0; i<n; i++){
append_move(2,0);
append_right(2,2,i*k);
append_and(2,2,99);
append_move(8,99);
append_left(8,8,i*k);
//compute the min
append_not(3,1);
append_add(3,3,98);
append_add(3,3,2);
append_right(3,3,k);
append_and(2,3,2);
append_and(8,3,8);
append_not(3,3);
append_and(7,3,7);
append_and(3,3,1);
append_or(7,7,8);
append_or(1,2,3);
}
append_or(0,7,0);
append_print(0);
append_left(1,1,j*k);
append_or(9,1,9);
}
append_move(0,9);
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
# |
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 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
764 KB |
Wrong answer detected in grader |
3 |
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 |
Correct |
1 ms |
600 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
600 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Incorrect |
1 ms |
760 KB |
Wrong answer detected in grader |
4 |
Halted |
0 ms |
0 KB |
- |