04 2016 档案
摘要:—亚信科技,巴卡斯(杭州),壹晨仟阳(杭州),英雄互娱(杭州) (包括2016级新生)除了校赛,还有什么途径可以申请加入ACM校队? ztr loves lucky numbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 6553...
阅读全文
摘要:矩阵快速幂大概是用来解决这样一类问题,当你知道了一个递推式比如a[n]=a[n-1]+a[n-2] 题目要求你求出a[n]。如果n大于1亿怎么办?不可能用for。解决办法就是根据递推式构造一个矩阵A,最终会化简为a[n]=A^n类似的形式,再利用快速幂,快速的求出A^n,所以原先的O(n...
阅读全文
摘要:Happy 2006Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 10827 Accepted: 3764DescriptionTwo positive integers are said to be relatively pri...
阅读全文
摘要:CoprimeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 849 Accepted Submission(s): 232Probl...
阅读全文
摘要:D. Simple Subsettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tuple of positive integers {x1,...
阅读全文
摘要:C. Simple Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputzscoder loves simple strings! A...
阅读全文
摘要:B. Shoppingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAyush is a cashier at the shopping cen...
阅读全文
摘要:A. Rebustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rebus of form ? + ? - ? +...
阅读全文
摘要:A. Complicated GCDtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGreatest common divisor GCD(a, ...
阅读全文
摘要:Kpop Music PartyTime Limit: 2 Seconds Memory Limit: 65536 KBMarjar University often hosts Kpop music festival. A Kpop music festival will last se...
阅读全文
摘要:A. Buses Between Citiestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBuses run between the citi...
阅读全文
摘要:1052. Linked List Sorting (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA linked list consists of a series of structures, which are no...
阅读全文
摘要:GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9046 Accepted Submission(s): 3351Problem...
阅读全文
摘要:Highway ProjectTime Limit: 2 Seconds Memory Limit: 65536 KBEdward, the emperor of the Marjar Empire, wants to build some bidirectional highways s...
阅读全文
摘要:SkiingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4668 Accepted: 1242 Special JudgeDescriptionBessie and the rest of Farmer John's cows ...
阅读全文
摘要:畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22650 Accepted Submission(s): 7231Pro...
阅读全文
摘要:还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37307 Accepted Submission(s): 16802Pr...
阅读全文
摘要:畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43766 Accepted Submission(s): 23177Prob...
阅读全文
摘要:PseudoforestTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2382 Accepted Submission(s): 9...
阅读全文
摘要:畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23823 Accepted Submission(s): 10381Prob...
阅读全文
摘要:继续畅通工程Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20152 Accepted Submission(s): 8683Pro...
阅读全文
摘要:Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19432 Accepted Submission...
阅读全文
摘要:Cellular Automaton Time Limit: 12000MS Memory Limit: 65536K Total Submissions: 3504 Accepted: 1421 Case Time Limit: 2000MS Description...
阅读全文
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12271 Accepted: 8707 DescriptionIn the Fibonacci integer sequ...
阅读全文
摘要:Circuit Board Time Limit: 2 Seconds Memory Limit: 65536 KB On the circuit board, there are lots of circuit paths. We know the basic const...
阅读全文
摘要:Javabeans Time Limit: 2 Seconds Memory Limit: 65536 KB Javabeans are delicious. Javaman likes to eat javabeans very much.Javaman has n bo...
阅读全文
摘要:Time Limit: 2 Seconds Memory Limit: 65536 KB The successor to a string can be calculated by applying the following rules:Ignore the nonal...
阅读全文
摘要:QueuingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4237 Accepted Submission(s...
阅读全文
摘要:Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4118 Accepted Submission(s): 3...
阅读全文
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2157这道题目很多人的题解都是矩阵快速幂写的,矩阵快速幂倒是麻烦了许多了。先给DP的方法 dp[i][j] 表示走过了i个点到了j点的步数#include #include #includ...
阅读全文
摘要:C. Enduring Exodus time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output In an attempt to ...
阅读全文
摘要:C. Table Compression time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Petya is...
阅读全文
摘要:It is a balmy spring afternoon, and Farmer John’s n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, a...
阅读全文
摘要:Training little cats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11787 Accepted: 2892 DescriptionFacer’s pet cat ju...
阅读全文
摘要:Matrix Power Series Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 19338 Accepted: 8161 DescriptionGiven a n × n matr...
阅读全文
摘要:A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tabl...
阅读全文
摘要:Modular Inverse Time Limit: 2 Seconds Memory Limit: 65536 KB The modular modular multiplicative inverse of an integer a modulo m is an in...
阅读全文
摘要:Lazier Salesgirl Time Limit: 2 Seconds Memory Limit: 65536 KB Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at...
阅读全文
摘要:Find the MarbleTime Limit: 2 Seconds Memory Limit: 65536 KBAlice and Bob are playing a game. This game is played with several identical pots and ...
阅读全文
摘要:Problem Description Holion August will eat every thing he has found.Now there are many foods,but he does not want to eat all of them at on...
阅读全文
摘要:A. Amity Assessment time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Bessie the cow a...
阅读全文
摘要:A. Parliament of Berland time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are n ...
阅读全文
摘要:B. Processing Queries time limit per test5 seconds memory limit per test256 megabytes inputstandard input outputstandard output In this proble...
阅读全文
摘要:Bear and Displayed Friends time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Limak is ...
阅读全文
摘要:B. Bear and Forgotten Tree 3 time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A tree ...
阅读全文
摘要:B. Intersection time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given two set...
阅读全文
摘要:B. Bargaining Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob wants to put a new bargai...
阅读全文
摘要:C. Stripe 2time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputOnce Bob took a paper stripe of n squar...
阅读全文
摘要:A. BerOS file systemtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputThe new operating system BerO...
阅读全文
摘要:C. Dijkstra?time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputYou are given a weighted undirected gr...
阅读全文
摘要:A. Jabber IDtime limit per test0.5 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputJabber ID on the national Berland s...
阅读全文
摘要:At the beginning of the semester in kindergarten, the n little kids (indexed from 1 to n, for convenience) in class need to elect their new leader.The...
阅读全文
摘要:Accept: 710 Submit: 2038Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionFat brother and Maze are playing a kind of special (hen...
阅读全文
摘要:Problem 2150 Fire GameAccept: 1302 Submit: 4569Time Limit: 1000 mSec Memory Limit : 32768 KB Problem DescriptionFat brother and Maze are playing...
阅读全文
摘要:Problem 2144 Shooting Game Accept: 370 Submit: 1902 Time Limit: 1000 mSec Memory Limit : 32768 KBProblem DescriptionFat brother and Maze...
阅读全文
摘要:Problem 2140 Forever 0.5 Accept: 371 Submit: 1307 Special Judge Time Limit: 1000 mSec Memory Limit : 32768 KBProblem DescriptionGiven...
阅读全文
摘要:In mathematics, a polygonal number is a number represented as dots or pebbles arranged in the shape of a regular polygon. The dots are thought...
阅读全文
摘要:Last week, n students participated in the annual programming contest of Marjar University. Students are labeled from 1 to n. They came to the ...
阅读全文
摘要:There are n balls, where the i-th ball is labeled as pi. You are going to put n balls into a deque. In the i-th turn, you need to put the i-th ball to...
阅读全文
摘要:Programming Ability Test (PAT) aims to evaluate objectively, through unified examinations with automatic online judging system, the abilities of teste...
阅读全文
摘要:Very often, especially in programming contests, we treat a sequence of non-whitespace characters as a string. But sometimes, a string may contain whit...
阅读全文
摘要:Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than k friends in com...
阅读全文
摘要:Recently, the ACM/ICPC team of Marjar University decided to choose some new members from freshmen to take part in the ACM/ICPC competitions of the nex...
阅读全文
摘要:做了几题区间动态规划的题目,觉得区间动态规划的题目是有点难的。区间DP大概是这一类的动态规划,在一个线性的数据上对区间进行状态转移,dp[i][j]表示i到j的区间。dp[i][j]可以由子区间的状态转移而来,关键是dp[i][j]表示的是什么,然后去找dp[i][j]和子区间的关系...
阅读全文
摘要:Key TaskTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1809 Accepted Submission(s): 770Pro...
阅读全文
摘要:A + B forever!Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1171 Accepted Submission(s): ...
阅读全文
摘要:A. Joystickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFriends are going to play console. Th...
阅读全文
摘要:B. Beautiful Paintingstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n pictures delive...
阅读全文
摘要:C. Watchmentime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWatchmen are in a danger and Doctor M...
阅读全文
摘要:D. Notepadtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputNick is attracted by everything unconve...
阅读全文
摘要:B. Checkout Assistanttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob came to a cash & carry s...
阅读全文
摘要:D. Seller Bobtime limit per test2 secondsmemory limit per test128 megabytesinputstandard inputoutputstandard outputLast year Bob earned by selling mem...
阅读全文