diff --git a/src/8/15/P8817.cpp b/src/8/15/P8817.cpp new file mode 100644 index 0000000..da85b69 --- /dev/null +++ b/src/8/15/P8817.cpp @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include +#include + +using ll = int64_t; +ll n,m,k; +std::vector score; +std::vector> edg; +std::vector> cango; +std::vector> best3; + +void dfscango(ll from,ll cur, ll curk){ + if(curk>k){ + return; + } + for(ll i=0;i>n>>m>>k; + score.resize(n+1); + edg.resize(n+1); + cango.resize(n+1,std::vector(n+1)); + best3.resize(n+1); + for(ll i=2;i<=n;i++){ + std::cin>>score[i]; + } + for(ll i=1;i<=m;i++){ + ll u,v; + std::cin>>u>>v; + edg[u].push_back(v); + edg[v].push_back(u); + } + for(ll i=1;i<=n;i++){ + dfscango(i, i, 0); + } + for(ll i=2;i<=n;i++){ + std::priority_queue,std::vector>,std::greater<>> pr; + for(ll j=2;j<=n;j++){ + if(i==j)continue; + if(cango[i][j]&&cango[j][1]){ + pr.emplace(score[j],j); + } + } + //TODO + } + for(ll B=2;B<=n;B++){ + for(ll C=B+1;C<=n;C++){ + + } + } +} \ No newline at end of file