Submission #199803

# Submission time Handle Problem Language Result Execution time Memory
199803 2020-02-03T13:13:08 Z Gamma Pismo (COCI18_pismo) C++14
0 / 70
23 ms 376 KB
#include <bits/stdc++.h>

using namespace std;
int N, n, mx = -(1e9) - 7, mn = (1e9) + 7;
int main()
{
    scanf("%d", &N);
    for(int i = 0; i < N; i++)
    {
        scanf("%d", &n);
        mx = max(mx, n);
        mn = min(mn, n);
    }
    printf("%d\n", mx - mn);
}

Compilation message

pismo.cpp: In function 'int main()':
pismo.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &N);
     ~~~~~^~~~~~~~~~
pismo.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &n);
         ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 376 KB Output isn't correct
2 Incorrect 5 ms 256 KB Output isn't correct
3 Incorrect 5 ms 256 KB Output isn't correct
4 Incorrect 5 ms 256 KB Output isn't correct
5 Incorrect 21 ms 256 KB Output isn't correct
6 Incorrect 23 ms 256 KB Output isn't correct
7 Incorrect 22 ms 256 KB Output isn't correct