結果

問題 No.565 回転拡大
ユーザー 👑 kmjpkmjp
提出日時 2017-09-08 22:45:56
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,050 bytes
コンパイル時間 1,336 ms
コンパイル使用メモリ 160,356 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 21:23:29
合計ジャッジ時間 4,758 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int R,K;
int H,W;
char C[150][150];
char D[150][150];

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>R>>K>>H>>W;
	FOR(y,H) cin>>C[y];
	assert((R/90)%2==0);
	FOR(i,R/90) {
		FOR(y,150) FOR(x,150) D[y][x]=C[y][x];
		swap(H,W);
		FOR(y,H) FOR(x,W) C[y][x]=D[W-1-x][y];
	}
	
	FOR(y,H) {
		FOR(i,K) {
			FOR(x,W) FOR(j,K) cout<<C[y][x];
			cout<<endl;
		}
	}
	cout<<endl;
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}
0