結果
| 問題 | No.2052 Indegree |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-01 10:46:03 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 472 bytes |
| 記録 | |
| コンパイル時間 | 1,860 ms |
| コンパイル使用メモリ | 81,896 KB |
| 実行使用メモリ | 37,716 KB |
| 最終ジャッジ日時 | 2026-03-07 02:05:58 |
| 合計ジャッジ時間 | 3,189 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 20 |
ソースコード
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
boolean[] ind = new boolean[N+1];
int ans = N;
while(M-->0){
sc.next();
int B = sc.nextInt();
if(!ind[B]){
ind[B] = true;
--ans;
}
}
System.out.println(ans);
}
}