結果

問題 No.2912 0次パーシステントホモロジー
ユーザー 👑 p-adic
提出日時 2024-07-23 02:10:06
言語 cLay
(20241019-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
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
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]

ソースコード

diff #

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));
0