QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#143466#3263. 期末考试legenc6yCompile Error//C++141.6kb2023-08-21 13:28:082023-08-21 13:28:12

Details

answer.code: In function ‘int main()’:
answer.code:44:9: error: ‘i64’ was not declared in this scope
   44 |         i64 ans = 1e18;
      |         ^~~
answer.code:46:20: error: expected ‘;’ before ‘len’
   46 |                 i64 len = 0;
      |                    ^~~~
      |                    ;
answer.code:48:25: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   48 |                         ans = std::min(ans, (i128)i * b[i] + c[i] + B * len), len += suf[i];
      |                         ^~~
      |                         abs
answer.code:48:73: error: ‘len’ was not declared in this scope
   48 |                         ans = std::min(ans, (i128)i * b[i] + c[i] + B * len), len += suf[i];
      |                                                                         ^~~
answer.code:50:20: error: expected ‘;’ before ‘len’
   50 |                 i64 len = 0;
      |                    ^~~~
      |                    ;
answer.code:52:33: error: ‘len’ was not declared in this scope
   52 |                         tb[i] = len += suf[i + 1];
      |                                 ^~~
answer.code:53:17: error: ‘len’ was not declared in this scope
   53 |                 len = 0;
      |                 ^~~
answer.code:57:28: error: expected ‘;’ before ‘resb’
   57 |                         i64 resb = std::max(tb[i] - ta[i], 0ll), ua = std::min(ta[i], tb[i]);
      |                            ^~~~~
      |                            ;
answer.code:58:25: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   58 |                         ans = std::min(ans, (i128)i * b[i] + c[i] + A * ua + B * resb);
      |                         ^~~
      |                         abs
answer.code:58:73: error: ‘ua’ was not declared in this scope; did you mean ‘xa’?
   58 |                         ans = std::min(ans, (i128)i * b[i] + c[i] + A * ua + B * resb);
      |                                                                         ^~
      |                                                                         xa
answer.code:58:82: error: ‘resb’ was not declared in this scope
   58 |                         ans = std::min(ans, (i128)i * b[i] + c[i] + A * ua + B * resb);
      |                                                                                  ^~~~
answer.code:61:15: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   61 |         print(ans);
      |               ^~~
      |               abs
answer.code:29:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   29 |         scanf("%d %d", &n, &m); w = 0;
      |         ~~~~~^~~~~~~~~~~~~~~~~
answer.code:31:29: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   31 |                 int x; scanf("%d", &x); w = std::max(w, x); xa[i] = x;
      |                        ~~~~~^~~~~~~~~~
answer.code:35:29: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   35 |                 int x; scanf("%d", &x); w = std::max(w, x);
      |                        ~~~~~^~~~~~~~~~