Submission #978211

#TimeUsernameProblemLanguageResultExecution timeMemory
978211AmaarsaaExhibition (JOI19_ho_t2)C++14
100 / 100
39 ms5684 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long ; int main() { // freopen("moocast.in", "r", stdin); // freopen("moocast.out", "w", stdout); ios::sync_with_stdio(false); cin.tie(NULL); ll t, n, m, ans, s, sum, x, y, r, p, i, j; cin >> n >> m; pair < ll, ll > P[n + 2]; for (i = 1; i <= n; i ++) { cin >> P[i].second >> P[i].first; } sort(P + 1, P + n + 1); ll a[m + 2]; for (i = 1; i <= m; i++) cin >>a[i]; j = m; sort ( a + 1, a +m +1); for (i = n; i >= 1; i --) { if ( j == 0) break; if ( a[j] >= P[i].second) { j --; } } cout << m - j << endl; }

Compilation message (stderr)

joi2019_ho_t2.cpp: In function 'int main()':
joi2019_ho_t2.cpp:10:5: warning: unused variable 't' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |     ^
joi2019_ho_t2.cpp:10:14: warning: unused variable 'ans' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |              ^~~
joi2019_ho_t2.cpp:10:19: warning: unused variable 's' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                   ^
joi2019_ho_t2.cpp:10:22: warning: unused variable 'sum' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                      ^~~
joi2019_ho_t2.cpp:10:27: warning: unused variable 'x' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                           ^
joi2019_ho_t2.cpp:10:30: warning: unused variable 'y' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                              ^
joi2019_ho_t2.cpp:10:33: warning: unused variable 'r' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                                 ^
joi2019_ho_t2.cpp:10:36: warning: unused variable 'p' [-Wunused-variable]
   10 |  ll t, n, m, ans, s, sum, x, y, r, p, i, j;
      |                                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...