QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#454221#8218. 水镜ZhangYiDeCompile Error//C++231.1kb2024-06-24 17:47:562024-06-24 17:48:02

详细

answer.code:6:13: error: ‘long’ specified with ‘std::pair<long long int, long long int>’
    6 | pair<ll,ll> long longerval(pair<ll,ll> A,pair<ll,ll> B){
      |             ^~~~
answer.code: In function ‘int main()’:
answer.code:24:54: error: expected primary-expression before ‘long’
   24 |                     if(r<n-1 && a[r-1]<a[r+1]) range=long longerval(range,{a[r-2]+a[r-1],a[r]+a[r+1]});
      |                                                      ^~~~
answer.code:24:102: error: expected primary-expression before ‘)’ token
   24 |                     if(r<n-1 && a[r-1]<a[r+1]) range=long longerval(range,{a[r-2]+a[r-1],a[r]+a[r+1]});
      |                                                                                                      ^
answer.code:25:21: error: expected ‘}’ before ‘else’
   25 |                     else range=long longerval(range,{a[r-2]+a[r-1],a[r-1]+a[r]});
      |                     ^~~~
answer.code:23:39: note: to match this ‘{’
   23 |                 if(r>1 && a[r]>a[r-2]){
      |                                       ^
answer.code:25:32: error: expected primary-expression before ‘long’
   25 |                     else range=long longerval(range,{a[r-2]+a[r-1],a[r-1]+a[r]});
      |                                ^~~~
answer.code:25:80: error: expected primary-expression before ‘)’ token
   25 |                     else range=long longerval(range,{a[r-2]+a[r-1],a[r-1]+a[r]});
      |                                                                                ^
answer.code:28:37: error: expected primary-expression before ‘long’
   28 |                     if(r<n-1) range=long longerval(range,{a[r-1]+a[r],a[r]+a[r+1]});
      |                                     ^~~~
answer.code:28:83: error: expected primary-expression before ‘)’ token
   28 |                     if(r<n-1) range=long longerval(range,{a[r-1]+a[r],a[r]+a[r+1]});
      |                                                                                   ^
answer.code:29:21: error: ‘else’ without a previous ‘if’
   29 |                     else range=long longerval(range,{a[r-1]+a[r],1e18});
      |                     ^~~~
answer.code:29:32: error: expected primary-expression before ‘long’
   29 |                     else range=long longerval(range,{a[r-1]+a[r],1e18});
      |                                ^~~~
answer.code:29:71: error: expected primary-expression before ‘)’ token
   29 |                     else range=long longerval(range,{a[r-1]+a[r],1e18});
      |                                                                       ^
answer.code: At global scope:
answer.code:36:5: error: ‘cout’ does not name a type
   36 |     cout<<ans;
      |     ^~~~
answer.code:37:5: error: expected unqualified-id before ‘return’
   37 |     return 0;
      |     ^~~~~~
answer.code:38:1: error: expected declaration before ‘}’ token
   38 | }
      | ^