結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  diginatu | 
| 提出日時 | 2014-11-24 01:24:47 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 378 bytes | 
| コンパイル時間 | 2,580 ms | 
| コンパイル使用メモリ | 86,788 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-24 20:50:45 | 
| 合計ジャッジ時間 | 3,387 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
import std.stdio, std.string, std.conv
	,std.array, std.algorithm;
void main(){
  auto N = readln().strip().to!int();
  int[11] fl;
  foreach(immutable int i; 0 .. N) {
    auto ln = readln().strip().split().map!(to!int)();
    foreach(immutable int j; 0 .. 3)
      ++ fl[ln[j]];
  }
  int i2 = reduce!("a + b/2")(0, fl);
  writeln(i2 + (3*N - 2*i2)/4);
}
            
            
            
        