結果
| 問題 |
No.565 回転拡大
|
| コンテスト | |
| ユーザー |
nenuon
|
| 提出日時 | 2017-09-09 00:14:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,298 bytes |
| コンパイル時間 | 1,084 ms |
| コンパイル使用メモリ | 102,400 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 12:29:13 |
| 合計ジャッジ時間 | 2,121 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 21 |
ソースコード
#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;
}
nenuon