fork download
  1. #pragma GCC optimize ("Ofast")
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. template<class T> inline T GCD_L(T a,T b){
  5. T r;
  6. while(a){
  7. r=b;
  8. b=a;
  9. a=r%a;
  10. }
  11. return b;
  12. }
  13. #define main dummy_main
  14. int main(){
  15. return 0;
  16. }
  17. #undef main
  18. class Solution{
  19. public:
  20. bool isGoodArray(vector<int>& nums){
  21. int Lj4PdHRW;
  22. int KL2GvlyY;
  23. if(nums.size()==0){
  24. KL2GvlyY = 0;
  25. }
  26. else{
  27. KL2GvlyY = nums[0];
  28. for(Lj4PdHRW=(1);Lj4PdHRW<(nums.size());Lj4PdHRW++){
  29. KL2GvlyY = GCD_L(KL2GvlyY, nums[Lj4PdHRW]);
  30. }
  31. }
  32. if(KL2GvlyY==1){
  33. return true;
  34. }
  35. return false;
  36. }
  37. }
  38. ;
  39. // cLay varsion 20191102-1
  40.  
  41. // --- original code ---
  42. // #define main dummy_main
  43. // {}
  44. // #undef main
  45. //
  46. // class Solution {
  47. // public:
  48. // bool isGoodArray(vector<int>& nums) {
  49. // if(gcd(nums(nums.size()))==1) return true;
  50. // return false;
  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