# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112379 | vjudge1 | Baloni (COCI15_baloni) | C++17 | 58 ms | 3664 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a = 0,ok = 1;
scanf("%d",&a);
int ar[a];
for(int i = 0;i < a;++i){
scanf("%d",&ar[i]);
if(i > 0 && ar[i] != ar[i-1] - 1){
ok++;
}
}
printf("%d",ok);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |