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
相關文章
相關標籤/搜索