标签:iostream lin ios chef ace class using pac space
///@author Sycamore, ZJNU ///@accepted_on 2017 - 01 - 17 /// #include<iostream> #include<algorithm> #include<algorithm> using namespace std; int main() { int T; cin >> T; while (T--) { int N, M, t; long long sum = 0; int m = 0; cin >> N >> M; while (N--) { cin >> t; m = max(t, m); sum += t; } int ans; if (sum%M) ans = sum / M + 1; else ans = sum / M; ans = max(ans, m); cout << ans << endl; } return 0; }
标签:iostream lin ios chef ace class using pac space
原文地址:http://www.cnblogs.com/zjnu/p/7247991.html