题意:一道水题,给出一个序列,要求找出一个子序列,(子序列的要求是:满足正负正负、或者负正负正,以此类推),使得该子序列长度最长和值最大。注意看样例(第一个位置无论正负都得取,因为要保证长度最长)。 PS:但是感觉我这次败给水题了,这题只有800分,我找bug找了2h,加油吧小伙子! 思路: 直接根 ...
分类:
其他好文 时间:
2020-06-26 22:37:03
阅读次数:
70
DAY4 Watching Fireworks is Fun The Prices 题目描述 你要购买$m$种物品各一件,一共有$n$家商店,你到第$i$家商店的路费为$d[i]$,在第家商店购买第$j$种物品的费用为$c[i][j]$,求最小总费用。 输入格式 第一行包含两个正整数$n,m(1<= ...
分类:
其他好文 时间:
2020-06-26 18:29:06
阅读次数:
50
7-2 Zigzag Sequence (25分) This time your job is to output a sequence of N positive integers in a zigzag format with width M in non-decreasing order. A ...
分类:
其他好文 时间:
2020-06-26 14:45:16
阅读次数:
81
【题目】 给定一个包含从0、1、2,...,n中获取的n个不同数字的数组,找到该数组中缺少的一个。 Example 1: Input: [3,0,1] Output: 2 Example 2: Input: [9,6,4,2,3,5,7,0,1] Output: 8 Example 3: Input ...
分类:
其他好文 时间:
2020-06-26 13:05:13
阅读次数:
54
Function "LCA_DI" Convert Char Array to DInt "LDI_CA" Convert DInt to Char Array Example Parameter Input Output InOut Static CA Array[0..9] of CharDI ...
分类:
其他好文 时间:
2020-06-26 01:17:33
阅读次数:
76
Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, ...
分类:
其他好文 时间:
2020-06-25 23:47:18
阅读次数:
92
题目 Description 给定一个序列a1,a2,…,an,如果存在i<j,a[i]>a[j],那么我们称之为逆序对,求逆序对的数目 Input 第一行为n,表示序列长度,接下来的n行,第i+1行表示序列中的第i个数。 N<=10^5。Ai<=10^5 Output 两行,第一行为所有逆序对总数 ...
分类:
其他好文 时间:
2020-06-25 21:50:26
阅读次数:
76
背景 毕业论文选择了文本处理的情感分析。交了论文的初稿后,导师看了觉得写得不错,希望我冲击一下优秀论文,给我推荐了bert算法让我再去跑一趟。本是第一次接触NLP的我又去看了这个前2年才由谷歌开发出来的算法,简直头皮发麻。在google开源代码的run_classifier.py里添加了自己的Pro ...
分类:
其他好文 时间:
2020-06-25 16:06:01
阅读次数:
205
Reversing Linked List Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, give ...
分类:
其他好文 时间:
2020-06-25 14:13:09
阅读次数:
56
Filebeat附带了示例Kibana仪表板,可视化文件,并提供了搜索以可视化Kibana中的Filebeat数据。 本例展示Nginx示例仪表板 步骤一、采集Nginx日志 使用Filebeat Nginx Module采集Nginx Access日志 参考:【Beats】 Filebeat收集N ...
分类:
其他好文 时间:
2020-06-25 10:04:11
阅读次数:
154