結果
問題 | No.216 FAC |
ユーザー |
👑 |
提出日時 | 2019-03-31 10:11:13 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 06:06:38 |
合計ジャッジ時間 | 1,655 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
n = io.read("*n")a, u = {}, {}for i = 1, n do table.insert(a, io.read("*n")) endfor i = 1, n doz = io.read("*n")if(u[z] == nil) then u[z] = a[i] else u[z] = u[z] + a[i] endendrem = 0max = 0for k, v in pairs(u) doif(k == 0) then rem = velsemax = math.max(max, v)endendif(max <= rem) then print("YES") else print("NO") end