結果
| 問題 | No.3798 algo to goal |
| ユーザー |
|
| 提出日時 | 2026-11-13 23:15:23 |
| 言語 | Rust (1.99.1 + proconio + num + itertools + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 546 bytes |
| 記録 | |
| コンパイル時間 | 3,514 ms |
| コンパイル使用メモリ | 178,048 KB |
| 実行使用メモリ | 8,780 KB |
| 最終ジャッジ日時 | 2026-11-13 23:15:33 |
| 合計ジャッジ時間 | 8,755 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 30 |
ソースコード
use itertools::Itertools;
use proconio::input;
fn main() {
input! {
q: usize,
}
let output = (0..q)
.map(|_| if solve() { "Yes" } else { "No" })
.join("\n");
println!("{output}");
}
fn solve() -> bool {
input! {
s: String,
t: String,
}
fn to_pair(s: &str) -> (String, String) {
let s0 = s.chars().step_by(2).sorted_unstable().collect();
let s1 = s[1..].chars().step_by(2).sorted_unstable().collect();
(s0, s1)
}
to_pair(&s) == to_pair(&t)
}