![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
其他
文章平均质量分 83
___Evan
这个作者很懒,什么都没留下…
展开
-
hud1211旋转百花
#include #include int a[]={0,1,0,-1}; //右 下 左 上 int b[]={1,0,-1,0}; char s[1010][1010]; void init(int n) { s[0][0]='A'; int x=0,y=0,k=0,m=1,g=0; while(g<n*n-1) { x+=a[k]; y+=b[k]; if原创 2013-11-02 22:49:07 · 601 阅读 · 0 评论 -
表达式求值
#include "stdio.h" #include "string.h" #include "math.h" const int NO=105; struct OP{ char s[NO]; int top; }op; struct DA{ double s[NO]; int top; }da; char comp(char ch1,char ch2) { char s[]={'+原创 2013-11-02 22:52:02 · 497 阅读 · 0 评论 -
hdu-1575矩阵快速幂
#include #include #include #include using namespace std; const int MAX=101; int n; class Matrix { public: int mat[MAX][MAX]; Matrix() { memset(mat,0,sizeof(mat)); } friend Matrix operator*(M原创 2013-11-02 22:51:22 · 525 阅读 · 0 评论 -
求逆序对数
//暴力 #include "stdio.h" const int maxn = 5005; int a[maxn]; int n; int main() { int i,j; while( scanf("%d",&n)!=EOF ) { for( i=0; i<n; i++ ) { scanf("%d",&a[i]); } int ans=0,Min=1<<29;原创 2013-11-03 11:27:34 · 620 阅读 · 0 评论 -
FAFU-1255 哈夫曼树及编码
http://acm.fafu.edu.cn/problem.php?id=1255 //优先队列 #include #include #include #include #include #include #include using namespace std; const int maxn = 505; const int inf = 1<<30; int root,len,原创 2013-11-08 16:27:18 · 588 阅读 · 0 评论 -
2013长春现场赛
2013长春现场赛水题 虽然我想不出思路看别人题解懂的 #include #include #include #include using namespace std; const int maxn = 105; const int inf = 1<<30; int n,m,pos; __int64 s[maxn],p[maxn],price[maxn]; int find( __i原创 2013-12-07 15:46:04 · 770 阅读 · 0 评论 -
FAFU-1410 九数矩阵 康拓展开
http://acm.fafu.edu.cn/problem.php?id=1410 类似八数码问题 用整形存状态4秒 康拓展开式1秒 #include #include #include #include #include using namespace std; const int maxn = 1005; const int inf = 1<<30; int n; int f[10]原创 2013-12-13 14:49:16 · 689 阅读 · 0 评论