結果
| 問題 |
No.1439 Let's Compare!!!!
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2021-03-26 22:07:29 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 601 bytes |
| コンパイル時間 | 3,945 ms |
| コンパイル使用メモリ | 255,472 KB |
| 最終ジャッジ日時 | 2025-01-19 22:45:07 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 3 WA * 14 |
ソースコード
#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;
}
Nachia