传送门:http://codeforces.com/contest/839/problem/D Examples input 33 3 1 output 12 input 42 3 4 6 output 39 Note In the first sample the clans are {1},?{ ...
A Text Volume 题面: You are given a text of single-space separated words, consisting of small and capital Latin letters. Volume of the word is number of ...
分类:
其他好文 时间:
2017-08-16 20:19:32
阅读次数:
227
Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies. At first, Arya and Bran ...
分类:
其他好文 时间:
2017-08-16 00:04:18
阅读次数:
143
数据分割 Problem Description 小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统。这个程序接受一些形如xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。输入包含多组数据。然而粗心的小w不幸地把每组数据之间的分 ...
分类:
其他好文 时间:
2017-08-13 15:14:40
阅读次数:
128
今夕何夕 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1295 Accepted Submission(s): 455 Problem Des ...
分类:
其他好文 时间:
2017-08-13 12:31:04
阅读次数:
242
题意给定一个长方形的范围;从给定的长方形中找两个占据面积最大的 wa多次 注意各个x,y的结合写错。。 代码: #include<bits/stdc++.h>using namespace std;int n;struct node{ int x; int y;}ma[105];int main() ...
分类:
其他好文 时间:
2017-08-13 01:15:50
阅读次数:
181
Appleman and Tree CodeForces - 461B 题意: 题解:http://blog.csdn.net/u011580493/article/details/39032195 1 #include <bits/stdc++.h> 2 using namespace std; ...
分类:
其他好文 时间:
2017-08-12 12:39:48
阅读次数:
145
You are given n points on the straight line — the positions (x-coordinates) of the cities and m points on the same line — the positions (x-coordinates ...
分类:
Web程序 时间:
2017-08-09 15:42:15
阅读次数:
248
codeforces 724D [n个城市每个城市有一个特产的产出,一个特产的最大需求。当i<j时,城市i可以运最多C个特产到j。求所有城市可以满足最大的需求和] [如果直接最大流建图显然会T。考虑将最大流问题转换为最小割。每个城市会被划分到S集或者T集。] [另dp[i][j]表示前i个城市有j个 ...
分类:
其他好文 时间:
2017-08-09 10:07:23
阅读次数:
136
/* CodeForces - 837E - Vasya's Function [ 数论 ] | Educational Codeforces Round 26 题意: f(a, 0) = 0; f(a, b) = 1 + f(a, b-gcd(a, b)); 求 f(a, b) , a,b usi... ...
分类:
其他好文 时间:
2017-08-06 11:02:44
阅读次数:
136