Submission #1112447

# Submission time Handle Problem Language Result Execution time Memory
1112447 2024-11-14T08:08:10 Z vjudge1 Baloni (COCI15_baloni) C++14
0 / 100
144 ms 7400 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;


int32_t main(){  
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin>>n;
int a[n];
set<int> st;
int cnt=0;
for(int i=0;i<n;i++){
	cin>>a[i];
	if(st.find(a[i]+1)!=st.end())st.erase(a[i]+1);
	else cnt++;
	st.insert(a[i]);
	}
cout<<cnt;

 return 0;  
}  
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Incorrect 2 ms 336 KB Output isn't correct
3 Incorrect 1 ms 336 KB Output isn't correct
4 Incorrect 2 ms 336 KB Output isn't correct
5 Incorrect 144 ms 6480 KB Output isn't correct
6 Incorrect 143 ms 7400 KB Output isn't correct
7 Incorrect 114 ms 5968 KB Output isn't correct
8 Incorrect 114 ms 5968 KB Output isn't correct
9 Incorrect 129 ms 6448 KB Output isn't correct
10 Incorrect 128 ms 6480 KB Output isn't correct