結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー | kohaku_kohaku |
提出日時 | 2016-12-03 16:19:42 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,442 bytes |
コンパイル時間 | 2,274 ms |
コンパイル使用メモリ | 74,096 KB |
実行使用メモリ | 67,956 KB |
最終ジャッジ日時 | 2023-08-18 12:52:06 |
合計ジャッジ時間 | 10,816 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 624 ms
64,620 KB |
testcase_01 | AC | 610 ms
65,488 KB |
testcase_02 | AC | 668 ms
67,956 KB |
testcase_03 | AC | 606 ms
65,176 KB |
testcase_04 | AC | 127 ms
55,768 KB |
testcase_05 | WA | - |
testcase_06 | AC | 129 ms
56,204 KB |
testcase_07 | AC | 130 ms
55,780 KB |
testcase_08 | AC | 503 ms
64,064 KB |
testcase_09 | AC | 126 ms
55,868 KB |
testcase_10 | AC | 131 ms
55,628 KB |
testcase_11 | WA | - |
testcase_12 | AC | 127 ms
55,856 KB |
testcase_13 | AC | 125 ms
56,072 KB |
testcase_14 | AC | 124 ms
55,800 KB |
testcase_15 | AC | 126 ms
55,724 KB |
testcase_16 | AC | 124 ms
55,840 KB |
testcase_17 | AC | 128 ms
55,836 KB |
testcase_18 | AC | 168 ms
56,156 KB |
testcase_19 | WA | - |
testcase_20 | AC | 126 ms
55,804 KB |
testcase_21 | AC | 126 ms
55,576 KB |
testcase_22 | AC | 128 ms
55,852 KB |
testcase_23 | AC | 126 ms
55,612 KB |
testcase_24 | AC | 130 ms
55,792 KB |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int big=Math.max(A,B); int small=Math.min(A,B); int c1=small; int c2=0; if(T<big){ System.out.println("NO"); }else{ System.out.println("YES"); String S1=""; String S2=""; if(A<=B){ S1=">"; S2="^"; }else{ S1="^"; S2=">"; } if(T-big==1){ c1--; System.out.println(S2); } c2=big-c1; for(int i=0; i<c1; i++){ System.out.println(">^"); } for(int i=0; i<c2; i++){ System.out.println(S1); } stand(T-big); } } static void stand(int z){ if(z<=1){ return; }else if(z%2==0){ for(int i=0; i<z/2; i++){ System.out.println(">"); System.out.println("<"); } return; }else{ System.out.println(">^"); System.out.println("<"); System.out.println("v"); z-=3; stand(z); return; } } }