Submission #440068

# Submission time Handle Problem Language Result Execution time Memory
440068 2021-07-01T14:40:45 Z algorithm16 Bit Shift Registers (IOI21_registers) C++17
10 / 100
1 ms 204 KB
#include "registers.h"
#include<iostream>
#include<algorithm>
using namespace std;
int ind=6,b=2000,r=2;
void flip(int x) {
	append_not(x,x);
	append_left(x,x,b-1);
	append_right(x,x,b-1);
}
void is0(int x,int y,int bit,int op) {
	//append_left(ind,x,b-1-bit);
	append_right(ind,x,bit);
	flip(ind);
	if(op) append_and(y,y,ind);
	else append_or(y,y,ind);
	ind+=1;
}
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);
		return;
	}
	append_move(1,0);
	append_right(1,1,2);
	append_and(2,0,1);
	// 3 4 5
	is0(2,3,1,0);
	is0(2,3,0,1);
	is0(0,4,1,0);
	is0(0,4,0,1);
	flip(4);
	is0(1,5,1,0);
	is0(1,5,0,1);
	flip(5);
	append_and(3,3,4);
	append_and(3,3,5);
	append_add(2,2,3);
	append_move(0,2);
	return;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Wrong answer detected in grader
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect sorting
2 Halted 0 ms 0 KB -