結果
| 問題 |
No.2714 Amaou
|
| ユーザー |
ARCANA
|
| 提出日時 | 2024-04-05 21:47:53 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 1,271 bytes |
| コンパイル時間 | 12,172 ms |
| コンパイル使用メモリ | 395,800 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-01 02:02:55 |
| 合計ジャッジ時間 | 13,298 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
コンパイルメッセージ
warning: struct `Graph` is never constructed
--> src/main.rs:3:8
|
3 | struct Graph {
| ^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: struct `WeightGraph` is never constructed
--> src/main.rs:7:8
|
7 | struct WeightGraph {
| ^^^^^^^^^^^
warning: struct `Point` is never constructed
--> src/main.rs:12:8
|
12 | struct Point {
| ^^^^^
warning: struct `PointGroup` is never constructed
--> src/main.rs:17:8
|
17 | struct PointGroup{
| ^^^^^^^^^^
warning: structure field `adjMatrixs` should have a snake case name
--> src/main.rs:5:5
|
5 | adjMatrixs: Vec<Vec<i32>>,
| ^^^^^^^^^^ help: convert the identifier to snake case: `adj_matrixs`
|
= note: `#[warn(non_snake_case)]` on by default
ソースコード
// 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();
// println!("{:?}",s[i]);
for j in 0..4{
if s[i][j] != model[j]{
continue 'counter;
}
}
count += 1;
// println!("{} {}",i,count);
}
println!("{}",count);
}
fn main() {
solve();
}
ARCANA