結果

問題 No.565 回転拡大
ユーザー dnishdnish
提出日時 2017-09-08 22:57:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 645 bytes
コンパイル時間 1,551 ms
コンパイル使用メモリ 166,836 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 06:36:01
合計ジャッジ時間 2,565 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=n;i--)
#define p(s) cout<<(s)<<endl
typedef long long ll;
using namespace std;
const int inf = 1e9 + 7;

int R,K,H,W;
char C[11][11];
char ans[11][11];
int main() {
	cin>>R>>K>>H>>W;
	REP(i,0,H) REP(j,0,W){
			cin>>C[i][j];
	}
	REP(i,0,H) REP(j,0,W){
		if(R==0) ans[i][j]=C[i][j];
		else if(R==270) ans[W-j-1][i]=C[i][j];
		else if(R==180) ans[H-i-1][W-j-1]=C[i][j];
		else if(R==90) ans[j][H-i-1]=C[i][j];
	}
	if(R==90||R==270) swap(H,W);
	REP(i,0,H) REP(k,0,K){
		REP(j,0,W) REP(kk,0,K){
			cout<<ans[i][j];
		}
		cout<<endl;
	}
	return 0;
}
0