fork download
  1. #pragma GCC optimize("Ofast")
  2. #pragma GCC optimize("unroll-loops")
  3. #pragma GCC optimize("inline")
  4. #include<bits/stdc++.h>
  5. using namespace std;
  6. template<class T> vector<vector<T>> Rot90(vector<vector<T>> a){
  7. int i;
  8. int j;
  9. int x;
  10. int y;
  11. x = a.size();
  12. y = a[0].size();
  13. vector<vector<T>> b(y, vector<T>(x));
  14. for(i=(0);i<(x);i++){
  15. for(j=(0);j<(y);j++){
  16. b[j][x-1-i] = a[i][j];
  17. }
  18. }
  19. return b;
  20. }
  21. #define main dummy_main
  22. int main(){
  23. return 0;
  24. }
  25. #undef main
  26. class Solution{
  27. public:
  28. bool findRotation(vector<vector<int>>& mat, vector<vector<int>>& target){
  29. int Lj4PdHRW;
  30. for(Lj4PdHRW=(0);Lj4PdHRW<(4);Lj4PdHRW++){
  31. if(mat==target){
  32. return true;
  33. }
  34. mat = Rot90(mat);
  35. }
  36. return false;
  37. }
  38. }
  39. ;
  40. // cLay version 20210607-1
  41.  
  42. // --- original code ---
  43. // #define main dummy_main
  44. // {}
  45. // #undef main
  46. //
  47. // class Solution {
  48. // public:
  49. // bool findRotation(vector<vector<int>>& mat, vector<vector<int>>& target) {
  50. // rep(4){
  51. // if(mat==target) return true;
  52. // mat = Rot90(mat);
  53. // }
  54. // return false;
  55. // }
  56. // };
  57.  
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