今天比赛的时候拿到的第一道题,其实挺简单的,求两等差序列中相同元素的个数,我想了一下就觉得,只要找到了第一个相等的点,然后后面求最大公约数就可以直接得到结果了网上叫什么拓展欧几里得,我反正是按照我们的思路来的关键是如何找到第一个相等的点,因为首项和公差能达到
10^9,项数可以达到10^18,我觉得...
分类:
其他好文 时间:
2014-05-27 02:53:44
阅读次数:
197
单元格合并一、单元格合并。(1)我们可以使用Jtable的三个方法:getCellRect(),columnAtPoint(),and
rowAtPoint()。第一个方法返回一个单元格的边界(Rectangle类),第二、三个方法分别返回屏幕指定位置的列和行。为了实现单元格合并,我们需要重载(ov...
分类:
其他好文 时间:
2014-05-27 02:22:07
阅读次数:
386
UIButton中的**EdgeInsets是做什么用的?UIEdgeInsetsMakeCreates
an edge inset for a button or view.An inset is a margin around the drawing
rectangle where each s...
分类:
其他好文 时间:
2014-05-27 01:52:22
阅读次数:
297
>____ 2 #include "TicTac.h" 3 #define
ID_TIMER_ELLIPSE 1 4 #define ID_TIMER_RECTANGLE 2 5 6 CMyApp myApp; 7 8
///////////////////////////////...
分类:
其他好文 时间:
2014-05-19 13:17:17
阅读次数:
312
>____ 2 #include "ABC.h" 3 #define
ID_TIMER_ELLIPSE 1 4 #define ID_TIMER_RECTANGLE 2 5 6 CMyApp myApp; 7 8
/////////////////////////////////////////.....
分类:
其他好文 时间:
2014-05-19 13:01:22
阅读次数:
293
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1425
DP题。 f[i][j]表示当前数字为i,分解式中最大质数为j的方案数,那么,状态转移方程为: f[i][j] = sum(f[i-j][k]) 其中...
分类:
其他好文 时间:
2014-05-17 20:41:17
阅读次数:
296
TilingTime Limit: 1000MSMemory Limit:
65536KTotal Submissions: 7264Accepted: 3528DescriptionIn how many ways can you
tile a 2xn rectangle by 2x1 or 2x...
分类:
其他好文 时间:
2014-05-17 15:07:20
阅读次数:
245
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1115解题报告:输入n个字符串,让你求出可以用来区别这些字符串的最少的前缀总共有多少个字母。可以区别是指每个字符串都取一个自己的前缀,同时保证所有取的这些前缀没有完全相同。这题用字典树可以做...
分类:
其他好文 时间:
2014-05-12 03:43:49
阅读次数:
296
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1424
逐渐找到做这种题的感觉了。 二分法。g[i][j]存储坐标(i, j)的值,s[i][j]存储的值为左上角为起始点(1,1),右下角为(i,
j)的矩形区域内所有值的和,那么...
分类:
其他好文 时间:
2014-05-10 22:55:11
阅读次数:
347
1 #include 2 #define range 1300000 3 #define
BOOL int //必须把bool,true,false这样表示出来,不然会报编译错误...不知道为什么囧... 4 #define true 1 5
#define false 0 6 BOOL p...
分类:
其他好文 时间:
2014-05-10 06:56:39
阅读次数:
283