結果
| 問題 |
No.565 回転拡大
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-08 23:14:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 856 bytes |
| コンパイル時間 | 1,074 ms |
| コンパイル使用メモリ | 73,772 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 06:16:00 |
| 合計ジャッジ時間 | 2,081 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#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=0;j<h*k;j++){
cout << w[j][i];
}
cout << endl;
}
}
return 0;
}