fork download
  1. #pragma GCC optimize ("Ofast")
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. template<class T1, class T2, class T3> inline T1 Kth1_L(const T1 a, const T2 b, const T3 c){
  5. if(a <= b){
  6. if(b <= c){
  7. return b;
  8. }
  9. if(c <= a){
  10. return a;
  11. }
  12. return c;
  13. }
  14. if(a <= c){
  15. return a;
  16. }
  17. if(c <= b){
  18. return b;
  19. }
  20. return c;
  21. }
  22. template<class T> inline T pow2_L(T a){
  23. return a*a;
  24. }
  25. #define main dummy_main
  26. int main(){
  27. return 0;
  28. }
  29. #undef main
  30. class Solution{
  31. public:
  32. bool checkOverlap(int r, int cx, int cy, int x1, int y1, int x2, int y2){
  33. int x =Kth1_L(x1,x2,cx);
  34. int y =Kth1_L(y1,y2,cy);
  35. return (pow2_L((x-cx))+pow2_L((y-cy))<=pow2_L(r));
  36. }
  37. }
  38. ;
  39. // cLay varsion 20200408-1
  40.  
  41. // --- original code ---
  42. // #define main dummy_main
  43. // {}
  44. // #undef main
  45. //
  46. // class Solution {
  47. // public:
  48. // bool checkOverlap(int r, int cx, int cy, int x1, int y1, int x2, int y2) {
  49. // int x = Kth1(x1,x2,cx), y = Kth1(y1,y2,cy);
  50. // return ((x-cx)**2 + (y-cy)**2 <= r**2);
  51. // }
  52. // };
  53.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty