結果
| 問題 | No.565 回転拡大 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-23 23:52:42 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 768 bytes |
| 記録 | |
| コンパイル時間 | 3,329 ms |
| コンパイル使用メモリ | 185,072 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-10-23 23:52:49 |
| 合計ジャッジ時間 | 4,506 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 30 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using ll = long long;
vector<string> rot(vector<string> p){
int h=p.size(), w=p[0].size();
swap(h, w);
vector<string> ans(h, string(w, '.'));
for(int i=0; i<h; i++)for(int j=0; j<w; j++) ans[i][j]=p[w-1-j][i];
return ans;
}
int main(void){
int r, k, h, w; cin >> r >> k >> h >> w;
vector<string> s(h);
for(auto&x:s) cin >> x;
int c=r/90;
for(int i=0; i<c; i++){
swap(h, w);
s=rot(s);
}
for(auto p:s) cout << p << '\n';
vector ans(h*k, string(w*k, '.'));
for(int i=0; i<h; i++)for(int j=0; j<w; j++){
int si=k*i, sj=k*j;
for(int p=0; p<k; p++)for(int q=0; q<k; q++) ans[si+p][sj+q]=s[i][j];
}
for(auto p:ans) cout << p << '\n';
return 0;
}