自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

北冥有鱼

成长日记

  • 博客(70)
  • 收藏
  • 关注

原创 推荐系统的技术栈

推荐系统是一个非常大的框架,有非常多的模块在里面,完整的一套推荐系统体系里,不仅会涉及到推荐算法工程师、后台开发工程师、数据挖掘/分析工程师、NLP/CV工程师还有前端、客户端甚至产品、运营等支持。我们作为算法工程师,需要掌握的技术栈主要就是在算法和工程两个区域了,所以这篇文章将会分别从算法和工程两个角度出发,结合两者分析当前主流的一些推荐算法技术栈。

2022-04-10 23:47:55 1925

原创 推荐系统架构

掌握推荐系统最重要的还是梳理清楚整个推荐系统的架构,知道每一个部分需要完成哪些任务,是如何做的,主要的技术栈是什么,有哪些局限和可以研究的问题,能够对我们学习推荐系统有一个提纲挈领的作用。

2022-04-10 01:47:44 2124

原创 【序列建模】DIN深度兴趣网络

【序列建模】DIN深度兴趣网络通过用户的历史行为序列刻画用户兴趣的广泛性,是推荐系统比较大的一个难点,用户历史行为序列建模的研究经历了从Pooling、RNN到attention、capsule再到transformer的顺序Pooling:代表是Youtube DNN ,对用户历史行为的商品ID进行embedding后再sum pooling/mean pooling,比如用户历史买过10件电子产品和1件衣服,那embedding被pooling仍然能够反映出用户对电子商品的偏好。这种做法优势是比较

2022-03-31 16:15:45 1855

原创 【序列建模】推荐广告中的序列建模

【序列建模】推荐广告中的序列建模最近在腾讯的实习中做的是行为序列推荐相关的工作,所以开个专题对行为序列推荐做一个汇总整理。一般推荐系统做特征工程,特征会有如下几种:用户侧特征:比如用户id、性别、地理位置、年龄等比较普遍的信息,还有一些是结合你业务的特征,我做的游戏推荐,就会有用户游戏等级、游戏登陆时长、喜欢的游戏模式等特征。Item侧特征:比如item-id,item类型(视频?图文?具体结合业务)、item历史ctr、item的标签。除了这些比较普遍的特征以外,很多组也有有专门的内容理解团队,给

2022-03-26 20:01:56 2657

原创 【通过PAT复习C++与数据结构】1032 挖掘机技术哪家强 (20分)

1032 挖掘机技术哪家强 (20分)为了用事实说明挖掘机技术到底哪家强,PAT 组织了一场挖掘机技能大赛。现请你根据比赛结果统计出技术最强的那个学校。输入格式:输入在第 1 行给出不超过 10​5​​ 的正整数 N,即参赛人数。随后 N 行,每行给出一位参赛者的信息和成绩,包括其所代表的学校的编号(从 1 开始连续编号)、及其比赛成绩(百分制),中间以空格分隔。输出格式:在一行中...

2020-01-11 17:47:02 133

转载 【C++】【转】new和maclloc的区别

【转】new和malloc的区别1. 申请的内存所在位置new操作符从自由存储区(free store)上为对象动态分配内存空间,而malloc函数从堆上动态分配内存。自由存储区是C++基于new操作符的一个抽象概念,凡是通过new操作符进行内存申请,该内存即为自由存储区。而堆是操作系统中的术语,是操作系统所维护的一块特殊内存,用于程序的内存动态分配,C语言使用malloc从堆上分配内存,使...

2020-01-01 14:48:04 961

原创 【C++】指针常量与常量指针

指针常量和常量指针指针常量:类型为指针的常量定义: int * const a//*为指针,const为常量,简单记忆 *const为指针常量本质上是常量,类型是指针,指针是一个地址,所以指针常量永远保存着一个地址,不可变动:即指向固定地址的指针。地址中的保存的数字或其他东西可以随意变化,但是指针常量永远指向它。总结:固定的一个指针!常量指针:指向常量的指针定义 const i...

2019-12-31 22:28:05 537

原创 【通过PAT复习C++与数据结构】PAT-A 1144 The Missing Number (20 分)

题目Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list.Input Specification:Each input file contains one test case. For each case, the first line gi...

2019-08-28 02:05:03 176

原创 【通过PAT复习C++与数据结构】PAT-A 1155 Heap Paths (30 分)

题目In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to...

2019-08-25 21:25:00 187

原创 【通过PAT复习C++与数据结构】PAT-A 1154 Vertex Coloring (25 分)

