| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 73494 | ics0503 | 기억 압축 (JOI15_memory) | C++17 | 3 ms | 488 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Memory_lib.h"
int Memory(int N, int M) {
	if (M < 10000) {
		int now = M / 100 + 1;
		int dep = M % 100;
		char want = Get(now);
		dep += (want == '[' || want == '<') * 2 - 1;
		if (dep < 0 || (now == N && dep != 0))return -2;
		if (now == N)return 10000;
		return now * 100 + dep;
	}
	if (M < 20000) {
		int m = M - 10000;
		int now = M-10000 + 1;
		char want = Get(now);
		if (want == '[' || want == '<') {
			return 20000 + (want == '[')*1000000+(now*10000)+(now*100)+1;//go check
		}
		if (now == N)return -1;
		return 10000 + now;
	}
	int m = M - 20000;
	int ck = m / 1000000;
	int nxt = m / 10000 % 100;
	int now = m / 100 % 100;
	int dep = m % 100;
	char get = Get(now + 1);
	if (get == '[' || get == '<') {
		dep++;
		return 20000 + ck * 1000000 + nxt * 10000 + (now + 1) * 100 + dep;
	}
	dep--;
	if (dep == 0) {
		if (!ck) {
			if (get == ']')return -2;
			return 10000 + nxt;
		}
		else{
			if (get == '>')return -2;
			return 10000 + nxt;
		}
	}
	return 20000 + ck * 1000000 + nxt * 10000 + (now + 1) * 100 + dep;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
