結果
| 問題 | No.1439 Let's Compare!!!! | 
| コンテスト | |
| ユーザー |  どらら | 
| 提出日時 | 2021-03-27 04:01:27 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 539 ms / 2,000 ms | 
| コード長 | 1,177 bytes | 
| コンパイル時間 | 4,008 ms | 
| コンパイル使用メモリ | 235,912 KB | 
| 実行使用メモリ | 12,160 KB | 
| 最終ジャッジ日時 | 2024-11-29 08:55:02 | 
| 合計ジャッジ時間 | 9,553 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
//using mint = modint1000000007;
//using mint = modint998244353;
int main(){
  int N;
  cin >> N;
  string S, T;
  cin >> S >> T;
  set<int> s;
  s.insert(N);
  rep(i,S.size()){
    if(S[i] != T[i]){
      s.insert(i);
    }
  }
  
  int Q;
  cin >> Q;
  rep(q,Q){
    string c;
    int x, y;
    cin >> c >> x >> y;
    x--;
    if(c == "S"){
      S[x] = '0' + y;
      if(S[x] == T[x]){
        s.erase(x);
      }else{
        s.insert(x);
      }      
    }else{
      T[x] = '0' + y;
      if(S[x] == T[x]){
        s.erase(x);
      }else{
        s.insert(x);
      }
    }
    int pos = *(s.begin());
    if(pos == N) cout << "=" << endl;
    else{
      int sy = S[pos] - '0';
      int ty = T[pos] - '0';
      if(sy > ty) cout << ">" << endl;
      else cout << "<" << endl;
    }
  }
    
  
  return 0;
}
            
            
            
        