結果

問題 No.565 回転拡大
ユーザー mikan765mikan765
提出日時 2017-09-08 22:53:41
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,331 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 78,152 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-08-07 03:09:32
合計ジャッジ時間 1,861 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <string>
#include <list>
#include <vector>
#include <algorithm>

#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout << (p) << endl;//print
typedef long long ll;
using namespace std;


int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    
    int r,k,h,w;
    cin >> r >> k >> h >> w;
    string data[10][10];
    if(r==0){
        rep(i,h){
            string a;
            cin >> a;
            rep(j,w){
                data[i][j] = a[j];
            }
        }
    }else if(r==90){
        rep(i,h){
            string a;
            cin >> a;
            rep(j,w){
                data[j][h-i-1] = a[j];
            }
        }
        swap(h, w);
    }else if(r==180){
        rep(i,h){
            string a;
            cin >> a;
            rep(j,w){
                data[h-i-1][w-j-1] = a[j];
            }
        }
    }else if(r==270){
        rep(i,h){
            string a;
            cin >> a;
            rep(j,w){
                data[w-j-1][i] = a[j];
            }
        }
        swap(h, w);
    }
    rep(i,h){
        rep(cc,k){
            rep(j,w){
                rep(c,k){
                    cout << data[i][j];
                }
            }
            cout << endl;
        }
    }
}
0