http://acm.student.cs.uwaterloo.ca/~acm00/040919/data/B.1.diff
여기 답안처럼 그대로 출력하는데 왜 통과가 안되는거야 씨발 백준
#include
#include
int main()
{
std::ios::ios_base::sync_with_stdio(false);
int t;
std::cin >> t;
while (t-- > 0)
{
int early = 0, late = 0, input, dis, count;
std::cin >> dis >> count;
for (int i = 0; i
{
std::cin >> input;
auto cmp = std::minmax(dis - input, input - 0);
early = std::max(early, cmp.first);
late = std::max(late, cmp.second);
}
printf("%d %d ", early, late);
}
return 0;
}
저기서 짤린 헤더는 iostream 과 algorithm
선생님... 설마 출력구분을 "공백"으로 하신 겁니까?
/n도 디시에서 잘라먹네
뉴라인은 넣었음
minmax가 문제네 ideone에서 돌리니 엉뚱한 결과 나오네. ac 받음