1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 int gcd(int a,int b) 8 { 9 if(b==0)10 return a;11 else12 r...
分类:
其他好文 时间:
2015-07-24 16:06:26
阅读次数:
133
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 long long multi(long long a,long long b) 8 { 9 long long mod=b+1;10 long ...
分类:
其他好文 时间:
2015-07-24 16:04:01
阅读次数:
109
错误代码:#include#include#includeusing std::string;using std::cin;using std::cout;using std::endl;***cout#include#includeusing namespace std;***cout<<setw...
分类:
其他好文 时间:
2015-07-24 15:49:55
阅读次数:
99
Visual Studio 2012 SPA Template /Help/index.cshtml file was throwing your error.@using System.Web.Http@using System.Web.Http.Description <=== CS0234:....
分类:
Web程序 时间:
2015-07-24 15:45:15
阅读次数:
138
原文链接:http://www.cnblogs.com/yeahgis/archive/2012/05/29/2523476.html#include #include using namespace std;intmain(intargc, char** argv){std::vector vec...
分类:
其他好文 时间:
2015-07-24 15:44:40
阅读次数:
112
VB.NETProgram StructureC#Imports System Namespace Hello Class HelloWorld Overloads Shared Sub Main(ByVal args() As String) Dim name As String = "...
每一次比赛的时候脑子都卡顿,
这次更离谱,我竟然二进制枚举边,这么大的复杂度,并且剪不了枝
后来学长说着是道爆搜,搜每一条边,恍然大悟。
只需要剪掉点的度数是奇数的时候,或者他的线上朋友或线下朋友大于等于度数的1/2时候的枝,
跑了15ms#include
#include
#include
using namespace std...
分类:
其他好文 时间:
2015-07-24 14:23:23
阅读次数:
96
【解析1】暴力dfs
[分析]
由于数据范围N
结果第一次由于空间只开了2000就直接爆了,然后还用了邻接矩阵也挂了,第三次才AC。
我已经弱得无话可说了...
[小结]多用邻接矩阵。
[代码]#include
#include
#include
using namespace std;
const int N=2001;
struct G
{
int v,nx...
分类:
其他好文 时间:
2015-07-24 13:00:21
阅读次数:
253
#include
using namespace std;
class A{
public:
A(int a,string str)
{
m_a = a;
m_str = str;
}
//A(int a,string str):m_a(a),m_str(str){}
void print()
{
cout << m_a << ' '<< m_str<< en...
分类:
其他好文 时间:
2015-07-24 12:54:37
阅读次数:
105
题意:n个人m条边(n#include#includeusing namespace std;int T,n,m;int s[5050],t[5050];int on[5050],off[5050];int du[5050],ans,cnt;void dfs(int x){ if(x==m+1...
分类:
其他好文 时间:
2015-07-24 12:22:48
阅读次数:
104