# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1053635 | 2024-08-11 14:48:14 | phong | Holiday (IOI14_holiday) | C++17 | Compilation error | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include <holiday.h>
#define ll long long
const int nmax = 1e5 + 5;
const ll oo = 1e18;
const int lg = 19, M = 2, mod = 1e6;
#define pii pair<ll, int>
#define fi first
#define se second
#define debug(a, n) for(int i = 1; i <= n; ++i) cout << a[i] << ' '; cout << "\n";
#define endl "\n"
#define task "code"
using namespace std;
int n, st, D;
pii a[nmax];
int rev[nmax];
int best[N][2];
ll dp[N][2];
pii tree[1 << 18];
void build(int id, int l, int r){
tree[id].fi = 0;
tree[id].se = 0;
if(l != r){
int mid = r + l >> 1;
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
holiday.cpp:22:10: error: 'N' was not declared in this scope 22 | int best[N][2]; | ^ holiday.cpp:23:7: error: 'N' was not declared in this scope 23 | ll dp[N][2]; | ^ holiday.cpp: In function 'void build(int, int, int)': holiday.cpp:30:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] 30 | int mid = r + l >> 1; | ~~^~~ holiday.cpp: In function 'void update(int, int, int, int, int)': holiday.cpp:42:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] 42 | int mid = r + l >> 1; | ~~^~~ holiday.cpp: In function 'long long int get(int, int, int, int)': holiday.cpp:51:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] 51 | int mid = r+ l >> 1; | ~^~~ holiday.cpp: In function 'void Init(int)': holiday.cpp:72:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] 72 | int mid = R + L >> 1; | ~~^~~ holiday.cpp:73:24: error: 'best' was not declared in this scope 73 | auto &FF = best[mid][ok]; | ^~~~ holiday.cpp:75:22: error: 'dp' was not declared in this scope 75 | ll &ma = dp[mid][ok]; | ^~ holiday.cpp:91:68: error: no matching function for call to 'std::vector<node>::push_back(<brace-enclosed initializer list>)' 91 | if(L < mid) adj[e + 1].push_back({L, mid - 1, from, FF}); | ^ In file included from /usr/include/c++/10/vector:67, from /usr/include/c++/10/functional:62, from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/10/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65, from holiday.cpp:4: /usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = node; _Alloc = std::allocator<node>; std::vector<_Tp, _Alloc>::value_type = node]' 1187 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const node&'} 1187 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = node; _Alloc = std::allocator<node>; std::vector<_Tp, _Alloc>::value_type = node]' 1203 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<node>::value_type&&' {aka 'node&&'} 1203 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ holiday.cpp:92:66: error: no matching function for call to 'std::vector<node>::push_back(<brace-enclosed initializer list>)' 92 | if(mid < R) adj[e + 1].push_back({mid + 1, R, FF, to}); | ^ In file included from /usr/include/c++/10/vector:67, from /usr/include/c++/10/functional:62, from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/10/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65, from holiday.cpp:4: /usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = node; _Alloc = std::allocator<node>; std::vector<_Tp, _Alloc>::value_type = node]' 1187 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const node&'} 1187 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = node; _Alloc = std::allocator<node>; std::vector<_Tp, _Alloc>::value_type = node]' 1203 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<node>::value_type&&' {aka 'node&&'} 1203 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ holiday.cpp:96:33: error: 'best' was not declared in this scope 96 | for(int i = 1; i <= D; ++i) best[i][ok] -= st; | ^~~~ holiday.cpp: In function 'void solve()': holiday.cpp:113:18: error: 'dp' was not declared in this scope 113 | ll val = dp[x][0]; | ^~ holiday.cpp:114:22: error: 'best' was not declared in this scope 114 | int y = D - (best[x][0] * 2 + x - best[x][0]) - 1; | ^~~~ holiday.cpp: At global scope: holiday.cpp:137:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 137 | main(){ | ^~~~