- 博客(11)
- 收藏
- 关注
原创 HDU 2124
英文题看懂不容易= =http://acm.hdu.edu.cn/showproblem.php?pid=2124#include #include using namespace std;long long l;long long N[666];int n;int cmp(int a,int b){ return a>b;}void solve(){
2014-03-27 16:39:42
492
原创 POJ 1789
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1789也是一道简单的贪心,用到了结构体排序而已.#include #include #include using namespace std;int t,n,ans;int v[1111];struct xx{ int ff; int tt;}a[
2014-03-27 14:17:28
414
原创 POJ 3617
题目链接http://poj.org/problem?id=3617简单贪心题.每次贪开头和结尾最小的字符即可#include using namespace std;char s[2111];int n;void solve(){ int a=0,b=n-1,i,cnt=0; while(a<=b) { bool fl
2014-03-27 13:07:32
382
原创 Robots on a grid
DescriptionYou have recently made a grid traversing robot that can find its way from the top left corner of a grid to the bottom right corner. However, you had forgotten all your AI programming
2013-08-24 19:17:57
490
原创 Matrix Multiplication
又见矩阵!!我只能说矩阵的题目最难搞了。Matrix Multiplication Description Johnnyand Johnare good friends. Johnnyis going to take the entrance exams for postgraduate schools. Recently, he is reviewing Linear Alg
2013-07-13 15:45:08
468
原创 Matrix
DescriptionTo efficient calculate the multiplication of a sparse matrix is very useful in industrial filed. Let’s considerthis problem:A is an N*N matrix which only contains 0 or 1. And we wan
2013-07-11 11:43:25
432
转载 qsort 函数的用法
qsort 功 能: 使用快速排序例程进行排序 用 法: void qsort(void *base, int nelem, int width, int (*fcmp)(const void *,const void *)); 各参数:1 待排序数组首地址 2 数组中待排序元素数量 3 各元素的占用空间大小 4 指向函数的指针用于确定排序的顺序 排序方法有很多种, 选择排
2013-07-09 13:04:15
414
原创 基于卡塔兰数的括号匹配
这是暑假个人赛第一场的一个困扰了我一个下午的题!Brackets This year MK is 5 years old. So he decides to learn some arithmetic. But he was confused by how to write the brackets. He has already known that the brackets shoul
2013-07-07 21:45:42
636
原创 一道关于快速幂的的水题
这是一道可以说是快速幂的入门题,本来是难不倒我的。可能是由于期末这段时间复习的原因,脑子不清醒总是不能A。最后找了模板才过的,不过这也让我更加深入的了解了快速幂的原理。其他就不说了直接上题 ---------------------------------------------------------------------------------------------------
2013-07-06 14:31:43
533
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人