結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2019-02-21 10:07:35 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 11,118 ms |
コンパイル使用メモリ | 220,364 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 04:49:29 |
合計ジャッジ時間 | 12,110 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
package mainimport "fmt"func main() {var n, a, b int_, _ = fmt.Scan(&n)scores := make([]int, n)for i := range scores {_, _ = fmt.Scan(&a)scores[i] = a}max := 0persons := make([]int, 101)for i := 0; i < n; i++ {_, _ = fmt.Scan(&b)persons[b] += scores[i]if b != 0 && max < persons[b] {max = persons[b]}}if persons[0] >= max {fmt.Println("YES")} else {fmt.Println("NO")}}