爆零的诸位pascal看过来!!!

是不是苦恼样例能过但全部WA?
看一看你的变量定义是不是*integer*?
如果是的话。。恭喜,用*longint直接AC*。。。

数据一定有毒

3 条评论

  • @ 2016-07-14 15:08:07

    现已习惯使用longint

    integer有毒

  • @ 2016-07-08 15:30:41

    水啊啊啊

  • @ 2016-06-27 16:41:38

    longint照样wa
    ```pascal
    type list=record
    name:string;
    markqm,markbj,lw,s:longint;
    ganbu,xibu:boolean;
    end;
    var a:array[0..101] of list;
    n,i,k,l:longint;
    b:char;

    procedure sort(l,r: longint);
    var
    i,j,x: longint;
    y:list;
    begin
    i:=l;
    j:=r;
    x:=a[(l+r) div 2].s;
    repeat
    while a[i].s<x do
    inc(i);
    while x<a[j].s do
    dec(j);
    if not(i>j) then
    begin
    y:=a[i];
    a[i]:=a[j];
    a[j]:=y;
    inc(i);
    j:=j-1;
    end;
    until i>j;
    if l<j then
    sort(l,j);
    if i<r then
    sort(i,r);
    end;

    begin
    readln(n);
    for i:=1 to n do
    with a[i] do
    begin
    read(b);
    l:=1;
    while b<>' ' do
    begin
    name[l]:=b;
    read(b);
    inc(l);
    end;
    name[0]:=chr(l);
    read(markqm,markbj);
    read(b);
    read(b);
    if b='Y' then ganbu:=true else ganbu:=false;
    read(b);
    read(b);
    if b='Y' then xibu:=true else xibu:=false;
    read(b);
    read(lw);
    readln;
    end;
    k:=0;
    for i:=1 to n do
    with a[i] do
    begin
    s:=0;
    if (markqm>80) and (lw>=1) then inc(s,8000);
    if (markqm>85) and (markbj>80) then inc(s,4000);
    if (markqm>90) then inc(s,2000);
    if (xibu) and (markqm>85) then inc(s,1000);
    if (markbj>80) and (ganbu) then inc(s,850);
    inc(k,s);
    end;
    sort(1,n);
    writeln(a[n].name);
    writeln(a[n].s);
    writeln(k);
    end.
    ```

  • 1

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39063
已通过
12711
通过率
33%
被复制
121
上传者