# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
523277 |
2022-02-07T10:02:24 Z |
tato |
Po (COCI21_po) |
C++14 |
|
77 ms |
5540 KB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
map <int,int> mp;
void answer()
{
int n;
cin >> n;
int a[n + 1];
for(int i = 1; i <= n; i++)
cin >> a[i];
int cnt = 1;
mp[a[1]] = 1;
for(int i = 2; i <= n; i++)
if(a[i] > a[i-1] or mp[a[i]] == 0)
{
cnt++;
mp[a[i]] = 1;
}
else
mp[a[i]] = 1;
cout << cnt;
}
int main()
{
int t = 1;
//cin >> t;
while(t--)
answer();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
4 |
Incorrect |
12 ms |
600 KB |
Output isn't correct |
5 |
Incorrect |
14 ms |
772 KB |
Output isn't correct |
6 |
Correct |
65 ms |
3220 KB |
Output is correct |
7 |
Incorrect |
77 ms |
5540 KB |
Output isn't correct |