結果

問題 No.3848 Max Under Cyclic Shifts
コンテスト
ユーザー roastnegi
提出日時 2026-12-04 23:45:40
言語 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  
実行時間 48 ms / 2,000 ms
+ 330µs
コード長 997 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,497 ms
コンパイル使用メモリ 360,548 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2026-12-04 23:45:49
合計ジャッジ時間 7,531 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using sl = set<ll>;
using pl = pair<ll, ll>;
#define MOD 998244353
#define MOD2 1000000007
#define INF 1e18
#define all(v) v.begin(), v.end()
#define SORT(v) sort(v.begin(), v.end())
#define RSORT(v) sort(v.rbegin(), v.rend())
#define REVERSE(v) reverse(v.begin(), v.end())
#define YESNO(b) cout << ((b) ? "Yes" : "No") << endl
#define DOUT(a, b) cout << fixed << setprecision(b) << a << endl;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, -1, 0, 1};


template <typename T>
void debug_out(const vector<T> &x){
    for(auto &y : x) cerr << y << " ";
    cerr << endl;
}


int main(void){
    int n, k;
    cin >> n >> k;
    vs a(n);
    string rt(k, '9');
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        for (int j = 0; j < k; j++)
        {
            rt[j] = min(rt[j], a[i][j]);
        }
        
    }
    cout << rt << endl;
    
}
0