Submission #623957

# Submission time Handle Problem Language Result Execution time Memory
623957 2022-08-07T04:44:17 Z Hanksburger Bit Shift Registers (IOI21_registers) C++17
21 / 100
1 ms 252 KB
#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
void construct_instructions(int S, int N, int K, int Q)
{
    if (S==0 && N==2 && K==1)
    {
        append_right(1, 0, 1);
        append_and(0, 0, 1);
    }
    else
    {
        append_right(1, 0, 1);
        append_not(1, 1);
        append_right(2, 0, 3);
        append_and(3, 1, 2);
        append_xor(4, 1, 2);
        append_right(5, 0, 0);
        append_not(5, 5);
        append_right(6, 0, 2);

        append_print(1);
        append_print(2);
        append_print(3);
        append_print(4);
        append_print(5);
        append_print(6);

        append_and(7, 4, 5);
        append_and(7, 7, 6);
        append_or(7, 7, 3);
        append_left(7, 7, 1999);
        append_right(7, 7, 1999);
        append_left(8, 7, 1);

        append_print(7);

        append_or(7, 7, 8);
        append_and(9, 0, 7);
        append_not(7, 7);
        append_right(0, 0, 2);

        append_print(7);

        append_and(10, 0, 7);
        append_or(0, 9, 10);
    }
}
# 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 0 ms 252 KB Incorrect min value
2 Halted 0 ms 0 KB -
# 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 1 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -