結果

問題 No.231 めぐるはめぐる (1)
ユーザー Kaz_nl
提出日時 2017-09-03 17:15:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 421 bytes
コンパイル時間 537 ms
コンパイル使用メモリ 65,276 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-06 20:05:10
合計ジャッジ時間 1,334 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;

int main() {
  int n, g, d, ans = 0;
  vector<int> v;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> g >> d;
    if (g - 30000 * d >= 500000) {
      v.push_back(i);
    }
  }
  if (v.empty()) cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < 6; i++) {
      cout << v[i % v.size()] << endl;
    }
  }
}
0