結果

問題 No.2863 Base 10 Subsets 1
ユーザー t98slidert98slider
提出日時 2024-09-01 06:55:29
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 830 ms
コンパイル使用メモリ 72,984 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-01 06:55:31
合計ジャッジ時間 1,777 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	string s, t;
	cin >> s >> t;
	reverse(t.begin(), t.end());
	reverse(s.begin(), s.end());
	if(t.size() > s.size()){
		cout << "No\n";
		return 0;
	}
	for(int i = 0; i < t.size(); i++){
		if(t[i] > s[i]){
			cout << "No\n";
			return 0;
		}
	}
	cout << "Yes\n";
}
0