結果
問題 | No.2863 Base 10 Subsets 1 |
ユーザー |
|
提出日時 | 2024-09-18 23:32:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 2,487 bytes |
コンパイル時間 | 1,338 ms |
コンパイル使用メモリ | 119,136 KB |
最終ジャッジ日時 | 2025-02-24 09:30:34 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
#include<iostream>#include<sstream>#include<algorithm>#include<deque>#include<list>#include<map>#include<memory>#include<queue>#include<set>#include<stack>#include<utility>#include<string.h>#include<string>#include<math.h>#include<float.h>#include<stdio.h>#include<vector>#include<iomanip>#include<bitset>#include<random>using namespace std;template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }template<typename T> inline bool chmin(T &a, T b) { return ((a>b) ? (a = b, true) : (false));}#define rep(i,s,n) for(long long i=s;i<(long long)(n);i++)#define rrep(i,s,n) for(long long i=n-1;i>=s;i--)const long long inf = 1LL<<60;typedef long long ll;typedef long double ld;#define cmp [](pair<ll,ll> a, pair<ll,ll> b){if(a.second != b.second) return a.second<b.second; return a.first > b.first; } //pairのsecondでソートsort(p.begin(),p.end(),cmp), secondが同じならfirstで逆順ソート//cmpArg := 偏角ソート, atan2l(y, x);#define cmpArg [](const auto &p1, const auto &p2) { return atan2l(p1.second, p1.first) < atan2l(p2.second, p2.first); }typedef pair<long long, long long> P;typedef pair<ll, pair<ll,ll> > PP;#define rll ll,vector<ll>,greater<ll>#define rP P,vector<P>,greater<P>const long double pi = 3.14159265358979;typedef unsigned long long ull;#define vll vector<ll>#define vvll vector<vector<ll>>#define vvch vector<vector<char>>#define vch vector<char>#define rPP PP,vector<PP>,greater<PP>#define vP vector<P>#define vvP vector<vector<P>>#define all(x) x.begin(), x.end()//bitの差集合 S & ~(1<<i)//UNIQUE(x) xをソートして値の被りがないようにする#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end())int stringcount(string s, char c) { return count(s.cbegin(), s.cend(), c); } //sに含まれるcの数int pc(int x) { return __builtin_popcount(x); } //ビット列にどれだけ1がたっているかを求める pop count//オバフロしない計算はa > inf - b および a > inf / bでとってね//long doubleやdoubleの時はpowl(weight-ave, 2)の方がいい(できるなら2乗を展開せずに組み込みの関数で計算した方がいい)int main(){string a,b; cin >> a >> b;if(b.size() > a.size()) { cout << "No" << endl; return 0; }while(a.size() > b.size()) b = "0" + b;rep(i,0,a.size()) {if(a[i] < b[i]) { cout << "No" << endl; return 0; }}cout << "Yes" << endl;return 0;}