Submission #1007945

#TimeUsernameProblemLanguageResultExecution timeMemory
1007945andecaandeciLasers (NOI19_lasers)C++17
24 / 100
60 ms432 KiB
#include<bits/stdc++.h> #define int long long using namespace std; signed main() { int n, q, k, p, ans=0; scanf("%lld %lld", &n, &q); for(int i=1; i<=q; i++) { scanf("%lld", &k); for(int j=1; j<=k; j++) { scanf("%lld", &p); ans=max(ans, 2*p-n); } } printf("%lld\n", ans); }

Compilation message (stderr)

lasers.cpp: In function 'int main()':
lasers.cpp:8:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |   scanf("%lld %lld", &n, &q);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~
lasers.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%lld", &k);
      |     ~~~~~^~~~~~~~~~~~
lasers.cpp:14:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |       scanf("%lld", &p);
      |       ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...