結果

問題 No.231 めぐるはめぐる (1)
ユーザー nCk_cvnCk_cv
提出日時 2015-08-02 14:39:34
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 859 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 52,460 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 12:17:13
合計ジャッジ時間 906 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 0 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 0 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:20:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   20 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~
main.cpp:27:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   27 |         scanf("%d %d",&g[i],&d[i]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <climits>
#include <vector>
#include <algorithm>
#include <queue>
#include <stdio.h>
#include <string>


#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define INF 99999999

using namespace std;

int main() {

    int n;
    scanf("%d",&n);
    
    int g[n];
    int d[n];
    
    
    for(int i = 0; i < n; i++) {
        scanf("%d %d",&g[i],&d[i]);
    }
    
    int target = 3000000;

    for(int i = 0; i < n; i++) {
        if((g[i] - 30000*d[i])*6 >= target) {
            printf("YES\n");
            for(int j = 0; j < 6; j++) {
                printf("%d\n",(i+1));
            }
            return 0;
        }
    }
    
    printf("NO\n");
    
    
    
    
    
    
    
    
    
    
    
    
}







0