結果
問題 | No.250 atetubouのzetubou |
ユーザー | kenji_shioya |
提出日時 | 2016-06-24 22:49:18 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 886 bytes |
コンパイル時間 | 3,100 ms |
コンパイル使用メモリ | 78,260 KB |
実行使用メモリ | 54,160 KB |
最終ジャッジ日時 | 2024-04-20 02:25:04 |
合計ジャッジ時間 | 6,363 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | AC | 108 ms
41,464 KB |
testcase_21 | AC | 122 ms
47,788 KB |
ソースコード
import java.util.*; public class Exercise120{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[][] q = new int[n][3]; int max = 0; for(int i = 0; i < n; i++){ q[i][0] = sc.nextInt(); q[i][1] = sc.nextInt(); q[i][2] = sc.nextInt(); max = Math.max(max, q[i][1] + q[i][0] - 1); } int[][] dp = new int[max + 1][max + 1]; for(int i = 0; i <= max; i++){ for(int j = 0; j <= i; j++){ if(j == 0 || j == i){ dp[i][j] = 1; }else{ dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j]; } } } for(int i = 0; i < max + 1; i ++){ } for(int i = 0; i < n; i++){ if(dp[q[i][1] + q[i][0] - 1][q[i][1]] > q[i][2]){ System.out.println("ZETUBOU"); }else{ System.out.println("AC"); } } } }