1 day. day. up!

尚未进行身份认证

暂无相关简介

等级
TA的排名 20w+

梯度下降之线性回归模型

相关原理线性回归的模型为:y=ax+b 我们就是利用已知的数据即x,y求出a,b相关公式梯度下降的求法一、BGD(批量梯度下降) 此方法就是对所有的数据进行训练,找出最优解,如果对象为凸函数找出的为全局最优,非凸函数为局部最优,但是速度慢,数据量大的时候不适用import matplotlib.pyplot as pltimport numpy as npfrom math ...

2020-01-16 19:15:15

HPU personal training-one

B - Consecutive Integers.给出两个整数N,K,求出从N个数中选择K个数的选法求出N-K+1的值即可#include<iostream>using namespace std;int main(){ int n,k; cin>>n>>k; int ans; ans=n-k+1; cout<<ans<&...

2019-11-20 21:40:27

第一次训练赛题解

F:题意给出字符串长度,找出能够组成“avin"的几率思路:找到a出现的次数 v出现的次数 i出现的次数 n出现的次数,这是可以组成目标的次数,然后`总共有n的4次方种情况,求出他们gcd即可#include<iostream>#include<cstring>#include<cmath>using namespace std;long long ...

2019-11-16 13:00:46

C - Robot Breakout

n robots have escaped from your laboratory! You have to find them as soon as possible, because these robots are experimental, and their behavior is not tested yet, so they may be really dangerous!For...

2019-11-15 21:56:06

B - Odd Sum Segments

You are given an array a consisting of n integers a1,a2,…,an. You want to split it into exactly k non-empty non-intersecting subsegments such that each subsegment has odd sum (i. e. for each subsegmen...

2019-11-14 22:00:26

Rng HDU6574

Problem DescriptionAvin is studying how to synthesize data. Given an integer n, he constructs an interval using the following method: he first generates a integer r between 1 and n (both inclusive) u...

2019-11-13 21:53:42

Budget HDU6575

Problem DescriptionAvin’s company has many ongoing projects with different budgets. His company records the budgets using numbers rounded to 3 digits after the decimal place. However, the company is ...

2019-11-13 21:27:08

poj3984-迷宫问题

Description定义一个二维数组:int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × ...

2019-11-11 21:43:54

N皇后问题

N皇后问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46714 Accepted Submission(s): 19543Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意...

2019-11-09 23:56:15

Oulipo(哈希公式)

问题描述The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tou...

2019-08-16 21:14:29

吃糖果

HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N<=1000000),第二行是N个...

2019-08-15 21:07:35

How many integers can you find

问题描述Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example, N=12, and M-int...

2019-08-15 21:04:02

Find a multiple

问题描述The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not necessarily different (so it may happen that ...

2019-08-15 20:51:38

Co-prime(容斥定理)

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Ma...

2019-08-15 20:34:26

2Problem A

1.问题描述度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到:H(s)=∏i≤len(s)i=1(Si−28) (mod 9973)H(s)=∏i=1i≤len(s)(Si−28) (mod 9973)SiSi代表 S[i] 字符的 ...

2019-08-14 21:12:31

A/B

问题描述要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output对应每组数据输出(A/B)%9973。Sample Input21...

2019-08-14 21:11:37

2Ekka Dokka

问题描述Ekka and his friend Dokka decided to buy a cake. They both love cakes and that’s why they want to share the cake after buying it. As the name suggested that Ekka is very fond of odd numbers and ...

2019-08-12 20:29:28

Smith Numbers

问题描述While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following peculiar prop...

2019-08-12 20:28:46

Closest Common Ancestors

Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest common anc...

2019-08-08 21:08:58

七夕

The system of Martians’ blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can have one parent ...

2019-08-07 20:47:41

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv3
    勤写标兵Lv3
    授予每个自然周发布7篇到8篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。