Submission #37974

#TimeUsernameProblemLanguageResultExecution timeMemory
37974wasylKošnja (COCI17_kosnja)C++11
50 / 50
136 ms2016 KiB
#include <cstdio> #include <vector> #include <iostream> #include <algorithm> #define d(...) __VA_ARGS__ #define all(x) (x).begin(), (x).end() #define eb(...) emplace_back(__VA_ARGS__) using namespace std;using ll=long long; template<class t>using V = vector< t >; int main() { int n; scanf( "%d", &n ); while ( n-- ) { int a, b; cin >> a >> b; int c = min( a, b ); int res = ( c / 2 ) * 4; res -= ( c % 2 == 0 ? 2 : 0 ); printf( "%d\n", res ); } }

Compilation message (stderr)

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