結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
4,492 KB
testcase_01 AC 47 ms
4,536 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,608 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,612 KB
testcase_07 AC 3 ms
4,488 KB
testcase_08 WA -
testcase_09 AC 3 ms
4,544 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 3 ms
4,500 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 3 ms
4,660 KB
testcase_17 AC 3 ms
4,588 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 3 ms
4,592 KB
testcase_22 AC 3 ms
4,488 KB
testcase_23 AC 3 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&&abs($a*$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