ch:char;
n,p,i,j,k:integer;
begin
readln(n,p,ch,a);
if n=0 then writeln(’-1’)
else begin
for i:=1 to p do
begin
readln(s);
if (length(s)<length(a))or
(length(s)= length(a))and(a>=s)then
begin
k:=i;
break;
end;
end;
if k>0 then
for i:=k+1 to n do readln(s);
if (p=n)and(k=0)or(k>0)and(length(s)=length(a))and(a=s)
then
k:=-1;
if (k=0)and(p<n)then k:=p+1;
writeln(k);
end;
end.
题目编号:262-游戏排行榜 查看该题
状态: Accepted
测评机: Xeond[6]
得分: 100分
提交日期: 2008-8-19 14:33:00
有效耗时: 642毫秒
测试结果1: 通过本测试点|有效耗时171:ms
测试结果2: 通过本测试点|有效耗时47:ms
测试结果3: 通过本测试点|有效耗时47:ms
测试结果4: 通过本测试点|有效耗时47:ms
测试结果5: 通过本测试点|有效耗时63:ms
测试结果6: 通过本测试点|有效耗时47:ms
测试结果7: 通过本测试点|有效耗时47:ms
测试结果8: 通过本测试点|有效耗时63:ms
测试结果9: 通过本测试点|有效耗时63:ms
测试结果10: 通过本测试点|有效耗时47:ms
我交了13次的成果……
粗心要人命啊……555……
b,d,e,f,g,h,i,j,k,l,s,p,r,m,n:longint;
begin
read(m,l,n);
for i:=1to l do
read(a[i]);
k:=1;
while n<=a[k] do
inc(k);
if k>m then
writeln(-1)
else begin
while a[k-1]=n do
dec(k);
writeln(k);
end;
end.
你不给我分!我和你急!!
program life;
var
int:array[0..50] of longint;
i,j,p,s,n,pro:longint;
begin
readln (p,s,n);
for i:=1 to s do
readln (int[i]);
int[0]:=maxlongint;
int[s+1]:=maxlongint;
if (p>s) or (int[s]<n) then
begin
for i:=0 to s do
if (int[i]>n) and (int[i+1]<=n) then
begin
writeln (i+1);
halt;
end;
end;
if (p>s) and (int[s]>n) then writeln (s+1)
else
writeln (-1);
end.
var
p,s,n,i,j,k,x:longword;
a:array[0..140]of longword;
begin
readln(p,s,n);
for i:=1 to s do readln(a[i]);
if a[p]>=n then begin write(-1);halt;end;
for i:=1 to p do
if n>=a[i] then begin write(i);halt;end;
end.