結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
constexpr int inf = 1073741823;
constexpr long long linf = 0xfffffffffffffff;
using ll = long long;
using ld = long double;

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    string a, b; cin >> a >> b;
    bool f = true;
    if(a.size() < b.size()) {
        cout << "No" << endl;
        return 0;
    }
    reverse(a.begin(), a.end());
    reverse(b.begin(), b.end());
    for(int i = 0; i < b.size(); i++) {
        if(a[i] - '0' < b[i] - '0') f = false;
    }
    if(f) {
        cout << "Yes" << endl;
    }else {
        cout << "No" << endl;
    }
}
0