# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
61851 | IvanC | Chase (CEOI17_chase) | C++17 | 805 ms | 358920 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 10;
const int MAXC = 1e2 + 5;
vector<int> grafo[MAXN];
ll dp[MAXN][MAXC][2],P[MAXN],somatorio[MAXN],best;
ll copia[MAXN][MAXC],copia_sigma[MAXN],atual[MAXN][MAXC];
int N,C;
void adicona(int v,int u){
for(int i = 1;i<=C;i++){
if(atual[u][i] > dp[v][i][0]){
dp[v][i][1] = dp[v][i][0];
dp[v][i][0] = atual[u][i];
}
else if(atual[u][i] > dp[v][i][1]){
dp[v][i][1] = atual[u][i];
}
}
somatorio[v] += P[u];
}
void tira(int v,int u){
for(int i = 1;i<=C;i++){
if(atual[u][i] == dp[v][i][0]){
dp[v][i][0] = dp[v][i][1];
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |