結果
問題 | No.1439 Let's Compare!!!! |
ユーザー |
![]() |
提出日時 | 2021-03-26 21:31:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 459 ms / 2,000 ms |
コード長 | 640 bytes |
コンパイル時間 | 572 ms |
コンパイル使用メモリ | 74,648 KB |
実行使用メモリ | 12,032 KB |
最終ジャッジ日時 | 2024-11-29 08:36:57 |
合計ジャッジ時間 | 5,247 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 |
ソースコード
#include <iostream> #include <set> using namespace std; int main() { int n; cin >> n; string s, t; cin >> s >> t; set<int> st; for(int i = 0; i < n; i++){ if(s[i] != t[i]) st.insert(i); } int q; cin >> q; while(q--){ char c; int x, y; cin >> c >> x >> y; x--; if(c == 'S') s[x] = char('0' + y); else t[x] = char('0' + y); if(s[x] != t[x]) st.insert(x); else st.erase(x); if(st.empty()) cout << '=' << endl; else if(s[*st.begin()] < t[*st.begin()]) cout << '<' << endl; else cout << '>' << endl; } }