結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 13:36:34 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 606 bytes |
| 記録 | |
| コンパイル時間 | 2,954 ms |
| コンパイル使用メモリ | 339,660 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 14:00:48 |
| 合計ジャッジ時間 | 3,826 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, w, h;
cin >> n >> w >> h;
string s;
cin >> s;
vector<int> a(w);
for(int i = 0, cur = 0; i < n && cur < w; ){
int p = i;
while(i < n && s[i] == s[p]) i++;
if(s[p] == 'o') a[cur] = i - p;
else cur += i - p;
}
vector<string> ans(h, string(w, 'x'));
for(int x = 0; x < w; x++){
for(int y = 0; y < h && y < a[x]; y++){
ans[h - 1 - y][x] = 'o';
}
}
for(auto &&str : ans) cout << str << '\n';
}