QOJ.ac

QOJ

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

详细

error[E0308]: mismatched types
  --> answer.code:66:30
   |
66 |             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
   |
66 |             ba = repeat(&ba, *m);
   |                              +

error[E0308]: mismatched types
  --> answer.code:67:30
   |
67 |             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
   |
67 |             bb = repeat(&bb, *m);
   |                              +

error[E0308]: mismatched types
  --> answer.code:68:30
   |
68 |             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
   |
68 |             bc = repeat(&bc, *m);
   |                              +

error[E0277]: can't compare `&usize` with `{integer}`
  --> answer.code:70:18
   |
70 |             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:71:25
   |
71 |                 if a == m || b == m {
   |                    -    ^ expected `usize`, found `&usize`
   |                    |
   |                    expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
71 |                 if a == *m || b == m {
   |                         +

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

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

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

error[E0308]: mismatched types
  --> answer.code:90:21
   |
90 |             if c != m {
   |                -    ^ expected `usize`, found `&usize`
   |                |
   |                expected because this is `usize`
   |
help: consider dereferencing the borrow
   |
90 |             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`.