Submission #64330893
Source Code Expand
Copy
#![allow(unused_imports)]#![allow(unused_variables)]#![allow(non_snake_case)]use ac_library::*;use once_cell::sync::Lazy;use static_assertions::*;use varisat::*;use memoise::*;use argio::*;use bitvec::prelude::*;use counter::Counter;use hashbag::*;use pathfinding::prelude::*;use recur_fn::*;use ::indexing::*;use amplify::*;use amplify_derive::*;use amplify_num::*;use easy_ext::*;use multimap::*;use btreemultimap::*;
#![allow(unused_imports)] #![allow(unused_variables)] #![allow(non_snake_case)] use ac_library::*; use once_cell::sync::Lazy; use static_assertions::*; use varisat::*; use memoise::*; use argio::*; use bitvec::prelude::*; use counter::Counter; use hashbag::*; use pathfinding::prelude::*; use recur_fn::*; use ::indexing::*; use amplify::*; use amplify_derive::*; use amplify_num::*; use easy_ext::*; use multimap::*; use btreemultimap::*; use bstr::*; use az::*; use glidesort::*; use ::tap::*; use omniswap::*; use multiversion::*; use ::num::*; use num_bigint::*; use num_complex::*; use num_integer::*; use num_iter::*; use num_rational::*; use num_traits::*; use num_derive::*; use ndarray::*; use nalgebra::*; use alga::*; use libm::*; use rand::*; use getrandom::*; use rand_chacha::*; use rand_core::*; use rand_hc::*; use rand_pcg::*; use rand_distr::*; use petgraph::*; use indexmap::*; use regex::*; use lazy_static::*; use ordered_float::*; use ascii::*; use permutohedron::*; use superslice::*; use itertools::*; use itertools_num::*; use maplit::*; use either::*; use im_rc::*; use fixedbitset::*; use bitset_fixed::*; use proconio::input; use proconio::marker::{Bytes, Chars, Usize1}; use text_io::*; use rustc_hash::*; use smallvec::*; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; fn main() { input! { _: usize, S: proconio::marker::Chars, T: proconio::marker::Chars, } let ans = solve(S, T); println!("{}", ans); } fn solve(S: Vec<char>, T: Vec<char>) -> usize { let mut res = 0; for i in 0..S.len() { if S[i] != T[i] { res += 1; } } res }
Submission Info
Submission Time | |
---|---|
Task | A - Hamming Distance |
User | maysay_d |
Language | Rust (rustc 1.70.0) |
Score | 100 |
Code Size | 1662 Byte |
Status | AC |
Exec Time | 0 ms |
Memory | 2060 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 03_handmade_00.txt, 03_handmade_01.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 0 ms | 2060 KB |
00_sample_01.txt | AC | 0 ms | 1896 KB |
00_sample_02.txt | AC | 0 ms | 1916 KB |
00_sample_03.txt | AC | 0 ms | 1920 KB |
01_random_00.txt | AC | 0 ms | 1932 KB |
01_random_01.txt | AC | 0 ms | 1892 KB |
01_random_02.txt | AC | 0 ms | 1928 KB |
02_random2_00.txt | AC | 0 ms | 1920 KB |
02_random2_01.txt | AC | 0 ms | 1940 KB |
02_random2_02.txt | AC | 0 ms | 1928 KB |
02_random2_03.txt | AC | 0 ms | 1928 KB |
02_random2_04.txt | AC | 0 ms | 1916 KB |
02_random2_05.txt | AC | 0 ms | 1796 KB |
02_random2_06.txt | AC | 0 ms | 1892 KB |
02_random2_07.txt | AC | 0 ms | 1920 KB |
03_handmade_00.txt | AC | 0 ms | 1900 KB |
03_handmade_01.txt | AC | 0 ms | 1912 KB |