# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1139077 | 2025-01-24 03:48:58 | btninh | Building Bridges (CEOI17_building) | C++20 | Compilation error | 0 ms | 0 KiB |
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
include <bits/stdc++.h>
#define ll long long
#define int long long
#define pb push_back
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pii pair<int,int>
#define INF 1e18
#define FOR(i, a, b) for(int i = a; i <= b; ++i)
#define FORD(i, a, b) for(int i = a; i >= b; --i)
#define TASK "test"
using namespace std;
const int N = 100005;
const int mod = 1e9 + 7;
int n, h[N], w[N];
struct Line{
ll a, b;
Line(ll a = 0, ll b = INF): a(a), b(b) {}
ll calc(int x){
return a * x + b;
}
ll sl(){
return a;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:10: error: 'bits' was not declared in this scope 1 | include <bits/stdc++.h> | ^~~~ building.cpp:1:15: error: 'stdc' was not declared in this scope; did you mean 'std'? 1 | include <bits/stdc++.h> | ^~~~ | std building.cpp:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ building.cpp:34:5: error: 'vector' does not name a type 34 | vector<Line> t; | ^~~~~~ building.cpp: In function 'void lichao::init()': building.cpp:36:9: error: 't' was not declared in this scope 36 | t.resize(4000001, Line()); | ^ building.cpp: In function 'void lichao::ins(Line, long long int, long long int, long long int)': building.cpp:40:29: error: 't' was not declared in this scope 40 | if (f.calc(l) < t[id].calc(l)){ | ^ building.cpp:46:27: error: 't' was not declared in this scope 46 | if (f.calc(mid) < t[id].calc(mid)) swap(f, t[id]); | ^ building.cpp:46:44: error: 'swap' was not declared in this scope 46 | if (f.calc(mid) < t[id].calc(mid)) swap(f, t[id]); | ^~~~ building.cpp:47:22: error: 't' was not declared in this scope 47 | if (f.sl() > t[id].sl()){ | ^ building.cpp: In function 'long long int lichao::get(long long int, long long int, long long int, long long int)': building.cpp:55:18: error: 't' was not declared in this scope 55 | ll cur = t[id].calc(x); | ^ building.cpp:57:30: error: 'min' was not declared in this scope; did you mean 'mid'? 57 | if (x <= mid) return min(cur, get(x, id << 1, l, mid)); | ^~~ | mid building.cpp:58:16: error: 'min' was not declared in this scope; did you mean 'mid'? 58 | return min(cur, get(x, id << 1 | 1, mid + 1, r)); | ^~~ | mid building.cpp: In function 'void Proc()': building.cpp:64:5: error: 'cin' was not declared in this scope 64 | cin >> n; | ^~~ building.cpp:78:5: error: 'cout' was not declared in this scope 78 | cout << lichao::get(h[n]) + h[n] * h[n] + w[n - 1]; | ^~~~ building.cpp: At global scope: building.cpp:81:1: error: 'int32_t' does not name a type 81 | int32_t main() { | ^~~~~~~ building.cpp:1:1: note: 'int32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? +++ |+#include <cstdint> 1 | include <bits/stdc++.h>