Submission #574693

#TimeUsernameProblemLanguageResultExecution timeMemory
574693MateGiorbelidzeExhibition (JOI19_ho_t2)C++14
100 / 100
133 ms5548 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define sc second #define pb push_back #define in insert int main () { ll n , m; cin>>n>>m; pair <ll,ll> a[n + 1]; for (int i = 1; i <= n; i++) { cin>>a[i].sc>>a[i].ff; } sort(a + 1, a + n + 1); ll d[m + 1]; for (int i = 1; i <= m; i++) { cin>>d[i]; } sort(d + 1,d + m + 1); ll r = m; for (int i = n; i > 0; i--) { ll val = a[i].ff, sz = a[i].sc; if (r == 0) break; if (d[r] >= sz) { r--; } } cout<<m - r; }

Compilation message (stderr)

joi2019_ho_t2.cpp: In function 'int main()':
joi2019_ho_t2.cpp:32:6: warning: unused variable 'val' [-Wunused-variable]
   32 |   ll val = a[i].ff, sz = a[i].sc;
      |      ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...