結果

問題 No.3420 Letter Loading
コンテスト
ユーザー besukohu
提出日時 2026-01-11 15:25:26
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 1,038 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,273 ms
コンパイル使用メモリ 339,260 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-11 15:25:31
合計ジャッジ時間 4,348 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using a2 = array<ll, 2>;
using a3 = array<ll, 3>;

bool chmin(auto& a, const auto& b) { return a > b ? a = b, 1 : 0; }
bool chmax(auto& a, const auto& b) { return a < b ? a = b, 1 : 0; }

ll mod = 998244353;
const ll INF = 1e18;

ifstream in;
ofstream out;

int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);

    if(argc > 2) {
        in.open(argv[1]);
        cin.rdbuf(in.rdbuf());
        out.open(argv[2]);
        cout.rdbuf(out.rdbuf());
    }

    ll n, w, h;
    cin >> n >> w >> h;
    string s;
    cin >> s;
    vector<ll> idx(1, -1);
    for(int i = 0; i < n; i++) {
        if(s[i] == 'l') {
            idx.push_back(i);
        }
    }
    idx.push_back(n);
    for(int i = 0; i < h; i++) {
        for(int j = 0; j < w; j++) {
            if(h - i < idx[j + 1] - idx[j]) {
                cout << 'o';
            } else {
                cout << 'x';
            }
        }
        cout << endl;
    }

    return 0;
}
0