Codeforces1064A——Make a triangle!

给三条边,判断须要多少次操做才能使得构成三角形,每一次操做为将每条边加1web 对边排序一下,而后由于两边和(短边)大于第三边,因此判断一下就能够了svg 代码:spa #include <cstdio> #include <algorithm> using namespace std; int a[3]; int main(void){ scanf("%d%d%d",&a[0],&a[1
相关文章
相关标签/搜索