随笔分类 -  数据结构

摘要:Second My Problem First Time Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1673 Accepted Submission 阅读全文
posted @ 2016-10-07 10:28 sCjTyC 阅读(237) 评论(0) 推荐(0)
摘要:Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6141 Accepted Submission(s): 2041 Pro 阅读全文
posted @ 2016-10-06 23:58 sCjTyC 阅读(304) 评论(0) 推荐(0)
摘要:3027 - Corporative Network 思路:并查集; cost记录当前点到根节点的距离,每次合并时路径压缩将cost更新。 阅读全文
posted @ 2016-10-04 18:54 sCjTyC 阅读(227) 评论(0) 推荐(0)
摘要:1215 数组的宽度 题目来源: Javaman 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 收藏 关注 1215 数组的宽度 题目来源: Javaman 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 1215 数组的宽度 题目来源: Javaman 基准时 阅读全文
posted @ 2016-10-04 16:55 sCjTyC 阅读(393) 评论(0) 推荐(0)
摘要:C. Destroying Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an arra 阅读全文
posted @ 2016-10-02 15:02 sCjTyC 阅读(202) 评论(0) 推荐(0)
摘要:3942 - Remember the Word 思路:字典树+dp dp[i]前i个字符,能由给的字串组成的方案数,那么dp[i] = sum(dp[i-k]);那么只要只要在字典树中查看是否有字串str[i-k+1,i]就行了; 阅读全文
posted @ 2016-09-28 21:21 sCjTyC 阅读(210) 评论(0) 推荐(0)
摘要:UVA 11992 - Fast Matrix Operations 给定一个r*c(r<=20,r*c<=1e6)的矩阵,其元素都是0,现在对其子矩阵进行操作。 1 x1 y1 x2 y2 val 表示将(x1,y1,x2,y2)(x1<=x2,y1<=y2)子矩阵中的所有元素add上val; 2 阅读全文
posted @ 2016-09-28 11:22 sCjTyC 阅读(368) 评论(0) 推荐(0)
摘要:思路:树状数组。 考虑第i个人当裁判,那么只要计算出在他之前比他小的乘在他之后比他大的与在他之前比他大的乘在他之后比他小的,那么用两个树状数组维护一下就行了。复杂的(n*log(n)) 阅读全文
posted @ 2016-09-26 21:13 sCjTyC 阅读(248) 评论(0) 推荐(0)
摘要:See you~ Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4768 Accepted Submission(s): 1521 Proble 阅读全文
posted @ 2016-09-24 16:34 sCjTyC 阅读(266) 评论(0) 推荐(0)
摘要:1452: [JSOI2009]Count Description Input Output Sample Input Sample Output 1 2 HINT 思路:二维树状数组; 将数组开三维的然后,每一维维护一个值,然后直接二维树状数组维护即可; 1 #include<stdio.h> 2 阅读全文
posted @ 2016-09-21 22:03 sCjTyC 阅读(156) 评论(0) 推荐(0)
摘要:Mobile phones Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 18453 Accepted: 8542 Description Suppose that the fourth generation mobile ph 阅读全文
posted @ 2016-09-21 20:42 sCjTyC 阅读(268) 评论(0) 推荐(0)
摘要:Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 25139 Accepted: 9314 Description Given an N*N matrix A, whose elements are either 0 阅读全文
posted @ 2016-09-21 20:08 sCjTyC 阅读(174) 评论(0) 推荐(0)
摘要:1080 - Binary Simulation PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 64 MB Given a binary number, we are about to do some ope 阅读全文
posted @ 2016-09-20 23:01 sCjTyC 阅读(239) 评论(0) 推荐(0)
摘要:1266 - Points in Rectangle PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB As the name says, this problem is about finding 阅读全文
posted @ 2016-09-20 21:35 sCjTyC 阅读(242) 评论(0) 推荐(0)
摘要:1135 - Count the Multiples of 3 PDF (English) Statistics Forum Time Limit: 3 second(s) Memory Limit: 64 MB You have an array with n elements which is 阅读全文
posted @ 2016-09-20 13:15 sCjTyC 阅读(237) 评论(0) 推荐(0)
摘要:Sort Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1038 Accepted Submission(s): 231 Problem Des 阅读全文
posted @ 2016-09-18 20:36 sCjTyC 阅读(243) 评论(0) 推荐(0)
摘要:G - Parenthesis Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu Description Bobo has a balanced parenthesis sequence P=p 1 p 2…p n 阅读全文
posted @ 2016-09-13 22:25 sCjTyC 阅读(416) 评论(0) 推荐(0)
摘要:1394 差和问题 基准时间限制:1 秒 空间限制:131072 KB 有一个多重集合S(即里面元素可以有重复),初始状态下有n个元素,对他进行如下操作: 1、向S里面添加一个值为v的元素。输入格式为1 v 2、向S里面删除一个值为v的元素。输入格式为2 v 3、询问S里面的元素两两之差绝对值之和。 阅读全文
posted @ 2016-09-04 12:57 sCjTyC 阅读(206) 评论(0) 推荐(0)
摘要:1105 第K大的数 基准时间限制:1 秒 空间限制:131072 KB 1105 第K大的数 基准时间限制:1 秒 空间限制:131072 KB 1105 第K大的数 基准时间限制:1 秒 空间限制:131072 KB 数组A和数组B,里面都有n个整数。数组C共有n^2个整数,分别是A[0] * 阅读全文
posted @ 2016-08-31 08:39 sCjTyC 阅读(216) 评论(0) 推荐(0)
摘要:D. Persistent Bookcase time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Recently in schoo 阅读全文
posted @ 2016-08-22 21:55 sCjTyC 阅读(207) 评论(0) 推荐(0)