結果
| 問題 | No.806 木を道に |
| コンテスト | |
| ユーザー |
keymoon
|
| 提出日時 | 2019-02-24 16:23:56 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 158 ms / 2,000 ms |
| コード長 | 529 bytes |
| 記録 | |
| コンパイル時間 | 3,385 ms |
| コンパイル使用メモリ | 106,180 KB |
| 実行使用メモリ | 40,772 KB |
| 最終ジャッジ日時 | 2026-03-28 17:57:23 |
| 合計ジャッジ時間 | 6,254 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)));
}
}
keymoon