# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
107552 | shoemakerjo | Lamps (JOI19_lamps) | C++14 | 225 ms | 24040 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n;
string a, b;
const int maxn = 1000010;
int dp[maxn][5];
//0 is nothing on me
//1 is a '0' on me
//2 is a '1' on me
//3 is a '0' on top of a '1'
//4 is a '1' on top of a '0'
const int cost[5][5] =
{{0, 1, 1, 2, 2},
{0, 0, 1, 1, 2},
{0, 1, 0, 2, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 1, 0}};
bool issame(int u, int tp) {
if (u == 0) return true;
if (tp == 0) {
return a[u] == b[u];
}
if (tp == 2 || tp == 4) {
return b[u] == '1';
}
# | 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... |