
随便
lazy_virus
这个作者很懒,什么都没留下…
展开
-
hdu1042——实现大整数N!
#include#include#define maxv 210char first[maxv],second[maxv];char third[maxv*2];int dp[maxv][maxv];main(){int n,i,j,k;int l1,l2;scanf("%d",&n);for(k=1;k0&&dp[i-1][j]==1&&first[i-1]==third[i+j-1]) dp[i][j]=1;if(j>0&&dp[i][j-1]==1&&second[j-1]==third[原创 2010-08-14 22:00:00 · 593 阅读 · 0 评论 -
poj3301——Texas Trip
<br />题意:给定一些点,求最小的正方形,覆盖所有点。<br />思路:旋转正方形,旋转角度(0~90),利用三分法,找到一个最小的正方形(正确性没证)。<br />#include<iostream>#include<string>#include<cstdio>#include<cmath>using namespace std;#define esp 1e-10#define maxcost 99999class point{public: double x原创 2011-04-15 19:25:00 · 797 阅读 · 0 评论 -
好玩的...
<br />e100 33 f6 bf 0 20 b5 10 f3 a5 8c c8 5 0 2 50 68 13 1 cb e 1f be a1 1 bf 0 1 <br />e11b 6 57 b8 11 1 bb 21 13 89 7 4b 4b 48 79 f9 ad 86 e0 8b c8 bd ff ff e8 20 <br />e134 0 3d 0 1 74 1a 7f 3 aa eb f3 2d ff 0 50 e8 f 0 5a f7 d8 8b d8 26 8a 1 aa <b转载 2011-04-23 23:42:00 · 653 阅读 · 0 评论 -
Where is my way ?
Where is my way ? 一个月快过去了,考试也基本结束了,看看这个月,真记不起做了些什么事,除了参加了几场考试。 明天有一场六级考试,现在看来就大有打酱油的趋势了。这次就当练兵吧,下学期坚决要好好看英语了,单词也好,英文短文也好,或者美剧...加强英语学习。 接下去,就是暑假了。暂且先留校一个月,有机会的话,找学姐学点东西。在这个月中,要多做题吧,如原创 2011-06-17 23:28:00 · 526 阅读 · 0 评论 -
用一篇博客宣告回归
I am back !原创 2011-06-22 23:30:00 · 439 阅读 · 0 评论 -
观《迫在眉捷》有感
心情实在是差,so terrible.在风行上挑了部电影看。 影片刚开始,就描述了美国萧条时期,约翰因无钱还房贷,车子被拖了。当然,这不是最糟糕的。在一场棒球赛上,约翰的儿子的心脏出了问题。 这时候,如果想要儿子活下来,约翰需要约7万美元。It is a big trouble for him。After having tried his best, he st原创 2012-03-10 01:00:34 · 2456 阅读 · 0 评论 -
All Is over
Done !原创 2012-03-28 17:28:59 · 581 阅读 · 0 评论 -
优快云,我又回来啦
RT. 哈哈,近期考研复习ing,加油!期待继续更新博客的那一刻!原创 2012-08-19 11:38:04 · 435 阅读 · 0 评论 -
Matlab求凸包!
Matlab真是一个神奇的软件。庞大而强大。very nice。function [ A,X ] = f()%UNTITLED6 Summary of this function goes here% Detailed explanation goes herefid=fopen(C:/Documents and Settings/Administrator/My Docum原创 2011-06-05 01:04:00 · 6189 阅读 · 2 评论 -
poj1068——Parencodings
<br />题意:对于括号来说,有p码和w码。p码指的是在每个右括号之前有多少左括号。w码指的是在对于每个右括号,在与其配对的左括号里有多少右括号(包括自身)。<br />思路:按照p码将括号模拟。<br />#include<iostream>#include<cstdio>#include<string>using namespace std;string str;int a[25],b[25];bool vis[15000];int main(){ int t,i,原创 2011-04-05 20:58:00 · 353 阅读 · 0 评论 -
一个人的奋斗 ——(我们不是一个人在战斗)
今天网上无意中看到的一篇文章,保存!(向牛们学习致敬)一个人的奋斗历程 这些日子我一直在写一个实时操作系统内核,已有小成了,等写完我会全部公开,希望 能够为国内it的发展尽自己一份微薄的力量。最近看到很多学生朋友和我当年一样没有 方向 ,所以把我的经历写出来与大家共勉,希望能给刚如行的朋友们一点点帮助。 一 转眼我在it行业学习工作已经七年多了,这期间我做过网页,写过mis、数据库,应用程 序,做过通信软件、硬件驱动、协议栈,到现在做操作系统内核和ic相关开发,这原创 2010-08-31 14:41:00 · 732 阅读 · 0 评论 -
hdu1022——Train Problem I
<br />栈的简单应用,注意下标问题!!!<br />很脑残的说,居然没把printf("%d/n",j);注释掉,白wa了两次!十足悲剧!<br />#include<stdio.h>#include<string.h>char a[20],b[20];int ta[20],tb[20];int sta[30],n,pre[200],prek;int find(){ memset(pre,0,sizeof(pre)); int i,j,k; int原创 2010-09-24 14:22:00 · 402 阅读 · 0 评论 -
c++初学
<br />陆续更新!#include<iostream>#include<cstdlib>#include<string>using namespace std;main(){ int number; cout <<"a number in decimal:"<<dec<<15<<endl; cout<<"in octal :"<<oct<<15<<endl; cout<<"in hex:" << hex << 15 <<endl;//进制的输出 cout <<原创 2010-09-24 20:42:00 · 455 阅读 · 0 评论 -
待解决
poj:http://poj.org/problem?id=1012:http://poj.org/problem?id=1088原创 2010-10-10 14:36:00 · 2738 阅读 · 0 评论 -
链表的各项操作——涉及指针
<br />#include<stdio.h>#include<stdlib.h>#include<malloc.h>struct st { int num; struct st * next;};struct st * create();struct st * insert(struct st * head);struct st * zeng(struct st * head);struct st * shan(struct st * head);struc原创 2010-10-07 17:42:00 · 479 阅读 · 0 评论 -
poj1027——The Same Game
<br />模拟题。<br />#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int maxn=20;char g[maxn][maxn];bool vis[maxn][maxn],flag[maxn][maxn];int dir[][4]={{-1,0},{1,0},{0,-1},{0,1}};class ball{public: int max,x,y;原创 2011-03-02 13:31:00 · 419 阅读 · 0 评论 -
poj3125——Printer Queue
<br />题意:优先级模拟<br />思路:循环队列处理。<br />#include<iostream>using namespace std;class queue{public: int a; bool pos; queue() { pos=false; }};void solve(){ int n,pt,i,max; cin>>n>>pt; queue q[150]; q[pt].pos =true; for(i=0;i<n原创 2011-02-18 14:04:00 · 635 阅读 · 0 评论 -
poj1379——Run Away
模拟退火算法。其中 delta 取 (max(矩行边长))/sqrt(m).算法的正确性与L N的取值有关系。来源于《浅谈随机化思想在几何问题中的应用》 By顾研参考:http://boatswain.info/lovers/wordpress/?p=117#include#include#include#includeusing namespace std;#define N 30#define L 30#define esp 1e-2//即1/100 与所求精度有关原创 2011-03-26 15:57:00 · 529 阅读 · 0 评论