QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#825059#9774. Same Sumucup-team3607#Compile Error//Rust21.1kb2024-12-21 17:11:432024-12-21 17:11:51

Details

error[E0599]: no function or associated item named `from_iter` found for struct `PushFreeSegTree` in the current scope
   --> answer.code:79:36
    |
79  |       let mut sum = PushFreeSegTree::from_iter(arr.iter().map(|&t| AddSum {
    |                                      ^^^^^^^^^ function or associated item not found in `PushFreeSegTree<_, _>`
...
544 | /         pub struct PushFreeSegTree<
545 | |             Val: Copy + Add<Output = Val> + Mul<Change, Output = Val> + MulAssign<Change> + Zero,
546 | |             Change: Copy + One + MulAssign<Change>,
547 | |         > {
    | |_________- function or associated item `from_iter` not found for this struct
    |
note: if you're trying to build a new `PushFreeSegTree<_, _>`, consider using `PushFreeSegTree::<Val, Change>::new` which returns `PushFreeSegTree<Val, Change>`
   --> answer.code:562:13
    |
562 |             pub fn new(n: 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;
    |

error[E0599]: no function or associated item named `from_iter` found for struct `PushFreeSegTree` in the current scope
   --> answer.code:83:36
    |
83  |       let mut pos = PushFreeSegTree::from_iter(arr.iter().map(|&t| x.pow(t as u64)));
    |                                      ^^^^^^^^^ function or associated item not found in `PushFreeSegTree<_, _>`
...
544 | /         pub struct PushFreeSegTree<
545 | |             Val: Copy + Add<Output = Val> + Mul<Change, Output = Val> + MulAssign<Change> + Zero,
546 | |             Change: Copy + One + MulAssign<Change>,
547 | |         > {
    | |_________- function or associated item `from_iter` not found for this struct
    |
note: if you're trying to build a new `PushFreeSegTree<_, _>`, consider using `PushFreeSegTree::<Val, Change>::new` which returns `PushFreeSegTree<Val, Change>`
   --> answer.code:562:13
    |
562 |             pub fn new(n: 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;
    |

error[E0599]: no function or associated item named `from_iter` found for struct `PushFreeSegTree` in the current scope
   --> answer.code:84:36
    |
84  |       let mut neg = PushFreeSegTree::from_iter(arr.iter().map(|&t| rx.pow(t as u64)));
    |                                      ^^^^^^^^^ function or associated item not found in `PushFreeSegTree<_, _>`
...
544 | /         pub struct PushFreeSegTree<
545 | |             Val: Copy + Add<Output = Val> + Mul<Change, Output = Val> + MulAssign<Change> + Zero,
546 | |             Change: Copy + One + MulAssign<Change>,
547 | |         > {
    | |_________- function or associated item `from_iter` not found for this struct
    |
note: if you're trying to build a new `PushFreeSegTree<_, _>`, consider using `PushFreeSegTree::<Val, Change>::new` which returns `PushFreeSegTree<Val, Change>`
   --> answer.code:562:13
    |
562 |             pub fn new(n: 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;
    |

error: aborting due to 3 previous errors

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