fork download
  1. #include "mining.h"
  2.  
  3. #include <bits/stdc++.h>
  4.  
  5. using namespace std;
  6.  
  7. typedef long long ll;
  8. typedef complex<double> point;
  9. #define mapii map<int, int>
  10. #define debug(a) cout << #a << ": " << a << endl
  11. #define debuga1(a, l, r) fto(i, l, r) cout << a[i] << " "; cout << endl
  12. #define fdto(i, r, l) for(int i = (r); i >= (l); --i)
  13. #define fto(i, l, r) for(int i = (l); i <= (r); ++i)
  14. #define forit(it, var) for(__typeof(var.begin()) it = var.begin(); it != var.end(); it++)
  15. #define forrit(rit, var) for(__typeof(var.rbegin()) rit = var.rbegin(); rit != var.rend(); rit++)
  16. #define ii pair<int, int>
  17. #define iii pair<int, ii>
  18. #define ff first
  19. #define ss second
  20. #define mp make_pair
  21. #define pb push_back
  22. #define maxN 250005
  23. #define MOD 1000
  24. #define oo 1000000000000000007LL
  25. #define sz(a) (int)a.size()
  26.  
  27. const double PI = acos(-1.0);
  28.  
  29. double fRand(double fMin, double fMax)
  30. {
  31. double f = (double)rand() / RAND_MAX;
  32. return fMin + f * (fMax - fMin);
  33. }
  34.  
  35. template <class T>
  36. T min(T a, T b, T c) {
  37. return min(a, min(b, c));
  38. }
  39.  
  40. template <class T>
  41. T max(T a, T b, T c) {
  42. return max(a, max(b, c));
  43. }
  44.  
  45. int sqr(int x) {return x*x;}
  46.  
  47. bool isSqr(int x) {
  48. int y = sqrt(x);
  49. return (y*y == x);
  50. }
  51.  
  52. void findGold() {
  53. // answer(2, 4);
  54. int maxX = 1000;
  55. vector<bool> res(maxX+1, false);
  56.  
  57. int cntInteger = 0;
  58. fto(x, 1, maxX) {
  59. res[x] = isIntegerDistance(x, x);
  60. if (res[x]) ++cntInteger;
  61. }
  62.  
  63. fto(x, 1, maxX) {
  64. fto(y, 1, maxX) {
  65. if (res[x] && res[y]) {
  66. bool ok = true;
  67. fto(z, 1, maxX) {
  68. if (isSqr(sqr(x-z) + sqr(y-z))^res[z]) {
  69. ok = false;
  70. break;
  71. }
  72. }
  73. if (ok) {
  74. if (isIntegerDistance(x, y))
  75. answer(x, y);
  76. else
  77. answer(y, x);
  78. return;
  79. }
  80. }
  81. }
  82. }
  83. }
  84.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:10: fatal error: 'mining.h' file not found
#include "mining.h"
         ^~~~~~~~~~
1 error generated.
stdout
Standard output is empty