結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-07-10 19:20:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 917 bytes |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 60,628 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 23:41:48 |
| 合計ジャッジ時間 | 1,189 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <float.h>
using namespace std;
int main(){
int n;
cin >> n;
int g[n];
int d[n];
int exp[n];
double max = 30000 / 0.01 / 1000;
int i;
double clearMin = DBL_MAX;
int clearIndex = -1;
for(i=0; i<n; i++){
int g;
int d;
cin >> g;
cin >> d;
double exp = g - d*30000;
exp /= 1000;
int row = i+1;
if(exp < 1) continue;
double exppermax = max / exp;
// cout << row << ":" << exp << ":" << exppermax << endl;
if(exppermax <= 6 && exppermax < clearMin){
clearMin = exppermax;
clearIndex = row;
}
}
if(clearIndex == -1) cout << "NO" << endl;
else{
cout << "YES" << endl;
for(int i=0; i<6; i++) cout << clearIndex << endl;
}
return 0;
}