摘要:uva 10385列出n-1个一元方程,对应成单峰函数,所以用三分求解即可。#include #include #include using namespace std;const int maxn = 30;int N;double L, vr[maxn], vk[maxn];void init ...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5255枚举a和c 求解b#include #include #include #include #include using namespace std ;typedef long long LL ;#define...
阅读全文
摘要:#include #include #include #include using namespace std;int main(){ double L,n,C,R; while (~scanf("%lf%lf%lf",&L,&n,&C)) { if (L 1e-6) {...
阅读全文
摘要:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1432#include int main () { int a, b, c; while (s...
阅读全文
摘要:#include#includeusing namespace std;const int MAXN = 10000 + 10;bool notprime[MAXN];//值为false表示素数,值为true表示非素数int s[MAXN];int c[100000000];void init(){...
阅读全文