結果

問題 No.565 回転拡大
ユーザー iwashi31iwashi31
提出日時 2017-09-08 22:29:34
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,581 bytes
コンパイル時間 782 ms
コンパイル使用メモリ 87,912 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 21:10:58
合計ジャッジ時間 1,440 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>

#define int long long
#define MOD7 1000000007
#define MOD9 1000000009

#define rep(i, n) for (int i = 0; i < (n); i++)
#define itrep(i, a) for (auto i = (a).begin(); i != (a).end(); i++)
#define REP(i, a, n) for (int i = (a); i <= (n); i++)
#define all(a) (a).begin(), (a).end()

using namespace std;

int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, -1, 0, 1 };

template<class T> void inputVector(vector<T>& v, int n) {
    v.resize(n);
    for (int i = 0; i < v.size(); i++) cin >> v[i];
}

signed main() {
	int R, K, H, W;
	cin >> R >> K >> H >> W;

	vector<string> board;
	inputVector(board, H);

	vector<string> aboard;

	if (R == 0) {
		rep(y, H) {
			rep(i, K) {
				rep(x, W) {
					rep(j, K) {
						cout << board[y][x];
					}
				}
				cout << endl;
			}
		}
	} else if (R == 90) {
		rep(x, W) {
			rep(i, K) {
				rep(y, H) {
					rep(j, K) {
						cout << board[H - y - 1][x];
					}
				}
				cout << endl;
			}
		}
	} else if (R == 180) {
		rep(y, H) {
			rep(i, K) {
				rep(x, W) {
					rep(j, K) {
						cout << board[H - y - 1][W - x - 1];
					}
				}
				cout << endl;
			}
		}
	} else {
		rep(x, W) {
			rep(i, K) {
				rep(y, H) {
					rep(j, K) {
						cout << board[y][W - x - 1];
					}
				}
				cout << endl;
			}
		}
	}

    return 0;
}
0