제출 #219445

#제출 시각아이디문제언어결과실행 시간메모리
219445pavementExhibition (JOI19_ho_t2)C++17
0 / 100
5 ms384 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define int long long #define mp make_pair #define mt make_tuple #define pb push_back #define ppb pop_back #define eb emplace_back typedef long double ld; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; int N, M, O, S[100005], V[100005], C[100005]; pair<int, int> T[100005]; main() { ios::sync_with_stdio(0); cin.tie(0); cin >> N >> M; for (int i = 1; i <= N; i++) { cin >> S[i] >> V[i]; T[i] = mp(V[i], S[i]); } for (int i = 1; i <= M; i++) cin >> C[i]; sort(C + 1, C + 1 + M, greater<int>()); sort(T + 1, T + 1 + N); for (int i = 1; i <= N; i++) tie(V[i], S[i]) = T[i]; for (int i = N, idx = 1; i >= 1; i--) { while (idx <= M && C[idx] < S[i]) idx++; if (idx > M) break; O++; idx++; } cout << O << '\n'; }

컴파일 시 표준 에러 (stderr) 메시지

joi2019_ho_t2.cpp:18:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...