采用分治思想 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; double a,b,c,d; double f(double x) { return ...
分类:
其他好文 时间:
2020-07-17 13:39:43
阅读次数:
71
C# 内容 构造函数 构造函数和类同名,默认无参数,例如: class Line { private double length; // 线条的长度 public Line() { Console.WriteLine("对象已创建"); } } public Line(double len) // ...
分类:
其他好文 时间:
2020-07-17 09:31:59
阅读次数:
65
开始复健。 用了不方便的算面积的方法,讨论了好多,还调了一个多小时- - 发现 double 和 longdouble 的四舍五入是随机的,有时候舍5有时候入5。 #include<cstdio> #include<algorithm> #include<cmath> using namespace ...
分类:
其他好文 时间:
2020-07-17 09:24:11
阅读次数:
120
今日内容 1. JQuery 基础1-6 高级7-11: 1. 概念 2. 快速入门 3. JQuery对象和JS对象区别与转换 4. 选择器 5. DOM操作 6. 案例 7. 动画 8. 遍历 9. 事件绑定 10. 案例 11. 插件 JQuery 基础: 1. 概念: 一个JavaScrip ...
分类:
编程语言 时间:
2020-07-16 21:17:51
阅读次数:
69
题目链接:https://pintia.cn/problem-sets/994805342720868352/problems/994805363914686464 模拟题,新改的测试数据需要long double型,如果测试点3无法通过,可以参考以下代码: #include<bits/stdc++ ...
分类:
其他好文 时间:
2020-07-16 12:08:19
阅读次数:
60
叉乘,点乘,用结构体存cos^2 int n, ans = 1, X[N], Y[N]; struct node { double x,y; node(): node(0,0){} node(double x,double y):x(x),y(y){} bool operator < (const ...
分类:
其他好文 时间:
2020-07-16 11:50:55
阅读次数:
66
给你一个字符串s,共有q次操作,每个都是下面两种形式的一种。 1 i c:这个操作表示将字符串s的第i项变为字符c 2 l r y:这个操作表示输出字符串y在字符串s中以第l项为起点,以第r项为终点的子串(包括第l和第r项)中作为子串出现的次数。 考虑到有修改操作,跑KMP必然是不行的。 因此考虑暴 ...
分类:
其他好文 时间:
2020-07-15 23:59:44
阅读次数:
72
C++ string double互转精度问题 double转化为string,可以参见:https://www.cnblogs.com/chorulex/p/7660187.html。 string转化为double,可以参见:http://www.cplusplus.com/reference/ ...
分类:
编程语言 时间:
2020-07-15 23:58:10
阅读次数:
198
DECLARE @TableName sysname = 'TableName'; DECLARE @Result VARCHAR(MAX) = 'public class ' + @TableName + ' {'; SELECT @Result = @Result + ' /// <summar ...
分类:
数据库 时间:
2020-07-15 15:19:45
阅读次数:
85
题目:编写一个函数,输入n为偶数时,调用函数求1/2+1/4+...+1/n,当输入n为奇数时,调用函数1/1+1/3+...+1/n(利用指针函数)。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 double evenumber(i ...
分类:
其他好文 时间:
2020-07-14 13:46:20
阅读次数:
48