結果

問題 No.565 回転拡大
ユーザー nenuonnenuon
提出日時 2017-09-09 00:14:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,298 bytes
コンパイル時間 863 ms
コンパイル使用メモリ 101,816 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 02:51:56
合計ジャッジ時間 1,731 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
typedef pair<int, int> P;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int R, K; cin >> R >> K;
  int H, W; cin >> H >> W;
  vector<string> vs(H);
  FOR(i,0,H) cin >> vs[i];
  map<P, P> MAP;
  FOR(i,1,W+1) FOR(j,1,H+1) MAP[P(i, j)] = P(i, j);
  R /= 90;
  FOR(i,0,R) {
    for(auto m : MAP) {
      int x = m.second.first;
      int y = m.second.second;
      int X = y;
      int Y = x;
      MAP[m.first] = P(X, Y);
    }
  }
  int w = W, h = H;
  if(R == 1 || R == 3) {
    w = H;
    h = W;
  }
  vector<string> fig(h, string(w, 'a'));
  for(auto m : MAP) {
    int x = m.first.first-1;
    int y = m.first.second-1;
    int X = m.second.first-1;
    int Y = m.second.second-1;
    fig[Y][X] = vs[y][x];
  }
  FOR(i,0,h) {
    FOR(k,0,K) {
      FOR(j,0,w) {
        FOR(l,0,K) {
          cout << fig[i][j];
        }
      }
      cout << endl;
    }
  }
  return 0;
}
0