自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 Tensorflow 写构建神经网络

转自:https://blog.csdn.net/roseki/article/details/70171684import tensorflow as tfimport numpy as nplearning_rate = 0.01 #学习速率batch_size = 16 #输入数据个数epoch_step = 10000 # 遍历总数display_step = ...

2018-06-18 17:59:31 200

原创 hihocoder #1033 : 交错和 (数位dp)

1033 : 交错和时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个数 x,设它十进制展从高位到低位上的数位依次是 a0, a1, …, an - 1,定义交错和函数:f(x) = a0 - a1 + a2 - … + ( - 1)n - 1an - 1例如:f(3214567) = 3 - 2 + 1 - 4 + 5 - 6 + 7 ...

2018-02-21 23:24:54 205

原创 AtCoder Regular Contest 090 D - People on a Line

Problem Statement There are N people standing on the x-axis. Let the coordinate of Person i be xi. For every i, xi is an integer between 0 and 109 (inclusive). It is possible that more than one perso...

2018-02-12 10:47:52 317

原创 BZOJ 1002:[FJOI2007] 轮状病毒 (基尔霍夫矩阵生成树定理)

 轮状病毒有很多变种,所有轮状病毒的变种都是从一个轮状基产生的。一个N轮状基由圆环上N个不同的基原子 和圆心处一个核原子构成的,2个原子之间的边表示这2个原子之间的信息通道。如下图所示   N轮状病毒的产生规律是在一个N轮状基中删去若干条边,使得各原子之间有唯一的信息通道,例如共有16个不 同的3轮状病毒,如下图所示   现给定n(N<=100),编程计算有多少个不同的n轮状...

2018-02-08 09:56:31 250

原创 CodeForces 55D Beautiful numbers (数位dp)

D. Beautiful numbers time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Volodya is an odd boy and his taste is strange as well. It seems to h

2017-10-18 23:44:12 252

原创 hdu 3652 B-number(数位dp)

B-numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7199 Accepted Submission(s): 4216Problem Description A wqb-number, or B-number for

2017-10-18 19:24:15 185

原创 hdu 3709 Balanced Number(数位dp)

Balanced NumberTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 6504 Accepted Submission(s): 3112Problem Description A balanced number is a

2017-10-18 18:52:00 172

原创 BZOJ 1026 (数位dp)

1026: [SCOI2009]windy数Time Limit: 1 Sec Memory Limit: 162 MB Submit: 8505 Solved: 3834 [Submit][Status][Discuss] Description  windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道, 在A和B之间,包括

2017-10-18 15:32:28 216

原创 hdu 3292 佩尔方程一系列操作

No more tricks, Mr NanguoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 445 Accepted Submission(s): 294Problem Description Now Sailormoon

2017-08-15 11:00:22 249

原创 POJ 3243 Clever Y BSGS 算法 (模板)

Clever Y Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 8920 Accepted: 2222 DescriptionLittle Y finds there is a very interesting formula in mathematics:XY mod Z = KGiven X, Y,

2017-08-13 19:11:47 266

原创 hdu 1695 GCD(容斥原理)

GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12106 Accepted Submission(s): 4576Problem Description Given 5 integers: a, b, c, d, k, y

2017-08-08 11:02:45 209

原创 hdu 5668 中国剩余定理(模版)

CircleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 565 Accepted Submission(s): 190Problem Description Satiya August is in charge of

2017-08-07 19:41:06 311

原创 hdu 5728 (公式推导+指数循环节)

PowModTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1221 Accepted Submission(s): 428Problem Description Declare: k=∑(m,i=1)φ(i∗n) mod

2017-08-04 18:49:49 462

原创 Gym - 101350G (容斥原理)

G. Snake Rana time limit per test4.0 s memory limit per test256 MB inputstandard input outputstandard output Old Macdonald wants to build a new hen house for his hens. He buys a new rectangular ar

2017-08-01 09:44:24 743

原创 (多校) hdu 6035 Colorful Tree

Colorful TreeTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1741 Accepted Submission(s): 722Problem Description There is a tree with n n

2017-07-28 15:46:04 251

原创 (多校)hdu 6050 Funny Function

Funny FunctionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 142 Accepted Submission(s): 53Problem Description Function Fx,ysatisfies

2017-07-27 19:27:05 1424 8

原创 1010: [HNOI2008]玩具装箱toy 斜率优化

P教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京。他使用自己的压缩器进行压 缩,其可以将任意物品变成一堆,再放到一种特殊的一维容器中。P教授有编号为1…N的N件玩具,第i件玩具经过 压缩后变成一维长度为Ci.为了方便整理,P教授要求在一个一维容器中的玩具编号是连续的。同时如果一个一维容 器中有多个玩具,那么两件玩具之间要加入一个单位长度的填充物,形式地说如果将第i件玩具到

2017-05-28 09:42:07 318

原创 1597: [Usaco2008 Mar]土地购买 斜率优化

Description农夫John准备扩大他的农场,他正在考虑N (1 <= N <= 50,000) 块长方形的土地. 每块土地的长宽满足(1 <= 宽 <= 1,000,000; 1 <= 长 <= 1,000,000). 每块土地的价格是它的面积,但FJ可以同时购买多快土地. 这些土地的价格是它们最大的长乘以它们最大的宽, 但是土地的长宽不能交换. 如果FJ买一块3x5的地和一块5x

