- 博客(194)
- 收藏
- 关注
原创 RSA加密算法 C++实现
上信息安全课,老师布置了几个大作业,其中一个为RSA加密算法的实现,不能用Java写。出于兴趣,决定尝试。完成之后,为了便于查找,于是写下这篇文章,以备后续查看。也供大家一起学习,一起进步。1、预备知识1.1 快速幂算法 顾名思义,快速幂就是快速算底数的$n$次幂。其时间复杂度为${\rm{O(log n)}}$,与朴素的$O\left( n \right)$相比,效率有了极大的提高。
2017-06-23 21:29:28 4544 2
原创 POJ 1651 Multiplication Puzzle
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8760 Accepted: 5484DescriptionThe multiplication puzzle is played with a row of cards, each containing
2017-06-23 21:29:25 491
原创 HDU 2476 String painter
String painterTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3639 Accepted Submission(s): 1697Problem DescriptionThere are two strings A
2017-06-23 21:29:22 566
原创 POJ 1141 Brackets Sequence
Brackets SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 30738 Accepted: 8817 Special JudgeDescriptionLet us define a regular brackets sequence in the following w
2017-06-23 21:29:19 435
原创 CodeForces 149D Coloring Brackets
Coloring Bracketstime limit per test: 2 secondsmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputOnce Petya read a problem about a bracket sequence. He gave
2017-06-23 21:29:16 421
原创 HDU 5893 List wants to travel
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5893List wants to travelTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 6
2016-09-21 12:04:11 942
原创 HYSBZ 2243 [SDOI2011]染色
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2243[SDOI2011]染色Time Limit: 20 Sec Memory Limit: 512 MBSubmit: 6131 Solved: 2243[Submit][Status][Discuss]Description给定一棵有
2016-09-20 23:08:14 975
原创 HDU 5880 Family View
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=5880Family ViewTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 862 Accep
2016-09-20 20:22:34 1297 2
原创 POJ 1655 Balancing Act
题目链接:http://poj.org/problem?id=1655Balancing ActTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12278Accepted: 5202DescriptionConsider a tree T
2016-09-12 14:11:04 602
原创 SPOJ QTREE Query on a tree
题目链接:http://www.spoj.com/problems/QTREE/en/Query on a tree#treeYou are given a tree (an acyclic undirected connected graph) withN nodes, and edges numbered 1, 2, 3...N-1.We w
2016-09-03 10:59:32 477
原创 HDU 1421 搬寝室
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1421搬寝室Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25720 Accepted Su
2016-09-03 09:28:49 507
原创 HDU 1284 钱币兑换问题
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1284钱币兑换问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9287 Accepted
2016-09-02 22:42:14 927
原创 POJ 1269 Intersecting Lines
题目链接:http://poj.org/problem?id=1269Intersecting LinesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14693Accepted: 6488DescriptionWe all k
2016-09-02 21:01:02 438
原创 POJ 1185 炮兵阵地
题目链接:http://poj.org/problem?id=1185炮兵阵地Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 26021Accepted: 10042Description司令部的将军们打算在N*M的网格地图上部署他们的炮
2016-09-01 23:15:44 538
原创 HDU 4455 Substrings
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4455SubstringsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3115 Acce
2016-08-23 17:44:03 626
原创 HDU 4462 Scaring the Birds
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4462Scaring the BirdsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3516
2016-08-23 17:30:19 560
原创 HDU 4460 Friend Chains
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4460Friend ChainsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5167 Ac
2016-08-23 11:47:13 876
原创 HDU 4463 Outlets
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4463OutletsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3461 Accepted
2016-08-23 11:29:32 462
原创 HDU 4452 Running Rabbits
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4452Running RabbitsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1792
2016-08-18 17:17:04 502
原创 HDU 4445 Crazy Tank
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4445Crazy TankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6159 Acc
2016-08-18 17:04:00 627
原创 HDU 1051 Wooden Sticks
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1051Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18724 Accepte
2016-08-17 00:44:50 611
原创 HDU 1050 Moving Tables
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1050Moving TablesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30255 Accepte
2016-08-17 00:29:44 505
原创 HDU 1052 Tian Ji -- The Horse Racing
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1052Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26
2016-08-17 00:05:27 438
原创 HDU 1049 Climbing Worm
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1049Climbing WormTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17249 Accepte
2016-08-16 20:05:45 412
原创 HDU 1003 Max Sum
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 218106 Accepted Sub
2016-08-16 19:55:29 421
原创 HDU 1231 最大连续子序列
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1231最大连续子序列Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28539 Accepted Subm
2016-08-16 19:12:06 449
原创 HDU 1257 最少拦截系统
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1257最少拦截系统Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34892 Accepted Submi
2016-08-16 18:08:11 437
原创 HDU 3555 Bomb
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3555BombTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 15270 Accepted Submis
2016-08-14 11:03:20 510
原创 POJ 1979 Red and Black
题目链接:http://poj.org/problem?id=1979Red and BlackTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 31008Accepted: 16914DescriptionThere is a
2016-08-14 01:27:19 319
原创 HDU 4731 Minimum palindrome
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4731Minimum palindromeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1439 Acc
2016-08-14 00:43:21 492
原创 HDU 1253 胜利大逃亡
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1253胜利大逃亡Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33222 Accepted Submis
2016-08-14 00:24:21 477
原创 Codeforces Round #367 (Div. 2) 题解
题目链接:http://codeforces.com/contest/706感想:唯一一次前四道题全部都有思路,而且能保证正确的一次CF。但是最后却只A了前两道水题,最后没能来得及写后两道题。也许是太晚了,脑袋不太清醒吧!后面才想到后两题的做法。回想一下,从18分钟写完B后,就开始打酱油到比赛末,最后只A两题,就愤愤不平。555555!A.思路:水题。直接将各个点与源点
2016-08-12 10:01:04 798
原创 HDU 3234 Exclusive-OR
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3234Exclusive-ORTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3299 Accepted
2016-08-11 20:12:06 698
原创 HYSBZ 1036 [ZJOI2008]树的统计Count
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1036[ZJOI2008]树的统计CountTime Limit: 10 Sec Memory Limit: 162 MBSubmit: 12941 Solved: 5206[Submit][Status][Discuss]Descript
2016-08-09 11:26:07 581
原创 Codeforces Round #366 (Div. 2) 题解
题目链接:http://codeforces.com/contest/705A.思路:找规律。仔细看一下样例,大概就知道规律了。先输出"I hate ",然后将计数减一,再每次输出"that ",然后交替输出"I love "、"I hate ",直到计数结束,最后再输出"it"。详见代码。附上AC代码:#include using namespace std;
2016-08-08 11:25:31 625
原创 CodeForces 165D Beard Graph
题目链接:http://codeforces.com/problemset/problem/165/DBeard Graphtime limit per test:4 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard output
2016-08-07 20:25:58 689 2
原创 CodeForces 633C Spy Syndrome 2
题目链接:http://codeforces.com/problemset/problem/633/CSpy Syndrome 2time limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard out
2016-08-06 12:29:25 1051 1
原创 CodeForces 471D MUH and Cube Walls
题目链接:http://codeforces.com/problemset/problem/471/DMUH and Cube Wallstime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard
2016-08-06 00:21:58 671
原创 CodeForces 459D Pashmak and Parmida's problem
题目链接:http://codeforces.com/problemset/problem/459/DPashmak and Parmida's problemtime limit per test:3 secondsmemory limit per test:256 megabytesinput:standard inputoutp
2016-08-05 23:57:04 508
原创 CodeForces 631C Report
题目链接:http://codeforces.com/problemset/problem/631/CReporttime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard output
2016-08-05 23:30:42 614
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人