結果

問題 No.231 めぐるはめぐる (1)
コンテスト
ユーザー michonz4
提出日時 2019-12-18 21:04:42
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 1,000 ms
+ 866µs
コード長 600 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 57 ms
コンパイル使用メモリ 37,760 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-22 15:19:37
合計ジャッジ時間 1,308 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

int main() {
  int n;
  scanf("%d", &n);

  int arr[n], i, G, D, max=0;
  for (i=0; i<n; i++) {
    scanf("%d %d", &G, &D);
    if (G-(30000*D)<0) {
      arr[i]=0;
    } else {
      arr[i]=G-(30000*D);
      if (max<arr[i]) max=arr[i];
    }
  }

  if (max*6>=3000000) {
    printf("YES\n");
  } else {
    printf("NO\n");
    return 0;
  }

  for (i=0; i<n; i++) {
    if (arr[i]==max) {
      printf("%d\n", i+1);
      printf("%d\n", i+1);
      printf("%d\n", i+1);
      printf("%d\n", i+1);
      printf("%d\n", i+1);
      printf("%d\n", i+1);
      return 0;
    }
  }
}
0