結果
問題 |
No.2403 "Eight" Bridges of Königsberg
|
ユーザー |
![]() |
提出日時 | 2023-08-09 17:28:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 454 bytes |
コンパイル時間 | 2,247 ms |
コンパイル使用メモリ | 194,976 KB |
最終ジャッジ日時 | 2025-02-16 00:22:18 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 WA * 11 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,m; cin>>n>>m; vector<int> U(m),V(m); vector<int> A(n); rep(i,m){ cin>>U[i]>>V[i]; U[i]--,V[i]--; A[U[i]]++; A[V[i]]--; } int ans=0; rep(i,n) ans+=max(0,A[i]); cout<<ans-1<<endl; return 0; }