結果
| 問題 |
No.2461 一点張り
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-09-08 21:44:06 |
| 言語 | cLay (20241019-1) |
| 結果 |
CE
|
| 実行時間 | - |
| コード長 | 394 bytes |
| コンパイル時間 | 3,758 ms |
| コンパイル使用メモリ | 163,492 KB |
| 最終ジャッジ日時 | 2024-06-26 14:39:04 |
| 合計ジャッジ時間 | 4,148 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:290:5: error: ‘p’ was not declared in this scope
290 | 1*p+2*(1-p)p+3*
| ^
main.cpp:292:19: error: ‘K’ was not declared in this scope
292 | sum n(1-p)^{n-1}p+K(1-p)^{K-1}
| ^
main.cpp:292:26: error: expected primary-expression before ‘{’ token
292 | sum n(1-p)^{n-1}p+K(1-p)^{K-1}
| ^
main.cpp:293:1: error: ‘sum’ was not declared in this scope
293 | sum q^n = (1-q^K)/(1-q)
| ^~~
main.cpp:294:16: error: ‘q’ was not declared in this scope
294 | ->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2*
| ^
main.cpp:294:22: error: ‘qK’ was not declared in this scope
294 | ->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2*
| ^~
main.cpp:294:37: error: ‘Kq’ was not declared in this scope
294 | ->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2*
| ^~
main.cpp:294:40: error: expected primary-expression before ‘{’ token
294 | ->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2*
| ^
main.cpp:294:40: error: expected ‘)’ before ‘{’ token
294 | ->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2*
| ~ ^
| )
main.cpp:297:8: error: ‘x’ was not declared in this scope
297 | wt_L(x);
| ^
main.cpp:299:30: error: ‘N’ was not declared in this scope
299 | for(QAAnbtfa=(0);QAAnbtfa<(N);QAAnbtfa++){
| ^
main.cpp:300:14: error: ‘A’ was not declared in this scope
300 | auto&a = A[QAAnbtfa];
| ^
main.cpp:308:14: error: ‘N’ was not declared in this scope
308 | if((0) > ((N)-1)){
| ^
main.cpp:309:16: error: ‘条件を満たすi��
ソースコード
ll@T;rep(T){double@p;ll@K;wt(p==0?K:(1-(K-(K-1)*(1-p))*(1-p)**(K-1))/p+K*(1-p)**(K-1));}
1p+2(1-p)p+3
sum n(1-p)^{n-1}p+K(1-p)^{K-1}
sum q^n = (1-q^K)/(1-q)
->-Kq^{K-1}*(1-q)+(1-qK)/(1-q)^2=(1-Kq^{K-1}+(K-1)q^K)/(1-q)^2
rep(i,N)x+=A[i],wtSp(x);
rep[A](a,N)x+=a,wtLn(x);
x=sum[ll][i,0,N@iの満たす条件$条件を満たすiがない時の返り値](A[i]);
if(OR[i,0,N](A[i]==1))x=1;
wt(x);