結果

問題 No.1439 Let's Compare!!!!
ユーザー ninoinui
提出日時 2021-03-26 22:03:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 1,431 bytes
コンパイル時間 1,876 ms
コンパイル使用メモリ 196,848 KB
最終ジャッジ日時 2025-01-19 22:40:49
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 TLE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC diagnostic warning "-Wextra"
#pragma GCC diagnostic warning "-Wshadow"
#include <bits/stdc++.h>
using namespace std;

template <class A, class B> bool cmin(A& a, B b) { return a > b && (a = b, true); }
template <class A, class B> bool cmax(A& a, B b) { return a < b && (a = b, true); }
template <class A, class B> ostream& operator<<(ostream& os, pair<A, B>& p) { return os << '(' << p.first << ", " << p.second << ')'; }
static bool debug = false;
void dump() {}
template <class A, class... B> void dump(A&& a, B&&... b) { if (debug) cout << a << (sizeof...(b) ? ' ' : '\n'), dump(b...); }
template <class A> void dump1D(A& a) { if (debug) for (auto i = a.begin(); i != a.end(); i++) cout << *i << (next(i) != a.end() ? ' ' : '\n'); }
template <class A> void dump2D(A& a) { if (debug) for (auto i = a.begin(); i != a.end(); i++) dump1D(*i), cout << (next(i) != a.end() ? "" : "\n"); }

signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  // debug = true;

  int N;
  cin >> N;
  vector<int> S(N), T(N);
  for (int i = 0; i < N; i++) {
    char c;
    cin >> c;
    S.at(i) = c - '0';
  }
  for (int i = 0; i < N; i++) {
    char c;
    cin >> c;
    T.at(i) = c - '0';
  }
  dump1D(S);
  dump1D(T);
  int Q;
  cin >> Q;
  while (Q--) {
    char a;
    int b, c;
    cin >> a >> b >> c, b--;
    if (a == 'S') S.at(b) = c;
    else T.at(b) = c;
    cout << ((S > T) ? '>' : (S < T) ? '<' : '=') << '\n';
  }
}
0