# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44285 | Nnandi | Uzastopni (COCI15_uzastopni) | C++14 | 2 ms | 464 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;
const int maxn=10005;
const int maxv=105;
vector<int> graf[maxn];
vector<bool> dp[maxn][maxv];
int v[maxn];
void bejar(int start, int apa, set<int> volt) {
int ez=v[start];
if(volt.count(ez)) {
return;
}
volt.insert(ez);
dp[start][ez][ez+1]=true;
vector<int> dag[maxv];
dag[ez].push_back(ez+1);
for(int s:graf[start]) {
bejar(s,start,volt);
for(int i=0;i<maxv;i++) {
for(int j=i+1;j<maxv;j++) {
if(dp[s][i][j]) {
dag[i].push_back(j);
}
}
}
}
vector<int> sor;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |