自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(82)
  • 资源 (1)
  • 收藏
  • 关注

原创 Deep&Cross Network模型与TensorFlow实现

0、DCN网络模型结构:特征分为类别型与数值型,类别型特征经过 embedding 之后与数值型特征直接拼接作为模型的输入。所有的特征分别经过 cross 和 deep 网络,经过拼接后输出。1、embedding层这部分和DeepFM所用到的方法一致,都采用了NLP中常用的word2vec思想。不同的是DCN网络中只需要对离散特征做embedding,连续特征不需要进行em...

2019-05-11 15:10:06 1601 6

原创 2019.3.31网易游戏数据挖掘(算法US)笔试编程题第二题题解---HMM

因为考试中没有截图下来,所有只能说个大致的题意。第一题是一题SQL语句转编程语言。如果拿了70分的话应该是没考虑group by 和之后的去重。如果拿了80分的话是没有考虑到需要size>0。第二题其实是一题HMM,通过HMM前向算法就可以做出来。前向算法本质上属于动态规划的算法,也可以用DP去做。第三题要自己根据题目给出的公式计算梯度。第二题的思路其实和刘...

2019-04-01 13:51:58 1068

原创 AlexNet总结与Keras实现

这周读了AlexNet的论文,大概总结下论文的内容。0、论文地址http://https//papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf 1、激活函数和之前通常使用的softmax或者tanh激活函数不同,论文中使用了ReLU激活函数,论...

2018-11-20 20:08:30 6320 7

原创 seaborn 常用函数

seaborn 相当于对matplotlib的一些函数进行了封装,使用起来还是很方便的。train.csv数据来源:https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data...

2018-08-14 15:37:14 1540

原创 trick---减少存储稀疏矩阵所需内存

import numpy as npimport pandas as pd# This trick will enable those participants with less than 16GB of RAM to effectively# iterate on Santander competition. The code below shows how to save arou...

2018-07-27 14:02:20 662

原创 Kaggle——Titanic: Machine Learning from Disaster (XGBoost +神经网络)

今天没什么动力写代码,正确率也一直停在80%上不去,整理下之前写的代码吧。代码整体的逻辑是使用XGBoost 和神经网络训练两个结果,然后和之前表现最好的结果放在一起投票,然后得出最终的结果。代码结构:    对于特征选择,我首先去掉了Name', 'Ticket', 'PassengerId'然后对sex、Pclass、SibSp、Embarked 进行了特征因子化...

2018-07-10 19:56:48 2131

原创 Kaggle——Digit Recognizer (Keras+CNN)

Digit Recognizer是Kaggle的入门题,我尝试下训练一个卷积神经网络来解决该问题,主要记录下写代码中遇到的一些问题。代码:import tensorflow as tfimport pandas as pdfrom keras.models import Sequential, load_modelfrom keras.layers import Dense, Conv2D,...

2018-07-03 13:59:44 719

原创 Educational Codeforces Round 30 B. Balanced Substring

B. Balanced Substringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s consisting only of char

2017-10-13 23:29:24 275

原创 hdu 6216 A Cubic number and A Cubic Number (2017 ACM/ICPC Asia Regional Qingdao Online)

A Cubic number and A Cubic NumberTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 101    Accepted Submission(s): 58Problem Descriptio

2017-09-17 19:42:24 351

原创 判断二进制数除以3的余数

