Submission #1325257

#TimeUsernameProblemLanguageResultExecution timeMemory
1325257djsksbrbfBouquet (EGOI24_bouquet)C++20
8 / 100
28 ms3548 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pii;
#define fi first
#define se second
#define pb push_back
const int MOD = 1e9 + 7;
const int MAX = 5e5 + 5;
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
#define int ll

signed main(){
   ios_base::sync_with_stdio(0);
   cin.tie(0);
   
   int n; cin >> n;
   int l[n + 5], r[n + 5];
   for(int i = 1 ; i <= n ; i++)cin >> l[i] >> r[i];
   int gap = l[1];
   int ans = 0;
   for(int i = 1 ; i <= n ; i += gap + 1)ans++;
   
   cout << ans << endl;
   
   return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...