# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
15365 | skeksk91 | 쿼터너리 컴퓨터 (kriii3_Z) | C++98 | 0 ms | 1084 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#include <queue>
#include <limits.h>
#include <algorithm>
#define ll long long
int n, m, v[20], f[20], page[20], inst[20], ret[20], a[20], b[20], u[20];
int plus[4][4] ={{0,1,2,3},{1,2,3,0},{2,3,0,1},{3,0,1,2}};
int xor2[4][4] = {{0,1,2,3},{1,0,3,2},{2,3,0,1},{3,2,1,0}};
void func(int here){
if(here==n){
//for(int i = 0 ; i < n; i++){
// printf("%d ", v[i]);
//}
//printf("\n");
for(int i = 0; i < n; i++){
u[i] = v[i];
}
for(int i = 0; i < m; i++){
if(inst[i]==0){
u[ret[i]] = plus[u[a[i]]][u[b[i]]];
}
else if(inst[i]==1){
u[ret[i]] = xor2[u[a[i]]][u[b[i]]];
}
else if(inst[i]==2){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |