結果

問題 No.232 めぐるはめぐる (2)
ユーザー tailstails
提出日時 2015-06-26 23:11:39
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 524 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 4,728 KB
最終ジャッジ日時 2023-09-22 01:32:43
合計ジャッジ時間 1,903 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 46 ms
4,672 KB
testcase_02 AC 34 ms
4,712 KB
testcase_03 AC 38 ms
4,624 KB
testcase_04 AC 3 ms
4,508 KB
testcase_05 AC 3 ms
4,596 KB
testcase_06 WA -
testcase_07 AC 3 ms
4,628 KB
testcase_08 AC 32 ms
4,548 KB
testcase_09 AC 3 ms
4,680 KB
testcase_10 AC 2 ms
4,600 KB
testcase_11 AC 3 ms
4,676 KB
testcase_12 AC 3 ms
4,712 KB
testcase_13 WA -
testcase_14 AC 2 ms
4,500 KB
testcase_15 AC 3 ms
4,500 KB
testcase_16 AC 3 ms
4,672 KB
testcase_17 AC 3 ms
4,556 KB
testcase_18 AC 3 ms
4,664 KB
testcase_19 AC 2 ms
4,608 KB
testcase_20 AC 2 ms
4,548 KB
testcase_21 AC 3 ms
4,596 KB
testcase_22 AC 3 ms
4,616 KB
testcase_23 AC 2 ms
4,712 KB
testcase_24 AC 3 ms
4,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$/=$";($t,$b,$a)=<>;
$a+=0;$b+=0;
if($t>=$a&&$t>=$b&&$a+$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