链接:戳这里
Circle
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
问题描述
\ \ \ \ Fye对约瑟夫游戏十分着迷.
\ \ \ \ 她找到了n个同学,把他们围成一个圈,让他们做约瑟夫游戏,然后她得到了一个同学们出圈的...
分类:
其他好文 时间:
2016-05-07 08:53:19
阅读次数:
231
【题意】一个括号序列,你有以下三种操作:"L"光标左移;"R"光标右移;"D"删掉这个括号以及和它对应的括号之间的所有括号,并且把光标移动到被删后右边的那个括号上。如果没有了,就移动到串的末尾。现在给你原括号序列和操作,求最终结果!
【分析】由于操作最多有50万个,那么简单想一下用链表来暴力模拟都是能过得去的。那么,我在这里用了类似于跳转链表来模拟这个过程!但是这里我并不是一个一个的跳转的,而是...
分类:
其他好文 时间:
2016-05-07 07:21:00
阅读次数:
109
Holidays
Game of Robots
Cinema
Magic Powder - 12
Correct Bracket Sequence Editor
Restore a Number
Holidays#include
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define For...
分类:
其他好文 时间:
2016-05-07 06:58:00
阅读次数:
256
MATLAB取整函数 1)fix(x) : 截尾取整. >> fix( [3.12 -3.12]) ans = 3 -3(2)floor(x):不超过x 的最大整数.(高斯取整) >> floor( [3.12 -3.12]) ans = 3 -4 (3)ceil(x) : 大于x 的最小整数 >> ...
分类:
其他好文 时间:
2016-05-07 01:03:36
阅读次数:
138
Round Numbers
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 11481
Accepted: 4305
Description
The cows, as you know, have no fingers or thumbs and thus ar...
分类:
其他好文 时间:
2016-05-06 12:33:00
阅读次数:
157
E. Correct Bracket Sequence Editor Recently Polycarp started to develop a text editor that works only with correct bracket sequences (abbreviated as C ...
分类:
其他好文 时间:
2016-05-06 08:10:54
阅读次数:
299
1.Math.random() 随机函数 Math.random()是令系统随机选取大于等于 0.0 且小于 1.0 的随机数 alert(Math.random())取值在[0,1) 2.Math.round(数字) 四舍五入 alert(Math.round(3.2)) 弹出3 alert(Ma ...
分类:
其他好文 时间:
2016-05-05 12:36:51
阅读次数:
307
题目链接:http://codeforces.com/problemset/problem/7/C 给你一个直线方程,有整数解输出答案,否则输出-1。 扩欧模版题。这里有讲解:http://www.cnblogs.com/Recoder/p/5459812.html (很久没写exgcd,都不会写了 ...
分类:
其他好文 时间:
2016-05-04 22:38:25
阅读次数:
219
A. Little Artem and Presents 题意:Artem想将自己的n个糖果送给Masha,他想送尽量多的次数而不在乎数量,不顾每次送的数量不能和上次相同。 题解:只要第一次送一个,第二次送两个这样一次送就可以保证送的次数最多, 代码: 1 /*A*/ 2 #include<cstd ...
分类:
其他好文 时间:
2016-05-04 22:33:29
阅读次数:
242
A. Noldbach problem A. Noldbach problem Nick is interested in prime numbers. Once he read about Goldbach problem. It states that every even integer gr ...
分类:
其他好文 时间:
2016-05-04 19:02:48
阅读次数:
212