| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1353851 | JungPS | September (APIO24_september) | C++20 | 0 ms | 344 KiB |
#include "september.h"
#include <bits/stdc++.h>
using namespace std;
int degree[100007];
int solve(int N, int M, std::vector<int> F, std::vector<std::vector<int>> S) {
for(int i=0;i<N;++i) degree[i]=0;
for(int i=1;i<N;++i) ++degree[F[i]];
multiset<int,greater<int>> st;
int cnt=0;
for(auto i:S[0]){
if(st.count(degree[F[i]])){
st.erase(st.find(degree[F[i]]));
st.insert(degree[F[i]]-1);
}
--degree[F[i]];
st.insert(degree[i]);
if(*st.begin()==0){
st.clear();
++cnt;
}
}
return cnt;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