题目A proper vertex coloring is a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k colors is called a (proper...

2019-08-25 20:12:21 251

原创 【通过PAT复习C++与数据结构】PAT-A 1153 Decode Registration Card of PAT (25 分)

题目A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely, T for the top level, A for advance and B for basic;the 2nd - 4th digits are the test site n...

2019-08-25 03:30:58 335

原创 【通过PAT复习C++与数据结构】PAT-A 1152 Google Recruitment (20 分)

题目In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL consisting of the first 10-digi...

2019-08-24 21:05:18 1363

原创 【通过PAT复习C++与数据结构】PAT-A 1001 A+B Format (20 分)

题目Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...

2019-08-22 21:48:00 174

原创 【通过PAT复习C++与数据结构】PAT-A 1003 Emergency (25 分)

题目As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and th...

2019-08-22 20:43:50 419

原创 【通过PAT复习C++与数据结构】关于DFS入门的理解 (PATA1013 Battle Over Cities (25 分)等题目)

第一次刷到DFS的算法题被卡住了,DFS不是那么容易理解,它在直观上很容易看出算法过程,但是在解题的时候很抽象,于是就看了很多的博客以及书,慢慢的有了一个理解。其实DFS本质上就是暴力,适用于从数据中排列组合,找出所有的组合可能性,然后根据题目要求判断的题型。很多博客都给出了DFS模板,其实我觉得理解了dfs过程后,模板并没有多大用处。理解dfs关键在于理解两点:DFS本质是找出所有的...

2019-08-22 03:09:24 204

原创 【通过PAT复习C++与数据结构】PAT-A 1043 Is It a Binary Search Tree (25 分)

题目A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key.The right s...

2019-08-21 20:02:43 170

原创 【通过PAT复习C++与数据结构】PAT-A 1020 Tree Traversals (25 分)

题目Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the ...

2019-08-19 20:33:23 234

原创 【通过PAT复习C++与数据结构】PAT-A 1052 Linked List Sorting (25 分)

题目A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now g...

2019-08-16 21:47:38 142

原创 【通过PAT复习C++与数据结构】PAT-A 1032 Sharing (25 分)

题目To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For examp...

2019-08-16 20:05:13 475

原创 【通过PAT复习C++与数据结构】PAT-A 1051 Pop Sequence (25 分)

题目Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of ...

2019-08-16 10:17:17 140

原创 【通过PAT复习C++与数据结构】PAT-A 1067 Sort with Swap(0, i) (25 分)

题目Given any permutation of the numbers {0, 1, 2,…, N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, ...

2019-08-15 10:21:51 336

原创 【通过PAT复习C++与数据结构】PAT-A 1037 Magic Coupon (25 分)

题目The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that produc...

2019-08-14 10:51:32 167

原创 【通过PAT复习C++与数据结构】PAT-A 1048 Find Coins (25 分)

题目Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. Howev...

2019-08-14 09:01:54 235

原创 【通过PAT复习C++与数据结构】PAT-A 1050 String Subtraction (20 分)超级简单的方法!

题目描述Given two strings S​1​​ and S​2​​ , S=S​1​​ −S​2​​ is defined to be the remaining string after taking all the characters in S​2​​ from S​1​​ . Your task is simply to calculate S​1...

2019-08-10 11:36:28 169

原创 【通过PAT复习C++与数据结构】PAT-A Pop Sequence (25)

题目Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of ...

2019-08-06 16:07:09 172

原创 【通过PAT复习C++与数据结构】PAT-A Spell It Right (20)

题目描述题目描述Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one ...

2019-07-15 14:10:51 651

原创 【通过PAT复习C++与数据结构】PAT-A Spell It Right (20)

题目Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.输入描述:Each input file contains one test case. Each case occupie...

2019-07-13 00:17:24 205

原创 【通过PAT复习C++与数据结构】PAT-A Boys vs Girls (25)

题目This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.输入描述:Each input file contains one test case. Eac...

2019-07-09 00:38:42 224

原创 【通过PAT复习C++与数据结构】PAT-A A+B for Polynomials (25)

题目This time, you are supposed to find A+B where A and B are two polynomials.输入描述:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a poly...

2019-07-07 23:00:27 610

原创 【通过PAT复习C++与数据结构】PAT刷题过程中单词记录(持续更新)

英文中文accurate up to 2 decimal places精确到两位小数

2019-07-07 17:03:11 450

原创 【通过PAT复习C++与数据结构】PAT-A World Cup Betting (20)

题目With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa....

2019-07-07 16:55:38 249

原创 【通过PAT复习C++与数据结构】刷PAT及其他算法题笔记(持续更新中)

在大整数运算、比大小中,用long double有奇效,比龙long long好得多,能满足2^64位精度运算需求(大概是10 ^19)。但是要注意,如果用scanf输入要%llf在输出时钟时间的时候常常要求格式化输出为03:05这样,可以用%02d...

2019-07-06 16:43:41 387

原创 【通过PAT复习C++与数据结构】PAT-A 1065. A+B and C (64bit) (20)

题目描述题目描述Given three integers A, B and C in [-263, 263), you are supposed to tell whether A+B > C.输入描述:The first line of the input gives the positive number of test cases, T (<=1000). Then T...

2019-07-06 16:29:59 420

原创 【通过PAT复习C++与数据结构】PAT-A 1046. Shortest Distance (20)

题目题目描述The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.输入描述:Each input file contains one t...

2019-07-06 15:38:35 174

原创 【通过PAT复习C++与数据结构】PAT A1031 Shuffling Machine (20)

题目题目描述Shuffling is a procedure used to randomize a deck of playing cards.Because standard shuffling techniques are seen as weak, and in order toavoid “inside jobs” where employees collaborate with...

2019-07-06 01:35:08 131

原创 【通过PAT复习C++与数据结构】PAT B1046划拳

题目划拳是古老中国酒文化的一个有趣的组成部分。酒桌上两人划拳的方法为:每人口中喊出一个数字,同时用手比划出一个数字。如果谁比划出的数字正好等于两人喊出的数字之和,谁就赢了,输家罚一杯酒。两人同赢或两人同输则继续下一轮,直到唯一的赢家出现。下面给出甲、乙两人的划拳记录,请你统计他们最后分别喝了多少杯酒。输入格式:输入第一行先给出一个正整数N(<=100),随后N行,每行给出一轮划拳的记...

2019-06-18 21:41:59 162

原创 【通过PAT复习C++与数据结构】PAT B1026 程序运行时间(15) 改进版

题目要获得一个C语言程序的运行时间,常用的方法是调用头文件time.h,其中提供了clock()函数,可以捕捉从程序开始运行到clock()被调用时所耗费的时间。这个时间单位是clock tick,即“时钟打点”。同时还有一个常数CLK_TCK,给出了机器时钟每秒所走的时钟打点数。于是为了获得一个函数f的运行时间,我们只要在调用f之前先调用clock(),获得一个时钟打点数C1;在f执行完成...

2019-06-18 21:11:03 213

原创 【通过PAT复习C++与数据结构】 1001. 害死人不偿命的(3n+1)猜想 (15)-PAT乙级

今天顺便把秋季PAT的名报了,希望能取得一个好成绩。题目害死人不偿命的(3n+1)猜想 (15)卡拉兹(Callatz)猜想:对任何一个自然数n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把(3n+1)砍掉一半。这样一直反复砍下去,最后一定在某一步得到n=1。卡拉兹在1950年的世界数学家大会上公布了这个猜想,传说当时耶鲁大学师生齐动员,拼命想证明这个貌似很傻很天真的命题,结果闹...

2019-06-18 20:09:10 111

原创 【通过PAT复习C++与数据结构】1021. 个位数统计 (15)-PAT乙级真题

题目给定一个k位整数N = dk-110k-1 + … + d1101 + d0 (0<=di<=9, i=0,…,k-1, dk-1>0),请编写程序统计每种不同的个位数字出现的次数。例如:给定N = 100311,则有2个0,3个1,和1个3。输入格式:每个输入包含1个测试用例,即一个不超过1000位的正整数N。输出格式:对N中每一种不同的个位数字,以D:M的格式...

2019-05-04 17:28:09 163

原创 【通过PAT复习C++与数据结构】1019. 数字黑洞 (20)-PAT乙级真题

题目给定任一个各位数字不完全相同的4位正整数,如果我们先把4个数字按非递增排序,再按非递减排序,然后用第1个数字减第2个数字,将得到一个新的数字。一直重复这样做,我们很快会停在有“数字黑洞”之称的6174,这个神奇的数字也叫Kaprekar常数。例如,我们从6767开始,将得到7766 – 6677 = 10899810 – 0189 = 96219621 – 1269 = 8352...

2019-04-29 19:04:26 191

空空如也

空空如也

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

TA关注的人

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