Submission #563873

# Submission time Handle Problem Language Result Execution time Memory
563873 2022-05-18T07:48:58 Z doowey Bit Shift Registers (IOI21_registers) C++17
21 / 100
1 ms 340 KB
#include "registers.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define fi first
#define se second
#define mp make_pair

int b = 2000;

void construct_instructions(int s, int n, int k, int q) {
    vector<bool> ss(b);
    vector<bool> zz(b);
    for(int i = 0 ; i < b; i ++ ){
        if(i < k) ss[i] = 1;
        else ss[i] = 0;
    }
    vector<bool> qq(b);
    qq[k] = 1;
    append_store(1, ss);
    append_store(6, qq);
	for(int i = 1 ; i < n; i ++ ){
        // store minimum at 0
        // compare with i
        append_right(2, 0, i * k);
        append_move(3, 0);

        append_not(3, 3);

        append_and(2, 2, 1);
        append_and(3, 3, 1);



        append_add(4, 2, 3);
        append_not(3, 3);
        append_and(4, 6, 4);
        append_store(7, zz);
        for(int j = k; j >= 1; j -- ){
            append_right(8, 4, j);
            append_or(7, 7, 8);
        }
        append_print(7);
        append_and(3, 3, 7);
        append_not(7, 7);
        append_and(2, 2, 7);
        append_print(2);
        append_print(3);
        append_or(2, 2, 3);
        append_move(0, 2);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Wrong answer detected in grader
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Incorrect sorting
2 Halted 0 ms 0 KB -