![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴力法
EXECUTER_
ECUST ACMer.
展开
-
UVa 11059
求最大乘积,令出begin和end,暴力之。句末尾有句号,连续换行。#includelong long maxm;void solve(int a[], int num){ int begin, end; long long mul; maxm = a[0]; for(begin = 0; begin < num; begin ++) { for(end = beg原创 2016-04-20 21:56:33 · 500 阅读 · 0 评论 -
Summer day 5
上午训练赛,果断前三题。后面两题也就限于看看题解了。1. Digit GeneratorFor a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N , we call N a generator of M .原创 2016-07-16 11:03:15 · 378 阅读 · 0 评论 -
UVa 11093 Just Finish it up 模拟
描述环形跑道上有n个加油站,第i个加油站可提供量为pi的汽油,从第i个加油站到下一个加油站需要qi量的汽油。选择任意起点,初始油量为0,但可以立刻加油,问能否完成一圈?若能输出字典序最小的站序号,不能则输出无解。SampleInput2 5 1 1 1 1 1 1 1 2 1 1 7 1 1 1 10 1 1 1 2 2 2 2 2 2 2OutputCase 1: Not原创 2016-08-11 12:02:11 · 391 阅读 · 0 评论