Vasya and Basketball CodeForces - 493C】的更多相关文章

Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each successful throw has value of either 2 or 3 points. A throw is worth 2 points if the distance it was made from doesn't exceed some value of…
C. Vasya and Basketball 题目链接:http://codeforces.com/problemset/problem/493/C time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya follows a basketball game and marks the distances from whi…
C. Vasya and Basketball time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each succe…
C. Vasya and Basketball time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each succe…
C. Vasya and Basketball   Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each successful throw has value of either 2 or 3 points. A throw is worth 2 points if the distance it was made from do…
C. Vasya and Basketball time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya follows a basketball game and marks the distances from which each team makes a throw. He knows that each succe…
[链接] 我是链接,点我呀:) [题意] 题意 [题解] 枚举三分线(离散后)的位置 然后根据预处理的前缀和,快速算出两个队伍的分数. [代码] #include <bits/stdc++.h> using namespace std; const int N = 2e5; int n,m; int a[N+10],b[N+10],aa[2*N+100],bb[2*N+100]; map<int,int> dic; map<int,int> dic2; int main…
题意:给出三分线的值d,分别有两支队伍,如果小于等于d,得2分,如果大于d,得三分,问使得a-b最大时的a,b 一看到题目,就想当然的去二分了----啥都没分出来---55555555 后来才知道不能二分,因为随着d的增大,两个队的得分都会逐渐减少,但是两个队伍的得分的差值的单调性却不知道 是这一篇这样讲的 http://www.cnblogs.com/huangxf/p/4142760.html 然后就依次枚举d的值,维护一个最大值 #include<iostream> #include&l…
题意: 对输入的每个数都进行分配到两个多重集中,问分配完以后 每个多重集中的个数为1的元素是否相等  相等则输出一个分配方式, 不想等为NO 解析: 三种情况 1.原数列中个数为1 的数的个数为偶数  YES 集合A中只有一半个数为1的数, 其它的数在集合B中即可 2.原数列中个数为1的数的个数为奇数,且不存在个数大于等于3的数  NO 3.原数列中个数为1的数的个数为奇数,存在个数大于等于3的数 YES  先照1分配完 然后 把个数大于等于3的那个数 拿出一个放到A中 其它在B即可 #incl…
大意: 给定$4n$个$m$位的五进制数, $q$个询问, 每个询问给出一个$m$位的五进制数$b$, 求有多少种选数方案可以使五进制异或和为$b$. 高斯消元入门题 每次询问相当于就是给定了$m$个式子组成的模$5$的方程组, 求解的个数 如果消元后询问某一位非零, 但是对应系数矩阵全零, 那么无解 否则解的个数是$5^{n-r}$ $q$组询问的话, 就增广$q$列, 同时解$q$个方程组即可. #include <iostream> #include <sstream> #i…