結果

問題 No.1439 Let's Compare!!!!
ユーザー Franny-Stein
提出日時 2021-03-26 22:31:26
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 596 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 68,708 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-29 00:07:44
合計ジャッジ時間 2,079 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 3 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
using namespace std;

inline void query(unsigned int& st, int x, int y, int N)
{
    int de=pow(10,N-x);
    st -= (st/de)%10 * de;
    st += y*de;
}

int main()
{
    unsigned int N,S,T,Q;
    cin >> N >> S >> T >> Q;
    char c;
    int x,y;
    for(int i=0; i<Q; i++)
    {
        cin >> c >> x >> y;
        if(c == 'S')
        {
            query(S,x,y,N);
        }else{
            query(T,x,y,N);
        }
        if(S > T) cout << '>' << endl;
        else if(T == S) cout << '=' << endl;
        else cout << '<' << endl;
    }
    
    return 0;
}
0