Submission #442222

# Submission time Handle Problem Language Result Execution time Memory
442222 2021-07-07T10:02:55 Z daniel920712 Bit Shift Registers (IOI21_registers) C++17
0 / 100
1 ms 204 KB
#include "registers.h"
#include <vector>
using namespace std;
void construct_instructions(int s, int n, int k, int q)
{
    int i,j;
    if(k==1)
    {
        append_move(1,0);
        append_right(1,1,1);
        append_and(0,0,1);
    }
    else
    {
        append_move(1,0);
        append_right(1,1,2);
        append_and(0,0,1);

        append_xor(2,0,1);
        append_right(2,2,1);
        append_left(2,2,1999);
        append_right(2,2,1999);

        append_and(3,0,1);

        append_move(4,0);
        append_move(5,1);
        append_right(4,4,1);

        append_not(7,2);
        append_and(6,1,0);
        append_and(6,6,7);

        append_and(8,4,0);
        append_not(10,4);
        append_and(9,10,1);

        append_or(11,8,9);
        append_and(11,2,11);
        append_or(11,11,6);

        append_right(3,3,1);
        append_left(3,3,1);

        append_left(11,11,1999);
        append_right(11,11,1999);

        append_add(0,3,11);



    }


}

Compilation message

registers.cpp: In function 'void construct_instructions(int, int, int, int)':
registers.cpp:6:9: warning: unused variable 'i' [-Wunused-variable]
    6 |     int i,j;
      |         ^
registers.cpp:6:11: warning: unused variable 'j' [-Wunused-variable]
    6 |     int i,j;
      |           ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Incorrect min value
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Wrong answer detected in grader
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Incorrect sorting
2 Halted 0 ms 0 KB -