제출 #1007945

#제출 시각아이디문제언어결과실행 시간메모리
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);
}

컴파일 시 표준 에러 (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...