結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-09-29 22:24:30 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 10:42:01 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 6 |
コンパイルメッセージ
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] - 3000 * d[i] > max) {
max = g[i] - 3000 * 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;
}
くれちー