摘要: `e^{\alpha}` 阅读全文
posted @ 2013-07-15 17:49 nevergo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: USACO Contest 2001Spring 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 5 using namespace std; 6 7 const int MAXN=85; 8 const int SIZE=730; 9 const int delta=360; 10 11 int low[MAXN][MAXN], upp[MAXN][MAXN]; 12 bool hash[MAXN][MAXN][SIZE]; 13 bool np[MAXN][MAXN]; 阅读全文
posted @ 2013-05-26 20:52 nevergo 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 由于这几天各种忙,于是拖到现在才解决Chapter#03.这里是课件: Data Structure下面是这次的作业。。。Assignment 3: Data Structures·2418 Hardwood Species (1)统计相同字符串的个数,用BST或者排序都可以解决,我是用BST做的,第一次用指针打数据结构,打的真是头痛...View Code #include <stdio.h>#include <string.h>#include <stdlib.h>struct node{ char name[32]; int count; n 阅读全文
posted @ 2012-11-07 13:37 nevergo 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 搞定了第二章。。。。先上课件:MathematicsAssignment 2: Mathematics·1799 Yeehaa! (1)简单平面几何证明,答案是r*sin(π/n)/(1+sin(π/n)),我就不需要证明了吧(不会的自己画图就可以证明,不过估计这个连初中生都会)。。。View Code #include <stdio.h>#include <math.h>#define PI 3.1415926int main(){ int test,n,i; double r; scanf("%d",&test); for (i 阅读全文
posted @ 2012-10-26 10:02 nevergo 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 最近想要完成Stanford's ACM Training Course,我会将课件和练习题发上来。Coding ExerciseAssignment 1: Coding Exercise·1000 A+B Problem (0)这道题目没有什么好说的。。。View Code #include <stdio.h>int main(){ int a,b; scanf("%d %d",&a, &b); printf("%d\n",a+b); return 0;}·1004 Financial Manag 阅读全文
posted @ 2012-10-19 18:06 nevergo 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 这几天把SLPC2011的题目做一下这里是题目连接:SLPC2011A.Another Rock-Paper-Scissors Problem题目大意;给出Sonny在每一局出石头剪刀布的规则(具体规则将不太清楚,自己看题目吧),问你在第N局出什么才能赢过Sonny?题目分析:根据题意,我们可以发现连续的几局可分成若干块(每一块的局数显然与3的幂次有关,是个人都看得出,我就不再解释原因),每一块出什么都是由上一块决定的。这就提醒我们可以使用递归来解决这一题。设f(N)表示第N局Sunny出的东西(我们用0表示R,1表示P,2表示S),则f(N)=(f(N-delta)+1)mod 3,其中de 阅读全文
posted @ 2012-10-03 23:19 nevergo 阅读(313) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2012-10-03 19:59 nevergo 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2012-10-03 19:54 nevergo 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2012-10-03 19:46 nevergo 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2012-10-03 19:45 nevergo 阅读(1) 评论(0) 推荐(0) 编辑