結果
| 問題 | No.3707 Unique Ticket |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-09-22 17:45:45 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 705µs | |
| コード長 | 1,292 bytes |
| 記録 | |
| コンパイル時間 | 7,740 ms |
| コンパイル使用メモリ | 200,092 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-09-22 17:46:02 |
| 合計ジャッジ時間 | 4,406 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 45 |
ソースコード
#![allow(non_snake_case, unused_imports)]
use std::cmp::{min, max};
use std::collections::{BinaryHeap, Bound, HashMap, HashSet, VecDeque};
use std::hash::Hash;
use std::ops::RangeBounds;
use ac_library::{Additive, Min, Segtree};
use proconio::{input, marker::Usize1, marker::Chars};
use itertools::Itertools;
#[allow(unused_macros)]
macro_rules! d {
( $( $x:expr ),* $(,)? ) => {
eprintln!(
concat!( $( stringify!($x), "={:?} " ),* ),
$( $x ),*
);
};
}
#[allow(dead_code)]
fn yn(b: bool) -> &'static str {
if b { "Yes" } else { "No" }
}
fn main() {
input! {
N: usize,
M: usize,
SS: [String; N],
}
let mut xs = vec![0; M];
for s in SS.iter() {
for (i, c) in s.chars().enumerate() {
if c == 'o' {
xs[i] += 1;
}
}
}
let mut ans = 0;
for s in SS.iter() {
if !s.contains('o') { continue }
let b = s.chars()
.zip(xs.iter())
.all(|(c, &x)| {
match c {
'o' => x == 1,
'x' => true,
_ => unreachable!()
}
});
if b {
ans += 1;
}
}
println!("{}", ans);
}
norioc