#include "registers.h"
using namespace std;
#include <vector>
#include <iostream>
#define B 2000
void construct_instructions(int s, int n, int k, int q) {
if (s==1){return;}
vector<bool> v;
vector<bool> blank;
//seperate numbers
v.resize(B,0);
blank=v;
for (int i=0;i<k;i++){v[i]=1;}
append_store(n+1,v);
for (int i=0;i<n;i++){
append_move(i+1,0);
if (i!=0){
append_right(i+1,i+1,i*k);
}
if (i!=n-1){
append_and(i+1,i+1,n+1);
}
}
append_and(0,1,2);
if (k==1){return;}
append_right(3,0,1);
v=blank;
v[0]=1;
append_store(4,v);
append_add(3,3,4);
append_left(4,4,1);
append_and(5,4,1);
append_right(5,5,1);
append_and(5,5,3);
append_or(1,1,5);
append_and(5,4,2);
append_right(5,5,1);
append_and(5,5,3);
append_or(2,2,5);
append_and(0,1,2);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
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 |
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 |
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 |
- |