| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 149760 | Greedy left the chat. (#200) | Bulb Game (FXCUP4_bulb) | C++17 | 1051 ms | 10140 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bulb.h"
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include<bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define mkp make_pair
#define in insert
#define er erase
#define fd find
#define fr first
#define sc second
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f3f3f3f3f;
const ll llinf=(1LL<<61);
const int inf=(1<<30);
const int nmax=3e5+50;
const int mod=1e9+7;
using namespace std;
int n,t,i,j,b,s[nmax],l[nmax],r[nmax];
int dfs(int x)
{
if(x<0)return x;
if(s[x])return dfs(r[x]);
else return dfs(l[x]);
}
int FindWinner(int T,vector<int> L,vector<int> R)
{
n=L.size(),t=T;
for(i=0;i<n;i++)
{
l[i]=L[i];
r[i]=R[i];
}
for(i=0;i<n;i++)
{
s[i]^=1;
b=0;
for(j=0;j<n;j++)
{
s[j]^=1;
if(dfs(0)==-2)
{
b=1;
s[j]^=1;
break;
}
s[j]^=1;
}
if(!b)return 1;
s[i]^=1;
}
return 0;
}
컴파일 시 표준 에러 (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... | ||||
