Submission #1112367

# Submission time Handle Problem Language Result Execution time Memory
1112367 2024-11-14T06:43:54 Z vjudge1 Baloni (COCI15_baloni) C++17
0 / 100
212 ms 26548 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a;
    int b;
    map<int,int> c;
    long long int toplam=0;
    scanf("%d",&a);
    for(int i=0;i<a;i++){
        scanf("%d",&b);
        c[b+i]=1;
        
    }
    for(auto&f: c){
        toplam+=f.second;
    }
    printf("%lld",toplam);

    return 0;
}

Compilation message

baloni.cpp: In function 'int main()':
baloni.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d",&a);
      |     ~~~~~^~~~~~~~~
baloni.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |         scanf("%d",&b);
      |         ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Incorrect 1 ms 336 KB Output isn't correct
3 Incorrect 2 ms 336 KB Output isn't correct
4 Incorrect 2 ms 592 KB Output isn't correct
5 Incorrect 208 ms 23892 KB Output isn't correct
6 Incorrect 212 ms 26548 KB Output isn't correct
7 Incorrect 155 ms 22088 KB Output isn't correct
8 Incorrect 162 ms 21768 KB Output isn't correct
9 Incorrect 205 ms 23044 KB Output isn't correct
10 Incorrect 187 ms 23720 KB Output isn't correct