2017-05-27 21:20:13 375

原创 HDU 5674 Function(斐波那契模数列循环节)

Problem Description There is a function f(n)=(a+√b)^n+(a−√b)^n. a and b are integers (1≤a,b≤1,000,000). Maybe the function looks complex but it is actually an integer.The question is to calculate

2017-05-03 09:25:57 1243

原创 Educational Codeforces Round 18 C. Divide by Three

C. Divide by Three time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output A positive integer number n is written on a blackboard. It consists of n

2017-04-02 00:31:46 598

原创 HDU 2222 AC自动机 模板

Keywords SearchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 60573 Accepted Submission(s): 19961Problem Description In the modern time,

2017-03-17 18:23:03 242

原创 SG函数与组合博弈问题

把组合博弈问题抽象成一个有向无环图,有n个棋子在上面移动,当AB两方其中一方移动不了时另一方获胜. 定义mex运算为集合内没有出现过的最小的自然数,则SG(x)=mex{SG(y)(其中y为x所扩展出的状态)} 结论:当有K组的博弈时若SG(n1)^SG(n2)^..SG(nK)!=0时先手获胜,否则后手获胜. CF上的一道题: A. The game of Osho time li

2017-03-13 23:39:12 440

原创 hdu 5828

维护区间和+最大最小值就行了.#include<stdio.h>#include<iostream>#include<algorithm>#include<string>#include<string.h>#include<math.h>using namespace std;#define INF 99999999#define ll long longstruct p{ i

2017-02-11 11:16:30 265

原创 高斯消元模板

高斯消元模板

2017-02-08 23:05:29 187

原创 CCPC/ACM(杭州)热身赛

There are some positive integer numbers, and you want to divide them into two nonempty sets (every integer should be in and only in one set) and get a value descripted below:Assume that set AA has n1n1

2016-10-18 20:44:05 747

原创 poj 3667 Hotel

Hotel Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 16373 Accepted: 7108 DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and en

2016-10-03 10:30:24 239

原创 poj 2528 Mayor's posters

Mayor’s posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 59553 Accepted: 17255 DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayor

2016-09-29 13:21:15 213

原创 POJ 2777 Count Color

敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 78764 Accepted Submission(s): 33286Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Der

2016-09-28 11:10:55 250

原创 hdu 1166 敌兵布阵(线段树+单点更新)

敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 78764 Accepted Submission(s): 33286Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Der

2016-09-22 20:05:26 243

原创 矩阵快速幂模板

#include <stdio.h>#include <string.h>#include <iostream>struct matrix_task{ typedef long long llong; typedef llong matrix[4][4];#define rep(i) for (int i = 0; i < n; ++i) int mod; int n;

2016-09-22 14:37:46 258

原创 hdu 5895 Mathematician QSC(快速幂+指数循环节)

Mathematician QSCTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 326    Accepted Submission(s): 172Problem DescriptionQSC drea

2016-09-21 16:50:23 394

原创 POJ 1845 Sumdiv(数论+快速幂)

SumdivTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 19576 Accepted: 4930DescriptionConsider two natural numbers A and B. Let S be the sum of all natur

2016-09-19 23:48:44 408

原创 Codeforces 711E ZS and The Birthday Paradox

E. ZS and The Birthday Paradoxtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder has recently fo

2016-09-11 00:11:37 370

原创 Codeforces 711D Directed Roads

ZS the Coder and Chris the Baboon has explored Udayland for quite some time. They realize that it consists of n towns numbered from 1 to n.There are n directed roads in the Udayland. i-th of them goes

2016-09-06 22:25:18 316

原创 Codeforces Round #368 (Div. 2) C. Pythagorean Triples

C. Pythagorean Triples time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Katya studies in a fifth grade. Recently her class studied right tri

2016-08-31 17:49:03 272

原创 Codeforces Round #368 (Div. 2) 707B. Bakery

B. Bakery time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Masha wants to open her own bakery and bake muffins in one of the n cities numbe

2016-08-31 12:24:38 334

原创 POJ 3468 A Simple Problem with Integers

A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 96328 Accepted: 30033 Case Time Limit: 2000MS DescriptionYou have N integers, A1, A2, … , AN.

2016-08-18 15:26:06 236

原创 RSA加密原理

首先先解决这样一个问题,b和m已知求满足下面条件的x, xk≡b(modm)xk≡b(modm)x^k\equiv b\pmod m 这个问题若是没有限制条件的话会变得很棘手,那么假设条件变得更强让gcd(b,m)=1;便会想到利用欧拉函数求出ϕ(m)ϕ(m)\phi(m),之后解下面的不定方程。xkxkx k - yyy...

2016-08-17 20:57:39 472

原创 Codeforces 472D. Design Tutorial: Inverse the Problem

D. Design Tutorial: Inverse the Problem time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There is an easy way to obtain a new task from an

2016-08-16 08:39:15 540

原创 Codeforces 514C . Watto and Mechanism

C. Watto and Mechanism time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Watto, the owner of a spare parts store, has recently got an order

2016-08-15 20:57:48 524

空空如也

空空如也

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

TA关注的人

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