Submission #755053

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7550532023-06-09 11:06:06ttamxCyberland (APIO23_cyberland)C++17
100 / 100
2955 ms142972 KiB
#include "cyberland.h"
#include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef tuple<db,int,int,bool> t4;
const int N=1e5+5;
const int K=75;
int n,m,k,h;
int a[N];
db dp[N][K][2];
bool vis[N][K][2];
vector<pair<int,db>> adj[N];
priority_queue<t4,vector<t4>,greater<t4>> pq;
double solve(int N, int M, int K, int H, vector<int> x, vector<int> y, vector<int> c, vector<int> arr) {
n=N,m=M,k=min(K,70),h=H;
for(int i=0;i<n;i++)adj[i].clear();
for(int i=0;i<m;i++){
int u=x[i],v=y[i],w=c[i];
adj[u].emplace_back(v,w);
adj[v].emplace_back(u,w);
}
for(int i=0;i<n;i++)a[i]=arr[i];
for(int i=0;i<n;i++){
for(int j=0;j<=k;j++){
dp[i][j][0]=dp[i][j][1]=DBL_MAX;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...