結果

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

ソースコード

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=h*k-1;j>=0;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-1;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