
基础
薄帷清风
小河弯弯 浪遏飞舟
-
原创 poj_1008 Maya Calendar(模拟题)
【题目】 点击这里 【思路】 模拟题,要求速度,注意细节:strcmp(S1,S2)==0;(表达式)? x:y 【代码】 #include #include int main() { long int n,i,j; scanf("%d",&n); printf("%d\n",n); char month[19][10]={"pop", "no",2016-02-06 13:01:15253
0
-
原创 Give My Text Back_hihoCoder
描述 To prepare for the English exam Little Ho collected many digital reading materials. Unfortunately the materials are messed up by a malware. It is known that the original text contains only En2016-07-31 23:43:17231
0
-
原创 Counting Islands II_太阁竞赛C
题目3 : Counting Islands II 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Country H is going to carry out a huge artificial islands project. The project region is divided into a 1000x1000 grid. The whole2016-07-31 23:40:18301
0
-
原创 Popular Products_太阁竞赛B
题目2 : Popular Products 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Given N lists of customer purchase, your task is to find the products that appear in all of the lists. A purchase list consists of2016-07-31 23:38:49268
0
-
原创 Binary Watch_太阁竞赛A
题目1 : Binary Watch 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Consider a binary watch with 5 binary digits to display hours (00 - 23) and 6 binary digits to display minutes (00 - 59). For example2016-07-31 23:36:54324
0
-
原创 The Maze runner(BFS)
【题目描述】 Given a maze, find a shortest path from start to exit. Input consists serveral test cases. First line of the input contains number of test case T. For each test case the first line contai2016-06-03 16:33:11433
0
-
原创 max-Queue(堆)
【题目描述】 Use a max-Heap to design a priority queue with integer value. Each element stores an integer. The larger the integer is, the higher the priority of the element is. 【题目输入】 The first line cont2016-04-21 14:32:31259
0
-
原创 The K-th largest number(小根堆)
【题目要求】 Given N integer numbers, find the K-th largest number. Requirement: design an algorithm with the time complexity O(NlogK). 【输入要求】 The first line contains N, K. In the following N lines,2016-04-30 19:59:36473
0
-
原创 The Postorder enumeration(二叉树遍历:前中转后)
【题目描述】 Give you the Preorder enumeration and Inorder enumeration of a binary tree, output its Postorder enumeration. We assume the elements of binary tree are different. 【输入要求】 The first line c2016-04-11 17:12:39688
0
-
原创 Big vs Big(链表)
【题目描述】 Calculate the addtion of any two positive big integers. Requirements: Test data can be more than 64 digits, therefore you MUST use a linked list to store an integer (any big). 【输入】 The2016-03-27 17:32:09262
0
-
原创 Calculator(后缀表达式)
【题目要求】 Implement a calculator program based on a Reverse Polish notation. 【输入】 There could be several lines. Each line contains a Reverse Polish notation. The operators and operands are sepertate2016-03-27 17:37:22253
0
-
原创 Rail station(栈)
【题目】 There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possibl2016-03-27 17:40:04403
0
-
原创 hihoCoder_W84 Lucky Substrings(基础做法)
【题目】 点击这里 【思路】 分两步走,1. 找出所有斐波那契子串;2. 按字典序无重复地输出。 第一步可以枚举子串,由于规模比较小,O(n^2)的算法都可以接受。O(n^3)优化至O(n^2)的方法是,从前往后枚举子串,[i…j+1]可以利用[i…j]的结果。 第二步可以选择排序,然后无重复输出,也可以考虑建立字典树去重并排序,然后先序遍历输出。字典树的方法将在下周贴上来。 【代码】2016-02-06 23:57:25283
0
-
转载 欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl2016-01-24 14:40:02158
0
-
原创 poj_1000 A+B Problem 模拟
今天开启算法练习之旅,一直坚持直到大学毕业,请大家多多指教。 #include int main() { int a,b; scanf("%d %d",&a, &b); printf("%d\n",a+b); return 0; }2016-01-24 15:15:50211
0
-
原创 无间道之并查集_hihoCoder
描述 这天天气晴朗、阳光明媚、鸟语花香,空气中弥漫着春天的气息……额,说远了,总之,小Hi和小Ho决定趁着这朗朗春光出去玩。 但是刚刚离开居住的宾馆不久,抄近道不小心走入了一条偏僻小道的小Hi和小Ho就发现自己的前方走来了几个彪形大汉,定睛一看还都是地地道道的黑人兄弟!小Hi和小Ho这下就慌了神,捡肥皂事小,这一身百把来斤别一不小心葬身他乡可就没处说去了。 就在两人正2016-07-31 23:46:10315
0