最新帖子 精华区 社区服务 会员列表 统计排行
  • 10641阅读
  • 12回复

这是什么变态数据!

楼层直达
1256274 15:52:30
3 Aug 2006 les 1057 Pascal Time limit exceeded 7 2.031 194 KB
如果,爱

http://hi.baidu.com/听海哭的声音
只看该作者 1  发表于: 2006-08-03
你用掐时撒!
.


祝大家明年NOIP大获全盛!


.
只看该作者 2  发表于: 2006-08-03
I got Compilation error or Crash (at #test 5 access violation),but my program is so quickly!
.


祝大家明年NOIP大获全盛!


.

只看该作者 3  发表于: 2006-08-03
URAL到底是什么呀?谁能告诉我?
衆裏尋她千百度,驀然回首,那人卻在燈火闌珊處……
只看该作者 4  发表于: 2006-08-03
一个在线题库,但题型不象USACO那样分级排列~~~so~~做起来很自然~

但不适合专题训练~
.


祝大家明年NOIP大获全盛!


.
只看该作者 5  发表于: 2006-08-03
引用
引用第2楼bluetear2006-08-03 21:20发表的“”:
I got Compilation error or Crash (at #test 5 access violation),but my program is so quickly!


偶的弱程序:
用的类似背包问题的算法。



var tt,top,k,b:int64;
  i,j,x,y:longint;
  q:int64;
  a:array[0..32]of longint;
  f:packed array[0..1000000000]of boolean;
  total:packed array[0..1000000000]of byte;

begin
read(x,y,k,b);
q:=1;
top:=0;
repeat
a[top]:=q;

inc(top);
q:=q*b;

until q>y;
dec(top);

f[0]:=true;
total[0]:=0;

tt:=0;

if k<>1 then
for i:=0 to top do
begin
  for j:=y downto a do
  if total[j]<k then

  if ((f[j]=false)and(f[j-a]=true))
    or((f[j]=true)and(f[j-a]=true)
    and(total[j-a]+1<total[j])) then
    begin
    f[j]:=true;
    total[j]:=total[j-a]+1;
    if (total[j]=k)and(j>=x) then inc(tt);

    end;
end
else
begin
for i:=0 to top do
  if a in [x..y] then inc(tt);
end;

writeln(tt);

end.
.


祝大家明年NOIP大获全盛!


.
级别: 管理员

只看该作者 6  发表于: 2006-08-19
引用
引用第2楼北极星的眼泪2006-08-03 21:20发表的“”:
but my program is so quickly!

英语语法错误
but my program is so quick 或 but my program runs so quickly
只看该作者 7  发表于: 2006-08-20
Thanks for the MS!
.


祝大家明年NOIP大获全盛!


.
级别: 管理员

只看该作者 8  发表于: 2006-08-22
What is MS?
只看该作者 9  发表于: 2006-08-25
引用
引用第8楼sammy3122006-08-22 10:23发表的“”:
What is MS?



MS=message
.


祝大家明年NOIP大获全盛!


.
快速回复

限100 字节
 
上一个 下一个