結果
| 問題 | No.3798 algo to goal |
| ユーザー |
|
| 提出日時 | 2026-11-13 22:48:15 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 581 bytes |
| 記録 | |
| コンパイル時間 | 2,655 ms |
| コンパイル使用メモリ | 341,952 KB |
| 実行使用メモリ | 10,564 KB |
| 最終ジャッジ日時 | 2026-11-13 22:48:23 |
| 合計ジャッジ時間 | 6,777 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 30 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int q;
cin >> q;
auto f = [&](string s){
string odd, even;
for(int i = 0; i < (int)s.size(); i++){
if(i % 2 == 0) odd += s[i];
else even += s[i];
}
sort(even.begin(), even.end());
sort(odd.begin(), odd.end());
return make_pair(even, odd);
};
while(q--){
string s, t;
cin >> s >> t;
cout << (f(s) == f(t) ? "Yes" : "No") << '\n';
}
}