QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#290158#6794. Sequence to Sequencerepoman#Compile Error//Rust2.1kb2023-12-24 14:52:332023-12-24 14:52:33

详细

error[E0425]: cannot find function `min` in this scope
  --> answer.code:54:22
   |
54 |                     (min(mt, b - r), max(mt, b - r))
   |                      ^^^
...
79 | fn main() {
   | --------- similarly named function `main` defined here
   |
help: a function with a similar name exists
   |
54 |                     (main(mt, b - r), max(mt, b - r))
   |                      ~~~~
help: consider importing this function
   |
1  | use std::cmp::min;
   |

error[E0425]: cannot find function `min` in this scope
  --> answer.code:67:25
   |
67 |             a = max(dl, min(a, dr));
   |                         ^^^
...
79 | fn main() {
   | --------- similarly named function `main` defined here
   |
help: a function with a similar name exists
   |
67 |             a = max(dl, main(a, dr));
   |                         ~~~~
help: consider importing this function
   |
1  | use std::cmp::min;
   |

error[E0425]: cannot find function `min` in this scope
  --> answer.code:68:24
   |
68 |             b = max(a, min(b, dr));
   |                        ^^^
...
79 | fn main() {
   | --------- similarly named function `main` defined here
   |
help: a function with a similar name exists
   |
68 |             b = max(a, main(b, dr));
   |                        ~~~~
help: consider importing this function
   |
1  | use std::cmp::min;
   |

error[E0608]: cannot index into a value of type `i64`
  --> answer.code:40:12
   |
40 |         if b[i] != 0 {
   |            ^^^^

error[E0608]: cannot index into a value of type `i64`
  --> answer.code:43:22
   |
43 |             let dr = a[i] - 1;
   |                      ^^^^

error[E0608]: cannot index into a value of type `i64`
  --> answer.code:72:26
   |
72 |             mt = max(mt, a[i]);
   |                          ^^^^

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0425, E0608.
For more information about an error, try `rustc --explain E0425`.