fork(3) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. struct edg{int s, e, x;};
  5. vector<edg> v;
  6.  
  7. int main(){
  8. for(int i=1; i<=1998; i++){
  9. v.push_back({i, i+1, 100000000});
  10. v.push_back({i, 2000, 10000});
  11. for(int j=i+3; j<=1998; j++){
  12. v.push_back({i, j, 1});
  13. v.push_back({j, i, 1});
  14. }
  15. }
  16. printf("2000 %d\n", v.size());
  17. // for(auto &i : v) printf("%d %d %d\n", i.s, i.e, i.x);
  18. }
  19.  
Success #stdin #stdout 0.04s 16064KB
stdin
Standard input is empty
stdout
2000 3986016