結果

問題 No.512 魔法少女の追いかけっこ
ユーザー evawenis
提出日時 2020-03-19 17:49:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 196,264 KB
最終ジャッジ日時 2025-01-09 07:56:45
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int x,y,n;
	cin>>x>>y>>n;
	vector<int>a(n);
	for(auto&i:a)cin>>i;
	bool yes=true;
	for(int i=1;i<n;++i){
		if(a.at(i)<(long double)y*a.at(i-1)/x)yes=false;
	}
	if(yes)cout<<"YES\n"s;
	else cout<<"NO\n"s;
}
0