Submission #221333

# Submission time Handle Problem Language Result Execution time Memory
221333 2020-04-09T21:56:29 Z Sorting Transport (COCI19_transport) C++14
Compilation error
0 ms 0 KB
/ COCI 2018/2019 - Transport
// Lúcio Cardoso

// Solution:

// 1. Use centroid decomposition. Notice that for a pair (u, v), the minimum prefix sum
// of (sum_of_vertices - sum_of_edges) in the path from the centroid to v plus the remaining
// value from the sum of going from u up to the centroid should be >= 0.

// 2. We can insert the values that remain from going from a vertex u by rising up to the
// centroid in a vector, by using a DFS (check dfs_up()). After that, sort this vector, and
// use a BIT in its positions. Initially, our BIT has 1 in every position from 1 to vector_size.

// 3. Before going from the centroid down to a vertex v, update all positions in the BIT that
// are present in v's subtree to 0. After that, we can maintain the minimum prefix going down to
// v using the same method as in dfs_up(), and use a lower_bound in our vector to check the smallest
// index such that its value + the minimum prefix is >= 0. When we find that index, just add to the total
// answer the suffix in the BIT from the last position to such index.

// Complexity: O(n log^2 n)

#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> pii;
typedef long long ll;

const int maxn = 1e5+10;

int n;
ll ans;

int a[maxn];

int bit[maxn], id[maxn];

int sz[maxn];

bool mark[maxn];

vector<pii> grafo[maxn]; 
vector<pair<ll, int>> tot;

void upd(int x, int v)
{
	for (; x <= n; x += (x&-x))
		bit[x] += v;
}

int soma(int x)
{
	int ans = 0;
	for (; x > 0; x -= (x&-x))
		ans += bit[x];
	return ans;
}

void dfs(int u, int p)
{
	sz[u] = 1;

	for (auto pp: grafo[u])
	{
		int v = pp.first, w = pp.second;
		if (v == p || mark[v]) continue;

		dfs(v, u);

		sz[u] += sz[v];
	}
}

int centroid(int u, int p, int S)
{
	for (auto pp: grafo[u])
	{
		int v = pp.first;
		if (v == p || mark[v]) continue;

		if (sz[v] > S/2) return centroid(v, u, S);
	}

	return u;
}

void dfs_up(int u, int p, ll cost, ll sum)
{
	if (cost >= 0)
	{
		ans++;
		tot.push_back({sum, u});
	}

	for (auto pp: grafo[u])
	{
		int v = pp.first, w = pp.second;
		if (v == p || mark[v]) continue;

		dfs_up(v, u, min(cost+1ll*a[v]-1ll*w, 1ll*a[v]-1ll*w), sum+1ll*a[v]-1ll*w);
	}
}

void dfs_add(int u, int p, ll cost, int add)
{
	if (cost >= 0)
		upd(id[u], add);

	for (auto pp: grafo[u])
	{
		int v = pp.first, w = pp.second;
		if (v == p || mark[v]) continue;

		dfs_add(v, u, min(cost+1ll*a[v]-1ll*w, 1ll*a[v]-1ll*w), add);
	}
}

void dfs_down(int u, int p, ll cost, ll sum)
{
	if (cost >= 0)
		ans++;

	if (lower_bound(tot.begin(), tot.end(), make_pair(-cost, 0)) != tot.end())
	{
		int pos = (int) (lower_bound(tot.begin(), tot.end(), make_pair(-cost, 0))-tot.begin())+1;
		ans += 1ll*(soma(n)-soma(pos-1));
	}

	for (auto pp: grafo[u])
	{
		int v = pp.first, w = pp.second;
		if (v == p || mark[v]) continue;

		dfs_down(v, u, min(cost, sum+1ll*a[u]-1ll*w), sum+1ll*a[u]-1ll*w);
	}
}

void decompose(int u)
{
	dfs(u, 0);

	int c = centroid(u, 0, sz[u]);
	mark[c] = 1;

	for (auto v: grafo[c])
		if (!mark[v.first])
			dfs_up(v.first, c, 1ll*(a[v.first]-v.second), 1ll*(a[v.first]-v.second));

	sort(tot.begin(), tot.end());

	for (int i = 0; i < tot.size(); i++)
		id[tot[i].second] = i+1;

	for (auto v: grafo[c])
		if (!mark[v.first])
			dfs_add(v.first, c, 1ll*(a[v.first]-v.second), 1);

	for (auto pp: grafo[c])
	{
		int v = pp.first, w = pp.second;
		if (mark[v]) continue;

		dfs_add(v, c, 1ll*(a[v]-w), -1);

		dfs_down(v, c, 1ll*(a[c]-w), 1ll*(a[c]-w));

		dfs_add(v, c, 1ll*(a[v]-w), 1);
	}

	for (auto v: grafo[c])
		if (!mark[v.first])
			dfs_add(v.first, c, 1ll*(a[v.first]-v.second), -1);

	tot.clear();

	for (auto v: grafo[c])
		if (!mark[v.first])
			decompose(v.first);
}

