結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-02 21:09:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 513 bytes |
| コンパイル時間 | 465 ms |
| コンパイル使用メモリ | 57,440 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 04:46:54 |
| 合計ジャッジ時間 | 1,268 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
ソースコード
#include <algorithm>
#include <iostream>
using namespace std;
int main(int argc, const char* argv[])
{
int N;
cin >> N;
int G[N], D[N];
int EXP[N];
for (int i = 0; i < N; i++) {
cin >> G[i];
cin >> D[i];
EXP[i] = G[i] - 30000 * D[i];
}
auto maxExpp = max_element(EXP, &EXP[N]);
size_t maxIndex = distance(EXP, maxExpp);
bool ret = 3000000 <= *maxExpp * 6;
cout << (ret ? "YES" : "NO") << endl;
if (!ret) return 0;
for (int i = 0; i < 6; i++) {
cout << maxIndex + 1 << endl;
}
return 0;
}