Submission #592412

# Submission time Handle Problem Language Result Execution time Memory
592412 2022-07-09T07:21:12 Z joelau None (JOI15_memory) C++14
10 / 100
2233 ms 284052 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 (n >= N) return -2;
	char c = Get(n+1);
	if (c == '<') x++;
	else x--;
	if (x < 0) return -2;
	if (n == N-1) return x == 0 ? -1 : -2;
	int nxt = (n+1) * 100 + x;
	if (nxt >= (1<<22)) return -2;
	else return nxt;
}
# Verdict Execution time Memory Grader output
1 Correct 2160 ms 284052 KB Output is correct
2 Incorrect 2154 ms 284028 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2160 ms 284052 KB Output is correct
2 Incorrect 2154 ms 284028 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2160 ms 284052 KB Output is correct
2 Incorrect 2154 ms 284028 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2160 ms 284052 KB Output is correct
2 Incorrect 2154 ms 284028 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2233 ms 283984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2160 ms 284052 KB Output is correct
2 Incorrect 2154 ms 284028 KB Wrong Answer [6]
3 Halted 0 ms 0 KB -