# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101889 | KCSC | Boat (APIO16_boat) | C++14 | 671 ms | 3456 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.
#include <bits/stdc++.h>
using namespace std;
const int DIM = 505;
const int MOD = 1000000007;
vector<int> lst;
pair<int, int> seg[DIM];
int dp[DIM], dp2[DIM][DIM];
int fct[DIM], inv[DIM], cmb[DIM * 2][DIM];
int logPow(int x, int n) {
if (!n) { return 1; }
int y = logPow(x, n >> 1);
if (n | 1) { y = 1LL * y * y % MOD; }
if (n & 1) { y = 1LL * y * x % MOD; }
return y; }
int main(void) {
#ifdef HOME
freopen("boat.in", "r", stdin);
freopen("boat.out", "w", stdout);
#endif
int n; cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> seg[i].first >> seg[i].second;
lst.push_back(seg[i].first); lst.push_back(++seg[i].second); }
sort(lst.begin(), lst.end());
lst.resize(unique(lst.begin(), lst.end()) - lst.begin());
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |