Submission #602184

# Submission time Handle Problem Language Result Execution time Memory
602184 2022-07-22T16:28:05 Z SlavicG Bit Shift Registers (IOI21_registers) C++17
0 / 100
0 ms 212 KB
#include "registers.h"
#include "bits/stdc++.h"
using namespace std;

void mini(int a, int b, int k) {
    append_not(3, b);
    append_add(3, 3, a);
    append_and(3, 3, 98);
    append_and(4, 4, 69);
    for(int i = k; i >= 1; --i) {
        append_right(3, 3, 1);
        append_or(4, 4, 3);
    }
    append_and(a, a, 4);
    append_not(4, 4);
    append_and(b, b, 4);
    append_or(a, a, b);
}

void construct_instructions(int s, int n, int k, int q) {
    if(s == 0) {
        vector<bool> P(2000, 0), paiu(2000, 0);
        for(int i = 0; i < k; ++i) P[i] = 1;
        paiu[k] = 1;
        append_store(99, P);
        append_store(98, paiu);
        if(k == 1) {
            append_move(1, 0);
            append_right(1, 1, 1);
            append_and(0, 0, 1);
            return;
        }
        append_move(1, 0);
        append_and(1, 1, 99);
        for(int i = 1; i < n; ++i) {
            append_move(2, k * i);
            append_and(2, 2, 99);
            mini(0, i, k);
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 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 0 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -