上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: DescriptionYou know sorting is very important. And this easy problem is:Given you an array with N non-negative integers which are smaller than 10,000,000, you have to sort this array. Sorting means that integer with smaller value presents first.InputThe first line of the input is a positive integer 阅读全文
posted @ 2014-01-13 01:07 Joyee 阅读(626) 评论(0) 推荐(0) 编辑
摘要: Description大家都知道最小生成树一般求的是构成最小生成树的边的权值之和。现在请求构成最小生成树的边的权值之积 S,最终结果请输出 (S % 100003)。P.S. 点之间的边为无向边,矩阵保证符合无向图的对称性。Input多组数据。第一行,整数N,表示N个点。(0 2 #include 3 using namespace std; 4 5 #define MAX 105 6 #define INF 0x7FFFFFFF 7 int map[MAX][MAX]; // adjacency matrix 8 bool vis[MAX]; // is the node i vis... 阅读全文
posted @ 2014-01-04 20:54 Joyee 阅读(2134) 评论(0) 推荐(0) 编辑
摘要: ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThere are N cities and N-1 roads in Magic-Island. You can go from one city to any other. One road only connects two cities. One day, The king of magic-island want to visit the island from the capital. No road is visited twice. Do you know 阅读全文
posted @ 2014-01-04 17:39 Joyee 阅读(1329) 评论(0) 推荐(0) 编辑
摘要: 在实验室折腾附加题折腾了一个多钟没做出来……晚上回到宿舍决定再试一试,按原来的思路居然行了,目测在实验室的时候什么地方打错字了吧(心在流血)实现晃过元素后出现跟随鼠标的悬浮窗,只有几行代码给我折腾了好久,前端的JS果然debug困难 打错字都没提示OTZ 下次试试strict mode好了……简而言... 阅读全文
posted @ 2013-12-31 14:29 Joyee 阅读(773) 评论(0) 推荐(0) 编辑
摘要: 生成斐波那契数列的前10个数,从1开始。若生成前n个,改为range(n-2)。代码很简单:List = reduce(lambda x, y: x + [x[-1] + x[-2]], range(8), [1, 1])倒序打印一个数组,并用空格分隔元素。和上面一样用了reduce和lambda函数,倒序用了[::-1],也不难理解。print reduce(lambda x, y: str(x) + ' ' + str(y), List[::-1])自己打印自己print open(__file__).read() 阅读全文
posted @ 2013-11-29 22:55 Joyee 阅读(567) 评论(0) 推荐(0) 编辑
摘要: 只开了个头……google scholar自动生成APA引用真好用啊真好用…… 以后在博客园写长文果断先写markdown转换成HTML自己改 自带的CMS好蛋疼……(教练 我要自己建博!=。=)聚类的入门学习材料-------------------------------Jain, A. K. (2010). Data clustering: 50 years beyond K-means.Pattern Recognition Letters,31(8), 651-666.不知为何404了……搜一搜还是能在其他地方找到的 http://www.cs.msu.edu/~cse802/not 阅读全文
posted @ 2013-11-26 01:18 Joyee 阅读(2606) 评论(1) 推荐(0) 编辑
摘要: 反正也没给CSS,自己改了下样式……效果:题目给的验证信用卡号码规则不太全,万事达的卡第二位必须是1~5,另外其实visa号码也有13位的……要兼容这个的话只要把正则改成'^4([0-9]{12,15})$'就行了,懒得改,马克一下就好=。=找有效卡号做测试的时候google “credit card number generator”什么的就行……惊奇地发现ubuntu下自带的既有helvetica也有arial……没有指定lang的网页在我的win下会苦逼地fall back到全是冬青黑(我的浏览器默认中文都是冬青黑),冬青黑的西文部分单看又扁扁的很诡异=。= 以后果断都写 阅读全文
posted @ 2013-11-12 03:24 Joyee 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 用来做数值计算作业的代码,来自Numerical Methods Using Matlab (4th Edition) [John H. Mathews, Kurtis K. Fink],改了一下注释,并添加输出消元过程的代码uptrbk.mfunction X = uptrbk(A, B) % initialization [N N] = size(A); X = zeros(N, 1); C = zeros(1, N+1); % construct augmented matrix Aug = [A B]; disp('Aug be... 阅读全文
posted @ 2013-10-31 01:49 Joyee 阅读(924) 评论(0) 推荐(0) 编辑
摘要: Web2.0的lab3,使用tornado实现,自己改了改UI效果选中播放列表后的效果原来的图标长得太丑了,有空找些好看点的加进去……以后继续完成extra feature,当复习python了代码,由于是在linux下实现的,不保证win下也能跑……https://github.com/joyeec9h3/WebHWs/tree/master/Web2_0course/music收获: in-place sorting by attribute:用list.sort(key=lambda x:x.attribute)即可 git下删除不要的测试文件:用git rm --cached 阅读全文
posted @ 2013-10-27 03:46 Joyee 阅读(1092) 评论(0) 推荐(0) 编辑
摘要: 预备知识没学过计网的苦逼找点现成一些的东西看吧……《Restful Web Services》,《HTTP The Definitive Guide》,各种RFCWSGI:http://wsgi.readthedocs.org/en/latest/learn.htmlPEP333:http://ww... 阅读全文
posted @ 2013-10-26 03:38 Joyee 阅读(2565) 评论(0) 推荐(2) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页