Submission #864023

# Submission time Handle Problem Language Result Execution time Memory
864023 2023-10-21T17:23:18 Z Ice_man Truck Driver (IOI23_deliveries) C++17
Compilation error
0 ms 0 KB
#include <iostream>

#define maxn 100005
#define maxq 300005
#define INF 1000000010
#define endl '\n'

using namespace std;

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

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