/ Vijos /

记录详情

Compile Error

foo.cc:3:5: error: 'longa' does not name a type; did you mean 'long'?
    3 |     longa[1000001],s[32769],t,last,ans,ans2,i,max,n,cnt;
      |     ^~~~~
      |     long
foo.cc: In function 'bool check(long int)':
foo.cc:6:14: error: 'cnt' was not declared in this scope; did you mean 'int'?
    6 |       long i;cnt=0;
      |              ^~~
      |              int
foo.cc:7:29: error: 's' was not declared in this scope
    7 |       for (i=1;i<=32768;i++)s[i]=0;//以前是i<=n
      |                             ^
foo.cc:10:9: error: 's' was not declared in this scope
   10 |         s[a[i]]++;if (s[a[i]]==1)cnt++;
      |         ^
foo.cc:10:11: error: 'a' was not declared in this scope
   10 |         s[a[i]]++;if (s[a[i]]==1)cnt++;
      |           ^
foo.cc:12:16: error: 'ans' was not declared in this scope
   12 |       if (cnt==ans) return true;
      |                ^~~
foo.cc:13:21: error: 'n' was not declared in this scope
   13 |       for (i=k+1;i<=n;i++)
      |                     ^
foo.cc:15:11: error: 's' was not declared in this scope
   15 |           s[a[i]]++;if (s[a[i]]==1)cnt++;
      |           ^
foo.cc:15:13: error: 'a' was not declared in this scope
   15 |           s[a[i]]++;if (s[a[i]]==1)cnt++;
      |             ^
foo.cc:17:20: error: 'ans' was not declared in this scope
   17 |           if (cnt==ans) returntrue;
      |                    ^~~
foo.cc:17:25: error: 'returntrue' was not declared in this scope
   17 |           if (cnt==ans) returntrue;
      |                         ^~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:31:24: error: 'n' was not declared in this scope
   31 |       scanf("%ld %ld",&n,&max);
      |                        ^
foo.cc:31:27: error: 'max' was not declared in this scope
   31 |       scanf("%ld %ld",&n,&max);
      |                           ^~~
foo.cc:32:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   32 |       cnt=0;
      |       ^~~
      |       int
foo.cc:33:12: error: 'i' was not declared in this scope
   33 |       for (i=1;i<=n;i++)
      |            ^
foo.cc:35:23: error: 'a' was not declared in this scope
   35 |          scanf("%ld",&a[i]);
      |                       ^
foo.cc:37:12: error: 'i' was not declared in this scope
   37 |       for (i=1;i<=32768;i++)s[i]=0;//以前是i<=n
      |            ^
foo.cc:37:29: error: 's' was not declared in this scope
   37 |       for (i=1;i<=32768;i++)s[i]=0;//以前是i<=n
      |                             ^
foo.cc:38:12: error: 'i' was not declared in this scope
   38 |       for (i=1;i<=max;i++)
      |            ^
foo.cc:40:9: error: 's' was not declared in this scope
   40 |         s[a[i]]++;if (s[a[i]]==1)cnt++;
      |         ^
foo.cc:40:11: error: 'a' was not declared in this scope
   40 |         s[a[i]]++;if (s[a[i]]==1)cnt++;
      |           ^
foo.cc:42:15: error: 'ans' was not declared in this scope
   42 |       if (cnt>ans) ans=cnt;
      |               ^~~
foo.cc:43:12: error: 'i' was not declared in this scope
   43 |       for (i=max+1;i<=n;i++)
      |            ^
foo.cc:45:11: error: 's' was not declared in this scope
   45 |           s[a[i]]++;if (s[a[i]]==1)cnt++;
      |           ^
foo.cc:45:13: error: 'a' was not declared in this scope
   45 |           s[a[i]]++;if (s[a[i]]==1)cnt++;
      |             ^
foo.cc:47:19: error: 'ans' was not declared in this scope
   47 |           if (cnt>ans)ans=cnt;
      |                   ^~~
foo.cc:49:21: error: 'ans' was not declared in this scope
   49 |       printf("%ld ",ans);
      |                     ^~~
foo.cc:50:7: error: 'ans2' was not declared in this scope
   50 |       ans2=erfen(0,max);//以前是(1,max)
      |       ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1760 11月10日的欢乐
语言
C++
递交时间
2022-02-09 18:31:51
评测时间
2022-02-09 18:31:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes