ICode9

精准搜索请尝试: 精确搜索
  • D - Super Jumping! Jumping! Jumping! HDU - 1087 (基础DP)2020-05-25 18:56:49

    题目大意: 给出一个序列,然后求这个序列的最大上升子序列的和。 题解:定义状态dp[i]表示前i个数的最大和,dp[i]的最小值应该是arr[i]了,因为i前边可能有负数,对于负数,虽然可以构成上升子序列,但是没有必要选。 code: #include<bits/stdc++.h> using namespace std; const long long INF

  • PAT乙级1087(C++)——龙哥哥的刷题路2020-01-31 20:00:53

    1087 有多少不同的值 (20分) 当自然数 n 依次取 1、2、3、……、N 时,算式 ⌊n/2⌋+⌊n/3⌋+⌊n/5⌋ 有多少个不同的值?(注:⌊x⌋ 为取整函数,表示不超过 x 的最大自然数,即 x 的整数部分。) 输入格式: 输入给出一个正整数 N(2≤N≤10^4)。 输出格式: 在一行中输出题面中算式取到的不同

  • 1087 All Roads Lead to Rome2020-01-29 22:08:31

    题目 题意: 有N个城市,M条无向边,从某个给定的起始城市出发,前往名为ROM的城市。每个城市(除了起始城市)都有一个点权(称为幸福值),和边权(每条边所需的花费)。求从起点到ROM所需要的最少花费,并输出其路径。如果路径有多条,给出幸福值最大的那条。如果仍然不唯一,选择路径上的城市平均幸福

  • PAT (Advanced Level) 1087 All Roads Lead to Rome2020-01-23 23:55:17

    题解     最短路径经典题型。套最短路的板子再加上额外的要求就可以了(说起来好简单)。SPFA也行,Dijkstra也可以。这里我用的是SPFA。因为题目要求,将地名和其对应的数字用map映射一下,这样方便处理。          same[i]代表到达地点 i 有几种路径;          dist[i]代表从

  • [kuangbin带你飞]之'基础DP1'2019-11-16 13:50:55

    带飞网址

  • LeetCode 1087. Brace Expansion2019-11-04 13:01:51

    原题链接在这里:https://leetcode.com/problems/brace-expansion/ 题目: A string S represents a list of words. Each letter in the word has 1 or more options.  If there is one option, the letter is represented as is.  If there is more than one option, then curly

  • PTA(Basic Level)1087.有多少不同的值2019-09-30 22:01:02

    当自然数 n 依次取 1、2、3、……、N 时,算式 ⌊n/2⌋+⌊n/3⌋+⌊n/5⌋ 有多少个不同的值?(注:⌊x⌋ 为取整函数,表示不超过 x 的最大自然数,即 x 的整数部分。) 输入格式: 输入给出一个正整数 N(2≤N≤104)。 输出格式: 在一行中输出题面中算式取到的不同值的个数。 输入样例: 2017 输出样例:

  • [kuangbin带你飞]专题十二 基础DP1 E - Super Jumping! Jumping! Jumping! HDU - 10872019-08-04 20:51:21

    E - Super Jumping! Jumping! Jumping!HDU - 1087 题目链接:https://vjudge.net/contest/68966#problem/E 题目: Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game

  • PAT-甲级-1087 All Roads Lead to Rome (30 分)2019-08-03 22:39:09

    1087 All Roads Lead to Rome (30 分) Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. Input Specification: Each input file contains

  • bzoj 1087(状压dp)2019-08-02 17:02:09

    传送门 题意: 给你一个\(n*n\)的格子,如果第\(i\)个格子放入了棋子,则八联通方向都不能放置棋子,问放置\(k\)个棋子的方案数。 分析: 很明显可以进行\(dp\),又因为\(n\)非常的小,因此我们可以采用状态压缩的方法。设\(dp[i][state][k]\)为当前第\(i\)行的状态为\(state\)时,放置了\(k\)个棋

  • POJ 10872019-07-07 18:40:51

    https://blog.csdn.net/lvshubao1314/article/details/42926803 https://blog.csdn.net/scut_pein/article/details/9671969

  • Poj 1087 A Plug for UNIX 最大流2019-06-03 13:00:30

    Poj 1087 A Plug for UNIX 最大流 题目描述: You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and ideas on the Internet

  • YTU 1087: 用筛法求N之内的素数。2019-05-11 13:51:13

    风华是一指流砂,苍老是一段年华。 题目描述 用筛法求N(<1000)之内的素数。 输入 N 输出 0~N的素数 样例输入 copy 100 样例输出 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 #include <iostream> #include<cstring> #include<cstdio> #include<i

  • 九度OJ题目1087-约数的个数2019-03-14 17:47:32

    题目描述: 输入n个整数,依次输出每个数的约数的个数 输入: 输入的第一行为N,即数组的个数(N<=1000) 接下来的1行包括N个整数,其中每个数的范围为(1<=Num<=1000000000) 当N=0时输入结束。 输出: 可能有多组输入数据,对于每组输入数据, 输出N行,其中每一行对应上面的一个数的约数的个数。

  • PAT 甲级 1087 All Roads Lead to Rome2019-02-16 22:43:17

    https://pintia.cn/problem-sets/994805342720868352/problems/994805379664297984   Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. Inp

  • HDU 1087 最长不下降子序列 LIS DP2019-02-01 14:02:44

    Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game can be played by two or more than two players. It consists o

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有