結果
| 問題 | No.1563 Same Degree |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-27 03:56:33 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 185 ms / 2,000 ms |
| コード長 | 631 bytes |
| 記録 | |
| コンパイル時間 | 1,614 ms |
| コンパイル使用メモリ | 166,796 KB |
| 実行使用メモリ | 21,248 KB |
| 最終ジャッジ日時 | 2026-04-05 17:48:18 |
| 合計ジャッジ時間 | 3,215 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<List_<long>>' [-Wnontrivial-memcall]
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
out.cpp:688:9: note: in instantiation of function template specialization 'newArraysRec_<std::shared_ptr<Array_<std::shared_ptr<List_<long>>>>>::operator()<long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1628:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<List_<long>>>>, long>' requested here
1628 | (k_at) = (newArrays_<type_(Array_<type_(List_<int64_t>)>)>((k_ar)));
| ^
out.cpp:676:14: note: explicitly cast the pointer to silence this warning
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
| (void*)
1 warning generated.
ソースコード
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