Submission #1005777

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10057772024-06-23 04:32:05omsincoconutBoat (APIO16_boat)C++17
9 / 100
156 ms8020 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9+7, MAXN = 505;
ll n, a[MAXN], b[MAXN];
vector<ll> dis;
ll disz;
ll dp[MAXN][2*MAXN] = {0}, qdp[MAXN][2*MAXN];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for (ll i = 1; i <= n; i++) cin >> a[i] >> b[i];
for (ll i = 1; i <= n; i++) dis.push_back(a[i]), dis.push_back(b[i]);
dis.push_back(0);
sort(dis.begin(), dis.end());
dis.resize(unique(dis.begin(), dis.end()) - dis.begin());
disz = dis.size();
for (ll i = 1; i <= n; i++) {
ll beg = lower_bound(dis.begin(), dis.end(), a[i]) - dis.begin();
ll lst = lower_bound(dis.begin(), dis.end(), b[i]) - dis.begin();
for (ll j = beg; j < lst; j++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...