結果
| 問題 | No.1048 Zero (Advanced) | 
| コンテスト | |
| ユーザー |  hanbei_dayo | 
| 提出日時 | 2020-05-08 23:11:50 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 725 bytes | 
| コンパイル時間 | 527 ms | 
| コンパイル使用メモリ | 68,852 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-04 01:10:34 | 
| 合計ジャッジ時間 | 1,224 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 15 | 
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
typedef long long ll;
using namespace std;
int main(void){
    ll l,r,m,k;
    cin>>l>>r>>m>>k;
    if(k==0){
        cout<<"Yes"<<endl;
        return 0;
    }
    if(m==1){
        cout<<"Yes"<<endl;
        return 0;
    }
    if(l==0){
        cout<<"Yes"<<endl;
        return 0;
    }
    if(r-l+1>=m){
        cout<<"Yes"<<endl;
        return 0;
    }
    if((l<=m)&&(m<=r)){
        cout<<"Yes"<<endl;
        return 0;
    }
    ll mi = k*l;
    ll ma = k*r;
    if((mi<=m)&&(m<=ma)){
        cout<<"Yes"<<endl;
        return 0;
    }
    ll x = mi/m;
    ll y = ma/m;
    if(ma%m!=0)y++;
    if(y-x>1)cout<<"Yes";
    else cout<<"No";
    
    return 0;
}
            
            
            
        