| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 101181 | Pro_ktmr | 기억 압축 (JOI15_memory) | C++14 | 18 ms | 2048 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"Memory_lib.h"
int Memory(int N, int M){
int roopCount = M >> 15;
int now = (M >> 8) % (1 << 7);
int length = (M >> 1) % (1 << 7);
int stack = M % (1 << 1);
if(now > N) return -2;
if(now == N){
if(length != 0) return -2;
roopCount++;
now = 0;
return roopCount << 15;
}
if(roopCount > N) return -2;
if(roopCount == N) return -1;
char c = Get(now);
if(c == '<'){
if(length == roopCount) stack = 0;
length++;
}
if(c == '['){
if(length == roopCount) stack = 1;
length++;
}
if(c == '>'){
length--;
if(length == roopCount && stack != 0) return -2;
}
if(c == '>'){
length--;
if(length == roopCount && stack != 1) return -2;
}
now++;
return (roopCount<<15) + (now<<8) + (length<<1) + stack;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
