Submission #1239881

#TimeUsernameProblemLanguageResultExecution timeMemory
1239881JerBikeparking (EGOI24_bikeparking)C++20
0 / 100
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; scanf("%d", &n); int slots[2], users[2]; scanf("%d%d", &slots[0], &slots[1]); scanf("%d%d", &users[0], &users[1]); int upvotes = max(0, slots[0] - users[0]); int downvotes = max(0, users[0] - slots[0]); printf("%d\n", upvotes - downvotes); return 0; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
Main.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     scanf("%d%d", &slots[0], &slots[1]);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d%d", &users[0], &users[1]);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#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...