摘要: #include #include #include #define mod (int)(1e9+7) using namespace std; int main() { int t,n; scanf("%d",&t); while(t--) { scanf("%d",&n); long long ans1 = (1+n)*n/2... 阅读全文
posted @ 2016-10-07 20:40 菜鸟龙* 阅读(347) 评论(0) 推荐(0) 编辑
摘要: Description 985有n个正整数,他想快速知道下面函数的返回值 int a[N+1]; long long Solve() { int i, j; long long ans = 0; for(i = 1; i <= N; i++) { for(int j = i + 1; j <= N; 阅读全文
posted @ 2016-08-09 17:07 菜鸟龙* 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Description 985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输出到达(n,n)的方案数。 985走入了一个n * n的方格地图,他已经知道其中有一个 阅读全文
posted @ 2016-08-09 16:15 菜鸟龙* 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭 阅读全文
posted @ 2016-08-08 21:26 菜鸟龙* 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description Jesus, what a great movie! Thousands of p 阅读全文
posted @ 2016-08-08 17:23 菜鸟龙* 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description 给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为 阅读全文
posted @ 2016-08-08 15:44 菜鸟龙* 阅读(193) 评论(0) 推荐(0) 编辑
摘要: A -- Alarm Time Limit:1s Memory Limit:128MByte Submissions:179Solved:62 A -- Alarm Time Limit:1s Memory Limit:128MByte Submissions:179Solved:62 Time L 阅读全文
posted @ 2016-08-05 20:32 菜鸟龙* 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 /*B*/ 2 #include<cstdio> 3 #include<cstring> 4 #include<queue> 5 using namespace std; 6 int head[10010]; 7 int indegree[10010]; 8 int mon[10010]; 9 阅读全文
posted @ 2016-08-05 11:47 菜鸟龙* 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description 虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿 阅读全文
posted @ 2016-08-04 20:15 菜鸟龙* 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description XX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全 阅读全文
posted @ 2016-08-04 16:41 菜鸟龙* 阅读(163) 评论(0) 推荐(0) 编辑