# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1112355 |
2024-11-14T06:21:53 Z |
vjudge1 |
Baloni (COCI15_baloni) |
C++17 |
|
2000 ms |
14160 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int32_t main()
{
int n,tut,cev=0;
cin >> n;
int arr[n+5],visited[n+5];
for(int i=0;i<n;i++){
cin >> arr[i];
visited[i]=0;
}
for(int i=0;i<n;i++)
{
if(visited[i]==1)
continue;
cev++;
tut=arr[i];
tut--;
for(int j=i+1;j<n;j++)
{
if(arr[j]==tut){
visited[j]=1;
tut--;
}
}
}
cout << cev;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Incorrect |
3 ms |
336 KB |
Output isn't correct |
3 |
Incorrect |
7 ms |
496 KB |
Output isn't correct |
4 |
Incorrect |
6 ms |
336 KB |
Output isn't correct |
5 |
Execution timed out |
2101 ms |
12572 KB |
Time limit exceeded |
6 |
Execution timed out |
2053 ms |
14160 KB |
Time limit exceeded |
7 |
Execution timed out |
2077 ms |
11856 KB |
Time limit exceeded |
8 |
Execution timed out |
2067 ms |
11600 KB |
Time limit exceeded |
9 |
Execution timed out |
2052 ms |
12368 KB |
Time limit exceeded |
10 |
Execution timed out |
2059 ms |
12636 KB |
Time limit exceeded |