# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
417625 | huangqr | Worst Reporter 4 (JOI21_worst_reporter4) | C++14 | 345 ms | 116680 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.
#ifdef local
#define debug(x) cout<<#x<<" "<<x<<endl;
#else
#define debug(x)
#endif
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pl;
const ll mod=1e9+7,lim=2e5+5,bitlim=15,inf=1e9;
vector<ll>adjl[lim];
vector<pl>costs[lim];
ll pwr[lim],cost[lim];
map<ll,ll> *mps[lim];
ll root[lim],nxt[lim];
ll vis[lim];
void dp(ll pos){
// debug(pos);
if(adjl[pos].size() == 0&&root[pos]==0){
mps[pos] = new map<ll,ll>();
mps[pos]->operator[](0)=0;
mps[pos]->operator[](pwr[pos] + 1) = cost[pos];
}
else{
ll maxsz=0,maxszidx=0;
for(int i=0;i<adjl[pos].size();i++){
ll u=adjl[pos][i];
dp(u);
if(mps[u]->size()>maxsz){
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... |