Submission #769637

# Submission time Handle Problem Language Result Execution time Memory
769637 2023-06-30T00:02:54 Z tolbi Bit Shift Registers (IOI21_registers) C++17
0 / 100
1 ms 340 KB
#pragma optimize("Bismillahirrahmanirrahim")
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█■█
//█─█─█▄─█▄─█─█─█─█
//Allahuekber
//ahmet23 orz...
//FatihSultanMehmedHan
//YavuzSultanSelimHan
//AbdulHamidHan
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
#define author tolbi
#include<bits/stdc++.h>
using namespace std;
template<typename T> vector<int32_t> normalize(vector<T> &rt){vector<int32_t> arr(rt.size());for (int i = 0; i < rt.size(); i++){arr[i]=rt[i];}return arr;}
#define endl '\n'
#define vint(x) vector<int> x
#define cinarr(x) for (auto &it : x) cin>>it;
#define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl;
#define sortarr(x) sort(x.begin(), x.end())
#define sortrarr(x) sort(x.rbegin(), x.rend())
#define rev(x) reverse(x.begin(), x.end())
#define deci(x) int x;cin>>x;
#define decstr(x) string x;cin>>x;
#define tol(bi) (1LL<<((int)(bi)))
#define lsb(x) (x&-x)
const int MOD = 1e9+7;
const int64_t INF = 1e15;
mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count());
#include "registers.h"
void miv(int n, int k){
    append_xor(2,0,1);//1 move
    append_not(3,2);//1 move
    vector<bool> kk(2000,0);
    for (int i = 0; i < n; i++){
        kk[i*k]=1;
    }
    append_store(4,kk);//1 move
    for (int i = 0; i < k; i++){//6*k move
        append_and(5,2,4);//1 move
        append_and(4,3,4);//1 move
        append_or(6,5,6);//1 move
        append_or(5,5,6);//1 move
        if (i!=k-1) append_left(4,4,1);//1 move
        if (i!=k-1) append_left(6,6,1);//1 move
    }
    append_and(5,2,5);//1 move
    append_xor(0,0,5);//1 move
}
void halve(int n, int k){
    if (n==1) return;
    int say = n/2;
    append_print(0);
    append_right(1,0,say*k);//1 move
    miv(n-say,k);
    halve(n-say,k);
}
void construct_instructions(int32_t s, int32_t n, int32_t k, int32_t q) {
    vector<bool> kk(2000);
    for (int i = n*k; i < 2000; i++){
        kk[i]=1;
    }
    append_store(1,kk);//1 move
    append_or(0,0,1);//1 move
    halve(n,k);//log2(n)*f(halve) move
}

Compilation message

registers.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    1 | #pragma optimize("Bismillahirrahmanirrahim")
      |
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Incorrect min value
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 308 KB Wrong answer detected in grader
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Incorrect sorting
2 Halted 0 ms 0 KB -