結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-05-29 21:40:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 567 bytes |
コンパイル時間 | 629 ms |
コンパイル使用メモリ | 74,200 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 06:30:41 |
合計ジャッジ時間 | 1,932 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 WA * 20 |
ソースコード
#include<iostream> #include<string> #include<vector> #include<math.h> using namespace std; int count(string S) { return (S[0] == 'R'&&S[1] == 'E'&&S[2] == 'D') ? 1 : 0; } int main() { int x, y,z; int n; double dis; cin >> x >> y; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; x = x*(pow(10, 3)) / (60 * 60)+0.5; y = y*(pow(10, 3)) / (60 * 60)+0.5; for (int i = 0; i < n-1; i++) { dis = (double)a[i] / (double)x; z = y*dis; if (z>a[i+1]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }