結果

問題 No.1439 Let's Compare!!!!
ユーザー karinohitokarinohito
提出日時 2023-10-10 01:36:04
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 500 ms / 2,000 ms
コード長 874 bytes
コンパイル時間 4,575 ms
コンパイル使用メモリ 266,396 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2023-10-10 01:36:16
合計ジャッジ時間 10,607 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,352 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 1 ms
4,356 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 8 ms
4,352 KB
testcase_08 AC 13 ms
4,352 KB
testcase_09 AC 6 ms
4,352 KB
testcase_10 AC 500 ms
11,656 KB
testcase_11 AC 399 ms
6,828 KB
testcase_12 AC 388 ms
6,884 KB
testcase_13 AC 478 ms
11,904 KB
testcase_14 AC 478 ms
11,864 KB
testcase_15 AC 367 ms
4,352 KB
testcase_16 AC 321 ms
4,356 KB
testcase_17 AC 295 ms
4,348 KB
testcase_18 AC 284 ms
4,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
#include <time.h> 
using namespace atcoder;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
#define all(A) A.begin(),A.end()
#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)


int main() {

    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    ll N,Q;
    string S,T;
    cin>>N>>S>>T>>Q;
    set<ll> P;
    rep(i,N)if(S[i]!=T[i])P.insert(i);
    rep(q,Q){
        char C,Y;
        ll X;
        cin>>C>>X>>Y;
        X--;
        if(P.count(X))P.erase(X);
        (C=='S'?S:T)[X]=Y;
        if(S[X]!=T[X])P.insert(X);
        if(P.size()==0)cout<<"="<<endl;
        else{
            auto p=*(P.begin());
            cout<<(S[p]<T[p]?"<":">")<<endl;
        }
    }
}
0