結果
問題 |
No.2052 Indegree
|
ユーザー |
|
提出日時 | 2022-08-21 13:11:32 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 689 bytes |
コンパイル時間 | 7,757 ms |
コンパイル使用メモリ | 167,036 KB |
実行使用メモリ | 182,900 KB |
最終ジャッジ日時 | 2024-10-10 06:02:37 |
合計ジャッジ時間 | 9,265 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (106 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using System.Collections.Generic; namespace test { static class Program { static void Main() { string[] a = Console.ReadLine().Split(' '); long n = long.Parse(a[0]); long m = long.Parse(a[1]); bool[] hairu = new bool[n]; for(long i = 0;i < m; i++) { long deguti = long.Parse(Console.ReadLine().Split(' ')[1]); hairu[deguti-1] = true; } long count = 0; for(long i = 0;i < n; i++) { if (hairu[i] == false) count++; } Console.WriteLine(count); } } }