QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#825059 | #9774. Same Sum | ucup-team3607# | Compile Error | / | / | Rust | 21.1kb | 2024-12-21 17:11:43 | 2024-12-21 17:11:51 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
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`.