Submission #159557

#TimeUsernameProblemLanguageResultExecution timeMemory
159557geon040702지능형 기차 2 (KOI11_train2)C++14
16 / 16
2 ms504 KiB
#include <bits/stdc++.h> using namespace std; pair<int, int> Data[15]; int people, ans_max; int main(void) { int i; for(i=1;i<=10;i++) { scanf("%d %d", &Data[i].first, &Data[i].second); people -= Data[i].first; people += Data[i].second; ans_max = max(ans_max, people); } printf("%d\n", ans_max); return 0; }

Compilation message (stderr)

train.cpp: In function 'int main()':
train.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d", &Data[i].first, &Data[i].second);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...