上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
摘要: 1006: [HNOI2008]神奇的国度Time Limit:20 SecMemory Limit:162 MBSubmit:2346Solved:1059[Submit][Status][Discuss]DescriptionK国是一个热衷三角形的国度,连人的交往也只喜欢三角原则.他们认为三角关... 阅读全文
posted @ 2015-07-12 11:20 AI_Believer 阅读(243) 评论(1) 推荐(0)
摘要: HDNOIP201304阻断传染难度级别: A; 编程语言:不限;运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述 H国有n个城市,n个城市用n-1条双向道路相互连通构成一棵树,1号城市是首都,也是树中的根节点。H国的首都爆发了一种危害性极高的传染... 阅读全文
posted @ 2015-07-12 09:11 AI_Believer 阅读(236) 评论(0) 推荐(0)
摘要: 1005: [HNOI2008]明明的烦恼Time Limit:1 SecMemory Limit:162 MBSubmit:3108Solved:1248[Submit][Status][Discuss]Description自从明明学了树的结构,就对奇怪的树产生了兴趣...... 给出标号为1到... 阅读全文
posted @ 2015-07-11 22:10 AI_Believer 阅读(612) 评论(0) 推荐(0)
摘要: 1004: [HNOI2008]CardsTime Limit:10 SecMemory Limit:162 MBSubmit:2163Solved:1286[Submit][Status][Discuss]Description小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种... 阅读全文
posted @ 2015-07-11 18:24 AI_Believer 阅读(294) 评论(1) 推荐(0)
摘要: 1 #include//竹子 2 using namespace std; 3 ifstream cin("eat.in"); 4 ofstream cout("eat.out"); 5 const int MAXT=100; 6 int a[MAXT+1],b[MAXT+1]; 7 int m... 阅读全文
posted @ 2015-07-11 14:09 AI_Believer 阅读(213) 评论(0) 推荐(0)
摘要: 我今天才发现的。。。a+1=-~aa-1=~-a因为-是按位取反再加一,~是按位取反,所以就实现了。。。好机智呀。。。 阅读全文
posted @ 2015-07-11 08:47 AI_Believer 阅读(389) 评论(0) 推荐(0)
摘要: NOIP201108计算系数难度级别:A; 运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述给定一个多项式(ax + by)^k,请求出多项式展开后(x^n)*(y^m)项的系数。输入共一行,包含5个整数,分别为a,b,k,n,m,每两个整数之间用... 阅读全文
posted @ 2015-07-10 12:08 AI_Believer 阅读(174) 评论(0) 推荐(0)
摘要: 妈妈呀我终于会写乘法逆元+排列组合了。 1 void exgcd(int a,int b,int&x,int&y){ 2 if(b==0){x=1;y=0;return;}exgcd(b,a%b,x,y);int t=x;x=y;y=t-a/b*y; 3 } 4 int qpow(int x... 阅读全文
posted @ 2015-07-10 11:24 AI_Believer 阅读(318) 评论(0) 推荐(0)
摘要: 妈妈呀我会写拓展欧几里得了。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define PAU putchar(' ') 8 #define ENT putchar('\n') 9 using namesp... 阅读全文
posted @ 2015-07-10 10:54 AI_Believer 阅读(165) 评论(0) 推荐(0)
摘要: 30201象棋中的皇后难度级别:B; 运行时间限制:1000ms; 运行空间限制:51200KB; 代码长度限制:2000000B试题描述 在n×m的棋盘上放置两个相互攻击的皇后,总共有多少种不同的方案?例如当n=2,m=2时答案为12,当n=100,m=223时答案为10907100。说明:如果同... 阅读全文
posted @ 2015-07-10 10:34 AI_Believer 阅读(279) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页