結果

問題 No.2371 最大の試練それは起床
ユーザー stonesoil107831stonesoil107831
提出日時 2023-07-14 19:43:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 6,538 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 204,968 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-14 09:35:31
合計ジャッジ時間 2,859 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 WA -
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,352 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 2 ms
4,352 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 1 ms
4,348 KB
testcase_11 AC 1 ms
4,352 KB
testcase_12 AC 1 ms
4,348 KB
testcase_13 AC 1 ms
4,352 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 1 ms
4,352 KB
testcase_16 AC 1 ms
4,352 KB
testcase_17 AC 1 ms
4,348 KB
testcase_18 AC 1 ms
4,352 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,348 KB
testcase_21 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
//struct Fast {Fast() {std::cin.tie(0); ios::sync_with_stdio(false);}} fast;
using namespace std;
using ll= long long;
using ull= uint64_t;
using vi= vector<int>;
using vvi= vector<vi>;
using vvvi= vector<vvi>;
using vll= vector<ll>;
using vvll= vector<vll>;
using vvvll= vector<vvll>;
using vs= vector<string>;
using vc= vector<char>;
using vvc= vector<vc>;
using vvvc= vector<vvc>;
using vb= vector<bool>;
using vvb = vector<vb>;
//setエイリアス
using si=set<int>;
using sll=set<ll>;
using sc=set<char>;
using ss=set<string>;
//pairエイリアス
using pii= pair<int, int>;
using vpii= vector<pii>;
using pll=pair<ll,ll>;
using vpll=vector<pll>;
//using Graph = vector<vector<int>>; // グラフ型重みなし ありはint =edge


#define reps(i, n, m) for (ll i = (ll)n; i < (ll)m; i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define rep(i, m) reps(i, 0, m)
#define all(a) a.begin(), a.end()
#define vecsort(a) sort(all(a))
#define PQminll priority_queue<ll, vector<ll>, greater<ll>>
#define PQmaxll priority_queue<ll,vector<ll>,less<ll>>
#define PQminP priority_queue<P, vector<P>, greater<P>>
#define PQmaxP priority_queue<P,vector<P>,less<P>>
#define NP next_permutation
#define pb push_back
#define mp make_pair
inline int ctoi(char c) {return c - '0';}
template<class T>inline void vcin(vector<T> &n){for(int i=0;i<int(n.size());i++) cin>>n[i];}
template<class T,class K>inline void vcin(vector<T> &n,vector<K> &m){for(int i=0;i<int(n.size());i++) cin>>n[i]>>m[i];}
template<class T>inline void vcin(vector<vector<T>> &n){for(int i=0;i<int(n.size());i++){for(int j=0;j<int(n[i].size());j++){cin>>n[i][j];}}}
template<class T>inline void vcout(vector<T> &n,bool tmp){for(int i=0;i<int(n.size());i++){cout<<n[i];if(tmp)cout<<endl;else cout<<" ";}if(!tmp)cout<<endl;}//if true endl
template<class T>inline void vcout(vector<vector<T>> &n){for(int i=0;i<int(n.size());i++){for(int j=0;j<int(n[i].size());j++){cout<<n[i][j]<<" ";}cout<<endl;}cout<<endl;}
template<class T,class S>inline void vcout(vector<T>&a,vector<S>&b){for(int i=0;i<int(a.size());i++)cout<<a[i]<<" "<<b[i]<<endl;}
void yes(bool a){cout<<(a?"yes":"no")<<endl;}
void YES(bool a){cout<<(a?"YES":"NO")<<endl;}
void Yes(bool a){cout<<(a?"Yes":"No")<<endl;}
template<class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }
template<class T>auto min(const T& a){ return *min_element(all(a));}
template<class T>auto max(const T& a){ return *max_element(all(a));}
template<class T> inline bool isprime(const T b) { if(b==1)return false;if(b==2||b==3)return true;else{for(int i=2;i*i<=b;i++)if(b%i==0)return false;}return true;}

ll pop(ll x){return __builtin_popcountll(x);}//bit counting true
//grpahアルゴリズム-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*//
//template<class T, class U> inline void Gcin(T a,U &G,bool tmp){rep(i,a){int x,y;cin>>x>>y;G[x].pb(y);if(tmp){G[y].pb(x);}}}//無向の時true
class UnionFind{
public:
    vector<ll> parent; //parent[i]はiの親
    vector<ll> siz; //素集合のサイズを表す配列(1で初期化)
    map<ll,vector<ll>> group; //集合ごとに管理する(key:集合の代表元、value:集合の要素の配列)
    ll n; //要素数
    
    //コンストラクタ
    UnionFind(ll n_):n(n_),parent(n_),siz(n_,1){ 
        //全ての要素の根が自身であるとして初期化
        for(ll i=0;i<n;i++){parent[i]=i;}
    }
 
    //データxの属する木の根を取得(経路圧縮も行う)
    ll root(ll x){
        if(parent[x]==x) return x;
        return parent[x]=root(parent[x]);//代入式の値は代入した変数の値なので、経路圧縮できる
    }
 
    //xとyの木を併合
    void unite(ll x,ll y){
        ll rx=root(x);//xの根
        ll ry=root(y);//yの根
        if(rx==ry) return;//同じ木にある時
        //小さい集合を大きい集合へと併合(ry→rxへ併合)
        if(siz[rx]<siz[ry]) swap(rx,ry);
        siz[rx]+=siz[ry];
        parent[ry]=rx;//xとyが同じ木にない時はyの根ryをxの根rxにつける
    }
 
    //xとyが属する木が同じかを判定
    bool same(ll x,ll y){
        ll rx=root(x);
        ll ry=root(y);
        return rx==ry;
    }
 
    //xの素集合のサイズを取得
    ll size(ll x){
        return siz[root(x)];
    }
 
    //素集合をそれぞれグループ化
    void grouping(){
        //経路圧縮を先に行う
        rep(i,n)root(i);
        //mapで管理する(デフォルト構築を利用)
        rep(i,n)group[parent[i]].pb(i);
    }
 
    //素集合系を削除して初期化
    void clear(){
        rep(i,n){parent[i]=i;}
        siz=vector<ll>(n,1);
        group.clear();
    }
};
//-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// template<typename T> inline T nibutan(T x,vector<T>a){T pos=lower_bound(all(a),x)-a.begin();if(pos<=a.size()&&a[pos]==x)return pos;return -1;}
// inline int nibutan(int x,vi a){int pos=lower_bound(all(a),x)-a.begin();if(pos<=a.size(),a[pos]==x)return pos;return -1;}

struct Edge {
    int to;     // 辺の行き先
    int weight; // 辺の重み
    Edge(int t, int w) : to(t), weight(w) { }
};
using Graph = vector<vector<int>>; // グラフ型重みなし ありはint =edge
const ll mod = 1e9+7;

//ll mod=2147483647;
const double pi=3.14159265358;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
/*------------------------------------------------------------------------------------------------------------------------*/


int main(){
    int h,w;
    cin>>h>>w;
    
    if(h<7){
        cout<<"Yes"<<endl;
    }
    else if(h>9){
        cout<<"No"<<endl;
    }
    else if(h==7){
        if(w<=30){
            cout<<"Yes"<<endl;
        }
        else{
            cout<<"Late"<<endl;
        }
    }
    else{
        if(w<30){
            cout<<"Late"<<endl;
        }
        else{
            cout<<"No"<<endl;
        }
    }
}
0