标签:ble space axis iostream style math else name int
//http://codeforces.com/contest/1065/problem/B
#include <iostream> #include <cmath> using namespace std; int main() { long long n,m,num,s,a,b,c,minIS,maxIS; cin>>n>>m; if(n<2*m) { minIS=0; } else { minIS=n-2*m; } if(m==2) { maxIS=n-3; } else if(m==0) { maxIS=n; } else { maxIS=n-(1+(sqrt(1+8*m)))/2; } cout<<minIS<<" "<<maxIS<<endl; return 0; }
标签:ble space axis iostream style math else name int
原文地址:https://www.cnblogs.com/LandingGuy/p/9783699.html