Submission #381328

#TimeUsernameProblemLanguageResultExecution timeMemory
381328AdiZer0Košnja (COCI17_kosnja)C++17
50 / 50
19 ms620 KiB
#include <bits/stdc++.h> #define pb push_back #define whole(x) x.begin(), x.end() #define sz(x) (int)x.size() using namespace std; typedef long long ll; typedef long double ld; const int N = (int)3e5 + 7; const int INF = (int)1e9 + 7; const ll linf = (ll)1e18 + 1; void solve() { int n, m; scanf ("%d %d", &n, &m); if (n > m) swap(n, m); ll ans = (n - 1) * 1ll * 2; printf ("%lld\n", ans); } int main() { int tt; scanf ("%d", &tt); while (tt--) solve(); return 0; }

Compilation message (stderr)

kosnja.cpp: In function 'void solve()':
kosnja.cpp:17:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   17 |     int n, m; scanf ("%d %d", &n, &m);
      |               ~~~~~~^~~~~~~~~~~~~~~~~
kosnja.cpp: In function 'int main()':
kosnja.cpp:24:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   24 |     int tt; scanf ("%d", &tt);
      |             ~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...