답안 #864024

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
864024 2023-10-21T17:25:37 Z Ice_man Truck Driver (IOI23_deliveries) C++17
컴파일 오류
0 ms 0 KB
#include <iostream>

#define maxn 100005
#define maxq 300005
#define INF 1000000010
#define endl '\n'
#include "deliveries.h"

using namespace std;

int n;
int pomm[maxn];
int pomm2[maxn];

void init(int N, int[] U, int[] V, int[] T, int[] W)
{
    n = N;
    W[0]++;
    for(int i = 0; i < n; i++){ pomm[i] = W[i];pomm2[i] = T[i];}
}


int64 max_time(int S , int X)
{
    pomm[S] = X;
    int minn = min(pomm[0] , pomm[1]);
    return 2 * pomm2[0] * minn;
}


Compilation message

deliveries.cpp:15:24: error: expected ',' or '...' before 'U'
   15 | void init(int N, int[] U, int[] V, int[] T, int[] W)
      |                        ^
deliveries.cpp: In function 'void init(int, int*)':
deliveries.cpp:18:5: error: 'W' was not declared in this scope
   18 |     W[0]++;
      |     ^
deliveries.cpp:19:59: error: 'T' was not declared in this scope
   19 |     for(int i = 0; i < n; i++){ pomm[i] = W[i];pomm2[i] = T[i];}
      |                                                           ^
deliveries.cpp: At global scope:
deliveries.cpp:23:1: error: 'int64' does not name a type; did you mean 'int64_t'?
   23 | int64 max_time(int S , int X)
      | ^~~~~
      | int64_t