結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
|
提出日時 | 2024-03-31 22:14:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 1,000 ms |
コード長 | 543 bytes |
コンパイル時間 | 4,485 ms |
コンパイル使用メモリ | 250,124 KB |
最終ジャッジ日時 | 2025-02-20 18:29:15 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int N, G[1010], D[1010]; int ma = 0, idx = -1; int main() { cin >> N; for (int i = 0; i < N; i++) { cin >> G[i] >> D[i]; if (ma < G[i] - 30000 * D[i]) { ma = G[i] - 30000 * D[i]; idx = i; } } if (ma * 6 >= 3000000) { cout << "YES" << endl; for (int i = 0; i < 6; i++) { cout << idx + 1 << endl; } } else { cout << "NO" << endl; } return 0; }