pub struct CFProblem {
pub contest_id: Option<i64>,
pub problemset_name: Option<String>,
pub index: Option<String>,
pub name: String,
pub problem_type: CFProblemType,
pub points: Option<f64>,
pub rating: Option<i64>,
pub tags: Vec<String>,
pub input_testcases: Option<Vec<String>>,
}
Expand description
Struct representing a Codeforces problem.
Fields§
§contest_id: Option<i64>
§problemset_name: Option<String>
§index: Option<String>
§name: String
§problem_type: CFProblemType
§points: Option<f64>
§rating: Option<i64>
§input_testcases: Option<Vec<String>>
Implementations§
Source§impl CFProblem
impl CFProblem
Sourcepub fn fetch_testcases(&mut self) -> Result<Vec<String>, Error>
pub fn fetch_testcases(&mut self) -> Result<Vec<String>, Error>
Extra method which allows a user to fetch testcases directly from a
CFProblem
.
Returns Vec of Strings where each String is a separate input testcase for the problem. Currently, the ‘expected output’ provided by Codeforces is not returned. However, in future this could be implemented relatively easily.
Uses fetch_testcases_for_problem
under the hood.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CFProblem
impl<'de> Deserialize<'de> for CFProblem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for CFProblem
Auto Trait Implementations§
impl Freeze for CFProblem
impl RefUnwindSafe for CFProblem
impl Send for CFProblem
impl Sync for CFProblem
impl Unpin for CFProblem
impl UnwindSafe for CFProblem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more