Submission #559012

#TimeUsernameProblemLanguageResultExecution timeMemory
559012nghiass001Bit Shift Registers (IOI21_registers)C++17
21 / 100
1 ms304 KiB
#include "registers.h" #include <bits/stdc++.h> using namespace std; const int B = 2000; vector<bool> tmp(B); void get_to(int t, int x, int pos) { append_left(t, x, B - pos - 1); append_right(t, t, B - 1); } void construct_instructions(int s, int n, int k, int q) { tmp[0] = 1; append_store(99, tmp); if (k == 1) { append_right(1, 0, 1); append_and(0, 0, 1); return; } /// a*2 + b , c*2 + d get_to(1, 0, 1); get_to(2, 0, 0); //get_to(3, 0, 3); append_right(3, 0, 3); get_to(4, 0, 2); append_and(0, 1, 3); append_xor(10, 1, 3); /// a^c -> a!=c append_xor(11, 10, 99); /// a==c append_and(12, 2, 4); /// b&d append_and(13, 11, 12); /// (a==c) & (b&d) append_and(14, 3, 2); /// c&b -> (~a)&b append_and(15, 1, 4); /// a&d -> (~c)&d append_or(16, 14, 15); append_and(16, 16, 10); /// (a!=c) & ((~a&b) | (~c&d)) append_or(17, 13, 16); append_left(0, 0, 1); append_or(0, 0, 17); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...