結果

問題 No.29 パワーアップ
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-07-28 12:01:04
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 718 bytes
コンパイル時間 5,867 ms
コンパイル使用メモリ 105,220 KB
実行使用メモリ 23,720 KB
最終ジャッジ日時 2023-09-19 06:05:37
合計ジャッジ時間 5,046 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
21,524 KB
testcase_01 AC 81 ms
21,556 KB
testcase_02 AC 82 ms
21,628 KB
testcase_03 AC 82 ms
21,616 KB
testcase_04 AC 81 ms
21,584 KB
testcase_05 AC 81 ms
21,676 KB
testcase_06 AC 82 ms
21,548 KB
testcase_07 WA -
testcase_08 AC 82 ms
23,548 KB
testcase_09 AC 82 ms
21,640 KB
testcase_10 AC 82 ms
21,472 KB
testcase_11 AC 82 ms
21,424 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 81 ms
21,656 KB
testcase_15 AC 82 ms
21,660 KB
testcase_16 AC 81 ms
21,588 KB
testcase_17 AC 81 ms
23,680 KB
testcase_18 AC 81 ms
23,720 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 81 ms
21,564 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;

class No29{
    static void Main(){
        var a=Int32.Parse(Console.ReadLine());
        List<string> list=new List<string>();
        for(int i=0;i<a;++i){
            var b=Console.ReadLine().Split(' ');
            list.Add(b[0]);
            list.Add(b[1]);
            list.Add(b[2]);
        }
        list.Sort();
        var c=list.Count;
        var d=0;
        var e=0;
        for(int i=0;i<c-1;++i){
            if(list[i]==list[i+1]){
                d++;
                i++;
                if(i==c-3)e++;
            }else{
                e++;
                if(i==c-2)e++;
            }
        }
        
        Console.WriteLine(d+e/4);
    }
}
0