結果

問題 No.232 めぐるはめぐる (2)
ユーザー tailstails
提出日時 2015-06-26 22:49:44
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 5,292 KB
実行使用メモリ 4,704 KB
最終ジャッジ日時 2023-09-22 00:55:43
合計ジャッジ時間 2,844 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
4,580 KB
testcase_01 AC 52 ms
4,460 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 3 ms
4,568 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,528 KB
testcase_07 AC 3 ms
4,568 KB
testcase_08 WA -
testcase_09 AC 3 ms
4,524 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 3 ms
4,680 KB
testcase_13 AC 3 ms
4,568 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,524 KB
testcase_17 AC 2 ms
4,456 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
4,520 KB
testcase_22 AC 2 ms
4,616 KB
testcase_23 AC 2 ms
4,604 KB
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$/=$";($t,$a,$b)=<>;
if($t>=$a&&$t>=$b){
	print"YES\n";
	while($t--){
		if($a==0&&$b==0){
			print"<";	++$a;
		}elsif($t==1&&$a==1&&$b==1){
			print">";	--$a;
		}elsif($t==1){
			print">^";	--$a; --$b;
		}else{
			if($a>0){
				print">"; --$a;
			}
			if($a<0){
				print"<"; ++$a;
			}
			if($b>0){
				print"^"; --$b;
			}
			if($b<0){
				print"v"; ++$b;
			}
		}
		print"\n";
	}
}else{
	print"NO\n";
}
0