自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 ACM/ICPC 2018亚洲区预选赛北京赛站网络赛 D题

时间限制:1000ms单点时限:1000ms内存限制:256MB描述80 Days is an interesting game based on Jules Verne's science fiction "Around the World in Eighty Days". In this game, you have to manage the limited money an...

2018-09-23 16:04:17 214

原创 洛谷P2184

题目背景面对蚂蚁们的疯狂进攻,小FF的Tower defence宣告失败……人类被蚂蚁们逼到了Greed Island上的一个海湾。现在,小FF的后方是一望无际的大海, 前方是变异了的超级蚂蚁。 小FF还有大好前程,他可不想命丧于此, 于是他派遣手下最后一批改造SCV布置地雷以阻挡蚂蚁们的进攻。题目描述小FF最后一道防线是一条长度为N的战壕, 小FF拥有无数多种地雷,而SCV每次可以在...

2018-09-21 21:17:47 160

原创 线段树模板

#include <bits/stdc++.h>using namespace std;#define mmax 100010struct haha{ int x;}we[mmax<<2];int sum[mmax<<2],add[mmax<<2];//求和,懒惰标记 int a[mmax];//PushUp//求和更新 voi...

2018-09-14 22:50:51 115

原创 Wannafly挑战赛23_A 字符串

链接:https://www.nowcoder.com/acm/contest/161/A来源:牛客网 题目描述小N现在有一个字符串S。他把这这个字符串的所有子串都挑了出来。一个S的子串T是合法的,当且仅当T中包含了所有的小写字母。小N希望知道所有的合法的S的子串中,长度最短是多少。输入描述:一行一个字符串S。只包含小写字母。S的长度不超过106.输出描述:一行一个...

2018-09-12 23:47:05 145

原创 HDU 1299 Diophantus of Alexandria(质数筛)

Diophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables were restricted to integral values. In honor of him,...

2018-09-11 10:27:41 159

原创 HDU —— 1239 Calling Extraterrestrial Intelligence Again(找素数水题)

Problem Description A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November 16, 1974. The messa...

2018-09-10 23:52:42 178

原创 RSA——HDU1211(扩展欧几里得

Problem Description RSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow: > choose two large prime integer p, q > calculate n = p × q, ...

2018-09-10 23:09:46 417

原创 Trace

There‘s a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy) means the wave is a rectangle whose vertexes are ( 00 , 00 ), ( xx , 00 ), ( 00 , yy ), ( xx , yy )...

2018-09-09 23:43:27 170

原创 ACM-ICPC 2018 徐州赛区网络预赛 Characters with Hash

Mur loves hash algorithm, and he sometimes encrypt another one's name, and call him with that encrypted value. For instance, he calls Kimura KMR, and calls Suzuki YJSNPI. One day he read a book about ...

2018-09-09 22:17:26 172

原创 Features Track——徐州网络赛

  31.32%  1000ms  262144K Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat features in each f...

2018-09-09 22:00:14 170

原创 Factorial

Problem Description The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellula...

2018-09-08 22:58:24 328

原创 Secret Code ——HDU1124

Problem Description The Sarcophagus itself is locked by a secret numerical code. When somebody wants to open it, he must know the code and set it exactly on the top of the Sarcophagus. A very ...

2018-09-05 22:14:03 289

原创 Remainder

  Problem Description Coco is a clever boy, who is good at mathematics. However, he is puzzled by a difficult mathematics problem. The problem is: Given three integers N, K and M, N may adds (‘...

2018-09-05 19:15:51 905

原创 欧拉函数(phi)

欧拉函数:phi[n]小于等于n的与n互质的数的个数 PHI(n) = (p1 ^ k1 - p1 ^ (k1 - 1)) * (p2 ^ k2 - p2 ^ (k2 - 1)) * ... * (pn ^ kn - pn ^ (kn - 1))               =n*(p1-1)(p2-1)……(pi-1)/(p1*p2*……pi);                  =...

2018-09-03 22:55:02 3303

原创 Eratosthenes筛法——欧拉筛

 Eratosthenes筛法memset(vis,0,sizeof(vis)); for(int i = 2; i <= n; i++) for(int j = 2 * i; j <= n; j += i) vis[j] = 1; //vis[j] = 1 表示 j 不是素数欧拉筛d = 0;memset(flag, 0, ...

2018-09-02 15:02:34 268

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除