結果
| 問題 |
No.2403 "Eight" Bridges of Königsberg
|
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2023-10-22 17:30:37 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 487 bytes |
| コンパイル時間 | 950 ms |
| コンパイル使用メモリ | 103,544 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 09:47:10 |
| 合計ジャッジ時間 | 2,677 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | WA * 31 |
ソースコード
#include<iostream>
#include<algorithm>
#include<stack>
#include<vector>
#include<set>
using namespace std;
using ll = long long;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n,m;
cin>>n>>m;
vector<int> cnt(n,0);
for(int i = 0;i<m;i++){
int u,v;
cin>>u>>v;
u--;v--;
cnt[u]++;
}
int sum = 0;
for(int i = 0;i<n;i++) sum += cnt[i] & 1;
if(sum>=2) cout<<sum-2<<endl;
else cout<<sum<<endl;
}
momoyuu