| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1360031 | biserailieva | Bouquet (EGOI24_bouquet) | C++20 | 51 ms | 2600 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<pair<int,int>> seg;
for(int i = 0; i < n; i++)
{
int l, r;
cin >> l >> r;
l = min(l, i);
int L = i - l;
int R = i;
seg.push_back({L, R});
}
int last = -1;
int ans = 0;
for(auto [L, R] : seg)
{
if(L > last)
{
ans++;
last = R;
}
}
cout << ans << "\n";
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
