pascal 玩具(toy)

作者&投稿:祁士 (若有异议请与网页底部的电邮联系)
toy是可数名词吗~

toy作为名词是可数的,如The childien are playing their toys happily.同时它也可以作为形容词,译为玩具的,如toy soildier(玩具士兵).也可以作为动词,把…当儿戏.

大家好!我是开心玩具城的,希望大家有时间进去开心开心。谢谢 http://www.kxc88.com/main.php 查看原帖>>

读入木条时在处理x=y的情况时没有考虑到b[i]的问题,后面
if k[j]=0 then
if x<b[j] then begin inc(a[j-1]); break; end;
还在用错误的b[j]
修改后的程序:
var
a:array[0..20001]of longint;
k,b:array[0..20001]of real;
n,m,x1,y1,x2,y2,i,j,x,y:longint;
begin
assign(input,'toy.in');
reset(input);
assign(output,'toy.out');
rewrite(output);
readln(n,m,x1,y1,x2,y2);
for i:=1 to n do
begin
readln(x,y);
if x-y=0 then begin k[i]:=0;b[i]:=x;end
else begin k[i]:=(y1-y2)/(x-y);b[i]:=y1-k[i]*x;end;
end;
n:=n+1;
k[n]:=0;
b[n]:=x2;
fillchar(a,sizeof(a),0);
for i:=1 to m do
begin
readln(x,y);
for j:=1 to n do
begin
if k[j]<>0 then
if x<(y-b[j])/k[j] then begin inc(a[j-1]); break; end;
if k[j]=0 then
if x<b[j] then begin inc(a[j-1]); break; end;
end;
end;
for i:=0 to n-1 do
writeln(i,': ',a[i]);
close(input);
close(output);
end.
然而超时很严重,只能过3个点(你是怎么知道的?——因为其实我就是wwt),用二分吧。
var
a:array[0..20001]of longint;
k,b:array[0..20001]of real;
n,m,x1,y1,x2,y2,i,j,x,y,l,r,mid:longint;
begin
assign(input,'toy.in');
reset(input);
assign(output,'toy.out');
rewrite(output);
readln(n,m,x1,y1,x2,y2);
for i:=1 to n do
begin
readln(x,y);
if x-y=0 then begin k[i]:=0;b[i]:=x;end
else begin k[i]:=(y1-y2)/(x-y);b[i]:=y1-k[i]*x;end;
end;
fillchar(a,sizeof(a),0);
for i:=1 to m do
begin
readln(x,y);
l:=0;r:=n;
while l<>r do
begin
mid:=(l+r) shr 1+1;
if (k[mid]<>0)and(x<(y-b[mid])/k[mid])
or (k[mid]= 0)and(x<b[mid])
then r:=mid-1
else l:=mid;
end;
inc(a[l]);
end;
for i:=0 to n do
writeln(i,': ',a[i]);
close(input);
close(output);
end.


阿克苏地区15639535704: 小学的所有玩具的英语单词有哪些? -
梁寒安普: toy 玩具 :英 [tɒɪ] 美 [tɔɪ]plaything 玩具:英 ['pleɪθɪŋ] 美 ['pleθɪŋ]rag baby 娃娃玩具:英 [ræg] 美 [ræɡ]peashooter 玩具枪:英 ['piː,ʃuːtə] water gun 玩具水枪:英 [gʌn] 美 [ɡʌn]minicar 玩具车:英 ['mɪnɪkɑː] 美 ['mɪnɪ,k...

阿克苏地区15639535704: 玩具类的英语单词有哪些? -
梁寒安普: toy 玩具 electronic toys 电动玩具 plastic toys 塑料玩具 intelligence toys 益智玩具 staff toys 毛绒玩具 stuffed toy 填充玩具 fancy toy 益智玩具 toy 玩具 bauble 小玩意儿 knickknack 小玩意儿 plaything 玩具 game 游戏 rag baby 娃娃玩具 peashooter ...

阿克苏地区15639535704: toys怎么读?语音读 -
梁寒安普: toys n. [轻] 玩具(toy的复数) v. 摆弄;调情(toy的第三人称单数) 音译:英国读---套一丝,美国读----脱一丝.

阿克苏地区15639535704: p打头的玩具英文 -
梁寒安普: toy 英 [tɔɪ] 美 [tɔɪ] n.玩具,玩物; 小装饰品; 无实用价值的东西 vi.玩弄; 不认真地考虑 adj.玩具的; 作玩具的; 个头很小的; 小体型品种的 网络 玩具; 柳熙烈; 玩具型

阿克苏地区15639535704: 玩具英语怎么说( ) -
梁寒安普: toy O(∩_∩)O~

阿克苏地区15639535704: 玩具的英文怎么写 -
梁寒安普: toy 玩具 doll 玩具娃娃 eg:Yes, a big purple toy car. Do you want to see it?是的,一辆大的紫色玩具汽车.你想看看它吗?.

阿克苏地区15639535704: 属于玩具一类的英语单词有哪些(带中文)???急用!!!! -
梁寒安普: toy 玩具 bauble 小玩意儿 knickknack 小玩意儿 plaything 玩具 game 游戏 rag baby 娃娃玩具 peashooter 玩具枪 water gun 玩具水枪 minicar 玩具车 teddy bear 玩具熊 dollhouse 玩具小屋 LEGO 乐高(著名的积木玩具厂商,基本已经成为积木的代名词了)

阿克苏地区15639535704: 玩具的英文单词怎么写 -
梁寒安普: toyn.玩具,玩物; 小装饰品; 无实用价值的东西; vi.玩弄; 不认真地考虑; adj.玩具的; 作玩具的; 个头很小的; 小体型品种的;第三人称单数:toys 复数:toys 现在进行时:toying 过去式:toyed

阿克苏地区15639535704: 玩具是谁发明的 -
梁寒安普: 什么是玩具(toy)? 简单说,用于“玩”的器具,就叫玩具.著名教育家、儿童教育专家陈鹤琴说:“对玩具应作广义理解,它不是只限于街上卖的供儿童玩的东西,凡是儿童可以玩的、看的、听的和触摸的东西,都可以叫玩具.”玩具不公...

阿克苏地区15639535704: 玩具,交通工具的英语单词 -
梁寒安普: 英文名称:toy 中文名称:玩具 英文名称:electronic toys 中文名称:电动玩具 英文名称:plastic toys 中文名称:塑料玩具 英文名称:intelligence toys 中文名称:益智玩具 英文名称:staff toys 中文名称:毛绒玩具 英文名称:stuffed toy 中文名...

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网