上一页 1 ··· 18 19 20 21 22
摘要: 1.一般用C语言节约空间,要用C++库函数或STL时才用C++; cout、cin和printf、scanf最好不要混用。 大数据输入输出时最好不要用cin、cout,防止超时。 (或加上 2.有时候int型不够用,可以用long long或__int64型(两个下划线__)。 值类型表示值介于 - 阅读全文
posted @ 2017-04-16 21:55 euzmin 阅读(354) 评论(0) 推荐(0) 编辑
摘要: A. Kalevitch and Chess time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output A. Kalevitch and C 阅读全文
posted @ 2017-04-06 20:43 euzmin 阅读(343) 评论(0) 推荐(0) 编辑
摘要: map<a,b>c中,a,b是变量类型 参数定义的map的名字 阅读全文
posted @ 2017-03-31 18:07 euzmin 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 第一次线下比赛献给了cccc。 大致写写自己心得,比赛前一天晚上日常和室友在宿舍玩到11点多,洗漱上床。睡前突然想起第二天还有比赛,顿时激动加紧张。在床上刷了刷知乎和百度,看几道去年的真题,熬到了12点左右吧,关手机睡觉。 晚上也没睡多熟,主要怕迟到。(话说赛后教练总结我迟到了,真不好意思 :)) 阅读全文
posted @ 2017-03-28 15:57 euzmin 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Right turn frog is trapped in a maze. The maze is infinitely large and divided into grids. It also consists of nn obstacles, where the ii -th obstacle 阅读全文
posted @ 2017-03-20 22:41 euzmin 阅读(599) 评论(0) 推荐(0) 编辑
摘要: bfs的思想还是很好理解的,类似于树的层次遍历。 通过做两道题,看各种解题报告,终于大致知道代码是如何实现的了。(建议大家还是把数据结构相关的内容看完再写题,不然就会像我一样根基不稳 T T) poj3984-迷宫问题 本渣是根据这道题来学习广搜的,bfs()函数这段看了好几个小时才看明白(看懂后感 阅读全文
posted @ 2017-02-13 21:50 euzmin 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 简记为先进先出(first in first out) 它只允许在表的前端(front)进行删除操作,而在表的后端(rear)进行插入操作。 实用: 声明字符串数组可以用: (我第一次使用队列,在初始化的输入方面遇到了一些问题,如下例1) 例1: 如样例所示,每次输入都覆盖了队列的前端(front) 阅读全文
posted @ 2017-02-08 09:01 euzmin 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 筛选求素数 理解:把从1开始的、某一范围内的正整数从小到大顺序排列, 1不是素数,首先把它筛掉。剩下的数中选择最小的数是素数,然后去掉它的倍数。依次类推,直到筛子为空时结束。 做题时的一些技巧: 1.设求1….n中的素数 只需使1到sqrt(n)的倍数去掉即可。 2.设数组时,因为判断是否为素数只需 阅读全文
posted @ 2017-01-18 21:00 euzmin 阅读(293) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22