Submission #914780

#TimeUsernameProblemLanguageResultExecution timeMemory
914780vjudge13D Histogram (COCI20_histogram)C++17
0 / 110
6 ms348 KiB
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // typedef __gnu_pbds::tree<int, __gnu_pbds::null_type, less<int>, __gnu_pbds::rb_tree_tag, // __gnu_pbds::tree_order_statistics_node_update > ordered_set; // #include "debugging.h" using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; typedef vector<vi> vvi; typedef vector<vii> vvii; #define pb push_back #define mp make_pair #define all(a) (a).begin(), (a).end() #define f first #define s second #define endl '\n' #define fr(i, x) for (ll i = 0; i < x; i++) #define fr1(i, x) for (ll i = 1; i <= x; i++) #define FOR(i, x, y) for (ll i = x; i < y; i++) #define lcm(a, b) (a * b) / __gcd(a, b) #define sqr(x) ((x) * (x)) #define cube(x) ((x) * (x) * (x)) #define dbg(v) cerr << "Line(" << __LINE__ << ") -> " << #v << " = " << (v) << endl; #define show(v) cerr << v << " "; #define INT(n) \ int n; \ cin >> n; const ll INF = LLONG_MAX / 2; const double PI = acos(-1); const int MOD = 1e9 + 7; int main() { std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; vll x(n), y(n); ll res = 0, mini_x, mini_y; fr(i, n) cin >> x[i] >> y[i]; fr(i, n) { mini_x = x[i]; mini_y = y[i]; fr(j, n) { mini_x = min(x[j], mini_x); mini_y = min(y[j], mini_y); res = max(res, mini_x * mini_y * (j - i + 1)); } } cout << res << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...