結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
ZeriToki
|
| 提出日時 | 2026-01-11 13:36:40 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 717 bytes |
| 記録 | |
| コンパイル時間 | 1,705 ms |
| コンパイル使用メモリ | 213,824 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 14:00:50 |
| 合計ジャッジ時間 | 2,274 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long mod=998244353;
const long long mod2=469762049;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
int N,W,H;
cin>>N>>W>>H;
string S;
cin>>S;
char ans[H+1][W+1];
for(int i=1;i<=H;i++){
for(int j=1;j<=W;j++) ans[i][j]='x';
}
int r=H,c=1;
for(int i=0;i<N;i++){
if(S[i]=='o'){
ans[r][c]='o';
r--;
}
else{
r=H;
c++;
}
}
for(int i=1;i<=H;i++){
for(int j=1;j<=W;j++){
cout<<ans[i][j];
}
cout<<endl;
}
}
ZeriToki