今天继续学习spring中。理解了依赖注入,就基本能看懂它的例子。配置文件比较多,感觉就是基于配置的一个框架。我们不能为了用它而用它,究竟是什么需求促使我们去用它。我做过的项目很少,不过看了些别人的文章,真的用起来,确实会不错,模块间的耦合降到最低,单元测试变得容易,而且也不依赖于具体框架,不用spring的时候,我们的模块也照样独立工作。 不过这一切都要基于良好的设计,良好的设计需要注意的地方
原创 2005-01-07 17:01:00
1149阅读
"Fibonacci again and again" 参考: "SG函数和SG定理【详解】" 思路:这是比较简单的SG定理的运用,SG定理—— 游戏和的SG函数等于各个游戏SG函数的Nim和 如果一个位置 的SG值为0,那么这个点就为必败点 ,否则就是必胜点 必败点:用N表示 必胜点:用P表示 对
原创 2022-11-03 15:26:59
75阅读
https://qduoj.com/problem/65提前把所有字符串按字典序排序 然后插入字符串
原创 2022-06-16 00:27:28
72阅读
Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的:F(1)=1;F(2)=2;F(n)=F(n-1)+F(n-2)(n>=3);所以,1,2,3,5,8,13……就是菲波那契数列。在HDOJ上有不少相关的题目,比
转载 2018-01-31 08:45:00
48阅读
2评论
这是尼姆博弈的变型; 还是博弈,可是这次要用Sg函数最后异或等于0后手赢 反之,先手赢 #include <iostream> #include <cstring> #include <cstdio> using namespace std; int f[100]={1,2,3,5}; int e[
转载 2016-02-06 08:13:00
50阅读
2评论
Fibonacci again and againTime Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32
原创 2022-03-18 14:54:38
50阅读
Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)http://acm.hdu.edu.cn/showproblem.php?pid=18
原创 2021-08-05 10:47:45
62阅读
题意:同nim,3堆,每次取的为fib数,n#include using namespace std;int f[1005], a[100];bool b[20];int main() { a[1]=1; a...
原创 2021-08-11 14:02:08
66阅读
// Time 0ms, Memory 236K#include #include #include #include using namespace std; int fb[16],sg[1001],v[1001]; int mex(int x) { if(sg[x]!=-1) return sg[x]; int i; memset(v,0,sizeof(v)); for(i=1;i=0;i++) { sg[x-fb[i]]=mex(x-fb[i]); v[sg[x-fb[i]]]=1; } for(i=...
转载 2013-05-30 11:04:00
29阅读
2评论
HDU
转载 2012-02-24 12:41:00
41阅读
2评论
Fibonacci again and againTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:184864-bit integer IO format:%I64d Java...
转载 2014-08-12 21:21:00
133阅读
2评论
Fibonacci again and again Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的:F(1)=1;F(2)=2;F(n)=F(n-1)+F(n-2)(n>=3);所以,1,2,3,5,8,13…
转载 2017-02-06 16:11:00
86阅读
2评论
http://acm.hdu.edu.cn/showproblem.php?pid=1848 #include<cstdio> #include<cstring> int sg[10001],a[15]; int mex(int n) { bool vis[16]={0}; for(int i=0;
转载 2017-07-01 08:43:00
52阅读
2评论
没什么好说的,博弈简单题,懂得SG改下s数组大体都一样详细讲解类试题1850#include #include #include using namespace std; int n,m,p,sg[1003],h[1003],s[20]; void Sg() { int i,j; for(i=0;i=0)h[sg[i-s[j]]]=1; for(j=0;j<1003;j++) if(h[j]==0) { sg[i]=j; break; } } } int main() { s[0]=1;s[1]=2; for(int ...
转载 2012-04-04 16:21:00
27阅读
没什么好说的,博弈简单题,懂得SG改下s数组大体都一样详细讲解类试题​​1850​​#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int n,m,p,sg[1003],h[1003],s[20];void Sg(){ int i,j; for(i=0;i<
原创 2023-02-24 10:11:51
68阅读
    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43312    Accepted Submission(s): 20674Problem Description There are another kind of Fibo
转载 2016-04-08 11:19:00
162阅读
2评论
1,2,y = x = a +b3,字面常量仅仅只作为右值,却不能为左值(常量是右值,由于它的值不能被修改),减法整型变量溢出signed int ruiy = bigNumber - smallNumber;cout if(x==0);if(!x) ==> if(x==0);10,条件三目运算符...
原创 2021-12-30 10:05:02
98阅读
之前有提及过jqgrid这个很不错的jquery grid, 非常适合企业MIS系统使用. 本文以一个显示学生成绩结果的页面, 来说明它的一些用法, 手写代码, 运行可能会报错, 不过思路是经过验证的. 加载theme 默认的jqgrid样式很难看, jqgrid 完全支持jquery ui的 th
原创 2022-05-05 22:08:14
264阅读
Fibonacci again and again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6253 Accepted Submissi
转载 2017-07-02 19:30:00
114阅读
2评论
Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2) Description There are another kind of Fibo
转载 2018-04-03 19:06:00
34阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5