根据题意模拟 #include <bits/stdc++.h> #define ull unsigned long long #define P pair<int, int> #define sc(n) scanf("%d", &n) using namespace std; const int p ...
分类:
其他好文 时间:
2020-04-05 13:39:22
阅读次数:
70
#include <bits/stdc++.h> using namespace std; int n; set <int> a; map <int,int> cnt; int main() { cin >> n; int ans = 0; for (int i = 1; i <= n; ++i) ...
分类:
其他好文 时间:
2020-04-05 13:33:18
阅读次数:
70
数据范围很小,搜索即可 #include<bits/stdc++.h> #define sc(n) scanf("%d",&n) #define ll long long #define db double #define P pair<int,int> using namespace std; i ...
分类:
其他好文 时间:
2020-04-05 13:13:47
阅读次数:
79
Why thinking in Java? Java means a lot for computer science. And it gives a best practice in project. Thinking in Java can make you coding with better ...
分类:
编程语言 时间:
2020-04-05 11:31:02
阅读次数:
104
dfs,对于每个点数的牌,都有:不出、作为同花出、作为顺子出这三种选择 #include<bits/stdc++.h> using namespace std; int a[20],x,anss=0x3f3f3f3f; void dfs(int k) { if(k>13) { int sum=0; ...
分类:
其他好文 时间:
2020-04-04 11:28:29
阅读次数:
50
Binary Classification Notation used in this course Logistic Regression Sigmoid函数:$\displaystyle \sigma(z) = \frac{1}{1+e^{ z}}$ practice: 总结: y是概率,通过y ...
分类:
其他好文 时间:
2020-04-03 12:13:34
阅读次数:
66
print("Let's practice everything.")print("You\'d need to know \'bout escapes with \\ that do:")print('\n newlines and \t tabs.') poem = """\tdasohcsch ...
分类:
其他好文 时间:
2020-04-03 11:48:57
阅读次数:
59
题目链接 http://bailian.openjudge.cn/practice/4140/ 这个题给出的函数是一个单调函数,用数学中的二分法可以求解,这个题需要注意精度问题,题目要求保留9位小数,在误差的选择上需要注意,这里我用的是eps = 1e 8。 cpp代码 ...
分类:
其他好文 时间:
2020-04-01 19:39:15
阅读次数:
65
题目链接 http://bailian.openjudge.cn/practice/4138/ 素数的Esieve筛选法 截图自百度百科 那这道题就可以从 s/2 的位置向前向后查找素数表,找到第一对素数就是最大的素数积。 cpp代码 ...
分类:
其他好文 时间:
2020-04-01 12:56:23
阅读次数:
89
题目链接 http://bailian.openjudge.cn/practice/4137/ 这个题目原本以为选出前k大的数删除就可以得到正确结果,但是这种策略是错的,举一个反例:52376 2,如果取出7 6,得到523,显然还有更小的数 236。 正确的贪心策略是从左到右每次选取一个比后一位大 ...
分类:
其他好文 时间:
2020-04-01 11:16:40
阅读次数:
66