結果

問題 No.232 めぐるはめぐる (2)
ユーザー tailstails
提出日時 2015-06-26 23:02:01
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 4,644 KB
最終ジャッジ日時 2023-09-22 01:28:25
合計ジャッジ時間 3,021 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
4,492 KB
testcase_01 AC 47 ms
4,468 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 3 ms
4,540 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,588 KB
testcase_07 AC 2 ms
4,584 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,516 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 3 ms
4,488 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,488 KB
testcase_17 AC 3 ms
4,548 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 3 ms
4,604 KB
testcase_22 AC 3 ms
4,572 KB
testcase_23 AC 3 ms
4,496 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 && abs($a)<2 && abs($b)<2){
			if($a>0&&$b){
				print">"; --$a;
			}elsif($a<0&&$b){
				print"<"; ++$a;
			}elsif($a){
				print"v"; ++$b;
			}else{
				print"<"; ++$a;
			}
		}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