結果
| 問題 | No.565 回転拡大 |
| コンテスト | |
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2018-08-03 18:27:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,143 bytes |
| 記録 | |
| コンパイル時間 | 993 ms |
| コンパイル使用メモリ | 102,580 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-19 17:26:17 |
| 合計ジャッジ時間 | 2,032 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <unordered_map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
vector<string> rotate( vector<string> s ) {
vector<string> ret;
for ( int x = 0; x < s[0].size(); x++ ) {
string t = "";
for ( int y = s.size()-1; y >= 0; y-- ) {
t += s[y][x];
}
ret.push_back(t);
}
return ret;
}
int main() {
int R,K,H,W;
cin >> R >> K >> H >> W;
vector<string> S(H);
for ( int i = 0; i < H; i++ ) {
cin >> S[i];
}
vector<string> r;
r = S;
for ( int i = 0; i < R/90; i++ ) {
r = rotate(r);
}
// for ( int y = 0; y < r.size(); y++ ) {
// cout << r[y] << endl;
// }
for ( int y = 0; y < r.size()*K; y++ ) {
string t = "";
for ( int x = 0; x < r[0].size()*K; x++ ) {
t += r[y/K][x/K];
}
cout << t << endl;
}
return 0;
}
tetsuzuki1115