結果

問題 No.512 魔法少女の追いかけっこ
ユーザー Nasatame
提出日時 2017-04-08 07:50:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 704 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 55,792 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-27 05:42:56
合計ジャッジ時間 1,727 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 52 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <assert.h>
using namespace std;

int a[100];

int main(void){
    
    int x,y,n;
    cin >> x >> y >> n;
    
    assert(x >= 1 && x <= 100);
    assert(y >= 1 && y <= 100);
    assert(n >= 1 && n <= 80);
    
    for(int i = 0; i < n; i++)
        cin >> a[i];
        
    
    for(int i = 0; i < n-1; i++){
        
        
        assert(a[i] < a[i+1]);
        assert(0 < a[i] && a[i] <= 100000);
    
        double diff = ( a[i] * y ) / x;
        
        if((a[i+1]) < diff ){
            cout << "NO" << endl;
            return 0;
        }
    }
    
    
    cout << "YES" << endl;
        
        
    
    
    
    
    
    
    
    
}
0