每日训练
*Slime*
这个作者很懒,什么都没留下…
展开
-
1.间隔取最大数(dp)E. Pavel and Triangles(思维) 每日两刷2019/4/15
链接:https://ac.nowcoder.com/acm/contest/558/I来源:牛客网题目描述小猫在研究序列。小猫在研究选择。给定一个长度为N的序列a1,a2,…,aN,请你在这N个元素中选出一些(可以不选,可以全选),使得对于任意1≤i<N,ai与ai+1不被同时选,求选出的数的和最大是多少。输入描述:第一行一个正整数T,表示数据组数。每组数据的第一行一个正整数N...原创 2019-04-15 22:23:51 · 472 阅读 · 0 评论 -
Educational Codeforces Round 69 (Rated for Div. 2) D. Yet Another Subarray Problem(DP)
D. Yet Another Subarray Problem传送门You are given an array a1,a2,…,an and two integers m and k.You can choose some subarray al,al+1,…,ar−1,ar.The cost of subarray al,al+1,…,ar−1,ar is equal to ∑i=lr...原创 2019-07-23 11:57:22 · 203 阅读 · 0 评论 -
Codeforces Round #575 (Div. 3) D1D2 RGB Substring (hard version)(思维)
D2. RGB Substring (hard version)传送门he only difference between easy and hard versions is the size of the input.You are given a string s consisting of n characters, each character is ‘R’, ‘G’ or ‘B’....原创 2019-07-25 10:46:10 · 117 阅读 · 0 评论 -
I - Birthday Puzzle(遍历子集的位运算)
I - Birthday PuzzleToday is the Birthday of a beautiful girl, she’s happy and she’s telling her friends loudly to bring her birthday gifts. One of her best friends who is fond of puzzles decided to b...原创 2019-07-18 01:05:25 · 275 阅读 · 3 评论 -
与堆有关问题的求解
洛谷P2085 最小函数值https://www.luogu.org/problemnew/show/P2085题目大意:有n个函数,分别为F1,F2,...,FnF_1,F_2,...,F_nF1,F2,...,Fn。定义Fi(x)=AiA_iAi*x2x^2x2+BiB_iBix+CiC_iCi (x∈N)。给定这些Ai、Bi和CiA_i、B_i和C_iAi、Bi和Ci...原创 2019-07-12 22:14:48 · 131 阅读 · 0 评论 -
2019中山大学程序设计竞赛(重现赛)2019/4/20
这场比赛打得很憋屈,快读会TLE,每题都wa了好多发。呜呜1002 TriangleAfter Xiaoteng took a math class, he learned a lot of different shapes, but Xiaoteng’s favorite triangle is because he likes stable shapes, just like his st...原创 2019-04-20 00:15:41 · 515 阅读 · 0 评论 -
Codeforces Round #552 (Div. 3)每日两刷(E.Two Teams(vector),F. Shovels Shop(DP)G. Minimum Pos数论 2019/4/17
E. Two Teams题目链接:http://codeforces.com/contest/1154/problem/EThere are n students standing in a row. Two coaches are forming two teams — the first coach chooses the first team and the second coach ...原创 2019-04-18 15:27:21 · 247 阅读 · 0 评论 -
2019 GDUT Spring Team_up Training IV(Div.2)(优先队列,暴力,思维,玄学)(2019/4/16)
A. Coffee Breaktime limit per test 2.0 smemory limit per test 256 MBinput standard inputoutput standard outputRecently Monocarp got a job. His working day lasts exactly m minutes. During work, Mo...原创 2019-04-17 21:34:20 · 182 阅读 · 0 评论 -
每日两刷Codeforces Round #551 (Div. 2) (B. Serval and Toy 模拟),C. Serval and Parenthesis(贪心))2019/4/14
B. Serval and Toy Brickstime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputLuckily, Serval got onto the right bus, and he came to the kinderg...原创 2019-04-15 00:29:12 · 300 阅读 · 0 评论 -
每日两刷(Erwin Schrödinger的橘猫(字典树或map),冰水挑战(dfs或dp),分宿舍(dp,枚举)2019/4/13)
由于题目主人有隐私,不方便贴出题目题目大意:n串密码,然后k组输入,当输入的是其中一个密码的前面几位或者整串密码时,可以成功解锁。思路:做法1:暴力存入set中,然后搜索即可。代码:#include<iostream>#include<cstdio>#include <string.h>#include <map>using n...原创 2019-04-13 20:52:50 · 148 阅读 · 0 评论 -
每日两刷(2019/4/12)(Two Merged Sequences(贪心),Same Sum Blocks (Hard)(数据结构))
G. Two Merged Sequencescf 难度2600(贪心)链接:http://codeforces.com/problemset/problem/1144/GTwo integer sequences existed initially, one of them was strictly increasing, and another one — strictly decrea...原创 2019-04-12 23:03:03 · 121 阅读 · 0 评论 -
Codeforces Round #576 (Div. 2) F. Rectangle Painting 1(dfs搜矩形)
F. Rectangle Painting 1传送门There is a square grid of size n×n. Some cells are colored in black, all others are colored in white. In one operation you can select some rectangle and color all its cells...原创 2019-08-07 22:27:01 · 154 阅读 · 0 评论