摘要: #include#includeusing namespace std;int n,a[1006];int main(){ int t,i; cin>>t; while(t--) { int f=0; //每次f归0 cin>>n; ... 阅读全文
posted @ 2015-07-26 19:19 lee是美少女 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uDescriptionTwo bored soldiers are playing card war. Their card deck consists of exa... 阅读全文
posted @ 2015-07-26 19:14 lee是美少女 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束... 阅读全文
posted @ 2015-07-26 19:07 lee是美少女 阅读(885) 评论(0) 推荐(0) 编辑
摘要: 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人... 阅读全文
posted @ 2015-07-24 20:54 lee是美少女 阅读(289) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uDescriptionA magic island Geraldion, where Gerald lives, has its own currency sys... 阅读全文
posted @ 2015-07-24 20:47 lee是美少女 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescription某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,... 阅读全文
posted @ 2015-07-23 20:27 lee是美少女 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionTwo bored soldiers are playing card war. Their card deck con... 阅读全文
posted @ 2015-07-23 20:17 lee是美少女 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Problem G Big Chocolate Mohammad has recently visited Switzerland . As he loves his friends very much, he decided to buy some chocolate for them, but ... 阅读全文
posted @ 2015-07-17 21:27 lee是美少女 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluDescription有三户人家共拥有一座花园,每户人家的太太均需帮忙整理花园。A 太太工作了5 天,B 太太则工作了4 天,才将花园整理完毕。C 太太因为正身怀六甲... 阅读全文
posted @ 2015-07-17 21:20 lee是美少女 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop,you’ll get a full bottle of coco-cola to drink. If... 阅读全文
posted @ 2015-07-17 21:11 lee是美少女 阅读(200) 评论(0) 推荐(0) 编辑