問題一覧 > 通常問題

No.1439 Let's Compare!!!!

レベル : / AI推定難易度 : 825 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 159
作問者 : first_vil / テスター : uwi
お気に入りにしたユーザー ProblemId : 5533 / 自分の提出
問題文最終更新日: 2021-03-26 00:41:22
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 288 (順位表) の他の問題:

Problem Statement

You are given $N$-digit non-negative integers $S,T$ in decimal notation, and $Q$ queries. In the $i$-th query, change the $x_i$-th digit from the top of the integer $c_i$ to $y_i$, then compare the magnitudes of $S,T$. Note that the change made in each query is not reverted when the query ends and continues to apply to subsequent queries (see the samples for details).

Input

$N$
$S$
$T$
$Q$
$c_1\ x_1\ y_1$
$c_2\ x_2\ y_2$
$\vdots$
$c_Q\ x_Q\ y_Q$

  • All numbers in the input are integers
  • $1 \le N,Q \le 2 \times 10^5$
  • $S,T$ are $N$-digit non-negative integers in decimal notation
  • $S,T$ may contain leading zeros, both in the input and at the end of each query
  • $c_i$ is either S or T
  • $1 \le x_i \le N$
  • $0 \le y_i \le 9$

Output

After each query, print > if $S > T$, = if $S = T$, and < if $S < T$, followed by a newline.

Sample

Sample 1
Input
5
45218
08809
4
T 1 3
S 1 2
T 1 2
T 4 6
Output
>
<
<
<

The operations change $(S,T)$ as follows: $(45218,08809) → (45218,38809) → (25218,38809) → (25218,28809) → (25218,28869)$.

Sample 2
Input
20
40565756273027673892
10905458842553731367
20
S 1 9
T 5 5
S 19 8
T 12 3
S 20 9
S 9 9
S 1 3
S 1 0
S 1 5
T 19 7
S 2 9
T 18 7
T 20 0
S 5 7
T 1 5
T 11 3
T 5 3
S 1 1
S 1 1
S 10 6
Output
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
<
<
<

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。