Submission #1061780

# Submission time Handle Problem Language Result Execution time Memory
1061780 2024-08-16T13:19:33 Z j_vdd16 Bit Shift Registers (IOI21_registers) C++17
10 / 100
1 ms 348 KB
#include "registers.h"

#include <algorithm>
#include <bitset>
#include <cstdint>
#include <cstring>
#include <iostream>
#include <limits.h>
#include <math.h>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

//#define int long long
#define loop(X, N) for(int X = 0; X < (N); X++)
#define all(V) V.begin(), V.end()
#define rall(V) V.rbegin(), V.rend()

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<vector<ii>> vvii;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;

void construct_instructions(int s, int n, int k, int q) {
    if (s == 1) return;

    append_left(1, 0, k);

    vb even(2000, true);
    for (int i = k * n; i < 2000; i++) even[i] = false;
    append_store(99, even);
    append_and(1, 1, 99);

    append_xor(2, 0, 1);

    append_print(0);
    append_print(1);
    append_print(2);

    append_right(3, 2, 1);
    append_print(3);
    for (int pow = 1; pow <= 8; pow *= 2) {
        append_right(4, 3, pow);
        append_or(3, 3, 4);
    }
    append_print(3);
    append_print(4);

    append_not(3, 3);
    append_and(4, 2, 3);

    append_print(4);

    append_and(5, 0, 4);
    for (int pow = 1; pow <= 8; pow *= 2) {
        append_right(6, 5, pow);
        append_or(5, 5, 6);
    }

    append_print(5);

    append_and(2, 5, 2);
    append_xor(0, 0, 2);
    append_right(0, 0, k);

    append_print(0);

    /*
    0 2 5 100
    22 19
    */
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer detected in grader
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Incorrect sorting
2 Halted 0 ms 0 KB -