Codeforces Round #460 (Div. 2)D. Substring 链接:http://codeforces.com/contest/919/problem/DD. Substring time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard outputYou are given a grap...
Gym - 101608G (尺取) https://vjudge.net/contest/208695#problem/G Just days before the JCPC, your internet service went down. You decided to continue your training at the ACM club at your university. Sadly, you discov...
牛客网 练习赛11 B题 假的字符串 tire+topsort判环 题目链接:https://www.nowcoder.com/acm/contest/59#submit/{%22problemIdFilter%22%3A15049%2C%22statusTypeFilter%22%3A%225%22%2C%22page%22%3A1}链接:https://www.nowcoder.com/acm/contest/59/B 来源:牛客网题目描述给定n...
TCO 11 muddy round (贪心求 期望dp) TCO 11 muddy roundProblem StatementFox Ciel is going to walk through an unpaved road to meet her friend. The road is one-dimensional. It is separated into N parts numbered from 0 to N-1, where part 0 i
小C打比赛 wannafly C题 (记忆化搜索) 网址;https://www.nowcoder.com/acm/contest/57/C 小C打比赛 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 小C现在要参加一场wannafly挑战赛,一场挑战赛一共有n道题,一共有m分钟。 对于第i道题,小C解决它需要恰好j分钟的概率是p...
cf待补 (hash 的写法) 别人的代码:#include <bits/stdc++.h>#define mp make_pair#define pb push_back#define f first#define s second#define ll long longusing namespace std;const int N = int(1e6) + 10;const int mod1 = int(1e9) +
Codeforces Round #451 (Div. 2) B. Proper Nutrition B. Proper Nutrition time limit per test 1 second memory limit per test 256 megabytes input standard input output standard outputVasya has n burles. One bottle of Ber-Cola costs a burles and one
Educational Codeforces Round 34 (Rated for Div. 2) D - Almost Difference 参考:http://blog.csdn.net/kamiyoru/article/details/78791923当读入第k个数字的时候: ans′=∑k−1i=1(numberk−nubmeri)=(k−1)numberk−∑k−1i=1nubmeri 当然这不是实际的答案,因为差值为1及以内的数是不必加到答案上的; 所以 ans=ans′−countnumberk−1+countnumb
cf450 BCDE(待补) 参考:https://www.cnblogs.com/wujiechao/p/8026872.html D题不知道为什么是对于每一个因素。。。待补。。#include #define mem(a, i) memset(a, i, sizeof(a))using namespace std;typedef long long LL;const LL MOD = 1e9 + 7;int
Codeforces Beta Round #17 C. Balance DP C. Balance 题目链接http://codeforces.com/contest/17/problem/C 题面Nick likes strings very much, he likes to rotate them, sort them, rearrange characters within a string… Once he wrote a random string of ch
BZOJ 4300: 绝世好题 动态规划 转自:http://www.cnblogs.com/qscqesze/p/6042216.html4300: 绝世好题题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4300Description 给定一个长度为n的数列ai,求ai的子序列bi的最长长度,满足bi&bi-1!=0(2<=i<=len)。Input 输入文件共2行。 第一行包
Codeforces Round #384 (Div. 2)E.Vladik and cards【二分+状压dp】(未敲) E. Vladik and cards time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputVladik was bored on his way home and decided to play the followi
Codeforces Round #449 (Div. 1) A. Nephren gives a riddle 模拟. A. Nephren gives a riddle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output What are you doing at the end of the world? Are you busy
Codeforces Round #312 (Div. 2) E. A Simple Task 线段树(未敲) E. A Simple Task 题目连接:http://www.codeforces.com/contest/558/problem/E DescriptionThis task is very simple. Given a string S of length n and q queries each query is on the format i j k which means sor
BZOJ 4636: 蒟蒻的数列 分块 (未敲) 转自:http://www.cnblogs.com/qscqesze/p/5785586.htmlBZOJ 4636: 蒟蒻的数列 分块 4636: 蒟蒻的数列 题目连接:http://www.lydsy.com/JudgeOnline/problem.php?id=4636 Description蒟蒻DCrusher不仅喜欢玩扑克,还喜欢研究数列 题目描述 DCrusher有一个数列,初
CodeForces 472 D ,E,F (MST,构造,线性代数)(待补) 官方题解:http://codeforces.com/blog/entry/14028 E题:http://codeforces.com/contest/472/problem/E F题:http://codeforces.com/contest/472/problem/FThere is an easy way to obtain a new task from an old one call
Homework of PE dp 正难则反 Problem D: Homework of PE Time Limit: 1 Sec Memory Limit: 128 MB Submit: 117 Solved: 37 [Submit][Status][Web Board] Description At the begining of PE class, the math teacher comes to the class,
Codeforces Round #379 (Div. 2) C. Anton and Making Potions 枚举+二分 C. Anton and Making Potions 题目连接:http://codeforces.com/contest/734/problem/C DescriptionAnton is playing a very interesting computer game, but now he is stuck at one of the levels. To pass to the nex
CDOJ 1292 卿学姐种花 暴力 分块 线段树 转自:卿学姐种花 题目连接:http://acm.uestc.edu.cn/#/problem/show/1292 Description众所周知,在喵哈哈村,有一个温柔善良的卿学姐。卿学姐喜欢和她一样美丽的花。所以卿学姐家的后院有很多的花坛。卿学姐有n 个花坛,一开始第i个花坛里有A[i]朵花。每过一段时间,卿学姐都会在花坛里种上新的花。作为一个聪明的学姐,卿学姐的种花方式也是与众不同 ,