제출 #235929

#제출 시각아이디문제언어결과실행 시간메모리
235929NightlightExhibition (JOI19_ho_t2)C++14
100 / 100
94 ms4536 KiB
#include <bits/stdc++.h> #define pii pair<int, int> using namespace std; int N, M; int F[100005]; pii P[100005]; int main() { scanf("%d %d", &N, &M); for(int i = 1; i <= N; i++) { scanf("%d %d", &P[i].second, &P[i].first); } for(int i = 1; i <= M; i++) { scanf("%d", &F[i]); } sort(F + 1, F + M + 1); sort(P + 1, P + N + 1); int ans = 0; for(int i = N; i > 0; i--) { int pos = lower_bound(F + 1, F + M + 1, P[i].second) - F; if(M - pos >= ans)ans++; } printf("%d\n", ans); }

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

joi2019_ho_t2.cpp: In function 'int main()':
joi2019_ho_t2.cpp:10:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &N, &M);
   ~~~~~^~~~~~~~~~~~~~~~~
joi2019_ho_t2.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d", &P[i].second, &P[i].first);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t2.cpp:15:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &F[i]);
     ~~~~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...