Submission #19213726


Source Code Expand

Copy
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        final int V = in.nextInt();
        final int E = in.nextInt();
        for (int i = 0; i < E; i++) {
            int u = in.nextInt() - 1;
            int v = in.nextInt() - 1;
            int d = in.nextInt();
        }
        final int dayType = in.nextInt();
        final int nDiv = in.nextInt();
        final int nPattern = in.nextInt();
        final int electricSupplySigma = in.nextInt();
        final double pEvent = in.nextDouble();
        final int deltaEvent = in.nextInt();
        int[][] powerPredict = new int[nPattern][nDiv];
        for (int i = 0; i < nPattern; i++) {
            for (int j = 0; j < nDiv; j++) {
                powerPredict[i][j] = in.nextInt();
            }
        }
        final int nGrid = in.nextInt();
        final int cGridInit = in.nextInt();
        final int cGridMax = in.nextInt();
        final int vGridMax = in.nextInt();
 
        final int[] x = new int[nGrid];
        final int[] pattern = new int[nGrid];
        for (int i = 0; i < nGrid; i++) {
            x[i] = in.nextInt();
            pattern[i] = in.nextInt();
        }
        final int nEv = in.nextInt();
        final int cEvInit = in.nextInt();
        final int cEvMax = in.nextInt();
        final int vEvMax = in.nextInt();
        final int deltaEvMove = in.nextInt();
        final int[] pos = new int[nEv];
        for (int i = 0; i < nEv; i++) {
            pos[i] = in.nextInt();
        }
        final double gamma = in.nextDouble();
        final int tMax = in.nextInt();
 
        for (int turn = 0; turn < tMax; turn++) {
            for (int i = 0; i < nGrid; i++) {
                final int xx = in.nextInt() - 1;
                final int yy = in.nextInt();
                final int powerActual = in.nextInt();
                final int powerExcess = in.nextInt();
                final int powerBuy = in.nextInt();
            }
            for (int i = 0; i < nEv; i++) {
                final int charge = in.nextInt();
                final int u = in.nextInt() - 1;
                final int v = in.nextInt() - 1;
                final int distFromU = in.nextInt();
                final int distFromV = in.nextInt();
            }
            for (int i = 0; i < nEv; i++) {
                System.out.println("stay");
            }
            System.out.flush();
        }
    }
}

Submission Info

Submission Time
Task A - hokudai_hitachi2020_a
User hiro116s
Language Java (OpenJDK 11.0.6)
Score 43954937
Code Size 2550 Byte
Status AC
Exec Time 3687 ms
Memory 60164 KB

Judge Result

Set Name All
Score / Max Score 43954937 / 9999999999999
Status
AC × 16
Set Name Test Cases
All test_case_1, test_case_10, test_case_11, test_case_12, test_case_13, test_case_14, test_case_15, test_case_16, test_case_2, test_case_3, test_case_4, test_case_5, test_case_6, test_case_7, test_case_8, test_case_9
Case Name Status Exec Time Memory
test_case_1 AC 3632 ms 58608 KB
test_case_10 AC 3586 ms 58368 KB
test_case_11 AC 3616 ms 58260 KB
test_case_12 AC 3612 ms 58304 KB
test_case_13 AC 3593 ms 58868 KB
test_case_14 AC 3687 ms 59608 KB
test_case_15 AC 3625 ms 58408 KB
test_case_16 AC 3582 ms 58732 KB
test_case_2 AC 3662 ms 60164 KB
test_case_3 AC 3658 ms 60144 KB
test_case_4 AC 3633 ms 58436 KB
test_case_5 AC 3648 ms 59740 KB
test_case_6 AC 3608 ms 58640 KB
test_case_7 AC 3605 ms 58304 KB
test_case_8 AC 3645 ms 58408 KB
test_case_9 AC 3596 ms 58548 KB