Advertisement
Hamoudi30

Untitled

Jul 16th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.13 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #include <ext/pb_ds/assoc_container.hpp>
  3. #include <ext/pb_ds/detail/standard_policies.hpp>
  4. using namespace std;
  5. using namespace __gnu_pbds;
  6. template<typename T>
  7. using indexed_set [[maybe_unused]] = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
  8. #define ll long long
  9. #define pb push_back
  10. #define SZ(v) ((int)((v).size()))
  11. #define UNIQUE(v) sort(all(v));v.erase(unique(all(v)),v.end());
  12. const int N = 70;
  13. int a[N][N];
  14. void run () {
  15.     int n;
  16.     cin >> n;
  17.     int pos = 0;
  18.     for (int i = 1; i <= n; ++i) {
  19.         for (int j = 1; j <= n; ++j) {
  20.             cin >> a[i][j];
  21.             if (a[i][j] == n - 1)
  22.                 pos = j;
  23.         }
  24.     }
  25.     for (int i = 1; i <= n; ++i) {
  26.         if (i != pos) {
  27.             cout << a[pos][i] << " ";
  28.         } else {
  29.             cout << n << " ";
  30.         }
  31.     }
  32. }
  33. int main () {
  34.     ios_base::sync_with_stdio(false);
  35.     cin.tie(nullptr);
  36.     cout.tie(nullptr);
  37. //    freopen("/home/hamoudi/clion/hello.in", "rt", stdin);
  38.     int tt;
  39.     tt = 1;
  40. //    cin >> tt;
  41.     while (tt--)
  42.         run();
  43. }
  44. /*
  45.  
  46.  */
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement