結果

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

ソースコード

diff #

#include <iostream>
#include <math.h>
#include <cstdio>
#include <algorithm>
#include <string>
#include <string.h>
using namespace std;

const int MAX_N=100;
int r,k,h,v;

int main(){
	cin >> r >> k >> h >> v;
	string s[h];
	string w[h*k];
	
	for(int i=0;i<h;i++){
		cin >> s[i];
		for(int j=0;j<s[i].length();j++) for(int l=0;l<k;l++) w[i*k].push_back(s[i][j]);
		for(int j=i*k;j<(i+1)*k;j++) w[j]=w[i*k];
	}
	
	if(r==0){
		for(int i=0;i<h*k;i++) cout << w[i] << endl;
	}else if(r==90){
		for(int i=0;i<v*k;i++){
			for(int j=0;j<h*k;j++){
				cout << w[j][i];
			}
			cout << endl;
		}
	}else if(r==180){
		for(int i=h*k-1;i>=0;i--){
			for(int j=v*k;j>=0;j--){
				cout << w[i][j];
			}
			cout << endl;
		}
	}else if(r==270){
		for(int i=v*k-1;i>=0;i--){
			for(int j=h*k-1;j>=0;j--){
				cout << w[j][i];
			}
			cout << endl;
		}
	}
	
	return 0;
}
0