摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
2019年2月11日
2019年2月10日
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
摘要:
Given an array of integers where 1 ≤ a[i] ≤ n (n= size of array), some elements appear twice and others appear once. Find all the elements of [1, n] i 阅读全文
2019年2月9日
摘要:
Given two positive integers a and b, we can easily calculate the greatest common divisor (GCD) and the least common multiple (LCM) of a and b. But wha 阅读全文
2019年1月30日
摘要:
都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。 阅读全文
2019年1月28日
摘要:
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now y 阅读全文
摘要:
The cows have been making movies lately, so they are ready to play a variant of the famous game "Six Degrees of Kevin Bacon". The game works like this 阅读全文
摘要:
Description Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standin 阅读全文
2019年1月27日
摘要:
Description Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them t 阅读全文
摘要:
Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home 阅读全文