# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
592402 |
2022-07-09T06:57:57 Z |
joelau |
None (JOI15_memory) |
C++14 |
|
1 ms |
212 KB |
#include "Memory_lib.h"
#include <bits/stdc++.h>
using namespace std;
int Memory(int N, int M) {
int n = M%100, x = M/100;
if (x == 0) x = 1;
char c = Get(n+1);
if (c == '<') x = x * 2;
if (c == '[') x = x * 2 + 1;
if (c == '>') {
if (x % 2 == 1) return -2;
else x /= 2;
}
if (c == ']') {
if (x == 1 || x % 2 == 0) return -2;
else x /= 2;
}
if (n == N-1) {
if (x == 1) return -1;
else return -2;
}
else return x * 100 + n + 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [1] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |