Submission #75057187


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define endl "\n"

string clean(string s)/// rem ass much as u can
{
    string t;
    for(char k:s)
    {
        ll z=t.size();
        if(z>=3&& k==')'&&t[z-1]=='x'&&t[z-2]=='x'&&t[z-3]=='(')
        {
            swap(t[z-1],t[z-3]);
            t.pop_back();
        }
        else
        {
            t+=k;
        }
    }
    return t;
}

signed main()
{
    ios::sync_with_stdio(0),cin.tie(0);

    int Tc=0,Tests=1;
    cin>>Tests;
    while(Tc++<Tests)
    {
        string a,b;
        cin>>a>>b;
        bool ans=clean(a)==clean(b);

        cout<<(ans?"Yes":"No")<<endl;

    }///End TotalTests
}   ///End Main

Submission Info

Submission Time
Task D - (xx)
User Dark_543
Language C++23 (GCC 15.2.0)
Score 425
Code Size 735 Byte
Status AC
Exec Time 32 ms
Memory 10228 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 425 / 425
Status
AC × 1
AC × 37
Set Name Test Cases
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_small_00.txt, 01_small_01.txt, 01_small_02.txt, 01_small_03.txt, 01_small_04.txt, 01_small_05.txt, 01_small_06.txt, 02_medium_00.txt, 02_medium_01.txt, 02_medium_02.txt, 02_medium_03.txt, 02_medium_04.txt, 02_medium_05.txt, 02_medium_06.txt, 02_medium_07.txt, 02_medium_08.txt, 02_medium_09.txt, 02_medium_10.txt, 02_medium_11.txt, 02_medium_12.txt, 03_random_00.txt, 03_random_01.txt, 03_random_02.txt, 03_random_03.txt, 03_random_04.txt, 03_random_05.txt, 03_random_06.txt, 03_random_07.txt, 03_random_08.txt, 03_random_09.txt, 04_corner_00.txt, 04_corner_01.txt, 04_corner_02.txt, 04_corner_03.txt, 04_corner_04.txt, 04_corner_05.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3656 KiB
01_small_00.txt AC 24 ms 3448 KiB
01_small_01.txt AC 24 ms 3592 KiB
01_small_02.txt AC 24 ms 3588 KiB
01_small_03.txt AC 24 ms 3680 KiB
01_small_04.txt AC 24 ms 3452 KiB
01_small_05.txt AC 24 ms 3552 KiB
01_small_06.txt AC 14 ms 3448 KiB
02_medium_00.txt AC 32 ms 3656 KiB
02_medium_01.txt AC 29 ms 3640 KiB
02_medium_02.txt AC 27 ms 3496 KiB
02_medium_03.txt AC 25 ms 3680 KiB
02_medium_04.txt AC 25 ms 3452 KiB
02_medium_05.txt AC 25 ms 3680 KiB
02_medium_06.txt AC 21 ms 3680 KiB
02_medium_07.txt AC 16 ms 3576 KiB
02_medium_08.txt AC 12 ms 3768 KiB
02_medium_09.txt AC 17 ms 3448 KiB
02_medium_10.txt AC 15 ms 3612 KiB
02_medium_11.txt AC 12 ms 3608 KiB
02_medium_12.txt AC 10 ms 3784 KiB
03_random_00.txt AC 10 ms 4420 KiB
03_random_01.txt AC 11 ms 4536 KiB
03_random_02.txt AC 10 ms 4368 KiB
03_random_03.txt AC 10 ms 4524 KiB
03_random_04.txt AC 10 ms 4380 KiB
03_random_05.txt AC 5 ms 5560 KiB
03_random_06.txt AC 10 ms 6180 KiB
03_random_07.txt AC 10 ms 6236 KiB
03_random_08.txt AC 10 ms 6136 KiB
03_random_09.txt AC 10 ms 5836 KiB
04_corner_00.txt AC 8 ms 9312 KiB
04_corner_01.txt AC 8 ms 9152 KiB
04_corner_02.txt AC 9 ms 10024 KiB
04_corner_03.txt AC 9 ms 10228 KiB
04_corner_04.txt AC 9 ms 9208 KiB
04_corner_05.txt AC 9 ms 9252 KiB