Submission #95292

#TimeUsernameProblemLanguageResultExecution timeMemory
95292karlopuhBaloni (COCI15_baloni)C++14
0 / 100
202 ms5156 KiB
#include <bits/stdc++.h> using namespace std; vector <bool> moze(10000001,false); long long int brojac,n; int main(){ cin>>n; for(long long int i=1;i<=n;i++){ long long int broj; cin>>broj; if(moze[broj+i]==false){ moze[broj+i]=true; brojac++; } } cout<<brojac; }
#Verdict Execution timeMemoryGrader output
Fetching results...