Submission #62710

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
627102018-07-29 21:25:53eriksuenderhaufBuilding Bridges (CEOI17_building)C++11
100 / 100
89 ms9960 KiB
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <fstream>
#define ni(n) scanf("%d", &n)
#define nl(n) scanf("%lld", &n)
#define nai(a,n) for (int i = 0; i < (n); i++) ni((a)[i])
#define nal(a,n) for (int i = 0; i < (n); i++) nl((a)[i])
#define case(t) printf("Case #%d: ", (t))
#define pii pair<int, int>
#define vii vector<pii>
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define f first
#define s second
typedef long long ll;
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const ll INF = 1e18 + 7;
const int MAXN = 1e5 + 5;
const double eps = 1e-9;
using namespace std;
ll h[MAXN], w[MAXN], pre[MAXN], dp[MAXN];
bool q = false;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

building.cpp: In member function 'll Hull::query(ll)':
building.cpp:76:46: warning: narrowing conversion of 'x' from 'll {aka long long int}' to 'double' inside { } [-Wnarrowing]
         Line l = *lines.lower_bound({0, 0, x});
                                              ^
building.cpp: In function 'int main()':
building.cpp:9:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define ni(n) scanf("%d", &n)
               ~~~~~^~~~~~~~~~
building.cpp:85:5: note: in expansion of macro 'ni'
     ni(n);
     ^~
building.cpp:10:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define nl(n) scanf("%lld", &n)
               ~~~~~^~~~~~~~~~~~
building.cpp:12:48: note: in expansion of macro 'nl'
 #define nal(a,n) for (int i = 0; i < (n); i++) nl((a)[i])
                                                ^~
building.cpp:86:5: note: in expansion of macro 'nal'
     nal(h, n);
     ^~~
building.cpp:10:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define nl(n) scanf("%lld", &n)
               ~~~~~^~~~~~~~~~~~
building.cpp:12:48: note: in expansion of macro 'nl'
 #define nal(a,n) for (int i = 0; i < (n); i++) nl((a)[i])
                                                ^~
building.cpp:87:5: note: in expansion of macro 'nal'
     nal(w, n);
     ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...