結果
| 問題 | No.565 回転拡大 | 
| コンテスト | |
| ユーザー |  beet | 
| 提出日時 | 2018-07-27 15:40:22 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 756 bytes | 
| コンパイル時間 | 1,705 ms | 
| コンパイル使用メモリ | 173,196 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-01 03:31:36 | 
| 合計ジャッジ時間 | 2,909 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
//INSERT ABOVE HERE
signed main(){
  auto expand=
    [&](vector<string> s,Int k){
      Int h=s.size(),w=s[0].size();
      vector<string> res(h*k,string(w*k,'#'));
      for(Int i=0;i<h*k;i++)
	for(Int j=0;j<w*k;j++)
	  res[i][j]=s[i/k][j/k];
      return res;
    };
  auto rot=
    [&](vector<string> s){
      Int h=s.size(),w=s[0].size();
      vector<string> res(w,string(h,'#'));
      for(Int i=0;i<h;i++)
	for(Int j=0;j<w;j++)
	  res[j][i]=s[h-(i+1)][j];
      return res;      
    };
  Int r,k,h,w;
  cin>>r>>k>>h>>w;  
  vector<string> s(h);
  for(Int i=0;i<h;i++) cin>>s[i];
  s=expand(s,k);
  for(Int i=0;i<r;i+=90) s=rot(s);
  for(string x:s) cout<<x<<endl;
  return 0;
}
            
            
            
        