結果

問題 No.1439 Let's Compare!!!!
コンテスト
ユーザー 👑 Nachia
提出日時 2021-03-26 22:07:29
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 601 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,238 ms
コンパイル使用メモリ 277,924 KB
実行使用メモリ 12,600 KB
最終ジャッジ日時 2026-06-19 00:23:03
合計ジャッジ時間 7,058 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 4 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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