#include #define int long long using namespace std; const int maxn=4e6+100; int phi[maxn]; int prime[maxn]; int visit[maxn]; int tot=0; int num[maxn];... ...
分类:
其他好文 时间:
2018-10-21 15:59:34
阅读次数:
200
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and . Example 1: Input: a = 1, b = 2 Output: 3 Example 2: Inp ...
分类:
其他好文 时间:
2018-10-21 13:02:24
阅读次数:
129
Problem Description Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two inte ...
分类:
其他好文 时间:
2018-10-19 10:14:19
阅读次数:
144
1. 素数筛筛出规定范围内的所有素数存入数组 2. 遍历数组,如果满足于后边的差2,计数器加加 include const int maxn = 10000001; int prime[maxn]={0}; bool p[maxn] = {0}; int pnum =0; void Find_pri ...
分类:
其他好文 时间:
2018-10-18 23:58:54
阅读次数:
303
Description Given a $n \times m$ chessboard, every time put two chessman with Manhattan distance 3 between them. Calculate the maximum number of chess ...
分类:
其他好文 时间:
2018-10-18 11:03:05
阅读次数:
363
Combinatorics Description Given an array $a[]$, define an operation: $ s_i=\sum_{j=1}^{n}{a_j},\\ s_i\rightarrow a_i.$ Calculate the value of each $a$ ...
分类:
其他好文 时间:
2018-10-18 10:57:30
阅读次数:
163
Combinatorics Descirption Calculate numbers of non increasing and non decreasing sequences with $n$ elements ranged in $[1,n]$. Solution Reversing a n ...
分类:
其他好文 时间:
2018-10-18 10:47:04
阅读次数:
140
网络要做的步骤:(一个中国人,给中国人教学,为什么要写一堆英语?) 1, sample abatch of data(数据抽样) 2,it through the graph ,get loss(前向传播,得到损失值) 3,backprop to calculate the geadiets(反向传 ...
分类:
其他好文 时间:
2018-10-16 11:54:07
阅读次数:
378
【2】Add Two Numbers 【7】Reverse Integer 【8】String to Integer (atoi) 【9】Palindrome Number 【12】Integer to Roman 【13】Roman to Integer 【29】Divide Two Intege ...
分类:
其他好文 时间:
2018-10-15 14:55:21
阅读次数:
211
题目 Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Exam ...
分类:
其他好文 时间:
2018-10-15 12:20:11
阅读次数:
142