library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub beet-aizu/library

:heavy_check_mark: test/aoj/2627.test.cpp

Depends on

Code

#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2627"

#include<bits/stdc++.h>
using namespace std;

#define call_from_test
#include "../../tools/chminmax.cpp"
#include "../../mincostflow/primaldual.cpp"
#include "../../mincostflow/negativeedge.cpp"
#undef call_from_test

#ifdef SANITIZE
#define IGNORE
#endif

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  using ll = long long;
  const ll INF = 1e9;

  int n;
  cin>>n;
  NegativeEdge<int, ll> G(n+1);

  for(int i=0;i<n;i++){
    int k;
    cin>>k;
    map<int, int> dst;
    for(int j=0;j<k;j++){
      int t,c;
      cin>>t>>c;
      t--;
      G.use_edge(i,t,1,c);
      if(!dst.count(t)) dst[t]=c;
      chmin(dst[t],c);
    }

    for(auto p:dst)
      G.add_edge(i,p.first,INF,p.second);

    G.add_edge(i,n,INF,0);
  }

  assert(G.build(0,n,INF));
  cout<<G.get_cost()<<endl;
  return 0;
}
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
    bundler.update(path)
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
    self.update(self._resolve(pathlib.Path(included), included_from=path))
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 400, in update
    raise BundleErrorAt(path, i + 1, "unable to process #include in #if / #ifdef / #ifndef other than include guards")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: mincostflow/negativeedge.cpp: line 6: unable to process #include in #if / #ifdef / #ifndef other than include guards
Back to top page