Submission #1238660

#TimeUsernameProblemLanguageResultExecution timeMemory
1238660JerBouquet (EGOI24_bouquet)C++20
8 / 100
20 ms1864 KiB
#include <bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 5; int l[MAXN], r[MAXN]; int n; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d%d", &l[i], &r[i]); int k = r[0]; int res = 0; for (int i = 0; i < n; i += k + 1) res++; printf("%d\n", res); return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
Main.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |         scanf("%d%d", &l[i], &r[i]);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#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...