摘要:
题目关键是建模,之后就是简单地增广路。#include#include#include#include#includeusing namespace std;const int N=1024;const int inf=1q;void ford(){ int a[N],vis[... 阅读全文
摘要:
#include#include#include#includeusing namespace std;const int N=1024;const int inf=1edges;vectorG[N];int n,m,s,t;int vis[N];int d[N];int cur[N... 阅读全文
摘要:
#include#include#includeusing namespace std;const int N=200000+5;const int inf=1<<24;int dp[N][2],a[N];char s[2*N];int main(){ int n,m,i,_;... 阅读全文
摘要:
#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const... 阅读全文
摘要:
#include#include#include#include#includeusing namespace std;const int N=1024*2;const int inf=1q; while(1) { memset(p,0xff,sizeof(... 阅读全文
摘要:
#include#include#include#includeusing namespace std;int n;int x[30],y[30];class Coordinate{public: double xCoordinate; double yCoordinat... 阅读全文
摘要:
用dp[i]表示第i种的情况,第i个上放一个木人,共有dp[i-3]+1种情况。不放木人共有dp[i-1]种情况。所以dp[i]=dp[i-1]+1+dp[i-3]。#include#include#include#includeusing namespace std;__int64... 阅读全文
摘要:
#include#include#include#include#includeusing namespace std;struct node{ int num; int cnt;}a[10000+5];bool cmp(node n1,node n2){ retu... 阅读全文