# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
105070 | IOrtroiii | Lamps (JOI19_lamps) | C++14 | 109 ms | 14844 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 1000100;
int n;
char from[N], to[N];
int f[N][3];
char get(char a,int x) {
if (x == 0) return '0';
if (x == 1) return '1';
if (x == 2) return a;
}
int main() {
scanf("%d %s %s", &n, from + 1, to + 1);
f[0][2] = 0;
f[0][0] = f[0][1] = n + 5;
for (int i = 1; i <= n; ++i) {
for (int x = 0; x < 3; ++x) {
f[i][x] = n + 5;
}
for (int x = 0; x < 3; ++x) {
for (int xx = 0; xx < 3; ++xx) {
int nw = f[i - 1][x];
if (x != xx && xx != 2) {
++nw;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |