結果
問題 | No.216 FAC |
ユーザー | te-sh |
提出日時 | 2016-09-16 13:59:47 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 484 bytes |
コンパイル時間 | 878 ms |
コンパイル使用メモリ | 120,424 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 04:28:27 |
合計ジャッジ時間 | 1,998 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto n = readln.chomp.to!size_t; auto ai = readln.split.map!(to!int); auto bi = readln.split.map!(to!int); auto si = new int[](101); foreach (i; 0..n) si[bi[i]] += ai[i]; auto maxS = si.reduce!(max); writeln(maxS == si.front ? "YES" : "NO"); }