QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#615608#9449. New School Termucup-team3607#Compile Error//Rust20.9kb2024-10-05 19:29:312024-10-05 19:29:31

Details

warning: unused import: `dsu`
   --> answer.code:664:24
    |
664 |         pub(crate) use dsu;
    |                        ^^^
    |
    = note: `#[warn(unused_imports)]` on by default

error[E0599]: no function or associated item named `from_iter` found for struct `DSUContainer` in the current scope
   --> answer.code:131:33
    |
131 |     let mut dsu = DSUContainer::from_iter((0..2 * n).map(|id| Q {
    |                                 ^^^^^^^^^ function or associated item not found in `DSUContainer<_>`
...
506 |         pub struct DSUContainer<T: AddAssign> {
    |         ------------------------------------- function or associated item `from_iter` not found for this struct
    |
note: if you're trying to build a new `DSUContainer<_>` consider using one of the following associated functions:
      DSUContainer::<T>::from_elem
      DSUContainer::<T>::new
      DSUContainer::<T>::with_capacity
   --> answer.code:555:13
    |
555 |             pub fn from_elem(elem: T, n: usize) -> Self {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
564 |             pub fn new() -> Self {
    |             ^^^^^^^^^^^^^^^^^^^^
...
571 |             pub fn with_capacity(capacity: usize) -> Self {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   + use std::iter::FromIterator;
    |
help: there is an associated function with a similar name
    |
131 |     let mut dsu = DSUContainer::from_elem((0..2 * n).map(|id| Q {
    |                                 ~~~~~~~~~

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0599`.