結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2026-01-11 17:21:44 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 645 bytes |
| 記録 | |
| コンパイル時間 | 404 ms |
| コンパイル使用メモリ | 54,260 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 17:21:56 |
| 合計ジャッジ時間 | 907 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 3420.cc: No.3420 Letter Loading - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 2549;
const int MAX_W = 50;
const int MAX_H = 50;
/* typedef */
/* global variables */
char s[MAX_N + 4];
char fs[MAX_H][MAX_W + 4];
/* subroutines */
/* main */
int main() {
int n, w, h;
scanf("%d%d%d%s", &n, &w, &h, s);
for (int i = 0; i < h; i++) fill(fs[i], fs[i] + w, 'x');
for (int i = 0, y = 0, x = 0; i < n; i++) {
if (s[i] == 'o') fs[y++][x] = 'o';
else x++, y = 0;
}
for (int i = h - 1; i >= 0; i--) puts(fs[i]);
return 0;
}
tnakao0123