제출 #1062154

#제출 시각아이디문제언어결과실행 시간메모리
1062154jamjanek레지스터 (IOI21_registers)C++17
21 / 100
1 ms348 KiB
#include "registers.h" #include<bits/stdc++.h> using namespace std; int iterator1; void policz_mniejsze(int k, int skip, int n){ vector<bool>zero(2000, 0); int i; for(i=0;i<2000;i+=k*skip*2) zero[i] = 1; append_store(10, zero); for(int j=0;j<n;j+=skip*2) for(int i=0;i<k;i++) zero[j*k+i] = 1; append_store(11, zero); //0 - a //1 - b //2 - !a append_right(1, 0, k*skip); append_and(0,11,0); append_and(1,11,1); append_not(2, 0); append_and(2, 2, 11); append_add(2, 1, 2); append_right(2, 2, k); append_and(2, 2, 10);//0 lub 1 append_add(2, 2, 11); //11111 lub 0000 append_and(3, 1, 2); append_and(4, 0, 2); append_xor(4, 0, 4); append_or(0, 3, 4); } void construct_instructions(int s, int n, int k, int q) { vector<bool>zero(2000, 0); for(int i=k*n;i<2000;i++) zero[i] = 1; append_store(1, zero); append_or(0, 0, 1); int skip = 1; while(skip<n){ policz_mniejsze(k, skip, n); append_print(0); skip*=2; } }
#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...