結果
| 問題 | No.231 めぐるはめぐる (1) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-10-04 15:23:31 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 781 bytes | 
| コンパイル時間 | 490 ms | 
| コンパイル使用メモリ | 65,684 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 23:47:03 | 
| 合計ジャッジ時間 | 1,206 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:41:22: warning: ‘best_place’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   41 |       rep(i,6) printf("%d\n",best_place+1);
      |                ~~~~~~^~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
#include <cstdio>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/* */
/* 入力開始! */
/* 入力終了! */
int main(void)
{
   int i,j,k,l;
   int n;
   int d;
   int g;
   int best = 0;
   int best_place;
   cin >> n;
   rep(i,n) {
      cin >> g >> d;
      if(best < g -30000*d) {
         best = g - 30000*d;
         best_place = i;
      }
   }
   if(best*6 < 30000*100) puts("NO");
   else {
      puts("YES");
      rep(i,6) printf("%d\n",best_place+1);
   }
   return 0;
}
            
            
            
        