제출 #37974

#제출 시각아이디문제언어결과실행 시간메모리
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 );
	}		
}	

컴파일 시 표준 에러 (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...