fork download
  1. #include <bits/stdc++.h>
  2. #define endl '\n'
  3.  
  4. //#pragma GCC optimize ("O3")
  5. //#pragma GCC target ("sse4")
  6.  
  7. using namespace std;
  8. template<class T, class T2> inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; }
  9. template<class T, class T2> inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; }
  10. const int MAXN = (1 << 20);
  11.  
  12. int n;
  13. int a[MAXN];
  14.  
  15. void read()
  16. {
  17. cin >> n;
  18. for(int i = 0; i < n; i++)
  19. cin >> a[i];
  20. }
  21.  
  22. void solve()
  23. {
  24. for(int i = 0; i < n; i++)
  25. for(int j = 0; j < n; j++)
  26. cout << a[i] * a[j] << " \n"[j == n - 1];
  27. }
  28.  
  29. int main()
  30. {
  31. ios_base::sync_with_stdio(false);
  32. cin.tie(NULL);
  33.  
  34. read();
  35. solve();
  36. return 0;
  37. }
  38.  
  39.  
Success #stdin #stdout 0s 19328KB
stdin
Standard input is empty
stdout
Standard output is empty