結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー |
![]() |
提出日時 | 2016-09-29 23:31:50 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 193 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 10:42:42 |
合計ジャッジ時間 | 801 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d", &n); | ^~~~~~~~~~~~~~~ main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d %d", &g[i], &d[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main() { int n, g[1000], d[1000], max, maxi, i; const int exp = 30000 * 100; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d", &g[i], &d[i]); if (i == 0 || g[i] - 30000 * d[i] > max) { max = g[i] - 30000 * d[i]; maxi = i; } } if (max * 6 >= exp) { printf("YES\n"); for (i = 0; i < 6; i++) { printf("%d\n", maxi + 1); } } else printf("NO\n"); return 0; }