結果
問題 | No.1563 Same Degree |
ユーザー | 👑 tatt61880 |
提出日時 | 2021-06-27 03:56:33 |
言語 | Kuin (KuinC++ v.2021.9.17) |
結果 |
AC
|
実行時間 | 245 ms / 2,000 ms |
コード長 | 631 bytes |
コンパイル時間 | 2,308 ms |
コンパイル使用メモリ | 156,340 KB |
実行使用メモリ | 20,972 KB |
最終ジャッジ日時 | 2023-10-14 18:32:30 |
合計ジャッジ時間 | 4,282 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,348 KB |
testcase_01 | AC | 72 ms
4,348 KB |
testcase_02 | AC | 71 ms
4,348 KB |
testcase_03 | AC | 69 ms
4,352 KB |
testcase_04 | AC | 75 ms
4,480 KB |
testcase_05 | AC | 76 ms
4,348 KB |
testcase_06 | AC | 51 ms
4,348 KB |
testcase_07 | AC | 51 ms
4,480 KB |
testcase_08 | AC | 51 ms
4,348 KB |
testcase_09 | AC | 50 ms
4,356 KB |
testcase_10 | AC | 51 ms
4,348 KB |
testcase_11 | AC | 40 ms
12,460 KB |
testcase_12 | AC | 71 ms
14,252 KB |
testcase_13 | AC | 207 ms
19,844 KB |
testcase_14 | AC | 245 ms
20,972 KB |
testcase_15 | AC | 157 ms
17,456 KB |
ソースコード
func main() var t: int :: cui@inputInt() for(1, t) var n: int :: cui@inputInt() var m: int :: cui@inputInt() var graph: []list<int> :: #[n]list<int> for i(0, n - 1) do graph[i] :: #list<int> end for for(1, m) var a: int :: cui@inputInt() - 1 var b: int :: cui@inputInt() - 1 do graph[a].add(b) do graph[b].add(a) end for var map: dict<int, bool> :: #dict<int, bool> var ans: bool :: false for i(0, n - 1) var num: int :: ^graph[i] if(map.exist(num)) do ans :: true break i end if do map.add(num, true) end for do cui@print((ans ?("Yes", "No")) ~ "\n") end for end func