MXS&Vincene ─╄OvЁ &0000016 ─╄OvЁ MXS&VinceneMXS&Vincene ─╄OvЁ:今天很残酷,明天更残酷,后天很美好,但是绝大部分人是死在明天晚上,只有那些真正的英雄才能见到后天的太阳。MXS&Vincene ─╄OvЁ:We're here to put ...
分类:
其他好文 时间:
2015-08-03 12:45:25
阅读次数:
148
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define sss(a,b,c) scanf("%d%d%d",&a,&b,...
分类:
其他好文 时间:
2015-08-03 11:34:18
阅读次数:
107
MXS&Vincene ─╄OvЁ &0000015 ─╄OvЁ MXS&VinceneMXS&Vincene ─╄OvЁ:今天很残酷,明天更残酷,后天很美好,但是绝大部分人是死在明天晚上,只有那些真正的英雄才能见到后天的太阳。MXS&Vincene ─╄OvЁ:We're here to put ...
分类:
其他好文 时间:
2015-08-03 11:32:35
阅读次数:
132
MXS&Vincene ─╄OvЁ &0000014 ─╄OvЁ MXS&VinceneMXS&Vincene ─╄OvЁ:今天很残酷,明天更残酷,后天很美好,但是绝大部分人是死在明天晚上,只有那些真正的英雄才能见到后天的太阳。MXS&Vincene ─╄OvЁ:We're here to put ...
分类:
其他好文 时间:
2015-08-03 11:30:13
阅读次数:
123
非常卡时间,不能用set
而却糖果是不会重的,之前认为会重也一直超时
别忘了清空,不清空也会超时
#include
using namespace std;
typedef pair candy;
list s;
int main()
{
int n;
while( scanf("%d",&n) && n ){
s.clear();
wh...
分类:
其他好文 时间:
2015-08-03 10:11:54
阅读次数:
255
/*给定一个正整数N,求出[2,N]中的所有素数*/
#define maxn 1000000
boool vis[maxn];
void getprime(int n, int &tot, int ans[]) //筛法将合数筛掉,留下的则是素数 ,用于快速判断一个区间内的所有素数
{
fot = 0; //记录素数的个数
for (int i = 2; i<= n; i++)...
分类:
其他好文 时间:
2015-08-03 09:01:48
阅读次数:
186
/*a*b (mod m) 的实现过程*/
/*当a,b很大的时候mod m就会产生溢出, 故运用乘法原理转换为加法求解*/
LL multi(LL a, LL b, LL m)
{
LL exp = a %m, res = 0;
while (b)
{
if (b & 1) //b的最低位是否为1
{
res = res + exp;
if (res >= m)...
分类:
其他好文 时间:
2015-08-03 08:59:09
阅读次数:
133
题目链接:http://poj.org/problem?id=1651题意:初使ans=0,每次消去一个值,位置在pos(pos!=1 && pos !=n)
同时ans+=a[pos-1]*a[pos]*a[pos+1],一直消元素直到最后剩余2个,求方案最小的ans是多少?代码:#include
#include
#include
#inc...
分类:
其他好文 时间:
2015-08-03 06:44:49
阅读次数:
283