# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
282503 |
2020-08-24T13:22:53 Z |
mhy908 |
None (JOI15_memory) |
C++14 |
|
3008 ms |
284024 KB |
#include "Memory_lib.h"
#include <bits/stdc++.h>
using namespace std;
int Memory(int N, int M){
if(N%2)return -2;
int lv=M&127, l=(M>>7)&63, r=(M>>13)&63, tp=(M>>20)&1;
if(!l){
tp=-1;
lv=0;
}
if(!lv){
if(r==N){
if(l)return -2;
return -1;
}
char c=Get(++r);
if(c=='['){
l=r;
tp=0;
}
if(c=='<'){
l=r;
tp=1;
}
if(c==']'){
if(tp!=0)return -2;
l--;
lv++;
}
if(c=='>'){
if(tp!=1)return -2;
l--;
lv++;
}
}
else{
char c=Get(l--);
if(c=='['){
lv--;
if(!lv)tp=0, l++;
}
else if(c=='<'){
lv--;
if(!lv)tp=1, l++;
}
else lv++;
}
return lv+(l<<7)+(r<<13)+(tp<<20);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2787 ms |
284024 KB |
Output is correct |
2 |
Incorrect |
0 ms |
256 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2787 ms |
284024 KB |
Output is correct |
2 |
Incorrect |
0 ms |
256 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2787 ms |
284024 KB |
Output is correct |
2 |
Incorrect |
0 ms |
256 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2787 ms |
284024 KB |
Output is correct |
2 |
Incorrect |
0 ms |
256 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3008 ms |
283704 KB |
Wrong Answer [5] |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2787 ms |
284024 KB |
Output is correct |
2 |
Incorrect |
0 ms |
256 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |