上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页

2021年2月26日

摘要: http://47.104.209.207/problem/old1065 如果超过n/2的芯片测试i为正常,那么i就是正常的。 反证:如果i不是正常的话,那么至少n/2个芯片的测试结果是错误的,与条件相违背。 不漏性证明:即证明如果少于n/2个芯片说i正常,那么i不可能是正常的。 从条件出发,至少 阅读全文
posted @ 2021-02-26 23:14 greenofyu 阅读(79) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1064 字符串处理。 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 5 using namespace std; 6 int main() 7 阅读全文
posted @ 2021-02-26 22:51 greenofyu 阅读(33) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1063 字符串处理,直接依据定义输出字符串。 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 5 using namespace std; 6 阅读全文
posted @ 2021-02-26 22:47 greenofyu 阅读(25) 评论(0) 推荐(0) 编辑

2021年2月24日

摘要: http://47.104.209.207/problem/old1061 可以证明直接将头部的字母固定,而后从尾部找与其相同的字母并不会使结果变差。 对于第i个字母,假设与之匹配的为k,他应该放置的位置是n-i-1,那么ans=k-(n-i-1) 如果第i个字母放于其他的位置上,对于第i个字母对, 阅读全文
posted @ 2021-02-24 16:02 greenofyu 阅读(49) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1060 计算出相交矩阵的左下和右上两个顶点。 1 #include<cmath> 2 #include<iostream> 3 #include<queue> 4 #include<vector> 5 #include<algori 阅读全文
posted @ 2021-02-24 15:27 greenofyu 阅读(50) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1059 直接用矩阵乘法的性质,注意0次方的时候是变成单位矩阵。 1 #include<cmath> 2 #include<iostream> 3 #include<queue> 4 #include<vector> 5 #inclu 阅读全文
posted @ 2021-02-24 12:09 greenofyu 阅读(51) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1058 先用筛法筛出所有质数,然后对每个数进行质因数分解。 1 #include<cmath> 2 #include<iostream> 3 #include<queue> 4 #include<vector> 5 #include 阅读全文
posted @ 2021-02-24 11:56 greenofyu 阅读(40) 评论(0) 推荐(0) 编辑

2021年2月23日

摘要: http://47.104.209.207/problem/old1007 直接按位与。 1 #include<iostream> 2 #include<queue> 3 #include<vector> 4 #include<algorithm> 5 using namespace std; 6 阅读全文
posted @ 2021-02-23 22:59 greenofyu 阅读(15) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1072 需要用到高精度乘法(高精度数乘以int)。 1 #include<iostream> 2 #include<queue> 3 #include<vector> 4 #include<algorithm> 5 using na 阅读全文
posted @ 2021-02-23 22:51 greenofyu 阅读(38) 评论(0) 推荐(0) 编辑
摘要: http://47.104.209.207/problem/old1071 直接用模板就好,反过来方便些。 1 #include<iostream> 2 #include<queue> 3 #include<vector> 4 #include<algorithm> 5 using namespac 阅读全文
posted @ 2021-02-23 22:33 greenofyu 阅读(36) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页