結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
ProgramingWe
|
| 提出日時 | 2017-10-30 11:42:59 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 896 bytes |
| 記録 | |
| コンパイル時間 | 820 ms |
| コンパイル使用メモリ | 111,168 KB |
| 実行使用メモリ | 26,856 KB |
| 最終ジャッジ日時 | 2025-10-24 21:03:33 |
| 合計ジャッジ時間 | 2,001 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
}
ProgramingWe