fork(2) download
  1. #include<bits/stdc++.h>
  2. #include "testlib.h"
  3. #define all(v) (v).begin(),(v).end()
  4. #define pb push_back
  5. #define ppb pop_back
  6. #define mp make_pair
  7. #define ri(x) scanf("%d",&(x))
  8. #define ri2(x,y) scanf("%d %d",&(x),&(y))
  9. #define ri3(x,y,z) scanf("%d %d %d",&(x),&(y),&(z))
  10. #define rll(x) scanf("%lld",&(x))
  11. #define rll2(x,y) scanf("%lld %lld",&(x),&(y))
  12. #define rll3(x,y,z) scanf("%lld %lld %lld",&(x),&(y),&(z))
  13. #define gc(x) ((x) = getchar())
  14. using namespace::std;
  15.  
  16. const long double PI = acos(-1);
  17. const long long MOD = 1000000000 +7;
  18.  
  19. typedef long long ll;
  20. typedef pair<ll,ll> pll;
  21. typedef pair<ll,pll> tll;
  22. typedef pair<int,int> ii;
  23. typedef pair<int,ii> iii;
  24. typedef vector<int> vi;
  25. typedef vector<ii> vii;
  26. typedef vector<iii> viii;
  27. typedef vector<ll> vll;
  28. typedef vector<pll> vpll;
  29. typedef vector<tll> vtll;
  30. typedef vector<string> vs;
  31. typedef set<int> si;
  32. typedef set<ii> sii;
  33. typedef set<iii> siii;
  34.  
  35. ll gcd(ll a, ll b){ return b==0?a:gcd(b,a%b);}
  36.  
  37. ll add(ll a, ll b, ll m = MOD){
  38. if(a >= m) a %= m;
  39. if(b >= m) b %= m;
  40. if(a < 0) a += m;
  41. if(b < 0) b += m;
  42. ll res = a+b;
  43. if(res >= m or res <= -m) res %= m;
  44. if(res < 0) res += m;
  45. return res;
  46. }
  47.  
  48. ll mul(ll a, ll b, ll m = MOD){
  49. if(a >= m) a %= m;
  50. if(b >= m) b %= m;
  51. if(a < 0) a += m;
  52. if(b < 0) b += m;
  53. ll res = a*b;
  54. if(res >= m or res <= -m) res %= m;
  55. if(res < 0) res += m;
  56. return res;
  57. }
  58.  
  59. ll pow_mod(ll a, ll b, ll m = MOD){
  60. ll res = 1LL;
  61. a = a%m;
  62. while(b){
  63. if(b&1) res = mul(res,a,m);
  64. b >>= 1;
  65. a = mul(a,a,m);
  66. }
  67. return res;
  68. }
  69.  
  70. ll fastexp(ll a, ll b){
  71. ll res = 1LL;
  72. while(b){
  73. if(b&1) res = res*a;
  74. b >>= 1;
  75. a *= a;
  76. }
  77. return res;
  78. }
  79.  
  80. int gcdExtendido(int a, int b, int *x, int *y){
  81. if(a == 0){
  82. *x = 0;
  83. *y = 1;
  84. return b;
  85. }
  86. int x1, y1;
  87. int gcd = gcdExtendido(b%a,a,&x1,&y1);
  88.  
  89. *x = y1-(b/a)*x1;
  90. *y = x1;
  91. return gcd;
  92. }
  93.  
  94. int modInverso(int a, int m){
  95. int x, y;
  96. int g = gcdExtendido(a,m,&x,&y);
  97. if(g!=1) return -1;
  98. else return (x%m + m)%m;
  99. }
  100.  
  101. /****************************************
  102. *************P*L*A*N*T*I*L*L*A************
  103. *****************************************/
  104.  
  105. int main(int argc, char* argv[]){ // You need to include "testlib.h" and download it.
  106. registerTestlibCmd(argc,argv); // Initialization of the checker streams
  107. long long jans = ans.readLong(); // Answer output
  108. long long pans = ouf.readLong(); // Participant output
  109. if(jans != pans) quitf(_wa, "Wrong answer. Expected %lld, found %lld",jans,pans); // Checking the correctness
  110. quitf(_ok,"Accepted"); // No problem -> AC
  111. return 0;
  112. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:10: fatal error: testlib.h: No such file or directory
 #include "testlib.h"
          ^~~~~~~~~~~
compilation terminated.
stdout
Standard output is empty