思维
文章平均质量分 89
FOWng_lp
这个作者很懒,什么都没留下…
展开
-
Our Tanya is Crying Out Loud (贪心+思维)
Right now she actually isn’t. But she will be, if you don’t solve this problem.You are given integers n, k, A and B. There is a number x, which is initially equal to n. You are allowed to perform two...原创 2019-01-27 12:28:23 · 333 阅读 · 0 评论 -
居然没有秒切的01背包,我还是太弱了的洛谷P1049 装箱问题
题目描述有一个箱子容量为VV(正整数,0 \le V \le 200000≤V≤20000),同时有nn个物品(0<n \le 300<n≤30,每个物品有一个体积(正整数)。要求nn个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。输入格式11个整数,表示箱子容量11个整数,表示有nn个物品接下来nn行,分别表示这nn个物品的各自体积输出格式11个整数,表示箱子剩...原创 2019-08-01 10:10:00 · 169 阅读 · 0 评论 -
poj3268 Silver Cow Party DIJ
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa...原创 2019-07-16 14:09:53 · 127 阅读 · 0 评论 -
今日水题博客第二篇(共十篇) CodeForces - 1059C
http://codeforces.com/problemset/problem/1059/CLet’s call the following process a transformation of a sequence of length nn.If the sequence is empty, the process ends. Otherwise, append the greatest...原创 2019-07-14 20:07:42 · 118 阅读 · 0 评论 -
神仙难做的Minieye杯第十五届华中科技大学程序设计邀请赛现场同步赛 J Mex
链接:https://ac.nowcoder.com/acm/contest/700/J来源:牛客网题目描述Recently MINIEYE’s engineer M is working on neural network model training and he has found that if the output of the network is S = (S1, S2, …,...原创 2019-04-21 20:44:11 · 442 阅读 · 0 评论 -
没搞明白的最大生成树 Nicoleta and the circle of kids codeforces/gym/101875/problem/A
A. Nicoleta and the circle of kidstime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputNicoleta is a happy kid, he goes every day to school and is always com...原创 2019-04-13 20:43:16 · 675 阅读 · 0 评论 -
Arpa’s obvious problem and Mehrdad’s terrible solution codeforces problem/742/ 异或
There are some beautiful girls in Arpa’s land as mentioned before.Once Arpa came up with an obvious problem:Given an array and a number x, count the number of pairs of indices i, j (1 ≤ i < j ≤ n...原创 2019-04-06 12:52:46 · 164 阅读 · 0 评论 -
Approximating a Constant Range-codeforces-problem/602/B(思维)
When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowly approached equilibrium. A good way to determine the equilibrium intensity would be ...原创 2019-03-02 11:05:35 · 298 阅读 · 0 评论 -
codeforces 540B School Marks(思维)
Little Vova studies programming in an elite school. Vova and his classmates are supposed to write n progress tests, for each test they will get a mark from 1 to p. Vova is very smart and he can write ...原创 2019-02-24 12:03:09 · 126 阅读 · 0 评论 -
codeforces 528B Clique Problem (贪心 + 思维)
The clique problem is one of the most well-known NP-complete problems. Under some simplification it can be formulated as follows. Consider an undirected graph G. It is required to find a subset of ver...原创 2019-02-24 10:17:09 · 173 阅读 · 0 评论 -
codeforces 745/A Hongcow Learns the Cyclic Shift(字符串处理)(set的运用)
Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Being a dutiful student, he immediately learns how to spell the word.Hongcow has decided to try to...原创 2019-02-27 22:20:05 · 249 阅读 · 0 评论 -
Leading and Trailing ——kuangbin带你飞(数论基础)
You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk.InputInput starts with an integer T (≤ 1000), denoting the numbe...原创 2019-02-16 18:47:21 · 395 阅读 · 0 评论 -
Vanya and Label - codeforces - problem/677/C
While walking down the street Vanya saw a label “Hide&Seek”. Because he is a programmer, he used & as a bitwise AND for these two words represented as a integers in base 64 and got new word. N...原创 2019-02-16 13:15:37 · 256 阅读 · 0 评论 -
codeforces 675 C. Money Transfers(思维、前缀和)
There are n banks in the city where Vasya lives, they are located in a circle, such that any two banks are neighbouring if their indices differ by no more than 1. Also, bank 1 and bank n are neighbour...原创 2019-02-03 16:42:30 · 377 阅读 · 1 评论 -
Hard Process CodeForces - 660C (关于尺取法的使用)
C. Hard Processtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a with n elements. Each element of a is either 0 or 1.L...原创 2019-02-02 20:04:37 · 311 阅读 · 0 评论 -
简单的01背包 洛谷P1164 小A点菜
ideaIt’s easy to find that it’s a 01 bag problem ,but I think my dp learned so nervous that meeting the easy change problem can’t get idea in a short timeafter looking the problem solution , there...原创 2019-08-01 11:24:35 · 203 阅读 · 0 评论