結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2026-01-11 13:35:56 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 820 bytes |
| 記録 | |
| コンパイル時間 | 777 ms |
| コンパイル使用メモリ | 109,340 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 14:00:22 |
| 合計ジャッジ時間 | 1,246 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <atcoder/modint>
#define rep(i, n) for(i = 0; i < n; i++)
#define int long long
using namespace std;
using namespace atcoder;
using mint = modint998244353;
int n, w, h;
string s;
bool used[100][100];
signed main() {
int i, j;
cin >> n >> w >> h >> s;
vector<int> hs;
int x = 0;
rep(i, n) {
if (s[i] == 'o') { x++; }
else { hs.push_back(x); x = 0; }
}
hs.push_back(x);
rep(i, hs.size()) {
rep(j, hs[i]) {
used[h - 1 - j][i] = true;
}
}
rep(i, h) {
rep(j, w) {
if (used[i][j]) cout << "o";
else cout << "x";
}
cout << endl;
}
return 0;
}
startcpp