Submission #761915

# Submission time Handle Problem Language Result Execution time Memory
761915 2023-06-20T11:32:24 Z caganyanmaz Bit Shift Registers (IOI21_registers) C++17
21 / 100
0 ms 212 KB
#include <bits/stdc++.h>
using namespace std;

constexpr static int b = 2000;
void append_move(int t, int y);
void append_store(int t, vector<bool> v);
void append_and(int t, int x, int y);
void append_or(int t, int x, int y);
void append_xor(int t, int x, int y);
void append_not(int t, int x);
void append_left(int t, int x, int p);
void append_right(int t, int x, int p);
void append_add(int t, int x, int y);
void append_print(int t);


void get_second(int t)
{
        append_left(t, t, b-2);
        append_right(t, t, b-1);
}

void _fix(int t)
{
        append_xor(3, t, 2);
        get_second(3);
        append_or(t, t, 3);
}

void construct_instructions(int s, int n, int k, int q)
{
        if (k == 2)
        {
                append_right(1, 0, 2);
                append_and(2, 0, 1);
                _fix(0);
                _fix(1);
                append_and(0, 0, 1);
        }
        else
        {
                append_right(1, 0, 1);
                append_and(0, 0, 1);
        }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
# 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 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 -