一个非常有意思的问题:判断一个二进制的数除3是否能够整除。思路:首先肯定会想到十进制除3整除的规则: 每位数相加的和能被3整除。但是按照这样的思路去考虑二进制的情况容易进入到死胡同里。考虑以下方法:二进制的数再加一位0就是原来的值*2,再加上一位1就是原来的值*2+1。那么考虑以下的状态转换:(以下思路来自:http://www.ji

2017-09-07 18:23:35 6347 2

原创 Codeforces Round #431 (Div. 2) A、Odds and Ends B、Tell Your World C、From Y to Y

A. Odds and Endstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhere do odds begin, and where do they end? Where doe

2017-09-04 16:32:59 493

原创 hdu 6186 CS Course 2017ACM/ICPC广西邀请赛-重现赛

CS CourseTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 542    Accepted Submission(s): 264Problem DescriptionLittle A has come

2017-09-03 23:43:38 770

原创 hdu 6081 度度熊的王国战略 2017"百度之星"程序设计大赛 - 资格赛 1002

1002、度度熊的王国战略Problem Description 度度熊国王率领着喵哈哈族的勇士,准备进攻哗啦啦族。哗啦啦族是一个强悍的民族,里面有充满智慧的谋士,拥有无穷力量的战士。所以这一场战争,将会十分艰难。为了更好的进攻哗啦啦族,度度熊决定首先应该从内部瓦解哗啦啦族。第一步就是应该使得哗啦啦族内部不能同心齐力,需要内部有间隙。

2017-08-08 21:31:11 849 2

原创 April Fools Contest 2017 C. INTERCALC

C. INTERCALCtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputDO YOU EXPECT ME TO FIND THIS OUT?WHAT BASE AND/XOR LAN

2017-04-01 13:42:33 787

原创 April Fools Contest 2017 E. Twisted Circuit

E. Twisted Circuittime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputInputThe input consists of four lines, ea

2017-04-01 13:19:18 719

原创 April Fools Contest 2017 A. Numbers Joke

A. Numbers Joketime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputInputThe input contains a single integer a (1 ≤ a ≤

2017-04-01 13:10:22 888

转载 Ptrace 详解

引子:1.在Linux系统中,进程状态除了我们所熟知的TASK_RUNNING,TASK_INTERRUPTIBLE,TASK_STOPPED等,还有一个TASK_TRACED。这表明这个进程处于什么状态?2.strace可以方便的帮助我们记录进程所执行的系统调用,它是如何跟踪到进程执行的?3.gdb是我们调试程序的利器,可以设置断点,单步跟踪程序。它的实现原理又是什么?所有这

2017-03-06 23:52:53 5934

转载 “快指针”、“慢指针”

有时候处理链表相关问题的时候,定义“快指针”和“慢指针“的方法有时候会极大地提高时间效率。下面是常见的几种使用这个方法的情况。假设不考虑异常输入的情况。判断一个链表是否有环  定义两个指针,快指针步长为2,慢指针步长为1.同时从链表头开始出发。如果链表中有环那么他们必然相遇。bool hasCycle(ListNode *head) { if(!head)

2017-03-03 17:21:09 906 1

原创 hdu 6016 Count the Sheep

Count the SheepTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 697    Accepted Submission(s): 301Problem DescriptionAltough Skipping

2017-02-28 23:10:07 481

原创 做了几个Firefox的主题

昨天想换个灰色的Firefox主题,感觉都不怎么满意,于是手痒做了几个。地址如下:https://addons.mozilla.org/zh-CN/firefox/addon/github_logo/https://addons.mozilla.org/zh-CN/firefox/addon/octodex_v1/

2017-02-01 14:24:18 2681

转载 达夫设备(Duff's Device)

达夫设备设备是一段非常巧妙,看起来非常诡异的c代码,它可以很大的提高程序执行的效率(本文将试验),达夫设备的来源我就不说了,我们来分析一下。   达夫设备是考虑到我们一般用for或者while循环的时候,如果执行循环内容本身用不了多少时间,那么时间将被主要消耗在每次循环的比较语句上边。  事实上比较语句是有很大优化空间的,假设你要循环1000次,结果你从第一次开始就不断的比较是否达到上

2017-01-16 01:19:30 804

原创 Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) C - Felicity is Coming!

C. Felicity is Coming!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's that time of the year, Felicity is around

2017-01-14 01:13:20 809

原创 理发师问题的实现

理发师问题:  一个理发店由一个有几张椅子的等待室和一个放有一张理发椅的理发室组成。     1. 若没有要理发的顾客,则理发师去睡觉;     2. 若一顾客进入理发店,理发师正在为别人理发,且等待室有空椅子,则该顾客就找张椅子按顺序坐下;     3. 若一顾客进入理发店,理发师在睡觉,则叫醒理发师为该顾客理发;     4. 若一顾客进入理发店且所有椅子都被占用了,则该顾客就

2016-12-29 00:37:33 3064

原创 Codeforces Round #389 C. Santa Claus and Robot

C. Santa Claus and Robottime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSanta Claus has Robot which lives on the inf

2016-12-27 22:22:28 782

原创 hdu 5996 dingyeye loves stone

dingyeye loves stoneProblem Descriptiondingyeye loves play stone game with you.dingyeye has an n-point tree.The nodes are numbered from 0 to n−1,while the root is numbered 0.In

2016-12-22 21:57:47 511

原创 Codeforces Round #383 (Div. 2) C. Arpa's loud Owf and Mehrdad's evil plan

C. Arpa's loud Owf and Mehrdad's evil plantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you have noticed, there

2016-12-07 12:25:35 723

原创 Process输入流输出流及对C++、Python的测试

对C++部分的测试来自文章:http://fair-jm.iteye.com/blog/1442267C++代码 #include #include using namespace std; void main(){ cout<<"hello world"<<endl; strin

2016-12-05 23:55:06 1522

原创 51nod算法马拉松20 C、战忽局的手段

战忽局的手段基准时间限制:2 秒 空间限制:262144 KB 分值: 80众所周知,有一个神秘的组织——战忽局,在暗中保护着我们。在局中任职的官员都有着极强的忽悠技巧,不只能用预言,还能用往事忽悠人。如今某外星间谍已经获得了战忽局曾经参与的n次事件的资料,局座发现了这件事,于是决定再次用忽悠来保证战忽局的安全。局座将发表m次演讲,每一天他都会从

2016-12-02 16:11:39 843

原创 Codeforces Round #382 (Div. 2) C - Tennis Championship

C. Tennis Championshiptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFamous Brazil city Rio de Janeiro holds a tenn

2016-11-28 21:10:23 477

原创 Codeforces Round #379 (Div. 2) C. Anton and Making Potions

C. Anton and Making Potionstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnton is playing a very interesting compu

2016-11-16 22:06:47 482

原创 hdu 5974 A Simple Math Problem

A Simple Math ProblemTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 70    Accepted Submission(s): 39Problem DescriptionGiven two

2016-11-06 23:44:03 1201 10

转载 关于java.lang.Process类

ProcessBuilder类是J2SE 1.5在java.lang中新添加的一个新类,此类用于创建操作系统进程,它提供一种启动和管理进程(也就是应用程序)的方法。在J2SE 1.5之前,都是由Process类处来实现进程的控制管理。本文简单介绍一下Process类的用法以及一些需要注意的问题。API方法说明如下:- destroy() 杀掉子进程。- exitValue() 返回

2016-11-05 17:18:07 1474

原创 说再见

这几天忙完了手里的事,给学弟学妹整理的资料也上传到ftp上了,那是时候总结下自己的ACM经历了,一笔一笔如流水,权当自己对ACM的留恋了。       大一的时候我第一次听说了有ACM这个赛事,当时对集训队的成员真是无比的佩服,因为队员之间都是用x神来称呼的,都说着我们听不懂的语言。12月的时候吧,集训队开始招新,那时候我鼓足了勇气才和室友一起报了名。在12月18的时候学校举行了新生赛,我们以

2016-10-20 02:15:04 648

原创 Codeforces Round #374 (Div. 2) D - Maxim and Array

D. Maxim and Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Maxim has found an array of n integers, n

2016-10-01 15:44:22 383 2

原创 Codeforces Round #374 (Div. 2) C. Journey

C. Journeytime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Irina arrived to one of the most famous cities of

2016-10-01 14:33:19 485

原创 hdu 5017 Ellipsoid 模拟退火

EllipsoidTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2228    Accepted Submission(s): 825Special JudgeProblem DescriptionGiven

2016-09-28 22:27:06 484

原创 hdu 5875 2016 ACM/ICPC Asia Regional Dalian Online 1008

FunctionTime Limit: 7000/3500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1427    Accepted Submission(s): 126Problem DescriptionThe shorter, the sim

2016-09-10 19:37:25 1818

原创 Educational Codeforces Round 16 C. Magic Odd Square

E. Generate a Stringtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputzscoder wants to generate an input file for some

2016-09-05 21:47:47 395

原创 Codeforces Round #361 (Div. 2) C - Mike and Chocolate Thieves

C. Mike and Chocolate Thievestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBad news came to Mike's village, some t

2016-07-07 15:47:20 843

原创 Codeforces Round #361 (Div. 2) B - Mike and Shortcuts

好久没写题解了;B. Mike and Shortcutstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, Mike was very busy

2016-07-07 11:41:21 495

private-documentation

private-documentationprivate-documentationprivate-documentationprivate-documentationprivate-documentation

2017-11-09

空空如也

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

TA关注的人

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