QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#825448#9768. A + B = C Problemucup-team3607#Compile Error//Rust19.8kb2024-12-21 19:27:302024-12-21 19:27:32

详细

error[E0308]: mismatched types
  --> answer.code:67:30
   |
67 |             ba = repeat(&ba, m);
   |                  ------      ^ expected `usize`, found `&usize`
   |                  |
   |                  arguments to this function are incorrect
   |
note: function defined here
  --> answer.code:26:8
   |
26 |     fn repeat(x: &BitSet, rep: usize) -> BitSet {
   |        ^^^^^^             ----------
help: consider dereferencing the borrow
   |
67 |             ba = repeat(&ba, *m);
   |                              +

error[E0308]: mismatched types
  --> answer.code:68:30
   |
68 |             bb = repeat(&bb, m);
   |                  ------      ^ expected `usize`, found `&usize`
   |                  |
   |                  arguments to this function are incorrect
   |
note: function defined here
  --> answer.code:26:8
   |
26 |     fn repeat(x: &BitSet, rep: usize) -> BitSet {
   |        ^^^^^^             ----------
help: consider dereferencing the borrow
   |
68 |             bb = repeat(&bb, *m);
   |                              +

error[E0308]: mismatched types
  --> answer.code:69:30
   |
69 |             bc = repeat(&bc, m);
   |                  ------      ^ expected `usize`, found `&usize`
   |                  |
   |                  arguments to this function are incorrect
   |
note: function defined here
  --> answer.code:26:8
   |
26 |     fn repeat(x: &BitSet, rep: usize) -> BitSet {
   |        ^^^^^^             ----------
help: consider dereferencing the borrow
   |
69 |             bc = repeat(&bc, *m);
   |                              +

error[E0277]: can't compare `&usize` with `{integer}`
  --> answer.code:71:18
   |
71 |             if m != 1 {
   |                  ^^ no implementation for `&usize == {integer}`
   |
   = help: the trait `PartialEq<{integer}>` is not implemented for `&usize`
   = help: the trait `PartialEq` is implemented for `usize`
   = help: for that trait implementation, expected `usize`, found `&usize`

error[E0308]: mismatched types
  --> answer.code:72:25
   |
72 |                 if a == m || b == m {
   |                    -    ^ expected `usize`, found `&usize`
   |                    |
   |                    expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
72 |                 if a == *m || b == m {
   |                         +

error[E0308]: mismatched types
  --> answer.code:72:35
   |
72 |                 if a == m || b == m {
   |                              -    ^ expected `usize`, found `&usize`
   |                              |
   |                              expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
72 |                 if a == m || b == *m {
   |                                   +

error[E0308]: mismatched types
  --> answer.code:85:21
   |
85 |             if a != m {
   |                -    ^ expected `usize`, found `&usize`
   |                |
   |                expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
85 |             if a != *m {
   |                     +

error[E0308]: mismatched types
  --> answer.code:88:21
   |
88 |             if b != m {
   |                -    ^ expected `usize`, found `&usize`
   |                |
   |                expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
88 |             if b != *m {
   |                     +

error[E0308]: mismatched types
  --> answer.code:91:21
   |
91 |             if c != m {
   |                -    ^ expected `usize`, found `&usize`
   |                |
   |                expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
91 |             if c != *m {
   |                     +

error: aborting due to 9 previous errors

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