Submission #560254

# Submission time Handle Problem Language Result Execution time Memory
560254 2022-05-11T08:10:03 Z doowey Bit Shift Registers (IOI21_registers) C++17
22 / 100
3 ms 900 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_and(4, 6, 4);
        append_store(5, zz);

        for(int j = k ; j > 0 ; j -- ){
            append_right(7, 4, j);
            append_or(5, 5, 7);
        }
        append_not(3, 3);
        append_and(3, 1, 3);

        append_and(3, 3, 5);
        append_not(5, 5);
        append_and(2, 2, 5);
        append_or(2, 2, 3);
        append_not(8, 1);
        append_and(0, 0, 8);
        append_or(0, 0, 2);
        append_or(0, 0, 3);
	}
}
# 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 Wrong answer detected in grader
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 3 ms 900 KB Output is correct
3 Correct 3 ms 772 KB Output is correct
4 Correct 2 ms 728 KB Output is correct
# 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 Incorrect 1 ms 300 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 300 KB Incorrect sorting
2 Halted 0 ms 0 KB -