摘要:
这道题是一道简单的不能再简单的题(虽然说我一开始看错题了),是一道数学题,代码简单,思想简单。先算出一共有多少对相同的,然后因为有两对才能配成一对,所以把对数和加起来后还要除以2才是最后的答案#includeusing namespace std;unsigned l... 阅读全文
posted @ 2017-07-28 20:45
c201904
阅读(100)
评论(0)
推荐(0)
摘要:
这道题呢其实说难不难说简单也不简单(虽然说我做了很久),重要的就是它的思想---正着做不行就反着做,先求出每个点不被抽到的概率,然后再用1-概率,并全部加起来。#include#include#includeusing namespace std;double cou... 阅读全文
posted @ 2017-07-28 20:38
c201904
阅读(93)
评论(0)
推荐(0)
摘要:
这道题,是一个典型最短路径问题,用宽搜,但不要理解为双起点,而要理解为双宽搜。这道题有多个终点,我们不要一个一个点地枚举,这样做会超时(我试过的,而且还卡了很久不知道为什么错.而是算没个人到每个KFC的距离,再用两人的距离和比较,取最小的。#include#inclu... 阅读全文
posted @ 2017-07-28 08:57
c201904
阅读(110)
评论(0)
推荐(0)
摘要:
这道题没什么好说的,一个最短路径的题,用宽搜。但是要注意的是,这道题是两个宽搜,先算火(有多个火!)到每个点的距离,然后人就必须在火到那个点之前到达那个点,不然人(只有一个人)就要死了#include#include#include#include#includeus... 阅读全文
posted @ 2017-07-28 08:40
c201904
阅读(143)
评论(0)
推荐(0)
摘要:
这道题说白了,其实就是最短路径问题,果断用宽搜,但是我们这里要注意的是,这道题是两个起点的宽搜,两个同时搜,而不是分开搜,我本人就是因为这个错误而做了很久的#include#include#includeusing namespace std;const int ma... 阅读全文
posted @ 2017-07-28 08:19
c201904
阅读(129)
评论(0)
推荐(0)
摘要:
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the... 阅读全文
posted @ 2017-07-28 08:05
c201904
阅读(110)
评论(0)
推荐(0)
摘要:
Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digit... 阅读全文
posted @ 2017-07-28 07:56
c201904
阅读(111)
评论(0)
推荐(0)
浙公网安备 33010602011771号