# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668820 | 2022-12-05T03:41:51 Z | as111 | Board (CEOI13_board) | C++14 | 6 ms | 980 KB |
#include <iostream> #include <string> #define MAXN 100000 using namespace std; int bitA[MAXN + 5]; int bitB[MAXN + 5]; int main() { string A, B; cin >> A >> B; int startA = 0; int startB = 0; int endA = 0; int endB = 0; for (int i = 0; i < A.length(); i++) { if (A[i] == '1') { bitA[endA] = 0; endA++; } if (A[i] == '2') { bitA[endA] = 1; endA++; } if (A[i] == 'U') { endA--; } if (A[i] == 'L') { // subtract 1 if (bitA[endA] == 1)bitA[endA] = 0; if (bitA[endA] == 0) { int pos = endA; while (pos > 0) { if (bitA[pos] == 1) { bitA[pos] = 0; break; } bitA[pos] = 1; pos--; } } } if (A[i] == 'R') { // add 1 if (bitA[endA] == 0)bitA[endA] = 1; if (bitA[endA] == 1) { int pos = endA; while (pos > 0) { if (bitA[pos] == 0) { bitA[pos] = 1; break; } bitA[pos] = 1; pos--; } } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 596 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 316 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 980 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 980 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 960 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |