- 博客(8)
- 资源 (17)
- 收藏
- 关注
原创 如何加快cin\cout读取数据的速度
在使用cin\cout前加上ios::sync_with_stdio(false);这可以加快读取数据的速度,但是有一个非常不好的副作用就是不能与scanf这类的输入输出方法混用了,我就是因为混用结果有一个题提交了10次才AC
2017-07-29 16:54:36 1269
原创 小明的调查作业(南阳理工OJ48)
直接一个Set集合就可以搞定AC代码#include#includeusing namespace std;int main(){ int n,buf; set s; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%d",&buf); s.insert(buf);
2017-07-28 17:32:08 565
原创 UVA11059解题报告
因为给出的范围很小,所以直接枚举起点和终点即可,注意当最大值为负数时,此时输出0,即一个元素也不选AC代码#include#includeusing namespace std;const int maxn=20;int data[maxn];int main(){ int n,T=1; long long maxNumber; while(scan
2017-07-28 15:21:48 394
原创 Python绘制五角星
借用了turtle这一模块的帮助import turtleturtle.forward(100)turtle.right(144)turtle.forward(100)turtle.right(144)turtle.forward(100)turtle.right(144)turtle.forward(100)turtle.right(144)turtle.forward(1
2017-07-11 19:55:34 5903 2
原创 我的第一个Python程序
突然想学Python了,今天开始学习,编出了我的第一个Python程序#calculate the area and circumference of a circle from its radiusimport mathradiusString =input("Enter the radius of your circle:")radiusInteger =int(radiusStri
2017-07-11 08:14:29 644
原创 uva712解题报告
没有发现x1,x2是干什么用的,不过我发现直接把二进制转成十进制就可以ac掉了AC代码Time 0ms#include#include#includeusing namespace std;const int maxn=256+10;char buf[maxn];int leap[maxn],n,q;void build(){ int len=strlen(
2017-07-10 20:19:15 785
原创 Binary String Matching(南阳理工OJ)
网址:http://acm.nyist.net/JudgeOnline/problem.php?pid=5描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring
2017-07-10 11:13:49 384
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人