Submission #1096689

# Submission time Handle Problem Language Result Execution time Memory
1096689 2024-10-05T02:28:14 Z nguyenvu Global Warming (CEOI18_glo) C++14
0 / 100
2000 ms 4696 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define endl "\n"
#define F first
#define S second

const ll ool=1e18;
const int ooi=1e9;
const int MOD=1e9+7;
const int N=2e5;

int n,k;
int a[N+5];
ll cnt[N+5];
map <int,int> m;

void subtask2()
{
    for (int i=1;i<=n;i++) cnt[i]=1;
    for (int i=1;i<n;i++)
        for (int j=i+1;j<=n;j++)
            if (a[j]>a[i]) cnt[j]=cnt[i]+1;
    cout<<*max_element(cnt+1,cnt+n+1);
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    

    cin>>n>>k;
    for (int i=1;i<=n;i++) cin>>a[i];
    subtask2();
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2024 ms 4696 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2055 ms 1372 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2071 ms 2396 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -