結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-12 03:51:42 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 784 bytes |
| 記録 | |
| コンパイル時間 | 3,275 ms |
| コンパイル使用メモリ | 341,920 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-12 03:51:46 |
| 合計ジャッジ時間 | 3,962 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define endl "\n"
signed main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n,w,h;cin>>n>>w>>h;
string s;cin>>s;
vector<vector<char>> g(h,vector<char>(w,'x'));
vector<int> v(w,0);
int x=0,c=0;
for(int i=0;i<n;i++){
if(s[i]=='l'){
v[x] = c;
x++;
c=0;
}else if(s[i]=='o'){
c++;
}
}
v[x] = c;
for(int j=0;j<w;j++){
for(int i=h-1;i>=0;i--){
if(v[j]>0){
g[i][j] = 'o';
v[j]--;
}else break;
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cout<<g[i][j];
}
cout<<endl;
}
}