| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1356531 | yyc000123 | Bouquet (EGOI24_bouquet) | C++20 | 1 ms | 344 KiB |
#include<bits/stdc++.h>
using namespace std ;
#define F first
#define S second
const int N = 1005 ; // 2e5+5 ;
int n , l[N] , r[N] , dp[N] ;
int main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) ;
cin >> n ;
for(int i=1 ; i<=n ; i++) cin >> l[i] >> r[i] ;
for(int i=1 ; i<=n ; i++){
for(int j=0 ; j<i ; j++){
if(j+r[j]<i && j<i-l[i]) dp[i]=max(dp[i],dp[j]+1) ;
}
}
cout << *max_element(dp+1,dp+n+1) << '\n' ;
return 0 ;
}| # | 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... | ||||
