結果
問題 | No.2912 0次パーシステントホモロジー |
ユーザー | 👑 p-adic |
提出日時 | 2024-07-23 02:10:06 |
言語 | cLay (20240714-1) |
結果 |
AC
|
実行時間 | 81 ms / 2,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 3,022 ms |
コンパイル使用メモリ | 185,796 KB |
実行使用メモリ | 21,956 KB |
最終ジャッジ日時 | 2024-10-04 20:50:47 |
合計ジャッジ時間 | 4,353 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,820 KB |
testcase_01 | AC | 2 ms
6,816 KB |
testcase_02 | AC | 2 ms
6,816 KB |
testcase_03 | AC | 1 ms
6,820 KB |
testcase_04 | AC | 2 ms
6,816 KB |
testcase_05 | AC | 2 ms
6,816 KB |
testcase_06 | AC | 1 ms
6,816 KB |
testcase_07 | AC | 2 ms
6,820 KB |
testcase_08 | AC | 2 ms
6,816 KB |
testcase_09 | AC | 1 ms
6,816 KB |
testcase_10 | AC | 1 ms
6,816 KB |
testcase_11 | AC | 2 ms
7,616 KB |
testcase_12 | AC | 2 ms
7,496 KB |
testcase_13 | AC | 1 ms
6,816 KB |
testcase_14 | AC | 2 ms
6,816 KB |
testcase_15 | AC | 4 ms
6,820 KB |
testcase_16 | AC | 36 ms
11,904 KB |
testcase_17 | AC | 23 ms
9,728 KB |
testcase_18 | AC | 35 ms
13,768 KB |
testcase_19 | AC | 81 ms
20,480 KB |
testcase_20 | AC | 81 ms
21,576 KB |
testcase_21 | AC | 63 ms
20,352 KB |
testcase_22 | AC | 63 ms
21,956 KB |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:280:14: warning: narrowing conversion of ‘e[2]’ from ‘long long int’ to ‘int’ [-Wnarrowing] 280 | F[m]={e[2],*e,e[1]}; | ~~~^ main.cpp:280:14: warning: narrowing conversion of ‘e[2]’ from ‘long long int’ to ‘int’ [-Wnarrowing] main.cpp:280:16: warning: narrowing conversion of ‘*(long long int*)e’ from ‘long long int’ to ‘int’ [-Wnarrowing] 280 | F[m]={e[2],*e,e[1]}; | ^~ main.cpp:280:16: warning: narrowing conversion of ‘*(long long int*)e’ from ‘long long int’ to ‘int’ [-Wnarrowing] main.cpp:280:22: warning: narrowing conversion of ‘e[1]’ from ‘long long int’ to ‘int’ [-Wnarrowing] 280 | F[m]={e[2],*e,e[1]}; | ~~~^ main.cpp:280:22: warning: narrowing conversion of ‘e[1]’ from ‘long long int’ to ‘int’ [-Wnarrowing] main.cpp:285:11: warning: narrowing conversion of ‘r’ from ‘long long int’ to ‘int’ [-Wnarrowing] 285 | S[t]={r,t}; | ^ main.cpp:285:11: warning: narrowing conversion of ‘r’ from ‘long long int’ to ‘int’ [-Wnarrowing]
ソースコード
ll@N,@M,@E[M][3],@T,@R[T],A[T],j=0,c=N;VI F[M],S[T];rep[E,m](e,M)F[m]={e[2],*e,e[1]};sort(F,F+M);rep[R,t](r,T)S[t]={r,t};sort(S,S+T);unionFind U('m',N,1);rep[S](s,T){while(j<M){auto&f=F[j];if(f[0]>s[0])break;else c-=U(f[1])!=U(f[2]),U.connect(f[1],f[2]),++j;}A[s[1]]=c;}wtLn(A(T));