daily pastebin goal
29%
SHARE
TWEET

Testcase generator for pushflow

a guest Aug 11th, 2014 185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<cstdio>
  2. #include<vector>
  3. #include<queue>
  4. #include<algorithm>
  5. #include<set>
  6. #include<map>
  7. #include<stack>
  8. #include<cmath>
  9. #include<iomanip>
  10. #include <map>
  11. #include<iostream>
  12. #include<cstdlib>
  13. #include<cstring>
  14. #include<string>
  15. #include<cassert>
  16. using namespace std;
  17.  
  18. #define DEBUG //on-off switch for prlling statements
  19.  
  20. // Input macros
  21. #define s(n)                        scanf("%d",&n)
  22. #define sc(n)                       scanf("%c",&n)
  23. #define sl(n)                       scanf("%lld",&n)
  24. #define sf(n)                       scanf("%lf",&n)
  25. #define ss(n)                       scanf("%s",n)
  26.  
  27. // Useful constants
  28. #define EPS                         1e-5
  29.  
  30. // Useful hardware instructions
  31. #define bitcount1                    __builtin_popcount1
  32. #define gcd                         __gcd
  33.  
  34. // Useful container manipulation / traversal macros
  35. #define forall(i,a,b)               for(ll i=a;i<b;i++)
  36. #define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
  37. #define all(a)                      a.begin(), a.end()
  38. #define in(a,b)                     ( (b).find(a) != (b).end())
  39. #define pb                          push_back
  40. #define fill(a,v)                    memset(a, v, sizeof a)
  41. #define sz(a)                       ((ll)(a.size()))
  42.  
  43. // Some common useful functions
  44. #define miN(a,b)                     ( (a) < (b) ? (a) : (b))
  45. #define maX(a,b)                     ( (a) > (b) ? (a) : (b))
  46.  
  47. #define ll long long int
  48. #define llu long long unsigned
  49. #define ld long
  50. #define INF 2000000001
  51. #define mod 1000000009
  52.  
  53.  #define llu long long unsigned
  54. #define ld long
  55.  
  56.  
  57. int main()
  58. {
  59.         FILE *fp=fopen("test.txt","w+");
  60.         fprintf(fp,"100000 99999\n");
  61.         for(int i=1;i<=100000;i++)
  62.         {
  63.                 if(2*i <= 100000)
  64.                 {
  65.                         fprintf(fp,"%d %d 1000000000\n",i,2*i);
  66.                 }
  67.                 if(2*i+1 <= 100000)
  68.                 {
  69.                         fprintf(fp,"%d %d 1000000000\n",i,2*i+1);
  70.                 }
  71.         }
  72.         fprintf(fp,"200000\n");
  73.         for(int i=1;i<=200000;i++)
  74.         {
  75.                 int val=rand()%99999+1;
  76.                 int val1=rand()%99999+1;
  77.                 if(val == val1)
  78.                 val1++;
  79.                 fprintf(fp,"0 %d %d\n",val,val1);
  80.         }
  81. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top