結果

問題 No.1439 Let's Compare!!!!
ユーザー 👑 NachiaNachia
提出日時 2021-03-26 22:07:29
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 4,799 ms
コンパイル使用メモリ 267,948 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-05-06 15:41:11
合計ジャッジ時間 10,071 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 6 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 402 ms
5,376 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <atcoder/all>
using namespace atcoder;
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

int N,Q;
string S,T;
set<int> G;

int main(){
  cin>>N>>S>>T>>Q;

  rep(i,N) if(S[i]!=T[i]) G.insert(i);

  rep(i,Q){
    char c; int x,y; cin>>c>>x>>y; x--;
    if(S[x]!=T[x]) G.erase(x);
    if(c=='S') S[x]=y;
    if(c=='T') T[x]=y;
    if(S[x]!=T[x]) G.insert(x);
    if(G.size()==0) printf("=\n");
    else{
      int p=*G.begin();
      if(S[p]<T[p]) printf("<\n"); else printf(">\n");
    }
  }
  return 0;
}
0