/ Vijos /

记录详情

Compile Error

/in/foo.c:1:1: error: unknown type name 'program'
 program Problem_3(input,output);
 ^~~~~~~
/in/foo.c:1:1: warning: parameter names (without types) in function declaration
/in/foo.c:3:3: warning: type defaults to 'int' in declaration of 'max' [-Wimplicit-int]
   max         =1000;
   ^~~
/in/foo.c:4:3: warning: data definition has no type or storage class
   depth       =10000;              //depth最大深度;
   ^~~~~
/in/foo.c:4:3: warning: type defaults to 'int' in declaration of 'depth' [-Wimplicit-int]
/in/foo.c:5:1: error: unknown type name 'type'
 type
 ^~~~
/in/foo.c:6:16: error: 'array' undeclared here (not in a function)
   xing        =array [1..max] of longint;
                ^~~~~
/in/foo.c:6:23: error: too many decimal points in number
   xing        =array [1..max] of longint;
                       ^~~~~~
/in/foo.c:6:31: error: expected ',' or ';' before 'of'
   xing        =array [1..max] of longint;
                               ^~
/in/foo.c:7:1: error: unknown type name 'var'
 var
 ^~~
/in/foo.c:9:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   min1,min2   :longint;           //a,b为输入数据;
               ^
/in/foo.c:10:3: warning: data definition has no type or storage class
   ans,out     :xing;              //out为输出数据;ans为搜索记录数组;
   ^~~
/in/foo.c:10:3: warning: type defaults to 'int' in declaration of 'ans' [-Wimplicit-int]
/in/foo.c:10:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   ans,out     :xing;              //out为输出数据;ans为搜索记录数组;
               ^
/in/foo.c:12:1: error: unknown type name 'procedure'
 procedure search(a,b,try:longint);       //搜索过程;Try为戴加入分母;
 ^~~~~~~~~
/in/foo.c:12:25: error: expected ')' before ':' token
 procedure search(a,b,try:longint);       //搜索过程;Try为戴加入分母;
                         ^
/in/foo.c:13:3: error: unknown type name 'var'
   var
   ^~~
/in/foo.c:14:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     ga,gb,ta,tb:longint;    //gb为此过程中新求出的公共分母;ga为在gb下的新分子;
                ^
/in/foo.c:16:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
     if try>=min2 then exit;   //剪枝一
     ^~
/in/foo.c:17:5: error: expected identifier or '(' before 'if'
     if n=min1 then exit;      //剪枝二
     ^~
/in/foo.c:18:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     ta:=a; tb:=b;                        //ta,tb为此过程中的原分子和分母
       ^
/in/foo.c:18:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     ta:=a; tb:=b;                        //ta,tb为此过程中的原分子和分母
              ^
/in/foo.c:19:5: error: expected identifier or '(' before 'if'
     if tb mod ta=0 then      //判断此次分数是否分子为1;
     ^~
/in/foo.c:22:9: error: expected identifier or '(' before 'if'
         if tb<try then exit;   //判断一
         ^~
/in/foo.c:23:9: error: expected identifier or '(' before 'if'
         if tb>min2 then exit; 
         ^~
/in/foo.c:25:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 min2:=tb;
     ^
/in/foo.c:26:9: warning: data definition has no type or storage class
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
         ^~~
/in/foo.c:26:9: warning: type defaults to 'int' in declaration of 'inc' [-Wimplicit-int]
/in/foo.c:26:9: warning: parameter names (without types) in function declaration
/in/foo.c:26:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
                       ^
/in/foo.c:26:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
                                ^
/in/foo.c:26:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
                                             ^
/in/foo.c:26:50: warning: data definition has no type or storage class
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
                                                  ^~~
/in/foo.c:26:50: warning: type defaults to 'int' in declaration of 'dec' [-Wimplicit-int]
/in/foo.c:26:45: warning: parameter names (without types) in function declaration
         inc(n); ans[n]:=tb; out:=ans; ans[n]:=0; dec(n);
                                             ^
/in/foo.c:27:9: warning: data definition has no type or storage class
         exit;
         ^~~~
/in/foo.c:27:9: warning: type defaults to 'int' in declaration of 'exit' [-Wimplicit-int]
/in/foo.c:27:9: warning: built-in function 'exit' declared as non-function
/in/foo.c:28:7: warning: data definition has no type or storage class
       end;
       ^~~
/in/foo.c:28:7: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:29:5: error: expected identifier or '(' before 'if'
     if n=min1-1 then exit;     //剪枝三
     ^~
/in/foo.c:30:5: error: expected identifier or '(' before 'while'
     while (a*try<=b) and (try<min2) do inc(try);
     ^~~~~
/in/foo.c:31:5: error: expected identifier or '(' before 'while'
     while try<min2 do
     ^~~~~
/in/foo.c:34:9: error: expected identifier or '(' before 'if'
         if (tb mod try=0) or (try mod tb=0) then
         ^~
/in/foo.c:38:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ga:=ta-(tb div try); gb:=tb;
                                        ^
/in/foo.c:39:17: warning: data definition has no type or storage class
                 inc(n);
                 ^~~
/in/foo.c:39:17: warning: type defaults to 'int' in declaration of 'inc' [-Wimplicit-int]
/in/foo.c:39:17: warning: parameter names (without types) in function declaration
/in/foo.c:40:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ans[n]:=try;
                       ^
/in/foo.c:41:33: error: expected ')' before '+' token
                 search(ga,gb,try+1);
                                 ^
/in/foo.c:42:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ans[n]:=0;
                       ^
/in/foo.c:43:17: warning: data definition has no type or storage class
                 dec(n);
                 ^~~
/in/foo.c:43:17: warning: type defaults to 'int' in declaration of 'dec' [-Wimplicit-int]
/in/foo.c:43:17: warning: parameter names (without types) in function declaration
/in/foo.c:45:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'else'
                             else         //case 2: Gcd(tb,try)<>try 
                             ^~~~
/in/foo.c:47:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ga:=(try div tb)*ta-1; gb:=try;
                                          ^
/in/foo.c:48:17: warning: data definition has no type or storage class
                 inc(n);
                 ^~~
/in/foo.c:48:17: warning: type defaults to 'int' in declaration of 'inc' [-Wimplicit-int]
/in/foo.c:48:17: warning: parameter names (without types) in function declaration
/in/foo.c:49:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ans[n]:=try;
                       ^
/in/foo.c:50:33: error: expected ')' before '+' token
                 search(ga,gb,try+1);
                                 ^
/in/foo.c:51:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
                 ans[n]:=0;
                       ^
/in/foo.c:52:17: warning: data definition has no type or storage class
                 dec(n);
                 ^~~
/in/foo.c:52:17: warning: type defaults to 'int' in declaration of 'dec' [-Wimplicit-int]
/in/foo.c:52:17: warning: parameter names (without types) in function declaration
/in/foo.c:53:15: warning: data definition has no type or storage class
              

信息

递交者
类型
递交
题目
P1308 埃及分数
语言
C
递交时间
2018-01-01 14:38:43
评测时间
2018-01-01 14:38:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes