結果
問題 |
No.2052 Indegree
|
ユーザー |
![]() |
提出日時 | 2022-08-29 22:31:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 1,720 ms |
コンパイル使用メモリ | 191,544 KB |
最終ジャッジ日時 | 2025-02-06 23:39:28 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N, M; cin >> N >> M; int A[110] = {}; for(int i = 0; i < M * 2; i++){ int a; cin >> a; if(i & 1) A[a] ++; } int cnt = 0; for(int i = 1; i <= N; i++){ if(A[i] == 0) cnt ++; } cout << cnt << "\n"; }