/ Vijos /

记录详情

Compile Error

/in/foo.c:1:1: error: unknown type name 'type'
 type
 ^~~~
/in/foo.c:2:10: error: 'record' undeclared here (not in a function)
    Tnode=record
          ^~~~~~
/in/foo.c:3:12: error: expected ',' or ';' before 'nam'
            nam:string;
            ^~~
/in/foo.c:4:12: warning: data definition has no type or storage class
            adv,cla,num,tot:longint;
            ^~~
/in/foo.c:4:12: warning: type defaults to 'int' in declaration of 'adv' [-Wimplicit-int]
/in/foo.c:4:16: warning: type defaults to 'int' in declaration of 'cla' [-Wimplicit-int]
            adv,cla,num,tot:longint;
                ^~~
/in/foo.c:4:20: warning: type defaults to 'int' in declaration of 'num' [-Wimplicit-int]
            adv,cla,num,tot:longint;
                    ^~~
/in/foo.c:4:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
            adv,cla,num,tot:longint;
                           ^
/in/foo.c:5:12: warning: data definition has no type or storage class
            job,west:boolean;
            ^~~
/in/foo.c:5:12: warning: type defaults to 'int' in declaration of 'job' [-Wimplicit-int]
/in/foo.c:5:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
            job,west:boolean;
                    ^
/in/foo.c:6:10: warning: data definition has no type or storage class
          end;
          ^~~
/in/foo.c:6:10: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:7:2: error: unknown type name 'var'; did you mean 'char'?
  var
  ^~~
  char
/in/foo.c:8:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   st:string;
     ^
/in/foo.c:9:3: warning: data definition has no type or storage class
   N,i,p,q,ans,max:longint;
   ^
/in/foo.c:9:3: warning: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
/in/foo.c:9:5: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
   N,i,p,q,ans,max:longint;
     ^
/in/foo.c:9:7: warning: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
   N,i,p,q,ans,max:longint;
       ^
/in/foo.c:9:9: warning: type defaults to 'int' in declaration of 'q' [-Wimplicit-int]
   N,i,p,q,ans,max:longint;
         ^
/in/foo.c:9:11: warning: type defaults to 'int' in declaration of 'ans' [-Wimplicit-int]
   N,i,p,q,ans,max:longint;
           ^~~
/in/foo.c:9:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   N,i,p,q,ans,max:longint;
                  ^
/in/foo.c:10:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   a:array[1..100]of Tnode;
    ^
/in/foo.c:10:11: error: too many decimal points in number
   a:array[1..100]of Tnode;
           ^~~~~~
/in/foo.c:11:3: error: unknown type name 'begin'
   begin
   ^~~~~
/in/foo.c:12:4: warning: parameter names (without types) in function declaration
    readln(N);
    ^~~~~~
/in/foo.c:13:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     max:=0;
        ^
/in/foo.c:14:5: error: expected identifier or '(' before 'for'
     for i:=1 to N do
     ^~~
/in/foo.c:17:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
         a[i].job:=false;
             ^
/in/foo.c:18:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
         a[i].west:=false;
             ^
/in/foo.c:19:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         p:=pos(' ',st);
          ^
/in/foo.c:20:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
         a[i].nam:=copy(st,1,p-1);
             ^
/in/foo.c:21:19: error: expected ')' before numeric constant
         delete(st,1,p);
                   ^
/in/foo.c:22:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         p:=pos(' ',st);
          ^
/in/foo.c:23:13: error: unknown type name 'copy'
         val(copy(st,1,p-1),a[i].adv);
             ^~~~
/in/foo.c:23:28: error: unknown type name 'a'
         val(copy(st,1,p-1),a[i].adv);
                            ^
/in/foo.c:24:19: error: expected ')' before numeric constant
         delete(st,1,p);
                   ^
/in/foo.c:25:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         p:=pos(' ',st);
          ^
/in/foo.c:26:13: error: unknown type name 'copy'
         val(copy(st,1,p-1),a[i].cla);
             ^~~~
/in/foo.c:26:28: error: unknown type name 'a'
         val(copy(st,1,p-1),a[i].cla);
                            ^
/in/foo.c:27:19: error: expected ')' before numeric constant
         delete(st,1,p);
                   ^
/in/foo.c:28:9: error: expected identifier or '(' before 'if'
         if st[1]='Y' then a[i].job:=true;
         ^~
/in/foo.c:29:9: error: expected identifier or '(' before 'if'
         if st[3]='Y' then a[i].west:=true;
         ^~
/in/foo.c:30:19: error: expected ')' before numeric constant
         delete(st,1,4);
                   ^
/in/foo.c:31:17: error: expected ')' before '[' token
         val(st,a[i].num);
                 ^
/in/foo.c:32:9: error: expected identifier or '(' before 'if'
         if (a[i].adv>80)and(a[i].num>=1) then inc(a[i].tot,8000);
         ^~
/in/foo.c:33:9: error: expected identifier or '(' before 'if'
         if (a[i].adv>85)and(a[i].cla>80) then inc(a[i].tot,4000);
         ^~
/in/foo.c:34:9: error: expected identifier or '(' before 'if'
         if a[i].adv>90 then inc(a[i].tot,2000);
         ^~
/in/foo.c:35:9: error: expected identifier or '(' before 'if'
         if (a[i].adv>85)and(a[i].west) then inc(a[i].tot,1000);
         ^~
/in/foo.c:36:9: error: expected identifier or '(' before 'if'
         if (a[i].cla>80)and(a[i].job) then inc(a[i].tot,850);
         ^~
/in/foo.c:37:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         ans:=ans+a[i].tot;
            ^
/in/foo.c:38:9: error: expected identifier or '(' before 'if'
         if a[i].tot>max then
         ^~
/in/foo.c:41:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
            q:=i;
             ^
/in/foo.c:42:10: warning: data definition has no type or storage class
          end;
          ^~~
/in/foo.c:42:10: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:43:7: warning: data definition has no type or storage class
       end;
       ^~~
/in/foo.c:43:7: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:44:15: error: unknown type name 'a'
       writeln(a[q].nam);
               ^
/in/foo.c:45:15: error: unknown type name 'a'
       writeln(a[q].tot);
               ^
/in/foo.c:46:7: warning: data definition has no type or storage class
       write(ans);
       ^~~~~
/in/foo.c:46:7: warning: type defaults to 'int' in declaration of 'write' [-Wimplicit-int]
/in/foo.c:46:7: warning: parameter names (without types) in function declaration
/in/foo.c:47:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    end.
       ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2017-10-04 10:50:49
评测时间
2017-10-04 10:50:49
评测机
分数
0
总耗时
20ms
峰值内存
2.77 MiB