基础
文章平均质量分 74
薄帷清风
小河弯弯 浪遏飞舟
展开
-
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:15 · 333 阅读 · 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 En原创 2016-07-31 23:43:17 · 376 阅读 · 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 whole原创 2016-07-31 23:40:18 · 407 阅读 · 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 of原创 2016-07-31 23:38:49 · 387 阅读 · 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 example原创 2016-07-31 23:36:54 · 439 阅读 · 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 contai原创 2016-06-03 16:33:11 · 572 阅读 · 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 cont原创 2016-04-21 14:32:31 · 421 阅读 · 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:36 · 659 阅读 · 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 c原创 2016-04-11 17:12:39 · 823 阅读 · 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).【输入】The原创 2016-03-27 17:32:09 · 351 阅读 · 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 sepertate原创 2016-03-27 17:37:22 · 412 阅读 · 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 possibl原创 2016-03-27 17:40:04 · 766 阅读 · 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:25 · 383 阅读 · 0 评论 -
欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl转载 2016-01-24 14:40:02 · 203 阅读 · 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:50 · 263 阅读 · 0 评论 -
无间道之并查集_hihoCoder
描述这天天气晴朗、阳光明媚、鸟语花香,空气中弥漫着春天的气息……额,说远了,总之,小Hi和小Ho决定趁着这朗朗春光出去玩。但是刚刚离开居住的宾馆不久,抄近道不小心走入了一条偏僻小道的小Hi和小Ho就发现自己的前方走来了几个彪形大汉,定睛一看还都是地地道道的黑人兄弟!小Hi和小Ho这下就慌了神,捡肥皂事小,这一身百把来斤别一不小心葬身他乡可就没处说去了。就在两人正原创 2016-07-31 23:46:10 · 470 阅读 · 0 评论