結果

問題 No.2863 Base 10 Subsets 1
ユーザー InTheBloom
提出日時 2024-08-30 21:49:55
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 1,080 ms
コンパイル使用メモリ 96,812 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-08-30 21:49:57
合計ジャッジ時間 1,560 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main () {
    string A, B; cin >> A >> B;

    reverse(A.begin(), A.end());
    reverse(B.begin(), B.end());

    if (A.size() < B.size()) {
        cout << "No" << "\n";
        return 0;
    }

    bool ok = true;
    for (int i = 0; i < B.size(); i++) {
        if (A[i] < B[i]) ok = false;
    }

    if (ok) {
        cout << "Yes" << "\n";
    }
    else {
        cout << "No" << "\n";
    }
}
0