結果
| 問題 | No.565 回転拡大 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-24 00:04:45 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 29µs | |
| コード長 | 770 bytes |
| 記録 | |
| コンパイル時間 | 2,526 ms |
| コンパイル使用メモリ | 182,860 KB |
| 実行使用メモリ | 9,844 KB |
| 最終ジャッジ日時 | 2026-10-24 00:04:57 |
| 合計ジャッジ時間 | 4,571 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 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;
}