結果
| 問題 |
No.583 鉄道同好会
|
| コンテスト | |
| ユーザー |
dptbl
|
| 提出日時 | 2017-10-28 00:17:24 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 636 bytes |
| コンパイル時間 | 664 ms |
| コンパイル使用メモリ | 105,684 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 22:13:17 |
| 合計ジャッジ時間 | 1,690 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 1 |
ソースコード
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);
adj[] = 0;
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 == 0 || cnt == 2;
enum R = ["NO", "YES"];
R[ans].writeln;
}
dptbl