結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
4,404 KB
testcase_01 AC 47 ms
4,556 KB
testcase_02 AC 34 ms
4,560 KB
testcase_03 AC 40 ms
4,548 KB
testcase_04 AC 2 ms
4,540 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,424 KB
testcase_07 AC 2 ms
4,476 KB
testcase_08 AC 34 ms
4,524 KB
testcase_09 AC 3 ms
4,560 KB
testcase_10 AC 2 ms
4,544 KB
testcase_11 AC 3 ms
4,504 KB
testcase_12 AC 3 ms
4,460 KB
testcase_13 AC 3 ms
4,568 KB
testcase_14 AC 2 ms
4,444 KB
testcase_15 AC 3 ms
4,580 KB
testcase_16 AC 3 ms
4,572 KB
testcase_17 AC 3 ms
4,528 KB
testcase_18 AC 3 ms
4,528 KB
testcase_19 AC 2 ms
4,540 KB
testcase_20 AC 3 ms
4,556 KB
testcase_21 AC 3 ms
4,452 KB
testcase_22 AC 3 ms
4,628 KB
testcase_23 AC 2 ms
4,512 KB
testcase_24 AC 3 ms
4,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

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