結果
| 問題 | No.1439 Let's Compare!!!! | 
| コンテスト | |
| ユーザー |  沙耶花 | 
| 提出日時 | 2021-03-26 21:26:18 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 813 ms / 2,000 ms | 
| コード長 | 680 bytes | 
| コンパイル時間 | 6,517 ms | 
| コンパイル使用メモリ | 254,340 KB | 
| 最終ジャッジ日時 | 2025-01-19 21:52:37 | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000001
int main(){
	
	int N;
	cin>>N;
	
	string S,T;
	cin>>S>>T;
	
	set<int> ne;
	rep(i,N){
		if(S[i]!=T[i])ne.insert(i);
	}
	
	int Q;
	cin>>Q;
	
	rep(_,Q){
		char c;
		int x,y;
		cin>>c>>x>>y;
		x--;
		
		if(S[x]!=T[x])ne.erase(x);
		if(c=='S')S[x] = '0'+y;
		if(c=='T')T[x] = '0'+y;
		if(S[x]!=T[x])ne.insert(x);
		
		if(ne.size()==0)printf("=\n");
		else{
			int ind = *ne.begin();
			if(S[ind]<T[ind])printf("<\n");
			else printf(">\n");
		}
		
	}
	
    return 0;
}
            
            
            
        