fork download
  1. #pragma GCC optimize ("Ofast")
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. template<class S, class T> inline S min_L(S a,T b){
  5. return a<=b?a:b;
  6. }
  7. #define main dummy_main
  8. int main(){
  9. return 0;
  10. }
  11. #undef main
  12. class Solution{
  13. public:
  14. vector<vector<int>> restoreMatrix(vector<int>& row, vector<int>& col){
  15. int i;
  16. int x = row.size();
  17. int y = col.size();
  18. vector<vector<int>> res(x,vector<int>(y));
  19. for(i=(0);i<(x);i++){
  20. int j;
  21. for(j=(0);j<(y);j++){
  22. res[i][j] =min_L(row[i], col[j]);
  23. {
  24. auto RZTsC2BF = (res[i][j]);
  25. row[i] -= RZTsC2BF;
  26. col[j] -= RZTsC2BF;
  27. }
  28. }
  29. }
  30. return res;
  31. }
  32. }
  33. ;
  34. // cLay version 20201121-1
  35.  
  36. // --- original code ---
  37. // #define main dummy_main
  38. // {}
  39. // #undef main
  40. //
  41. // class Solution {
  42. // public:
  43. // vector<vector<int>> restoreMatrix(vector<int>& row, vector<int>& col) {
  44. // int x = row.size(), y = col.size();
  45. // vector<vector<int>> res(x,vector<int>(y));
  46. // rep(i,x) rep(j,y){
  47. // res[i][j] = min(row[i], col[j]);
  48. // (row[i], col[j]) -= res[i][j];
  49. // }
  50. // return res;
  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