結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
tsuchinaga
|
| 提出日時 | 2019-02-21 10:07:35 |
| 言語 | Go (1.26.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 14,571 ms |
| コンパイル使用メモリ | 287,816 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-12 06:05:32 |
| 合計ジャッジ時間 | 16,228 ms |
|
ジャッジサーバーID (参考情報) |
tmp-judge_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
package main
import "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 := 0
persons := 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")
}
}
tsuchinaga