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