結果
| 問題 | 
                            No.216 FAC
                             | 
                    
| コンテスト | |
| ユーザー | 
                             nak2yoshi
                         | 
                    
| 提出日時 | 2016-02-23 23:28:23 | 
| 言語 | D  (dmd 2.109.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 409 bytes | 
| コンパイル時間 | 1,011 ms | 
| コンパイル使用メモリ | 134,232 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-12 03:02:36 | 
| 合計ジャッジ時間 | 1,798 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 15 WA * 9 | 
ソースコード
import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm,
       std.bigint;
void main()
{
    auto N = readln.strip.to!int;
    auto a = readln.split.to!(int[]);
    auto b = readln.split.to!(int[]);
    auto top = zip(a, b).map!(c => c[1]==1?c[0]:0).sum;
    auto me  = zip(a, b).map!(c => c[1]==0?c[0]:0).sum;
    (top <= me ? "YES" : "NO").writeln;
}
            
            
            
        
            
nak2yoshi