每一个新复制一个Experiment文件,都没有提交到github的权限,这样更新github端的代码就变的很麻烦,以后使用一下方法解决这一问题 1、通过git将项目文件克隆到本地G盘: git clone https://github.com/sunsunshark/Experiment(例如:下 ...
分类:
其他好文 时间:
2019-12-24 18:49:30
阅读次数:
148
#include<iostream>using namespace std;int main() { int i, j; bool isprime; for (i = 1; i <= 100; i++) { isprime = true; //see if the number is evenly ...
分类:
其他好文 时间:
2019-12-22 12:44:49
阅读次数:
56
最小生成树:如果无向连通图是一个网,它的所有生成树中必有一棵边的权值总和最小的生成树,称这棵生成树为最小生成树。 Prime算法 假设G=(V,E)为一网图,其中V为网图中所有顶点的集合,E为网图中所有带权边的集合。设置两个新集合U和T,其中集合U用于存放G的最小生成树中的顶点,集合T存放G的最小生 ...
分类:
其他好文 时间:
2019-12-20 20:38:25
阅读次数:
97
Google C++ Style Guide 书籍:C++ Primer,C++标准程序库,Effective C++,C++ concurrency in Action, Linux多线程服务端编程 读取数量不定的输入数据 while内返回其左侧运算符,即std:cin, 当istream作为条件 ...
分类:
编程语言 时间:
2019-12-13 22:06:55
阅读次数:
113
1059 Prime Factors (25分) Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p?1???k?1?? ...
分类:
其他好文 时间:
2019-12-13 12:14:02
阅读次数:
83
#include<bits/stdc++.h> using namespace std; #define maxn 40 int prime[maxn]; int visit[maxn]; void Prime(){//埃氏筛法 memset(visit,0,sizeof(visit)); //初始 ...
分类:
其他好文 时间:
2019-12-07 14:48:28
阅读次数:
102
题目描述 给一棵 $n$ 个点的树,每条边的边权为 $1$ 。 强制在线。 有 $m$ 次询问,每次询问给出 $u^{\prime}, v^{\prime}, w^{\prime}$ ,令 $u=\left(u^{\prime}+\text {lastans}\right) \% n+1, v= \ ...
分类:
其他好文 时间:
2019-12-02 13:44:26
阅读次数:
74
一:判定质数 要判断一个数是不是质数,只需遍历小于等于它的所有数,如果它能被除了1和本身之外的数整除,那么它就不是质数。 很简单,暴力枚举,代码如下: 1 bool is_prime(int x) 2 { 3 if (x < 2) return false; 4 for (int i = 2; i ...
分类:
其他好文 时间:
2019-11-28 11:48:52
阅读次数:
80
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5+10; int a[N]; int n; bool prime(int x) {//判断是否为质数 for(int i = 2; ...
分类:
其他好文 时间:
2019-11-28 01:33:53
阅读次数:
97
Pairs Forming LCM (LightOJ 1236)【简单数论】【质因数分解】【算术基本定理】(未完成) 标签: 入门讲座题解 数论 题目描述 Find the result of the following code: ...
分类:
其他好文 时间:
2019-11-27 12:21:00
阅读次数:
76