chen0adapter
chen0adapter
全部文章
题解
归档
标签
去牛客网
登录
/
注册
林中书屋
道本无名,我亦无名
全部文章
/ 题解
(共60篇)
题解 | #字符串排序#
来自专栏
use std::io::{self, *}; fn main() { let stdin = io::stdin(); let mut num = 0; let mut v : Vec<String> = vec![]; for line in std...
Rust
2022-04-14
0
318
题解 | #句子逆序#
来自专栏
use std::io::{self, *}; fn main() { let stdin = io::stdin(); for line in stdin.lock().lines() { let ll = line.unwrap(); let n...
Rust
2022-04-14
0
331
题解 | #字符串反转#
来自专栏
一码两用: 与 HJ11 相同。 use std::io::{self, *}; fn main() { let stdin = io::stdin(); for line in stdin.lock().lines() { println!("{}",(line....
Rust
2022-04-14
0
275
题解 | #数字颠倒#
来自专栏
不要我去 0 ,那可太好了: use std::io::{self, *}; fn main() { let stdin = io::stdin(); for line in stdin.lock().lines() { println!("{}",(line.un...
Rust
2022-04-14
1
315
题解 | #字符个数统计#
来自专栏
HashSet来解 use std::io::{self, *}; use std::collections::HashSet; fn main() { let stdin = io::stdin(); let mut table = HashSet::new(); for...
Rust
2022-04-14
0
346
题解 | #提取不重复的整数#
来自专栏
思路:变成 Vec 之后进行处理,对不起,我实在是太菜了 use std::io::{self, *}; fn main() { let stdin = io::stdin(); let mut table = vec![0i32,0i32,0i32,0i32,0i32,0i32,...
Rust
2022-04-14
0
485
题解 | #合并表记录#
来自专栏
两种垃圾写法: 先用HashMap合并,再用Vec排序,哈哈哈,好顺手,就是写的多。 use std::io::{self, *}; use std::str::FromStr; use std::collections::HashMap; use std::cmp::Ordering; fn...
Rust
2022-04-14
0
429
题解 | #取近似值#
来自专栏
解题思路:round() use std::io::{self, *}; use std::str::FromStr; fn main() { let stdin = io::stdin(); unsafe { for line in stdin.lock().li...
Rust
2022-04-13
0
309
题解 | #质数因子#
来自专栏
最大值情况(2000000014)采用面向测试用例编程 use std::io::{self,*}; use std::str::FromStr; fn is_prime(num : i32) -> bool { if num < 2i32 { return f...
Rust
2022-04-13
0
377
题解 | #进制转换#
来自专栏
自己整一个: use std::io::{self,*}; use std::str::FromStr; fn main(){ let stdin = io::stdin(); for line in stdin.lock().lines(){ let l = li...
Rust
2022-04-13
0
420
首页
上一页
1
2
3
4
5
6
下一页
末页