Submission #592412

#TimeUsernameProblemLanguageResultExecution timeMemory
592412joelau기억 압축 (JOI15_memory)C++14
10 / 100
2233 ms284052 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...