結果
| 問題 | No.1439 Let's Compare!!!! |
| コンテスト | |
| ユーザー |
👑 Nachia
|
| 提出日時 | 2021-03-26 22:09:56 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 286 ms / 2,000 ms |
| + 967µs | |
| コード長 | 609 bytes |
| 記録 | |
| コンパイル時間 | 2,831 ms |
| コンパイル使用メモリ | 279,940 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2026-10-03 23:17:30 |
| 合計ジャッジ時間 | 7,709 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#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+'0';
if(c=='T') T[x]=y+'0';
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