제출 #617364

#제출 시각아이디문제언어결과실행 시간메모리
617364Abrar_Al_SamitFinancial Report (JOI21_financial)C++17
0 / 100
46 ms4656 KiB
#include<bits/stdc++.h> using namespace std; void PlayGround() { int n, D; cin>>n>>D; int a[n+1]; for(int i=1; i<=n; ++i) { cin>>a[i]; } int ans = 0; for(int mask=1; mask<(1<<n); ++mask) { vector<int>seq; for(int j=0; j<n; ++j) if(mask>>j&1) { seq.push_back(a[j+1]); } int cur = 1; int mx = seq[0]; for(int j=1; j<seq.size(); ++j) { if(seq[j]>mx) { ++cur; mx = seq[j]; } } ans = max(ans, cur); } cout<<ans<<'\n'; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); PlayGround(); return 0; }

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

Main.cpp: In function 'void PlayGround()':
Main.cpp:20:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |     for(int j=1; j<seq.size(); ++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...