Codeforces Round #333 (Div. 1)】的更多相关文章

C. Kleofáš and the n-thlon Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/601/problem/C Description Kleofáš is participating in an n-thlon - a tournament consisting of n different competitions in n different disciplines (n…
B. Lipshitz Sequence Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/601/problem/B Description A function  is called Lipschitz continuous if there is a real constant K such that the inequality |f(x) - f(y)| ≤ K·|x - y| hold…
C. The Two Routes Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/602/problem/C Description In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road networ…
B. Approximating a Constant Range Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/602/problem/B Description When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowl…
A. Two Bases Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/602/problem/A Description After seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbers X and Y realised that they have different bases,…
B. Approximating a Constant Range Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/602/problem/B Description When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowl…
D. Acyclic Organic Compounds   You are given a tree T with n vertices (numbered 1 through n) and a letter in each vertex. The tree is rooted at vertex 1. Let's look at the subtree Tv of some vertex v. It is possible to read a string along each simple…
水 A - Two Bases 水题,但是pow的精度不高,应该是转换成long long精度丢失了干脆直接double就可以了.被hack掉了.用long long能存的下 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int b1[44], b2[44]; int n, m; int main(vo…
题意:n个点, 坐标已知,其中横坐标为为1~n. 求区间[l, r] 的所有子区间内斜率最大值的和. 首先要知道,[l, r]区间内最大的斜率必然是相邻的两个点构成的. 然后问题就变成了求区间[l, r]内所有子区间最大值的和. 这个问题可以利用单调栈来做. 每次找到当前点左面第一个大于当前值的点, 然后更新答案. 姿势很多. import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.…
B. Approximating a Constant Range time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output When Xellos was doing a practice course in university, he once had to measure the intensity of an effect t…