摘要:
A - FatMouse' Trade 该题就是,简单的一个贪心的问题,求最大金额的数目,只需要sort排序就可以了。代码如下: #include#incl... 阅读全文
摘要:
subject You are working in a team that writes Incredibly Customizable Programming Codewriter (ICP... 阅读全文
摘要:
subject In this problem, a dictionary is collection of key-value pairs, where keys are lower-c... 阅读全文
摘要:
成员函数:empty()判断队列空,当队列空时,返回true。size()访问队列中的元素个数。push()会将一个元素置入queue中。front()会返回queue内的第一个元素(也就是第一个被置入的... 阅读全文
摘要:
subjectGiven is an ordered deck of n cardsnumbered 1 to n with card 1 at the top and card n at the bot... 阅读全文
摘要:
Subject Managerof ACM-ICPC Thailand Contest Council is planning to buy lands in Phuket tobuild th... 阅读全文
摘要:
有(N+1)个城市,0是起点N是终点,开车从0 -> 1 - > 2...... -> N,车每走1个单位距离消耗1个单位的汽油,油箱的容量是T。给出每个城市到下一个城市的距离D,以及当地的油价P,求走完... 阅读全文
摘要:
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. E... 阅读全文
摘要:
Farmer John's N (1 #include #include #include using namespace std;long long num[50005];long long n,m,k... 阅读全文
摘要:
有编号1-n的n个格子,机器人从1号格子顺序向后走,一直走到n号格子,并需要从n号格子走出去。机器人有一个初始能量,每个格子对应一个整数Aii,表示这个格子的能量值。如果Aii > 0,机器人走到这个格子... 阅读全文