結果
| 問題 | No.3587 Too Good to Swap |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-26 13:29:45 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 607 bytes |
| 記録 | |
| コンパイル時間 | 1,095 ms |
| コンパイル使用メモリ | 211,664 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-10 20:53:03 |
| 合計ジャッジ時間 | 3,063 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 31 WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int Q;
cin >> Q;
while (Q--) {
string S, T;
cin >> S >> T;
vector<int> cntS(3), cntT(3); // d, o, g
for (char c : S) {
if (c == 'd') cntS[0]++;
else if (c == 'o') cntS[1]++;
else cntS[2]++;
}
for (char c : T) {
if (c == 'd') cntT[0]++;
else if (c == 'o') cntT[1]++;
else cntT[2]++;
}
cout << (cntS == cntT ? "Yes" : "No") << '\n';
}
}