fork download
  1. /*----<Bồ tác phù hộ code không bị bug>--------
  2.   _oo0oo_
  3.   o8888888o
  4.   88" . "88
  5.   (| -_- |)
  6.   0\ = /0
  7.   ___/`---'\___
  8.   .' \| |// '.
  9.   / \||| : |||// \
  10.   / _||||| -:- |||||- \
  11.   | | \ - /// | |
  12.   | \_| ''\---/'' |_/ |
  13.   \ .-\__ '-' ___/-. /
  14.   ___'. .' /--.--\ `. .'___
  15.   ."" '< `.___\_<|>_/___.' >' "".
  16.  | | : `- \`.;`\ _ /`;.`/ - ` : | |
  17.  \ \ `_. \_ __\ /__ _/ .-` / /
  18. =====`-.____`.___ \_____/___.-`___.-'=====
  19.   `=---='
  20. ------------------<>-------------------------*/
  21.  
  22. #include <bits/stdc++.h>
  23.  
  24. #define int long long
  25. #define fi first
  26. #define se second
  27. #define all(x) x.begin(), x.end()
  28. #define rall(x) x.rbegin(), x.rend()
  29. #define fr(x, l, r) for (int x = l; x < r; x++)
  30. #define frr(x, l, r) for (int x = l; x <= r; x++)
  31. #define fd(x, l, r) for (int x = l; x >= r; x--)
  32. #define cs const
  33. #define TIME (1.0*clock() / CLOCKS_PER_SEC)
  34. #define RUNTIME cerr << "\n" << "Runtime: " << TIME << "s\n";
  35. #define Fastio ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
  36.  
  37. typedef double db;
  38. typedef std::string str;
  39. typedef std::vector<int> vi;
  40. typedef std::greater<int> gi;
  41. typedef std::map<int, int> mii;
  42. typedef std::pair<int, int> ii;
  43.  
  44. cs int N = 1e6 + 5;
  45. cs int oo = 1e18;
  46.  
  47. using namespace std;
  48.  
  49. signed main(){
  50. Fastio;
  51. int n; cin >> n;
  52. vector<vector<int>> a(n,vector<int>(n));
  53. for (int i = 0; i < n; i++){
  54. for (int j = 0; j < n; j++){
  55. cin >> a[i][j];
  56. }
  57. }
  58. vi b(n);
  59. for (int i = 0; i < n; i++) b[i] = sqrt(a[i][i]);
  60. for (int i = 0; i < n; i++) cout << b[i] << " ";
  61. RUNTIME;
  62. return 0;
  63. }
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
0 
stderr
Runtime: 0.005255s