- 博客(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 235
原创 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 225
原创 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 346
原创 BZOJ 1002:[FJOI2007] 轮状病毒 (基尔霍夫矩阵生成树定理)
轮状病毒有很多变种,所有轮状病毒的变种都是从一个轮状基产生的。一个N轮状基由圆环上N个不同的基原子 和圆心处一个核原子构成的,2个原子之间的边表示这2个原子之间的信息通道。如下图所示 N轮状病毒的产生规律是在一个N轮状基中删去若干条边,使得各原子之间有唯一的信息通道,例如共有16个不 同的3轮状病毒,如下图所示 现给定n(N<=100),编程计算有多少个不同的n轮状...
2018-02-08 09:56:31 278
原创 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 285
原创 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 205
原创 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 187
原创 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 239
原创 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 272
原创 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 284
原创 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 223
原创 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 337
原创 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 493
原创 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 765
原创 (多校) 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 272
原创 (多校)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 1447 8
原创 1010: [HNOI2008]玩具装箱toy 斜率优化
P教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京。他使用自己的压缩器进行压 缩,其可以将任意物品变成一堆,再放到一种特殊的一维容器中。P教授有编号为1…N的N件玩具,第i件玩具经过 压缩后变成一维长度为Ci.为了方便整理,P教授要求在一个一维容器中的玩具编号是连续的。同时如果一个一维容 器中有多个玩具,那么两件玩具之间要加入一个单位长度的填充物,形式地说如果将第i件玩具到
2017-05-28 09:42:07 334
原创 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 397
原创 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 1276
原创 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 627
原创 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 257
原创 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 480
原创 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 288
原创 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 774
原创 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 274
原创 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 236
原创 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 271
原创 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 269
原创 矩阵快速幂模板
#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 281
原创 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 426
原创 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 435
原创 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 401
原创 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 340
原创 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 295
原创 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 365
原创 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 251
原创 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 522
原创 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 591
原创 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 550
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人