Submission #917197

# Submission time Handle Problem Language Result Execution time Memory
917197 2024-01-27T12:23:09 Z zyq181 Truck Driver (IOI23_deliveries) C++17
Compilation error
0 ms 0 KB
#include "deliveries.h"
#include <bits/stdc++.h>
long long A, B;
long long w;
int ans;

void init(int N, std::vector<int> U, std::vector<int> V, std::vector<int> T, std::vector<int> W) {
	w = T[0];
	A = W[0] + 1;
	B = W[1];
	return;
}

long long max_time(int S, int X) {
	if(S == 0) A = X + 1;
	else B = X;
	return 2LL*min(A, B)*w;
}

Compilation message

deliveries.cpp: In function 'long long int max_time(int, int)':
deliveries.cpp:17:13: error: 'min' was not declared in this scope; did you mean 'std::min'?
   17 |  return 2LL*min(A, B)*w;
      |             ^~~
      |             std::min
In file included from /usr/include/c++/10/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from deliveries.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
 3474 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~