Submission #199803

#TimeUsernameProblemLanguageResultExecution timeMemory
199803GammaPismo (COCI18_pismo)C++14
0 / 70
23 ms376 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...