結果

問題 No.565 回転拡大
ユーザー autumn-eelautumn-eel
提出日時 2017-09-08 23:39:20
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 806 bytes
コンパイル時間 1,426 ms
コンパイル使用メモリ 168,932 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-07 08:35:51
合計ジャッジ時間 2,583 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 1 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

char s[200][200];
char t[200][200];
vector<char>a[200],b[200];
int main() {
	int r,k;scanf("%d%d",&r,&k);
	int h,w;scanf("%d%d",&h,&w);
	rep(i,h)scanf("%s",s[i]);
	//拡大
	rep(i,h*k)rep(j,w*k){
		a[i].push_back(s[i/k][j/k]);
		b[j].push_back(s[i/k][j/k]);
	}
	//回転
	if(r==0){
		rep(i,h*k){
			rep(j,w*k)printf("%c",a[i][j]);
			puts("");
		}
	}
	if(r==90){
		rep(i,w*k){
			reverse(b[i].begin(),b[i].end());
		}
		rep(i,w*k){
			rep(j,h*k)printf("%c",b[i][j]);
			puts("");
		}
	}
	if(r==180){
		rep(i,h*k){
			reverse(a[i].begin(),a[i].end());
		}
		rep(i,h*k){
			rep(j,w*k)printf("%c",a[h*k-i-1][j]);
			puts("");
		}
	}
	if(r==270){
		rep(i,w*k){
			rep(j,h*k)printf("%c",b[w*k-i-1][j]);
			puts("");
		}
	}
}
0