//注意:排序的是满分解题数,而不是解题数。#include <cstdio>#include <cstring> #include <iostream> #include <algorithm> using namespace std; const int maxn = 200005; typed ...
分类:
其他好文 时间:
2020-02-04 10:37:01
阅读次数:
52
题意: 给你一堆单词与询问,每次询问给一个字符串s问以s为前缀的字符串有多少 思路: #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int maxn=400009; struct ...
分类:
编程语言 时间:
2020-02-03 22:28:15
阅读次数:
99
By R?za Özçelik Original post: https://towardsdatascience.com/an-intuitive-explanation-of-graphsage-6df9437ee64f DeepWalk is a transductive algorithm, ...
分类:
其他好文 时间:
2020-02-03 22:17:54
阅读次数:
95
A题 我们注意到如果存在两个奇数,那么就能满足题目条件,所以我们就从头寻找两个奇数,没有的话就是无解 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<vector> #include<s ...
分类:
其他好文 时间:
2020-02-03 14:15:25
阅读次数:
53
CodeForces 371C Hamburgers 二分 题意 给你一个做汉堡包的菜单,他们是由 ,三种材料做成的,现在我们有一些材料和钱,我们想做最多的汉堡包,请问最多是多少? 解题思路 这里我们开始我们可能会想该怎么买,也就是买的策略是什么,其实我们可以不用去思考这个,理由如下: 假如我们知道 ...
分类:
其他好文 时间:
2020-02-03 14:08:25
阅读次数:
57
KNN算法介绍 KNN算法(K NearestNeighor Algorithm) 是一种最简单的分类算法。 算法核心: 假设在一个二维坐标平面中已经有了$n$个点,每个点的颜色已知,现在给定查询点$p$的坐标$(x,y)$,判断$p$的颜色。 对于已知的$n$个点,计算每个点和点$p$的欧几里得距 ...
分类:
编程语言 时间:
2020-02-03 12:07:15
阅读次数:
80
题解:用 sort函数,位于 <algorithm>中。 #include <bits/stdc++.h> using namespace std; typedef long long ll; int a[5]; int main() { for(int i = 0; i < 3; i++) cin ...
分类:
其他好文 时间:
2020-02-02 23:29:23
阅读次数:
88
[toc] 注:dp可能并不是求解该这些问题的最优算法,这里只是做一个dp 算法的简介。 概念 定义:假设现有一个 string = 最长连续子串:要求在原序列中连续,比如 str = 、`fghijklm`都是valid substring 最长连续子序列:相对顺序在原序列中不变即可;比如 str ...
分类:
其他好文 时间:
2020-02-02 23:19:38
阅读次数:
89
注意: 1,回车和空格 2,是四位数,所以千位不能是0 接下来放代码 #include <iostream>#include <algorithm>using namespace std; int main(){ int arr[5]; cin >> arr[0] >> arr[1] >> arr[ ...
分类:
其他好文 时间:
2020-02-02 22:03:51
阅读次数:
109
咳咳,第一次写这种博客,介绍一下sort的自定义排序cmp函数: sort和cmp的实现需要的头文件有: #include<algorithm> using namespace std; sor()是C++标准库中的排序函数,使用很方便,传进去数组的起始和结束地址就行,注意是左闭右开,默认的排序是< ...
分类:
编程语言 时间:
2020-02-02 21:36:07
阅读次数:
132