# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
150860 | 이 대회 미분 되나요? (#200) | Bulb Game (FXCUP4_bulb) | C++17 | 2 ms | 380 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 "bulb.h"
#include<vector>
#include<algorithm>
using namespace std;
#define REDWIN 1
#define BLUEWIN 0
#define RED -1
#define BLUE -2
int N, ty1, ty2;
vector<int> l, r;
int dp[300301], dp1[300301][2], dp2[300301][2];
int res = 0;
int goLeft(int n)
{
if (dp[n] != 0) return dp[n];
if (l[n] >= 0) return dp[n] = goLeft(l[n]);
return dp[n] = l[n];
}
int moveOne(int n, int c) //�� �� �������� �� RED�� �� �� �ִ°�?
{
if (n < 0) return n;
if (dp1[n][c]) return dp1[n][c];
int r1 = BLUE, r2 = BLUE;
if (c) r1 = moveOne(r[n], 0);
r2 = moveOne(l[n], c);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |