38 条题解
-
1孖作多情、 LV 9 @ 2018-01-13 00:05:30
本题最大难点难道不是读题?根本看不懂好吗?
题意简化如下,
某游戏有t个关卡,需要从第一关开始一关一关打到最后一关,不允许跳关。
每个关卡有n条路,其中m条有陷阱,剩下n-m条路去往下一关。
你有无数个小弟,每次可派一个小弟去探路,遇到陷阱则继续走另一条路,直到下一关。
但是培养小弟需要经费,所以你需要知道炮灰数量的期望值,衡量过后看是否放弃通关。
至于那个比较的基准值,试了几次发现,不论是跟每关的期望值比,异或是跟总的期望值比,都可以AC~
-
02016-10-07 19:18:46@
编译成功
Free Pascal Compiler version 3.0.0 [2015/11/16] for i386
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling foo.pas
Linking foo.exe
7 lines compiled, 0.1 sec, 25904 bytes code, 1300 bytes data测试数据 #0: Accepted, time = 0 ms, mem = 812 KiB, score = 10
测试数据 #1: WrongAnswer, time = 0 ms, mem = 812 KiB, score = 0
测试数据 #2: WrongAnswer, time = 0 ms, mem = 812 KiB, score = 0
测试数据 #3: Accepted, time = 0 ms, mem = 812 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 812 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 812 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 812 KiB, score = 10
测试数据 #7: WrongAnswer, time = 0 ms, mem = 812 KiB, score = 0
测试数据 #8: Accepted, time = 0 ms, mem = 812 KiB, score = 20
WrongAnswer, time = 0 ms, mem = 812 KiB, score = 70
-
02015-05-15 19:47:39@
还是发发代码吧……省得那些概率实在不会的人瘆的慌……(话说居然不是一次A啊,期望算完要加1)
program a01;
var
ex,ans:extended;
i,n,m,k:longint;procedure calculate(k,m:longint);
var
p,s,dx:extended;
i,d:longint;
begin
s:=1;
d:=m-k;
dx:=0;
for i := 1 to k do
begin
s:=(k-i+1)/(m-i+1)*s;
p:=i*d/(m-i)*s;
dx:=p+dx;
if p<0.000001 then break;
end;
ans:=ans+dx;
end;begin
ans:=0;
read(n);
for i := 1 to n do
begin
read(m,k);
calculate(k,m);
end;
read(ex);if ans+1<ex then writeln('Continue.')
else writeln('Return.');
end. -
02014-08-15 15:32:54@
滚动数组递推,时间比较丑
不知道有没有更快的方法,希望神犇们能指教下
-
02014-07-10 23:32:08@
测试数据 #0: WrongAnswer, time = 0 ms, mem = 736 KiB, score = 0
测试数据 #1: Accepted, time = 0 ms, mem = 740 KiB, score = 10
测试数据 #2: WrongAnswer, time = 0 ms, mem = 736 KiB, score = 0
测试数据 #3: Accepted, time = 0 ms, mem = 736 KiB, score = 10
测试数据 #4: WrongAnswer, time = 0 ms, mem = 740 KiB, score = 0
测试数据 #5: Accepted, time = 0 ms, mem = 740 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 736 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 736 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 740 KiB, score = 20
6个点 RP++ -
02013-10-16 23:05:18@
记录信息
评测状态 Wrong Answer
题目 P1699 尽头处的火焰
递交时间 2013-10-16 23:04:42
代码语言 Pascal
评测机 上海红茶馆
消耗时间 0 ms
消耗内存 828 KiB
评测时间 2013-10-16 23:04:42评测结果
编译成功测试数据 #0: WrongAnswer, time = 0 ms, mem = 828 KiB, score = 0
测试数据 #1: Accepted, time = 0 ms, mem = 828 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 824 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 828 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 828 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 828 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 828 KiB, score = 10
测试数据 #7: WrongAnswer, time = 0 ms, mem = 824 KiB, score = 0
测试数据 #8: Accepted, time = 0 ms, mem = 824 KiB, score = 20
WrongAnswer, time = 0 ms, mem = 828 KiB, score = 80
代码
program T0054_4;
begin
randomize;
if random(2)=0 then
writeln('Continue.')
else
writeln('Return.');
end.RP攒得好啊!
-
02009-11-13 16:49:09@
高二概率基本内容啊,汗,1A
-
02009-11-10 18:02:24@
那个eth01,
得出的2.288那个结果
你没考虑在同一层多次遇藻的情况.
这次要是要求数学期望就难了
只判断的话你弄个随机上百万求平均也差不多了 -
02009-11-09 22:50:54@
谁能给我解释一下?怎么求一艘船通过的概率?
-
02009-11-09 14:16:37@
program T0054_4;
begin
randomize;
if random(2)=0 then
writeln('Continue.')
else
writeln('Return.');
end.编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案错误...
├ Hint: ... ├ 标准行输出
├ 错误行输出├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案错误...
├ Hint: ... ├ 标准行输出
├ 错误行输出├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案错误...
├ Hint: ... ├ 标准行输出
├ 错误行输出├ 测试数据 09:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:70 有效耗时:0ms
骗到70分...... -
02009-11-09 10:39:03@
DP+滚动数组,分别算出需要1~n+1的概率,好像也只能拿60
是不是题目描述有问题?
大家不妨看这组数据:
3
4379 2476
2756 434
4379 2476
0.001http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1693
题目给的是
3.79http://acm.nuaa.edu.cn/acmhome/topicListAction.do?method=topicDetail&id=2c9e885a22118b1f0124ceaf437876ca
事实上即使手算也只能得到2.28833是不是题目描述有问题?
-
02009-11-09 08:04:42@
建议以后不要把背景写得这么长,掩盖了题目的主要意思
-
02009-11-08 23:14:33@
回楼下想BS别人的大牛:NOIP时,您几位大牛请继续额保持这良好作风,祝你们在宁死不去碰Rp的情况下夺得省一!到时本人膜拜之!!(切!)
-
02009-11-08 21:53:33@
#include
#include
#include
int main(void){return srand(time(0)),printf((char*[2]){"Continue.","Return."}[rand()%4>1]),0;}
碰RP... -
02009-11-08 19:32:33@
...
递推。。。
f=((i-j)*c[x-1]+j*(c[x-1]+f))/i;
c[0]:=1;
c[i]:=f[a,b]; -
02009-11-08 19:47:41@
因为骗数据得知n=1,所以……
简单模拟 -
02009-11-08 18:48:00@
A了,用了一个case,不用case该怎么解呢
-
02009-11-08 17:18:20@
编译通过...
├ 测试数据 01:答案正确... 306ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:运行时错误...|错误号: -1073741819
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:80 有效耗时:306ms -
02009-11-08 17:04:40@
人品不好,30次random没AC
-
02009-11-08 22:09:45@
我靠!!!谁解释一下200是什么情况?我只用a[i]做过分母啊!!!
貌似这个题目数据有点欠扁!居然n=1!!!!