/ Vijos /

记录详情

Compile Error

/in/foo.cc:15:30: warning: '-std=c++11' is not an option that controls warnings [-Wpragmas]
 #pragma GCC diagnostic error "-std=c++11"
                              ^~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:77:17: error: 'ed' was not declared in this scope
    int hNum=sum[ed]-sum[st-1],jNum=len-hNum;
                 ^~
/in/foo.cc:78:11: error: 'jNum' was not declared in this scope
    if(abs(jNum-hNum)<=d||jNum==len||hNum==len)
           ^~~~
/in/foo.cc: At global scope:
/in/foo.cc:88:5: error: redefinition of 'int n'
 int n,d,a[M],sum[M],dp[M][M];
     ^
/in/foo.cc:63:5: note: 'int n' previously declared here
 int n,d,a[M],sum[M],dp[M][M];
     ^
/in/foo.cc:88:7: error: redefinition of 'int d'
 int n,d,a[M],sum[M],dp[M][M];
       ^
/in/foo.cc:63:7: note: 'int d' previously declared here
 int n,d,a[M],sum[M],dp[M][M];
       ^
/in/foo.cc:88:12: error: redefinition of 'int a [2505]'
 int n,d,a[M],sum[M],dp[M][M];
            ^
/in/foo.cc:63:9: note: 'int a [2505]' previously declared here
 int n,d,a[M],sum[M],dp[M][M];
         ^
/in/foo.cc:88:19: error: redefinition of 'int sum [2505]'
 int n,d,a[M],sum[M],dp[M][M];
                   ^
/in/foo.cc:63:14: note: 'int sum [2505]' previously declared here
 int n,d,a[M],sum[M],dp[M][M];
              ^~~
/in/foo.cc:88:28: error: redefinition of 'int dp [2505][2505]'
 int n,d,a[M],sum[M],dp[M][M];
                            ^
/in/foo.cc:63:21: note: 'int dp [2505][2505]' previously declared here
 int n,d,a[M],sum[M],dp[M][M];
                     ^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:89:5: error: redefinition of 'int main()'
 int main(){
     ^~~~
/in/foo.cc:64:5: note: 'int main()' previously defined here
 int main(){
     ^~~~

信息

递交者
类型
递交
题目
P1331 看球的巴士
语言
C++
递交时间
2024-04-24 16:42:28
评测时间
2024-04-24 16:42:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes