結果

問題 No.29 パワーアップ
ユーザー ProgramingWeProgramingWe
提出日時 2017-10-30 11:42:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 5,000 ms
コード長 896 bytes
コンパイル時間 2,100 ms
コンパイル使用メモリ 100,384 KB
実行使用メモリ 22,684 KB
最終ジャッジ日時 2023-08-14 13:05:58
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
20,608 KB
testcase_01 AC 60 ms
20,696 KB
testcase_02 AC 59 ms
20,532 KB
testcase_03 AC 61 ms
20,564 KB
testcase_04 AC 59 ms
20,660 KB
testcase_05 AC 60 ms
20,612 KB
testcase_06 AC 59 ms
22,588 KB
testcase_07 AC 60 ms
22,684 KB
testcase_08 AC 58 ms
22,632 KB
testcase_09 AC 58 ms
20,608 KB
testcase_10 AC 59 ms
20,544 KB
testcase_11 AC 59 ms
20,636 KB
testcase_12 AC 60 ms
20,748 KB
testcase_13 AC 61 ms
22,568 KB
testcase_14 AC 60 ms
18,588 KB
testcase_15 AC 59 ms
22,612 KB
testcase_16 AC 60 ms
20,660 KB
testcase_17 AC 61 ms
20,600 KB
testcase_18 AC 60 ms
20,528 KB
testcase_19 AC 59 ms
20,752 KB
testcase_20 AC 58 ms
22,616 KB
testcase_21 AC 59 ms
20,640 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;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int level = 0;
            List<String> list = new List<string>();
            List<String> items = new List<string>();
            for (int i = 0; i < N; i++)
            {
                list.AddRange(Console.ReadLine().Split(' '));
            }
            foreach (String con in list)
            {
                if (!items.Contains(con))
                {
                    items.Add(con);
                }
                else
                {
                    items.Remove(con);
                    level++;
                }
            }
            level = level + items.Count / 4;
            Console.WriteLine(level);
        }
    }
}
0