제출 #502760

#제출 시각아이디문제언어결과실행 시간메모리
502760beksultan04Financial Report (JOI21_financial)C++14
5 / 100
172 ms6544 KiB
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; //#define int long long #define pii pair<int,int> #define ret return #define fr first #define sc second #define OK puts("OK"); #define NO puts("NO"); #define YES puts("YES"); #define all(s) s.begin(),s.end() #define allr(s) s.rbegin(),s.rend() #define nosol puts("-1"); #define pb push_back #define endi puts(""); #define ordered_set tree <int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> const int N = 3e5+12,INF = 1e9+7; int a[N]; int main(){ int i,n,d,j; cin>>n>>d; vector <int> v; for (i=1;i<=n;++i) cin>>a[i]; v.pb(-INF); for (i=1;i<=n;++i){ v.pb(INF); } v.pb(INF); for (i=1;i<=n;++i){ int pos = lower_bound(all(v),a[i])-v.begin(); v[pos] = a[i]; } for (i=0;i<v.size();++i){ if (v[i] == INF)break; } cout <<i-1; }

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

Main.cpp: In function 'int main()':
Main.cpp:37:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   37 |  for (i=0;i<v.size();++i){
      |           ~^~~~~~~~~
Main.cpp:23:12: warning: unused variable 'j' [-Wunused-variable]
   23 |  int i,n,d,j;
      |            ^
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...