結果

問題 No.565 回転拡大
ユーザー fal_rndfal_rnd
提出日時 2017-09-08 22:37:06
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,020 bytes
コンパイル時間 2,949 ms
コンパイル使用メモリ 82,676 KB
実行使用メモリ 41,780 KB
最終ジャッジ日時 2024-04-24 21:17:34
合計ジャッジ時間 8,356 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 137 ms
41,712 KB
testcase_02 WA -
testcase_03 AC 130 ms
41,220 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 123 ms
40,180 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 125 ms
40,552 KB
testcase_13 WA -
testcase_14 AC 119 ms
40,268 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 118 ms
40,376 KB
testcase_24 WA -
testcase_25 AC 139 ms
41,144 KB
testcase_26 WA -
testcase_27 AC 136 ms
41,528 KB
testcase_28 WA -
testcase_29 AC 136 ms
41,480 KB
testcase_30 AC 129 ms
41,420 KB
testcase_31 AC 130 ms
41,252 KB
testcase_32 AC 118 ms
40,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main{
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[]$){
		int r=getInt(),k=getInt(),h=getInt(),w=getInt();
		char[][]in=new char[h*k][w*k];
		{
			char[][]buf=REPS(h).mapToObj(o->s.next().toCharArray()).toArray(char[][]::new);
			for(int i=0;i<h*k;++i) {
				for(int j=0;j<w*k;++j) {
					in[i][j]=buf[i/k][j/k];
				}
			}
		}
		for(int i=0;i<r;i+=90)
			in=turn(in);
		Arrays.stream(in).map(String::valueOf).forEach(System.out::println);
	}
	static char[][] turn(char[][]c){
		char[][] r=new char[c[0].length][c.length];
		for(int i=0;i<c[0].length;++i) {
			for(int j=0;j<c.length;++j) {
				r[i][j]=c[j][i];
			}
		}
		return r;
	}
}
0