結果
問題 |
No.583 鉄道同好会
|
ユーザー |
![]() |
提出日時 | 2017-10-28 00:00:08 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 611 bytes |
コンパイル時間 | 725 ms |
コンパイル使用メモリ | 105,776 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 22:13:14 |
合計ジャッジ時間 | 1,727 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 2 |
ソースコード
import core.bitop; import std.algorithm; import std.array; import std.ascii; import std.container; import std.conv; import std.format; import std.math; import std.range; import std.stdio; import std.string; import std.typecons; void main() { auto v = readln.chomp.split.map!(to!int); int n = v.front; int m = v.back; int[] adj = new int[](n); foreach (i; 0..m) { auto s = readln.chomp.split.map!(to!int); int a = s.front; int b = s.back; adj[a]++; adj[b]++; } auto cnt = adj.filter!(a => a % 2 == 1).count; auto ans = cnt == 2; enum R = ["NO", "YES"]; R[ans].writeln; }