結果

問題 No.1336 Union on Blackboard
ユーザー TomoTomo
提出日時 2021-01-15 23:26:53
言語 Ruby
(3.3.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 11,324 KB
実行使用メモリ 21,052 KB
最終ジャッジ日時 2023-08-17 19:07:46
合計ジャッジ時間 4,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,256 KB
testcase_01 AC 89 ms
16,976 KB
testcase_02 AC 89 ms
17,080 KB
testcase_03 AC 88 ms
16,880 KB
testcase_04 AC 89 ms
16,848 KB
testcase_05 AC 89 ms
16,676 KB
testcase_06 AC 90 ms
17,024 KB
testcase_07 AC 90 ms
16,664 KB
testcase_08 AC 90 ms
16,940 KB
testcase_09 AC 90 ms
17,016 KB
testcase_10 AC 98 ms
20,960 KB
testcase_11 AC 96 ms
20,776 KB
testcase_12 AC 94 ms
20,816 KB
testcase_13 AC 94 ms
21,052 KB
testcase_14 AC 97 ms
20,956 KB
testcase_15 AC 95 ms
21,048 KB
testcase_16 AC 94 ms
20,828 KB
testcase_17 AC 95 ms
20,868 KB
testcase_18 AC 94 ms
20,960 KB
testcase_19 AC 96 ms
20,964 KB
testcase_20 AC 98 ms
20,864 KB
testcase_21 AC 96 ms
20,996 KB
testcase_22 AC 96 ms
20,948 KB
testcase_23 AC 97 ms
20,784 KB
testcase_24 AC 95 ms
20,956 KB
testcase_25 AC 96 ms
20,820 KB
testcase_26 AC 95 ms
20,980 KB
testcase_27 AC 94 ms
20,820 KB
testcase_28 AC 94 ms
20,868 KB
testcase_29 AC 92 ms
20,864 KB
testcase_30 AC 80 ms
15,024 KB
testcase_31 AC 81 ms
15,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets.to_i.times{
  n=gets.to_i
  a=gets.split.map(&:to_i).sort
  (n-1).times{
    x,y,*a=a
    a << (x+y+x*y)%1000000007
  }
  p a[0]
}
0