結果
問題 | No.2714 Amaou |
ユーザー | ARCANA |
提出日時 | 2024-04-05 21:46:04 |
言語 | Rust (1.77.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,455 bytes |
コンパイル時間 | 13,332 ms |
コンパイル使用メモリ | 392,708 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 02:01:28 |
合計ジャッジ時間 | 14,468 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,812 KB |
testcase_02 | AC | 1 ms
6,820 KB |
testcase_03 | AC | 1 ms
6,816 KB |
testcase_04 | AC | 1 ms
6,816 KB |
testcase_05 | AC | 1 ms
6,816 KB |
testcase_06 | AC | 1 ms
6,820 KB |
testcase_07 | AC | 1 ms
6,816 KB |
testcase_08 | AC | 1 ms
6,820 KB |
testcase_09 | AC | 1 ms
6,816 KB |
testcase_10 | AC | 2 ms
6,816 KB |
testcase_11 | AC | 1 ms
6,820 KB |
testcase_12 | AC | 1 ms
6,820 KB |
testcase_13 | AC | 1 ms
6,820 KB |
testcase_14 | AC | 1 ms
6,820 KB |
testcase_15 | AC | 1 ms
6,820 KB |
testcase_16 | AC | 1 ms
6,820 KB |
testcase_17 | AC | 1 ms
6,820 KB |
testcase_18 | AC | 1 ms
6,824 KB |
testcase_19 | AC | 1 ms
6,816 KB |
testcase_20 | AC | 1 ms
6,820 KB |
testcase_21 | AC | 1 ms
6,820 KB |
testcase_22 | AC | 1 ms
6,820 KB |
testcase_23 | AC | 1 ms
6,820 KB |
testcase_24 | AC | 1 ms
6,820 KB |
testcase_25 | AC | 1 ms
6,816 KB |
testcase_26 | AC | 1 ms
6,824 KB |
testcase_27 | AC | 1 ms
6,820 KB |
コンパイルメッセージ
warning: unused import: `proconio::input` --> src/main.rs:1:5 | 1 | use proconio::input; | ^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `proconio::marker::Chars` --> src/main.rs:2:5 | 2 | use proconio::marker::Chars; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `proconio::marker::Bytes` --> src/main.rs:3:5 | 3 | use proconio::marker::Bytes; | ^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `std::cmp::*` --> src/main.rs:4:5 | 4 | use std::cmp::*; | ^^^^^^^^^^^ warning: unused import: `std::cell::RefCell` --> src/main.rs:5:5 | 5 | use std::cell::RefCell; | ^^^^^^^^^^^^^^^^^^ warning: unused import: `std::collections::HashMap` --> src/main.rs:6:5 | 6 | use std::collections::HashMap; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `std::collections::VecDeque` --> src/main.rs:7:5 | 7 | use std::collections::VecDeque; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `std::collections::BinaryHeap` --> src/main.rs:8:5 | 8 | use std::collections::BinaryHeap; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: struct `Graph` is never constructed --> src/main.rs:11:8 | 11 | struct Graph { | ^^^^^ | = note: `#[warn(dead_code)]` on by default warning: struct `WeightGraph` is never constructed --> src/main.rs:15:8 | 15 | struct WeightGraph { | ^^^^^^^^^^^ warning: struct `Point` is never constructed --> src/main.rs:20:8 | 20 | struct Point { | ^^^^^ warning: struct `PointGroup` is never constructed --> src/main.rs:25:8 | 25 | struct PointGroup{ | ^^^^^^^^^^ warning: structure field `adjMatrixs` should have a snake case name --> src/main.rs:13:5 | 13 | adjMatrixs: Vec<Vec<i32>>, | ^^^^^^^^^^ help: convert the identifier to snake case: `adj_matrixs` | = note: `#[warn(non_snake_case)]` on by default
ソースコード
use proconio::input; use proconio::marker::Chars; use proconio::marker::Bytes; use std::cmp::*; use std::cell::RefCell; use std::collections::HashMap; use std::collections::VecDeque; use std::collections::BinaryHeap; // graph struct Graph { node: i32, adjMatrixs: Vec<Vec<i32>>, } struct WeightGraph { node: i32, weight: Vec<Vec<i32>>, } // points struct Point { x: i32, y: i32, } struct PointGroup{ n: i32, point:Point, } use std::io; fn read_line() -> String { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); s } macro_rules! from_line { ($($a:ident : $t:ty),+) => { $(let $a: $t;)+ { let _line = read_line(); let mut _it = _line.trim().split_whitespace(); $($a = _it.next().unwrap().parse().unwrap();)+ assert!(_it.next().is_none()); } }; } fn solve(){ from_line!(n: usize); let mut s = vec![vec![String::new();4];n]; let model = ["akai", "marui", "okii", "umai"]; for i in 0..n{ from_line!(a:String,b:String,c:String,d:String); s[i] = vec![a,b,c,d]; } let mut count = 0; 'counter: for i in 0..n{ s[i].sort(); for j in 0..4{ if s[i][j] != model[j]{ continue 'counter; } } count += 1; // println!("{} {}",i,count); } println!("{}",count); } fn main() { solve(); }