Compile Error

foo.cc: In function 'int main()':
foo.cc:8:3: error: 'x' was not declared in this scope
    8 |   x[i]=(x[i-1]*3703+1047)%n+1;
      |   ^
foo.cc:10:5: error: 'x' was not declared in this scope
   10 |  if(x[i-1]==x[i])
      |     ^
foo.cc:12:3: error: 'ls' was not declared in this scope; did you mean 'sl'?
   12 |   ls++;
      |   ^~
      |   sl
foo.cc:16:3: error: 'ls' was not declared in this scope; did you mean 'sl'?
   16 |   ls=1;
      |   ^~
      |   sl
foo.cc:18:5: error: 'ls' was not declared in this scope; did you mean 'sl'?
   18 |  if(ls>3)
      |     ^~
      |     sl
foo.cc:22:6: error: 'a' was not declared in this scope
   22 |  for(a[i]>score)
      |      ^
foo.cc:26:13: error: expected ';' before 'return'
   26 |  cout<<score
      |             ^
      |             ;
   27 |  return 0;
      |  ~~~~~~      
foo.cc:27:2: error: expected primary-expression before 'return'
   27 |  return 0;
      |  ^~~~~~
foo.cc:26:13: error: expected ')' before 'return'
   26 |  cout<<score
      |             ^
      |             )
   27 |  return 0;
      |  ~~~~~~      
foo.cc:22:5: note: to match this '('
   22 |  for(a[i]>score)
      |     ^
foo.cc:5:8: warning: unused variable 'sl' [-Wunused-variable]
    5 |  int i,sl,score=0,n;
      |        ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1064 分数计数
语言
C++
递交时间
2022-05-09 16:31:19
评测时间
2022-05-09 16:31:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes