What is the difference between sed and awk sed is a stream editor. It works with streams of characters on a per-line basis. It has a primitive program ...
分类:
其他好文 时间:
2020-05-24 11:34:00
阅读次数:
81
#include <stdio.h>int main(){ int i; int f[20]={1,1}; for(i=2;i<20;i++) f[i]=f[i-1]+f[i-2]; for(i=0;i<20;i++) { if(i%5==0) printf("\n"); printf("%10d" ...
分类:
编程语言 时间:
2020-05-19 18:47:50
阅读次数:
94
Masking lets you modify a specific bit (or bits) using a bit pattern (called the mask) and a logical bitwise operator (AND, OR, or XOR). By changing t ...
分类:
其他好文 时间:
2020-05-19 12:29:32
阅读次数:
62
题目 People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6 digit number, w ...
分类:
其他好文 时间:
2020-05-18 14:35:03
阅读次数:
49
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher ...
分类:
其他好文 时间:
2020-05-16 22:26:57
阅读次数:
80
模拟考试的题: 0706:输出Fibonacci数列 总时间限制: 1000ms 内存限制: 65536kB描述 Fibonacci数列指的是数列第一项和第二项为1,之后每一项是之前两项的和所构成的数列。 现有多组数据,每组数据给出一个数字n,请你输出Fibonacci数列的前n-1项。 #incl ...
分类:
其他好文 时间:
2020-05-15 00:22:31
阅读次数:
50
题目描述 大家都知道斐波那契(Fibonacci)数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0,第1项是1)。 要求使用递归和非递归两种方法 1.递归 时间复杂度:O(2n) public class Solution { public int Fibonacci ...
分类:
其他好文 时间:
2020-05-13 23:34:59
阅读次数:
76
http://poj.org/problem?id=3070 Language: Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25706 Accepted: 17173 Description In the ...
分类:
其他好文 时间:
2020-05-12 14:13:22
阅读次数:
52
题意 定义"Fibonacci string"为没有连续1的01串。现在,给出a,b,定义一个"Fibonacci string"的权值为$y^bx^a$,其中$x$为$0$的个数,$y$为$1$的个数。 要求对所有长度为n的"Fibonacci string"的权值求和,对$10^9+7$取模。 ...
分类:
其他好文 时间:
2020-05-06 23:19:56
阅读次数:
105
```python from collections import defaultdict from gensim import corpora import jieba from gensim import similarities import re class Similarity: def ... ...
分类:
其他好文 时间:
2020-05-06 01:08:10
阅读次数:
52