| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 592371 | errorgorn | 기억 압축 (JOI15_memory) | C++17 | 2351 ms | 284296 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Memory_lib.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int,int>
#define fi first
#define se second
#define puf push_front
#define pof pop_front
#define pub push_back
#define pob pop_back
#define lb lower_bound
#define ub upper_bound
#define rep(x,s,e) for (int x=(s)-((s)>(e));x!=(e)-((s)>(e));((s)<(e))?x++:x--)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int) (x).size()
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
signed Memory(signed n, signed m){
	if (n%2==1) return -2;
	
	int curr=m&127;
	int d=(m>>7)&127;
	int pos=(m>>14)&127;
	int typ=m>>21;
	
	if (curr>=n || d>=n || pos>=n) return -2;
	
	char c=Get(pos+1);
	
	int nd=d;
	if (c=='<' || c=='[') nd++;
	else nd--;
	
	int ntyp=0;
	if (c=='[' || c==']') ntyp=1;
	
	if (nd<0) return -2;
	
	int typ2;
	if (nd==d+1){
		if (d==curr) typ2=ntyp;
	}
	else{
		if (nd==curr){
			if (typ!=ntyp) return -2;
		}
	}
	
	if (pos!=n-1){
		return curr|(nd<<7)|((pos+1)<<14)|(typ2<<21);
	}
	else if (curr!=n-1){
		if (nd!=0) return -2;
		return curr+1;
	}
	else{
		return -1;
	}
	
}
컴파일 시 표준 에러 (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... | ||||
