結果
問題 | No.806 木を道に |
ユーザー |
![]() |
提出日時 | 2019-02-24 16:23:56 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 226 ms / 2,000 ms |
コード長 | 529 bytes |
コンパイル時間 | 3,849 ms |
コンパイル使用メモリ | 110,888 KB |
実行使用メモリ | 42,708 KB |
最終ジャッジ日時 | 2024-07-07 03:40:10 |
合計ジャッジ時間 | 7,894 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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))); } }