結果

問題 No.1439 Let's Compare!!!!
ユーザー auauaauaua
提出日時 2021-03-26 22:21:05
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 496 ms / 2,000 ms
コード長 1,263 bytes
コンパイル時間 2,040 ms
コンパイル使用メモリ 171,584 KB
実行使用メモリ 13,112 KB
最終ジャッジ日時 2023-08-19 15:22:55
合計ジャッジ時間 7,566 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 9 ms
4,380 KB
testcase_08 AC 14 ms
4,380 KB
testcase_09 AC 6 ms
4,384 KB
testcase_10 AC 483 ms
12,868 KB
testcase_11 AC 493 ms
12,848 KB
testcase_12 AC 491 ms
12,708 KB
testcase_13 AC 496 ms
12,840 KB
testcase_14 AC 493 ms
13,112 KB
testcase_15 AC 478 ms
12,852 KB
testcase_16 AC 459 ms
12,892 KB
testcase_17 AC 453 ms
12,848 KB
testcase_18 AC 415 ms
12,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

//#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
#define double long double
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
//typedef long double ld;
typedef complex<double> Complex;
const ll INF=1e9+7;
const ll MOD=998244353;
const ll inf=INF*INF;
const ll mod=MOD;
const ll MAX=2000010;



signed main(){
    ll n;cin>>n;
    string s,t;cin>>s>>t;
    set<ll>st;
    rep(i,n)st.insert(i);
    rep(i,n){
        if(s[i]==t[i])st.erase(i);
    }
    ll q;cin>>q;
    while(q--){
        char c;cin>>c;
        ll x,y;cin>>x>>y;
        x--;
        if(c=='T'){
            t[x]='0'+y;
        }else{
            s[x]='0'+y;
        }
        if(s[x]==t[x])st.erase(x);
        else st.insert(x);
        auto k=st.lower_bound(-1LL);
        if(k==st.end()){
            cout<<'='<<endl;
        }else{
            ll l=*k;
            if(s[l]<t[l])cout<<'<'<<endl;
            else cout<<'>'<<endl;
        }
    }
}
0