結果

問題 No.806 木を道に
ユーザー keymoonkeymoon
提出日時 2019-02-24 16:23:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 233 ms / 2,000 ms
コード長 529 bytes
コンパイル時間 2,051 ms
コンパイル使用メモリ 105,216 KB
実行使用メモリ 40,748 KB
最終ジャッジ日時 2023-09-21 09:28:41
合計ジャッジ時間 6,948 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
19,768 KB
testcase_01 AC 63 ms
21,596 KB
testcase_02 AC 62 ms
21,636 KB
testcase_03 AC 63 ms
21,592 KB
testcase_04 AC 62 ms
21,568 KB
testcase_05 AC 63 ms
21,756 KB
testcase_06 AC 63 ms
21,764 KB
testcase_07 AC 63 ms
23,652 KB
testcase_08 AC 62 ms
23,792 KB
testcase_09 AC 62 ms
21,664 KB
testcase_10 AC 96 ms
30,220 KB
testcase_11 AC 95 ms
30,008 KB
testcase_12 AC 204 ms
38,592 KB
testcase_13 AC 166 ms
33,584 KB
testcase_14 AC 198 ms
36,264 KB
testcase_15 AC 205 ms
38,620 KB
testcase_16 AC 112 ms
31,224 KB
testcase_17 AC 185 ms
33,460 KB
testcase_18 AC 75 ms
25,732 KB
testcase_19 AC 99 ms
28,108 KB
testcase_20 AC 186 ms
33,448 KB
testcase_21 AC 129 ms
30,968 KB
testcase_22 AC 233 ms
38,624 KB
testcase_23 AC 229 ms
40,748 KB
testcase_24 AC 135 ms
29,460 KB
testcase_25 AC 176 ms
36,872 KB
testcase_26 AC 99 ms
27,012 KB
testcase_27 AC 189 ms
37,448 KB
testcase_28 AC 66 ms
21,636 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.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using Debug = System.Diagnostics.Debug;


class Ph
{
    static void Main()
    {
        Console.WriteLine(Enumerable.Repeat(0, int.Parse(Console.ReadLine()) - 1).SelectMany(_ => Console.ReadLine().Split().Select(int.Parse)).GroupBy(x => x).Sum(x => Max(0, x.Count() - 2)));
    }
}
0