int main(void)
{
	scanf("%d", &n);

	for (int i = 1; i <= n; i++)
		scanf("%d", &a[i]);

	for (int i = 1; i < n; i++)
	{
		int u, v, w;
		scanf("%d %d %d", &u, &v, &w);

		grafo[u].push_back({v, w});
		grafo[v].push_back({u, w});
	}

	decompose(1);

	printf("%lld\n", ans);
}

Compilation message

transport.cpp:1:1: error: expected unqualified-id before '/' token
 / COCI 2018/2019 - Transport
 ^
In file included from /usr/include/c++/7/cmath:43:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/include/c++/7/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of symbol
   __is_null_pointer(std::nullptr_t)
                                   ^
/usr/include/c++/7/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
     __is_null_pointer(_Type)
     ^~~~~~~~~~~~~~~~~
/usr/include/c++/7/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std'
   __is_null_pointer(std::nullptr_t)
                          ^~~~~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:120:31: error: declaration of 'operator new' as non-function
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                               ^
/usr/include/c++/7/new:120:25: error: 'size_t' is not a member of 'std'
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                         ^~~~~~
/usr/include/c++/7/new:120:25: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:122:33: error: declaration of 'operator new []' as non-function
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                                 ^
/usr/include/c++/7/new:122:27: error: 'size_t' is not a member of 'std'
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                           ^~~~~~
/usr/include/c++/7/new:122:27: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:129:34: error: 'std::size_t' has not been declared
 void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
                                  ^~~~~~
/usr/include/c++/7/new:131:36: error: 'std::size_t' has not been declared
 void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
                                    ^~~~~~
/usr/include/c++/7/new:134:25: error: declaration of 'operator new' as non-function
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                         ^~~~~~
/usr/include/c++/7/new:134:25: error: 'size_t' is not a member of 'std'
/usr/include/c++/7/new:134:25: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:134:33: error: expected primary-expression before 'const'
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                 ^~~~~
/usr/include/c++/7/new:136:27: error: declaration of 'operator new []' as non-function
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                           ^~~~~~
/usr/include/c++/7/new:136:27: error: 'size_t' is not a member of 'std'
/usr/include/c++/7/new:136:27: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:136:35: error: expected primary-expression before 'const'
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                   ^~~~~
/usr/include/c++/7/new:168:32: error: declaration of 'operator new' as non-function
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                ^~~~~~
/usr/include/c++/7/new:168:32: error: 'size_t' is not a member of 'std'
/usr/include/c++/7/new:168:32: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:168:40: error: expected primary-expression before 'void'
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                        ^~~~
/usr/include/c++/7/new:170:34: error: declaration of 'operator new []' as non-function
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                  ^~~~~~
/usr/include/c++/7/new:170:34: error: 'size_t' is not a member of 'std'
/usr/include/c++/7/new:170:34: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/exception_ptr.h:40:0,
                 from /usr/include/c++/7/exception:142,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/new:170:42: error: expected primary-expression before 'void'
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                          ^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:362:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^~~~~~
/usr/include/c++/7/type_traits:363:25: error: '_Size' was not declared in this scope
     struct is_array<_Tp[_Size]>
                         ^~~~~
/usr/include/c++/7/type_traits:363:31: error: template argument 1 is invalid
     struct is_array<_Tp[_Size]>
                               ^
/usr/include/c++/7/type_traits:561:42: error: 'nullptr_t' is not a member of 'std'
     struct __is_null_pointer_helper<std::nullptr_t>
                                          ^~~~~~~~~
/usr/include/c++/7/type_traits:561:42: note: suggested alternative:
In file included from /usr/include/c++/7/cstddef:50:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:45,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:444:29: note:   'nullptr_t'
   typedef decltype(nullptr) nullptr_t;
                             ^~~~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:561:42: error: 'nullptr_t' is not a member of 'std'
     struct __is_null_pointer_helper<std::nullptr_t>
                                          ^~~~~~~~~
/usr/include/c++/7/type_traits:561:42: note: suggested alternative:
In file included from /usr/include/c++/7/cstddef:50:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:45,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:444:29: note:   'nullptr_t'
   typedef decltype(nullptr) nullptr_t;
                             ^~~~~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:561:51: error: template argument 1 is invalid
     struct __is_null_pointer_helper<std::nullptr_t>
                                                   ^
/usr/include/c++/7/type_traits:1464:37: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                     ^~~~~~
/usr/include/c++/7/type_traits:1464:37: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:1464:37: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                     ^~~~~~
/usr/include/c++/7/type_traits:1464:37: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:1464:61: error: template argument 1 is invalid
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                                             ^
/usr/include/c++/7/type_traits:1464:61: note: invalid template non-type parameter
/usr/include/c++/7/type_traits:1469:37: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                     ^~~~~~
/usr/include/c++/7/type_traits:1469:37: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:1469:37: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                     ^~~~~~
/usr/include/c++/7/type_traits:1469:37: note: suggested alternative:
In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/7/bits/std_abs.h:38,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
                 from transport.cpp:22:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^~~~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from transport.cpp:22:
/usr/include/c++/7/type_traits:1469:46: error: template argument 1 is invalid
     : public integral_constant<std::size_t, 0> { };
                                              ^
/usr/include/c++/7/type_traits:1469:46: note: invalid template non-type parameter
/usr/include/c++/7/type_traits:1471:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^~~~~~
/usr/include/c++/7/type_traits:1472:21: error: '_Si