摘要: 只做出了B题,尴尬... 第一题自己推规律推错了,事实证明正确解法是暴力。 好在A被hack后知道错在了哪,反hack到2个人,所以rating居然还涨了。 A - The Monster 【暴力】 题意:有两个人。甲在b, b+a, b+2a, b+3a....的时候叫,乙在d, d+c, d+2 阅读全文
posted @ 2017-03-30 16:28 bestwzh 阅读(145) 评论(0) 推荐(0) 编辑
摘要: n!的长度等于log10(n!) 1 2 3 4 5 6 7 8 9 10 11 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; double ans = 1; for(int i = 1; i  阅读全文
posted @ 2017-03-28 23:15 bestwzh 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 做法:从左往右枚举前两个数的和sum,剩余的数二分找-sum是否存在。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 #include <bits/stdc++.h> us 阅读全文
posted @ 2017-03-28 21:27 bestwzh 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 首先庆祝一下再次血崩... A - Bear and Big Brother 【数学】 题意:甲身高小于等于乙,甲每年身高翻两倍,乙翻一倍,求需要几年甲能比乙高。 做法:无fuck说 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <bits/stdc 阅读全文
posted @ 2017-03-20 00:17 bestwzh 阅读(103) 评论(0) 推荐(0) 编辑
摘要: A - Anton and Polyhedrons 【模拟】 简单题。map<string,int>mp累计字符串权值 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include <bits/stdc++ 阅读全文
posted @ 2017-03-17 00:31 bestwzh 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 题意:求点权最大的最短路,输出最短路径条数、点权值、以及最大点权的路径。 做法:Dijstra求最短路,两步:1.找最小点;2.更新路径。这题的1不变,变的是2。在更新新路径的时候,如果找到更短的路径,那么更新点权、方案数;如果路径和最短路径一样,那么比较谁的点权大,更新为点权大的结果。 1 2 3 阅读全文
posted @ 2017-03-06 23:20 bestwzh 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 8 9 10 11 12 #include <bits/stdc++.h> typedef long long LL; using namespace std; int main() { int n; double a[100010]; double sum = 0; c 阅读全文
posted @ 2017-03-02 23:49 bestwzh 阅读(120) 评论(0) 推荐(0) 编辑
摘要: PAT 1054 网上看到的,很好的应用了这两个函数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 #include <bits/stdc++.h> usin 阅读全文
posted @ 2017-03-02 22:03 bestwzh 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 挖坑 阅读全文
posted @ 2017-03-02 01:29 bestwzh 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 挖坑 阅读全文
posted @ 2017-03-02 01:28 bestwzh 阅读(76) 评论(0) 推荐(0) 编辑