Submission #373827

#TimeUsernameProblemLanguageResultExecution timeMemory
373827guka415Lightning Rod (NOI18_lightningrod)C++14
0 / 100
2087 ms262148 KiB
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <unordered_set> #include <map> using namespace std; typedef pair<int, int> pii; int n; unordered_set<int> mem; int main() { int x, y, ret = 0, sum, diff; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d %d", &x, &y); mem.insert(x); sum = y - x, diff = y + x; } int prv = -2e9; printf("%d", ret); return 0; }

Compilation message (stderr)

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:14:21: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
   14 |  int x, y, ret = 0, sum, diff;
      |                     ^~~
lightningrod.cpp:14:26: warning: variable 'diff' set but not used [-Wunused-but-set-variable]
   14 |  int x, y, ret = 0, sum, diff;
      |                          ^~~~
lightningrod.cpp:21:6: warning: unused variable 'prv' [-Wunused-variable]
   21 |  int prv = -2e9;
      |      ^~~
lightningrod.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   15 |  scanf("%d", &n);
      |  ~~~~~^~~~~~~~~~
lightningrod.cpp:17:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   17 |   scanf("%d %d", &x, &y);
      |   ~~~~~^~~~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...