結果

問題 No.3848 Max Under Cyclic Shifts
コンテスト
ユーザー dayo ZOI
提出日時 2026-12-04 21:46:52
言語 C++23(gcc16)
(gcc 16.2.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc16.so -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 12 ms / 2,000 ms
+ 246µs
コード長 1,237 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,559 ms
コンパイル使用メモリ 361,276 KB
実行使用メモリ 9,924 KB
最終ジャッジ日時 2026-12-04 21:47:00
合計ジャッジ時間 7,750 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <csetjmp>
using namespace std;
using ll = long long;
using ld = long double;
using pll = array<ll, 2>;
using vl = vector<ll>;
template <class T> using vec = vector<T>;
template <class T> using vv = vec<vec<T>>;
template <class T> using vvv = vv<vec<T>>;
template <class T> using minpq = priority_queue<T, vector<T>, greater<T>>;
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define reps(i, l, r) for (ll i = (l); i < (r); ++i)
#define rrep(i, l, r) for (ll i = (r) - 1; i >= (l); --i)
#define sz(x) (ll)(x).size()
template <typename T> bool chmax(T &a, const T &b) {
  return a < b ? a = b, true : false;
}
template <typename T> bool chmin(T &a, const T &b) {
  return a > b ? a = b, true : false;
}

const ll INF = 1LL << 60;

using ull = unsigned long long;
using ulll = __uint128_t;

void solve() {
  ll n, k;
  cin >> n >> k;
  vec<string> a(n);
  rep(i, n) cin >> a[i];
  string ans(k, '9');
  rep(i, n) {
    rep(j, k) {
      chmin(ans[j], a[i][j]);
    }
  }
  cout << ans << endl;
}

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);

  int t = 1;
  // cin >> t;
  while (t--) {
    solve();
  }
}
0