Compile Error

foo.cc: In function 'int Count(int*, int, int)':
foo.cc:4:18: error: 'n' was not declared in this scope
    4 |  for(int j=i+1;j<n;j++)
      |                  ^
foo.cc:5:18: error: 'm' was not declared in this scope
    5 |    if(x[i]+x[j]==m)
      |                  ^
foo.cc: In function 'int main()':
foo.cc:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   13 |  scanf("%d %d",&n,&m);
      |  ~~~~~^~~~~~~~~~~~~~~
foo.cc:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   15 |   scanf("%d",&x[i]);
      |   ~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1329 6-1 和为定值的数对
语言
C++
递交时间
2021-12-08 13:33:16
评测时间
2021-12-08 13:33:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes