uva 10280 Old Wine Into New Bottles
原题:
Wine bottles are never completely filled: a small amount of air must be left in the neck to allow for thermal expansion
and contraction. If too little air is left in the bottle, the wine may exp...
uva 442 Matrix Chain Multiplication
原题:
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices.
Since matrix multiplication is associative, the order in which multiplications are performed is arbitr...
uva 11111 Generalized Matrioshkas
原题:
Vladimir worked for years making matrioshkas, those nesting dolls that certainly represent truly Russian
craft. A matrioshka is a doll that may be opened in two halves, so that one finds another...
uva 11234 Expressions
原题:
Arithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For example, (x + y) ∗ (z − w) is an arithmetic expression in infix not...
cf Educational Codeforces Round 46 B. Light It Up
原题:
B. Light It Up
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Recently, you bought a brand new smart lamp with programming features....
cf Educational Codeforces Round 46 C. Covered Points Count
原题:
C. Covered Points Count
time limit per test3 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
You are given n segments on a coordinate line; each endpoint...
使用tensorflow实现一个异或门
初学神经网络第一个接触的实例一般都是XOR,很不错的入门练习。
理论部分
异或门:
输入两个二进制值,如果两个值相同,结果为0,否则为1。
神经网络结构:
用矩阵来表示
([x1x2][w11w13w12w14]+[b1b2])[w21w23w22w24]+[b3b4]=[o1o2]([x1x2][w11w12w13w14]+[b1b2])[w21w22w23w24]+[b3b...
cf Educational Codeforces Round 47 B. Minimum Ternary String
原题:
B. Minimum Ternary String
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
You are given a ternary string (it is a string which consis...
cf Educational Codeforces Round 47 C. Annoying Present
原题:
Alice got an array of length n as a birthday present once again! This is the third year in a row!
And what is more disappointing, it is overwhelmengly boring, filled entirely with zeros. Bob dec...
cf Educational Codeforces Round 47 D. Relatively Prime Graph
原题:
D. Relatively Prime Graph
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Let’s call an undirected graph
G=(V,E) relatively prime ...
Python中selenium的使用
刚接触Python不到一个月,今天学习了selenium的使用方法,现在在这里给大家分享一下。
selenium的简介
selenium 中文翻译“硒”(别问为什么,我也很纠结) 是一个自动化测试工具。
selenium在Python中的应用:
1.用于模拟人对浏览器进行操作,对动态数据进行获取(动态数据是由代码生成,在页面初始化的过程当中是没有的,所以无法直接获取)
2.网页上有些数...
Python进阶之路——scrapy框架的安装与使用
scrapy初识
scrapy介绍就不啰嗦了,直接进入正题。
scrapy的安装
说实话,刚开始安装的时候费了好大力气,最后还是问了下度娘,才安装成功,现在给大家分享下我安装scrapy的心路历程;
首先,电脑上必须安装的有Anaconda,然后只需要在终端输入 conda install scrapy ,一句话OK,简单粗暴;
测试scrapy是否安装成功,在终端中直接输入scra...
LSA潜在语义分析--转自CSDN
本文转自CSDN,作者ROger_Wong
原文链接如下:
http://blog.csdn.net/roger__wong/article/details/41175967#reply
在Wiki上看到的LSA的详细介绍,感觉挺好的,遂翻译过来,有翻译不对之处还望指教。
原文地址:http://en.wikipedia.org/wiki/Latent_se
用马尔科夫链求首达时的一种方法--意料之外,情理之中
一. 定义
马尔科夫链:已知若干种状态,从当前状态转移到下一状态的概率,只取决于当前和上一步的状态,与其他状态无关。
首达时:从某状态i出发,首次到达状态j时经历的时间。
二. 假设条件
已知共有k个状态(0,1,...,K-1),状态转移矩阵M(k*k),求从某状态i出发,首次到达状态K的时间向量v=(v0,v1,...vk-1)。这里假设是离散时间马尔科夫链,
三. 问题求解
求解
读懂概率图模型:你需要从基本概念和参数估计开始
本文转自机器之心,作者Prasoon Goyal原文链接如下:http://www.sohu.com/a/207319466_465975概率图模型是人工智能领域内一大主要研究方向。近日,Statsbot 团队邀请数据科学家 Prasoon Goyal 在其博客上分两部分发表了一篇有关概率图模型的基础性介绍文章。文章从基础的概念开始谈起,并加入了基础的应用示例来帮助初学者理解概率图模型的实用价值。...
马尔可夫逻辑网终极理解
最近在学习马尔科夫逻辑网相关知识,查阅相关资料无数,仍然觉得无法掌握其中内涵。历时约2周,终于在今天对其内涵了解一二,特此记录自己的理解。觉得不错的马尔科夫逻辑网相关资料:1.读懂概率图模型:你需要从基本概念和参数估计开始https://blog.csdn.net/lucygill/article/details/79734874https://blog.csdn.net/lucygill/art...
传值or传引用?Python传的是对象——转自Python之禅
本文转自Python之禅,作者liuzhijun原文链接如下:https://foofish.net/python-function-args.html在 C/C++ 中,传值和传引用是函数参数传递的两种方式,在Python中参数是如何传递的?回答这个问题前,不如先来看两段代码。代码段1:def foo(arg):
arg = 2
print(arg)
a = 1
foo(a) ...
今日推荐
周排行