#include "registers.h"
#include "bits/stdc++.h"
using namespace std;
int mi(int a,int b,int k){
append_print(0);
append_not(2,b);
append_and(2,2,6);
append_add(3,2,a);
append_right(3,3,k);
for(int j = 0;j<k-1;j++){
append_left(4,3,1);
append_or(3,3,4);
}
append_print(3);
append_move(5,3);
append_not(5,5);
append_and(5,5,6);
append_and(3,3,b);
append_and(5,5,a);
append_or(7,3,5);
append_not(5,5);
append_add(5,5,6);
append_not(3,3);
append_add(3,3,6);
append_and(3,3,b);
append_and(5,5,a);
append_or(8,3,5);
}
void construct_instructions(int s, int n, int k, int q){
vector<bool> v(2000,0);
for(int i = 0;i<k;i++)v[i] = 1;
append_store(6,v);
for(int i = 0;i<n;i++){
append_move(0,10+i);
append_and(10+i,10+i,6);
append_right(0,0,k);
}
for(int i = 0;i<n;i++){
for(int j = 0;j<n-1;j++){
mi(j+10,j+10+1,k);
append_move(7,i);
append_move(8,i+1);
}
}
for(int i = 0;i<n;i++){
append_move(i,i+10);
}
}
Compilation message
registers.cpp: In function 'int mi(int, int, int)':
registers.cpp:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
29 | }
| ^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
344 KB |
Execution killed with signal 11 |
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 |
Runtime error |
1 ms |
348 KB |
Execution killed with signal 11 |
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 |
Runtime error |
1 ms |
348 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
348 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |