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