Submission #104306

#TimeUsernameProblemLanguageResultExecution timeMemory
104306LittleFlowers__Baloni (COCI15_baloni)C++14
100 / 100
236 ms504 KiB
#include <iostream> using namespace std; int n,i,a,x; int c[1000005]; main(){ cin>>n; for(i=1;i<=n;++i){ cin>>a; if(!c[a]) x++; else c[a]--; c[a-1]++; } cout<<x; }

Compilation message (stderr)

baloni.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...