제출 #771116

#제출 시각아이디문제언어결과실행 시간메모리
771116dilanyanFinancial Report (JOI21_financial)C++17
0 / 100
4056 ms1832 KiB
//-------------dilanyan------------\\ #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<stdio.h> using namespace std; //------------------KarginDefines--------------------\\ #define ll long long #define pb push_back #define all(u) (u).begin(), (u).end() #define pqueue priority_queue #define upper upper_bound #define lower lower_bound #define sz(s) s.size() #define mkp make_pair #define Kargin ios_base::sync_with_stdio(false);cin.tie(NULL); #define Usaco freopen(".in", "r", stdin); freopen(".out", "w", stdout); //-------------------KarginConstants------------------\\ const int mod = 1000000007; const int infmax = INT32_MAX, infmin = INT32_MIN; const ll Infmax = INT64_MAX, Infmin = INT64_MIN; //-------------------KarginCode------------------------\\ const int N = 300005; int a[N], dp[N]; void KarginSolve() { int n, d; cin >> n >> d; for (int i = 1;i <= n;i++) { cin >> a[i]; } dp[0] = a[0] = 0; int ans = 0; for (int i = 1;i <= n;i++) { for (int j = 0;j < i;j++) { if (a[j] <= a[i]) { dp[i] = max(dp[i], dp[j] + 1); } } ans = max(ans, dp[i]); } cout << ans; } int main() { //Usaco Kargin; int test = 1; //cin >> test; while (test--) { KarginSolve(); cout << endl; } return 0; }

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

Main.cpp:1:1: warning: multi-line comment [-Wcomment]
    1 | //-------------dilanyan------------\\
      | ^
Main.cpp:8:1: warning: multi-line comment [-Wcomment]
    8 | //------------------KarginDefines--------------------\\
      | ^
Main.cpp:21:1: warning: multi-line comment [-Wcomment]
   21 | //-------------------KarginConstants------------------\\
      | ^
Main.cpp:27:1: warning: multi-line comment [-Wcomment]
   27 | //-------------------KarginCode------------------------\\
      | ^
#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...