自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 前台获取枚举的key值

如:EnumShowPosition { 首页 = 0,一级分类页 = 1,二级分类页 = 2 }想获得汉字对应的数字,可用GetHashCode()html展示如下:循环枚举 @foreach (B2B.Enum.ShowPosition pd in Enum.GetValues(typeof(B2B.Enum.ShowPosition)...

2018-05-22 08:47:00 760

转载 简单日历表

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>...

2015-12-10 15:04:00 181

转载 xt

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;...

2015-11-29 17:46:00 107

转载 UVA 10200 Prime Time (打表)

Prime TimeEuler is a well-known matematician, and, among many other things, he discovered that the formula n 2 + n + 41 produces a prime for 0 ≤ n < 40. For n = 40, the formula produces 1681...

2015-11-20 17:26:00 131

转载 CodeForces 540B School Marks

http://codeforces.com/problemset/problem/540/BSchool MarksTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 540B...

2015-11-20 16:11:00 81

转载 CodeForces 540C Ice Cave (BFS)

http://codeforces.com/problemset/problem/540/CIce CaveTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 540C...

2015-11-19 17:57:00 87

转载 poj 3250 Bad Hair Day(栈的运用)

http://poj.org/problem?id=3250Bad Hair DayTime Limit:2000MSMemory Limit:65536KTotal Submissions:15985Accepted:5404DescriptionSome of Farmer John'sN...

2015-11-19 15:34:00 60

转载 hdu A Magic Lamp

http://acm.hdu.edu.cn/showproblem.php?pid=3183A Magic LampTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2556Accepted Submission(s...

2015-11-19 12:50:00 74

转载 hdu 4325 Flowers(区间离散化)

http://acm.hdu.edu.cn/showproblem.php?pid=4325FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2633Accepted Submission(s): 12...

2015-11-18 15:25:00 92

转载 hdu 5500 Reorder the Books

http://acm.hdu.edu.cn/showproblem.php?pid=5500Reorder the BooksTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 942Accepted Sub...

2015-11-18 11:31:00 71

转载 poj 2981 Strange Way to Express Integers (中国剩余定理不互质)

http://poj.org/problem?id=2891Strange Way to Express IntegersTime Limit:1000MSMemory Limit:131072KTotal Submissions:11970Accepted:3788DescriptionE...

2015-11-13 18:03:00 84

转载 hdu X问题 (中国剩余定理不互质)

http://acm.hdu.edu.cn/showproblem.php?pid=1573X问题Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4439Accepted Submission(s): 1435...

2015-11-13 16:54:00 264

转载 中国剩余定理(孙子定理)

“中国剩余定理”是公元5-6世纪、我国南北朝时期的一部著名算术著作《孙子算经》中的一个“物不知数”的解法问题:今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二。问物几何?答曰:二十三。1.除数两两互质的情况根据上面我们可以得到一组式子:X ≡ 2(mod 3)X ≡ 3(mod 5)X ≡ 2(mod 7)即:X % 3...

2015-11-12 16:25:00 264

转载 poj 1006 Biorhythms (中国剩余定理模板)

http://poj.org/problem?id=1006题目大意:人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同...

2015-11-12 15:36:00 176

转载 hud 5124 lines(思维 + 离散化)

http://acm.hdu.edu.cn/showproblem.php?pid=5124linesProblem Description:John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines....

2015-11-10 16:04:00 108

转载 UVA 11426 GCD - Extreme (II)(欧拉函数打表 + 规律)

Given the value of N, you will have to find the value of G. The definition of G is given below:Here GCD(i, j) means the greatest common divisor of integer i and integer j.For those who have t...

2015-11-10 14:24:00 72

转载 LightOJ 1138 Trailing Zeroes (III)(二分 + 思维)

http://lightoj.com/volume_showproblem.php?problem=1138Trailing Zeroes (III)Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 113...

2015-11-09 15:42:00 80

转载 LightOJ 1197 LightOJ 1197(大区间素数筛选)

http://lightoj.com/volume_showproblem.php?problem=1197题目大意:就是给你一个区间[a,b]让你求这个区间素数的个数但a、b的值太大没法直接进行素数筛选(没法开那么大的数组),我们可以将a当做0,将b当做b-a这样求[a,b]之间就变成了求[0, b - a]之间,这样就可以开数组来筛选下图是代码式子j ...

2015-11-06 19:01:00 88

转载 LightOJ 1213 Fantasy of a Summation(规律 + 快数幂)

http://lightoj.com/volume_showproblem.php?problem=1213Fantasy of a SummationTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1...

2015-11-06 15:06:00 76

转载 LightOJ 1220 Mysterious Bacteria(唯一分解定理 + 素数筛选)

http://lightoj.com/volume_showproblem.php?problem=1220Mysterious BacteriaTime Limit:500MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 12...

2015-11-05 17:57:00 129

转载 LightOJ 1234 Harmonic Number(打表 + 技巧)

http://lightoj.com/volume_showproblem.php?problem=1234Harmonic NumberTime Limit:3000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1234...

2015-11-05 14:36:00 79

转载 LightOJ 1236 Pairs Forming LCM (LCM 唯一分解定理 + 素数筛选)

http://lightoj.com/volume_showproblem.php?problem=1236Pairs Forming LCMTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 123...

2015-11-04 18:55:00 105

转载 LightOJ 1245 Harmonic Number (II)(找规律)

http://lightoj.com/volume_showproblem.php?problem=1245G -Harmonic Number (II)Time Limit:3000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ ...

2015-11-04 16:09:00 111

转载 LightOJ 1259 Goldbach`s Conjecture (哥德巴赫猜想 + 素数筛选法)

http://lightoj.com/volume_showproblem.php?problem=1259题目大意:给你一个数n,这个数能分成两个素数a、b,n = a + b且a<=b,问有几组这样的(a,b)比较简单的哥德巴赫猜想题,不需要多说,但一般的素数判定会TLE,所以这里用的是素数筛选法这里需要注意的是筛选出来素数数组的大小#include<...

2015-11-04 09:59:00 103

转载 LightOJ 1282 Leading and Trailing (快数幂 + 数学)

http://lightoj.com/volume_showproblem.php?problem=1282Leading and TrailingTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1282...

2015-11-03 13:39:00 101

转载 LightOJ 13361336 - Sigma Function (找规律 + 唯一分解定理)

http://lightoj.com/volume_showproblem.php?problem=1336Sigma FunctionTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1336...

2015-11-02 17:43:00 75

转载 hdu 5510 Bazinga

http://acm.hdu.edu.cn/showproblem.php?pid=5510Problem Description:Ladies and gentlemen, please sit up straight.Don't tilt your head. I'm serious.Forngiven stringsS1,S2,⋯,Sn, labelled fr...

2015-11-02 16:31:00 106

转载 hdu 5532 Almost Sorted Array

http://acm.hdu.edu.cn/showproblem.php?pid=5532题目大意:给你一个不规则的序列,问是否能够通过删除一个元素使其成为一个有序的序列(递增或递减(其中相邻的元素可以相等))将序列里分成两种可能讨论,该序列除了一个元素之外要么递增要么递减,只需满足一个即可#include<stdio.h>#...

2015-11-02 15:48:00 75

转载 素数筛选法

先把1挖掉,因为1不是素数,然后再把2的倍数挖掉,然后再把3的倍数挖掉、、、这样剩下的数就都是素数了int prime[N];//用来存素数bool Isprime[N];//用来标记素数void Prime(){ int k = 0; memset(Isprime, true, sizeof(Isprime)); Ispr...

2015-10-30 20:02:00 54

转载 唯一分解定理(算术基本定理)及应用

算术基本定理:任何一个大于1的自然数N,如果N不为质数,那么N可以唯一分解成有限个质数的乘积N = p1^a1 * p2^a2 * p3^a3 * ... * pn^an(其中p1、p2、... pn为N的因子,a1、a2、... 、an分别为因子的指数)这样的分解称为N的标准分解式应用:(1)一个大于1的正整数N,如果它的标准分解式为:N = p1^a1 ...

2015-10-30 19:53:00 310

转载 LightOJ 1341 - Aladdin and the Flying Carpet (唯一分解定理 + 素数筛选)

http://lightoj.com/volume_showproblem.php?problem=1341Aladdin and the Flying CarpetTime Limit:3000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPractice...

2015-10-30 19:25:00 60

转载 串的基本操作

#include<stdio.h>#define MAXSTRLEN 255#define TRUE 1#define FALSE 0#define OK 1typedef int Status;typedef unsigned char SString[MAXSTRLEN+1];Status StrAssign(SString &...

2015-10-30 15:39:00 150

转载 链队列的基本操作

#include<stdio.h>#include<stdlib.h>#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define OVERFLOW -1typedef struct QNode{ int data; struct QNod...

2015-10-30 15:30:00 73

转载 LightOJ 1370 - Bi-shoe and Phi-shoe (欧拉函数思想)

http://lightoj.com/volume_showproblem.php?problem=1370Bi-shoe and Phi-shoeTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightO...

2015-10-30 14:00:00 85

转载 poj 3060 Visible Lattice Points

http://poj.org/problem?id=3090Visible Lattice PointsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6153Accepted:3662DescriptionA lattice point...

2015-10-29 14:34:00 86

转载 欧拉函数介绍及简单模板

欧拉函数:对于一个正整数n,小于n且与n互质的正整数的个数,记做:φ(n),其中φ(1)被定义为1,但是并没有任何实质的意义。特殊性质:当n为奇数时,φ(2n)=φ(n)。当n为素数时:φ(n) = n - 1;(1)φ(n) = n * (1 - 1/p1) * (1 - 1 / p2) * ... * (1 - 1 / pn) (pi是n的质因子)求小于n且与n...

2015-10-29 14:20:00 135

转载 zoj 3593 One Person Game

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4677One Person GameTime Limit:2 Seconds Memory Limit:65536 KBThere is an interesting and simple one person game. Suppose ther...

2015-10-29 10:31:00 57

转载 poj 2115 C Looooops

http://poj.org/problem?id=2115C LooooopsTime Limit:1000MSMemory Limit:65536KTotal Submissions:20725Accepted:5598DescriptionA Compiler Mystery: We are g...

2015-10-28 14:32:00 64

转载 hdu 1576 A/B (扩展欧几里德简单运用)

http://acm.hdu.edu.cn/showproblem.php?pid=1576A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3351 Accepted Submission(s): 2545P...

2015-10-27 12:21:00 79

转载 poj 1061 青蛙的约会

http://poj.org/problem?id=1061青蛙的约会Time Limit:1000MSMemory Limit:10000KTotal Submissions:99832Accepted:19098Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它...

2015-10-26 18:02:00 60

空空如也

空空如也

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

TA关注的人

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