# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
973888 | PieArmy | Hard route (IZhO17_road) | C++17 | 511 ms | 86356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O3,fast-math,unroll-all-loops")
typedef long long ll;
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
int n;
ll dp[500001][3][3],ans=0,say=1;
vector<int>komsu[500001];
void ekle(int loc,int x,ll cnt){
if(x>dp[loc][0][0]){
swap(dp[loc][1],dp[loc][2]);
swap(dp[loc][0],dp[loc][1]);
dp[loc][0][0]=x;
dp[loc][0][1]=0;
dp[loc][0][2]=0;
}
else if(x>dp[loc][1][0]){
swap(dp[loc][1],dp[loc][2]);
dp[loc][1][0]=x;
dp[loc][1][1]=0;
dp[loc][1][2]=0;
if(x==dp[loc][0][0]){
dp[loc][1][1]=dp[loc][0][1];
dp[loc][1][2]=dp[loc][0][2];
}
}
else if(x>dp[loc][2][0]){
dp[loc][2][0]=x;
dp[loc][2][1]=0;
dp[loc][2][2]=0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |