結果
問題 | No.2780 The Bottle Imp |
ユーザー |
![]() |
提出日時 | 2024-06-07 22:51:13 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 17 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 3,236 ms |
コンパイル使用メモリ | 176,800 KB |
実行使用メモリ | 15,488 KB |
最終ジャッジ日時 | 2024-12-27 14:19:30 |
合計ジャッジ時間 | 4,887 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 40 |
ソースコード
graph g; int@n,s[n],a[1d5],b[],e=0; rep(i,n){ int@m; rep(m){ int@c--; a[e]=i; b[e]=c; ++e; } } g.setDirectEdge(n,e,a,b); int z=g.scc(s)-1; if(s[0]==0){ int v[z]{}; rep(j,e){ if(s[a[j]]==s[b[j]]-1){ if(!v[s[a[j]]]){ v[s[a[j]]]=1; --z; } } } } wt(z?"No":"Yes");