답안 #602652

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
602652 2022-07-23T09:50:36 Z rrrr10000 레지스터 (IOI21_registers) C++17
33 / 100
1 ms 340 KB
#include "registers.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> P;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef tuple<ll,ll,ll> PP;
typedef vector<PP> vpp;
typedef vector<vpp> vvpp;
typedef vector<bool> vb;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define pb emplace_back
#define all(a) a.begin(),a.end()
#define dupli(a) {sort(all(a));a.erase(unique(all(a)),a.end());}
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define fi first
#define se second
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
const ll inf=1001001001001001001;

void construct_instructions(int s, int n, int k, int q) {
	ll lg=0;
	while(n>(1<<lg))lg++;
	vb tmp(2000,false);
	REP(i,n*k,2000)tmp[i]=true;
	append_store(1,tmp);
	append_or(0,0,1);
	if(s==0){
		rep(i,lg){
			append_right(1,0,k<<i);
			append_xor(2,0,1);
			rep(j,k){
				append_right(4,0,j);
				append_right(5,2,j);
				append_xor(6,3,4);
				append_and(6,6,5);
				append_xor(3,3,6);
			}
			rep(i,2000){
				if(i%k==0)tmp[i]=true;
				else tmp[i]=false;
			}
			append_store(4,tmp);
			append_and(3,3,4);
			rep(j,k-1){
				append_left(4,3,1);
				append_or(3,3,4);
			}
			append_and(2,2,3);
			append_xor(0,0,2);
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Wrong answer detected in grader
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Incorrect sorting
2 Halted 0 ms 0 KB -