結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2017-03-07 18:34:07 |
言語 | D (dmd 2.109.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 829 bytes |
コンパイル時間 | 726 ms |
コンパイル使用メモリ | 119,632 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 07:13:00 |
合計ジャッジ時間 | 1,839 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 5 RE * 2 |
ソースコード
import std.stdio, std.string, std.conv, std.array, std.algorithm; import std.uni, std.range, std.math, std.container, std.datetime; import core.bitop, std.typetuple, std.typecons; immutable long MOD = 1_000_000_007; alias tie = TypeTuple; void main(){ auto N = readln.chomp.to!int; auto A = readln.split.to!(int[]); auto B = readln.split.to!(int[]); int[101] scores; foreach(i, b ; B){ scores[b] += A[i]; } auto Bmax = B[1 .. $].reduce!max; if(scores[0] >= Bmax){ writeln("YES"); } else { writeln("NO"); } } void readVars(T...)(auto ref T args){ auto line = readln.split; foreach(ref arg ; args){ arg = line.front.to!(typeof(arg)); line.popFront; } if(!line.empty){ throw new Exception("args num < input num"); } }