Submission #154025

#TimeUsernameProblemLanguageResultExecution timeMemory
154025AlexPascu007Baloni (COCI15_baloni)C++98
0 / 100
367 ms3796 KiB
#include <iostream> using namespace std; int n,i,sol,v[1000010],f[1000010]; int main() { cin>>n; for (i=1;i<=n;i++) cin>>v[i]; for (i=1;i<=n;i++) { if (f[v[i]]==0) { sol++; f[v[i]-1]=1; } else f[v[i]-1]=1; } cout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...