作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢! 我们熟悉了对象和类的基本概念。我们将进一步拓展,以便能实际运用对象和类。 调用类的其它信息 上一讲中提到,在定义方法时,必须有self这一参数。这个参数表示某个对象。对象拥有类的所有 ...
分类:
编程语言 时间:
2017-08-25 16:49:05
阅读次数:
210
题目大意:给定一个矩阵,给你多次查询,查询一个小矩阵中的数的中位数; 解题思路:完全没往二分上想,我们可以二分枚举中位数数值,搜索矩阵中数值小于中位数的个数。 ...
分类:
其他好文 时间:
2017-08-23 15:54:59
阅读次数:
181
题目大意: 给你一个数组,给你如下几种操作: s l r mod 查询区间【l,r】中模m等于mod的数字之和; + p r 将p位置的数加上r后模m; - p r 将p位置的数减去r后模m; 解题思路: 一般进行区间查询,位置操作可以使用线段树或者树状数组解决(暂时只会树状数组);这题的特殊之处就 ...
分类:
其他好文 时间:
2017-08-22 23:13:18
阅读次数:
213
Summer Holiday Time Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3937 Accepted Submission(s): 1775 ...
分类:
其他好文 时间:
2017-08-20 18:31:09
阅读次数:
181
Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a matrix a with n ...
分类:
其他好文 时间:
2017-08-20 18:30:27
阅读次数:
192
P1339 [USACO09OCT]热浪Heat Wave 题目描述 The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for good eating but are n ...
分类:
其他好文 时间:
2017-08-19 17:07:15
阅读次数:
201
一开始有n个杯子,每个杯子里有一些豆子,两个人轮流操作,每次只能将一个豆子移动到其所在杯子之前的某个杯子里,不过可以移动到的范围只有一段区间。问你是否先手必胜。 一个杯子里的豆子全都等价的,因为sg函数是异或起来的值,所以一个杯子里如果有偶数个豆子,就没有意义。 用sg(i)表示i杯子中的豆子的sg ...
分类:
其他好文 时间:
2017-08-17 10:32:35
阅读次数:
150
A:签到题 C:模拟搜索题 #include <bits/stdc++.h> #include <cstring> #include <iostream> #include <algorithm> #include<queue> #define EPS 1.0e-9 #define PI acos( ...
分类:
其他好文 时间:
2017-08-15 23:32:57
阅读次数:
466
A:贪心DFS 先从最远的搜起 如果一个点的value>=2 就ans++ D:并查集 E:大模拟 F:快速幂 #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL, LL > pLL; ...
分类:
其他好文 时间:
2017-08-15 23:32:47
阅读次数:
342
题目描述 The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for good eating but are not so adept at creating creamy ...
分类:
其他好文 时间:
2017-08-13 16:29:17
阅读次数:
156