結果

問題 No.2389 Cheating Code Golf
ユーザー 👑 p-adicp-adic
提出日時 2023-08-11 18:02:31
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 3,342 ms
コンパイル使用メモリ 184,960 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-29 09:34:15
合計ジャッジ時間 4,834 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 WA -
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 1 ms
5,376 KB
testcase_34 AC 1 ms
5,376 KB
testcase_35 AC 1 ms
5,376 KB
testcase_36 AC 2 ms
5,376 KB
testcase_37 AC 1 ms
5,376 KB
testcase_38 AC 2 ms
5,376 KB
testcase_39 AC 1 ms
5,376 KB
testcase_40 AC 2 ms
5,376 KB
testcase_41 AC 1 ms
5,376 KB
testcase_42 AC 2 ms
5,376 KB
testcase_43 AC 1 ms
5,376 KB
testcase_44 AC 2 ms
5,376 KB
testcase_45 AC 1 ms
5,376 KB
testcase_46 AC 2 ms
5,376 KB
testcase_47 AC 2 ms
5,376 KB
testcase_48 AC 2 ms
5,376 KB
testcase_49 AC 2 ms
5,376 KB
testcase_50 AC 2 ms
5,376 KB
testcase_51 AC 2 ms
5,376 KB
testcase_52 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:157:14: warning: narrowing conversion of ‘(j < 1)’ from ‘bool’ to ‘double’ [-Wnarrowing]
  157 |     X[j]={0,j<1};
      |             ~^~
main.cpp:157:14: warning: narrowing conversion of ‘(j < 1)’ from ‘bool’ to ‘double’ [-Wnarrowing]

ソースコード

diff #

ll@N,@M,@A[N][3];vector<double>B[N],X[M+1];
rep(i,N)B[i]={(1.0/A[i][0]-1.0/A[i][1])/A[i][2],1.0/A[i][0],1.0/A[i][1],1.0/A[i][2]};
sort(B,B+N);
rep(j,M+1)X[j]={0,j<1};
rep[B](a,N){
	X[M][0]+=X[M][1]*a[1];
	rrep(i,M){
		double p=X[i][1]*pow(1-a[3],M-i);
		X[M]={X[M][0]+p*a[1],X[M][1]+p};
		rrep(j,i+1,M){
			p=X[i][1]*pow(1-a[3],j-i)*a[3];
			X[j]={X[j][0]+p*a[2],X[j][1]+p};
		}
		X[i]={X[i][0]+X[i][1]*a[3]*a[2],X[i][1]*a[3]};
	}
}
wt(sum[double][i,0,M+1](X[i][0]));
0