# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1081765 | KALARRY | Bitaro’s Party (JOI18_bitaro) | C++14 | 212 ms | 40908 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.
//chockolateman
#include<bits/stdc++.h>
using namespace std;
int S = 20;
int N,M,Q,cur_dp[100005];
vector<pair<int,int>> dp[100005];
vector<int> adj_rev[100005];
bool visited[100005],prohibited[100005];
vector<pair<int,int>> temp;
void dfs(int v)
{
if(visited[v])
return;
visited[v] = true;
temp.push_back({-1,-1});
temp.push_back({0,v});
for(auto u : adj_rev[v])
{
dfs(u);
for(auto x : dp[u])
if(x.first != -1)
temp.push_back({x.first+1,x.second});
}
sort(temp.begin(),temp.end(),greater<pair<int,int>>());
for(int i = 0 ; i <= min(S,(int)(temp.size()-1)) ; i++)
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... |