Submission #37971

#TimeUsernameProblemLanguageResultExecution timeMemory
37971tmkKošnja (COCI17_kosnja)C++14
50 / 50
23 ms2016 KiB
#include<bits/stdc++.h> using namespace std; #define st first #define nd second #define pb push_back typedef long long LL; int main() { int k; scanf("%d",&k); for(int i=0;i<k;i++) { int n,m; scanf("%d",&n); scanf("%d",&m); int wynik=(min(n,m)-1)*2; printf("%d\n",wynik); } return 0; }

Compilation message (stderr)

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