結果
| 問題 |
No.583 鉄道同好会
|
| コンテスト | |
| ユーザー |
dptbl
|
| 提出日時 | 2017-10-27 23:36:11 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 649 bytes |
| コンパイル時間 | 685 ms |
| コンパイル使用メモリ | 104,648 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-12 22:13:05 |
| 合計ジャッジ時間 | 1,745 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);
foreach (i; 0..m) {
auto s = readln.chomp.split.map!(to!int);
int a = s.front;
int b = s.back;
adj[a]++;
adj[b]++;
}
int cnt = 0;
foreach (t; adj) {
cnt += ((t % 2) == 1 ? 1 : 0);
}
bool ans = cnt == 0 || cnt == 2;
enum R = ["NO", "YES"];
R[ans].writeln;
}
dptbl