結果

問題 No.2922 Rose Garden
ユーザー ryusei111
提出日時 2024-10-12 19:56:21
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,164 bytes
コンパイル時間 4,564 ms
コンパイル使用メモリ 274,856 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 19:56:31
合計ジャッジ時間 8,544 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<(ll)n;i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define mod 998244353
#define dai 5000000000000000000LL
#define sho -dai
#define eps 1e-14
#define fi(x) cout<<fixed<<setprecision(x);
using ll=long long;
using un=unsigned long long;
using ld=long double;
using st=string;
using ch=char;
using bo=bool;
using P=pair<ll,ll>;
using T=tuple<ll,ll,ll>;
using vi=vector<ll>;
using vs=vector<st>;
using vc=vector<ch>;
using vb=vector<bo>;
using vp=vector<P>;
using sp=set<P>;
using ss=set<st>;
using si=set<ll>;
using vvi=vector<vi>;
using vvs=vector<vs>;
using vvb=vector<vb>;
using vvc=vector<vc>;
using vvp=vector<vp>;
using vsi=vector<set<ll>>;
const ll dx[4]={0,1,0,-1};
const ll dy[4]={1,0,-1,0};
const ll INF = 1e18;

int main(){
	ll n,s,b;
	cin>>n>>s>>b;
	vi a(n);
	rep(i,n){
		cin>>a[i];
	}
	bool ok=true;
	rep(i,n-1){
		if(a[i+1]-a[i]>0){
			if((a[i+1]-a[i])%b==0){
				if((a[i+1]-a[i])/b>s){
					ok=false;
				}
			}else{
			  if((a[i+1]-a[i])/b+1>s){
			    ok=false;
			  }
			}
		}
	}
	if(ok){
		cout<<"Yes"<<endl;
	}else{
		cout<<"No"<<endl;
	}
}
0