题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=517
思路:求1~n的最小公倍数,就求小于等于n的x^i之积(x为质数,且i尽量大,x^i
#include
#include
#include
#include
#define MAXN 1000
#define MAXM 1000
using namespace std...
分类:
其他好文 时间:
2014-11-05 17:27:01
阅读次数:
142
【题意简述】:求下一个排列
【分析】:同1833一样,如果用STL 一下就解决了,最好自己写函数。
// 192K 0Ms
#include
#include
#include
using namespace std;
char alphabit[51];
int main()
{
int i,j,len;
while(1)
{
cin>>alphabit;
if(a...
分类:
编程语言 时间:
2014-11-05 17:22:22
阅读次数:
170
#include
#include
#include
#include
#include
#include
#include
using namespace std;
class TextQuery
{
public:
typedef vector::size_type line_no;
TextQuery(){};
void read_file(ifstream &is)
...
分类:
编程语言 时间:
2014-11-05 17:11:44
阅读次数:
215
裸的分层图最短路。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define N 51 7 #define K 51 8 #define M 2001 9 struct Point{int u,d;Poi...
分类:
其他好文 时间:
2014-11-05 17:01:57
阅读次数:
274
边查询,点更新的模板题。#include#include#include#include#include#includeusing namespace std;typedef long long LL;const int maxn = 222222;struct Node{ int to;in...
题目描述:圆周上有N(N#includeusing namespace std;int main(){ long long ans,n,i; cin>>n; ans=1; for (i=n-5;i<=n;++i) ans=ans*i; ans=ans/720; cout<<ans<<endl;}
分类:
其他好文 时间:
2014-11-05 16:57:45
阅读次数:
105
1 #include 2 using namespace std; 3 4 class rectangle 5 { 6 private: 7 int length,width; 8 public: 9 rectangle(){};10 rectangle(int a,...
分类:
其他好文 时间:
2014-11-05 16:41:21
阅读次数:
183
spfa 裸题; 1 //spfa 链表 ; 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 const int N=2500+5,M=620....
分类:
其他好文 时间:
2014-11-05 16:41:07
阅读次数:
144
思路:对一个n位数组,第一位和第二位比较,大的放后面,第二位和第三位比较,大的放后面,依次,,,,,,。到最后一位此时,最大的已经放到最后了,再用上面的方法比较前n-1位。#include "stdafx.h"#include #include #include using namespace st...
分类:
编程语言 时间:
2014-11-05 16:39:07
阅读次数:
187
// CKeyWord.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include using namespace std;int _tmain(int argc, _TCHAR* argv[]) { //i++是先使用i的值进行调用再计算++,i--同...
分类:
编程语言 时间:
2014-11-05 16:37:27
阅读次数:
134