結果
| 問題 | No.565 回転拡大 | 
| コンテスト | |
| ユーザー |  alpha_virginis | 
| 提出日時 | 2017-09-08 22:34:12 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 2,229 bytes | 
| コンパイル時間 | 1,554 ms | 
| コンパイル使用メモリ | 169,052 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 06:20:43 | 
| 合計ジャッジ時間 | 2,515 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
#include <bits/stdc++.h>
#include <inttypes.h>
#ifndef LOCAL_
#define fprintf if( false ) fprintf
#endif // LOCAL_
#define dump() fprintf(stderr, "#%s.%d\n", __func__, __LINE__);
#define dumpl(x1) fprintf(stderr, "#%s.%d (%s) = (%ld)\n", __func__, __LINE__, #x1, x1);
#define dumpll(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%ld, %ld)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define dumplll(x1, x2, x3) fprintf(stderr, "#%s.%d (%s, %s, %s) = (%ld, %ld, %ld)\n", __func__, __LINE__, #x1, #x2, #x3, x1, x2, x3);
#define dumpd(x1) fprintf(stderr, "#%s.%d (%s) = (%lf)\n", __func__, __LINE__, #x1, x1);
#define dumpdd(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%lf, %lf)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define loop for(;;)
typedef int64_t Int;
typedef std::vector<Int> LI;
const double pi = 3.14159265358979323846264338;
const Int mod = 1000000007;
template<typename T> void scan1(T& x) { fprintf(stderr, "unknown type\n"); }
template<> void scan1(Int& x) { if( scanf("%" PRId64, &x) < 0 ) exit(0); }
template<> void scan1(std::string& x) { if( not ( std::cin >> x ) ) exit(0); }
template<> void scan1(LI& xs) { for(Int &x : xs) scan1(x); }
void scan() {}
template<typename Head, typename... Tail>
void scan(Head& x, Tail&... xs) {
  scan1(x); scan(xs...);
}
struct Solver {
   Solver() { fprintf(stderr, "--------Solver begin--------\n"); }
   ~Solver() { fprintf(stderr, "--------Solver end--------\n"); }
   void solve() {
      Int r, k; scan(r, k);
      Int h, w; scan(h, w);
      char field[16][16];
      for(Int i = 0; i < h; ++i) scanf("%s", field[i]);
      for(Int i = 0; i < r / 90; ++i) {
         char field2[16][16];
         for(Int y = 0; y < w; ++y) {
            for(Int x = 0; x < h; ++x) {
               field2[y][x] = field[h-x-1][y];
            }
         }
         for(Int y = 0; y < 16; ++y) {
            for(Int x = 0; x < 16; ++x) {
               field[y][x] = field2[y][x];
            }
         }
         std::swap(w, h);
      }
      for(Int y = 0; y < k * h; ++y) {
         for(Int x = 0; x < k * w; ++x) {
            putchar(field[y/k][x/k]);
         }
         putchar('\n');
      }
   }
};
int main() {
   loop std::unique_ptr<Solver>(new Solver())->solve();
}
            
            
            
        