結果

問題 No.231 めぐるはめぐる (1)
コンテスト
ユーザー yagi2
提出日時 2017-04-21 11:12:25
言語 Java
(openjdk 26.0.2.1)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 116 ms / 1,000 ms
+ 57µs
コード長 581 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,396 ms
コンパイル使用メモリ 85,028 KB
実行使用メモリ 47,544 KB
最終ジャッジ日時 2026-08-19 12:58:45
合計ジャッジ時間 3,721 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int D = Integer.parseInt(sc.next());

        boolean f = false;
        for (int i = 1; i <= D; i++) {
            if (sc.nextLong() - sc.nextInt() * 30000 >= 500000) {
                f = true;
                System.out.println("YES");
                System.out.printf("%d\n%d\n%d\n%d\n%d\n%d\n", i, i, i, i, i, i);
                break;
            }
        }
        if (!f) {
            System.out.println("NO");
        }
    }
}
0