08 2014 档案
摘要:时间复杂度为O(n),参考:http://bbs.dlut.edu.cn/bbstcon.php?board=Competition&gid=23474#include#include#include#include#define maxn 2001000using namespace std;ch...
阅读全文
摘要:注意处理溢出#include#include#include#includeusing namespace std;long long n;long long a[60][2];int k;int fun(long long y,int x){ long long cnt=0,cur=1; ...
阅读全文
摘要:#include#include#include#include#includeusing namespace std;struct Point{ double x,y; Point(double x=0,double y=0):x(x),y(y){}};typedef Point Ve...
阅读全文
摘要:#include#include#include#include#includeusing namespace std;struct Point{ int x,y; Point(int x=0,int y=0):x(x),y(y){}};typedef Point Vector;bool...
阅读全文
摘要:#include#include#include#include#includeusing namespace std;int gcd(int a,int b){ return a%b==0?b:gcd(b,a%b);}int main(){ int x1,x2,y1,y2; wh...
阅读全文
摘要:#include#include#include#includeusing namespace std;int main(){ int n; int a[6]; while(scanf("%d",&n)!=EOF) { for(int i=0;ians) ...
阅读全文
摘要:因为y已经排好序了,用x坐标建立一维树状数组#include#include#includeusing namespace std;int n;int a[32001];int lev[15001];int lowbit(int x){ return x&(-x);}int sum(int x...
阅读全文
摘要:#include#include#include#include#includeusing namespace std;struct Point{ int x,y; Point(int x=0,int y=0):x(x),y(y){}};typedef Point Vector;bool...
阅读全文
摘要:#include#include#include#includeusing namespace std;double a[10010][150];double dp[10010][150];int b[10010];int n;void solve(int cnt){ memset(dp,0,...
阅读全文
摘要:#include#include#include#include#define lson l,m,rt> 1)) * col[rt]; sum[rt> 1) * col[rt]; col[rt] = 0; }}void build(int l,int r,int rt){ c...
阅读全文
摘要:#include#include#include#include#define lson l,m,rt=p) { update(v,p,lson); } else { p-=sum[rt>n) { for(int i=0; i=...
阅读全文
摘要:一道模拟题,写的有点麻烦#include#include#include#include#includeusing namespace std;bool fun(char c){ if(c=='a'||c=='A'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'...
阅读全文
摘要:确定好对手就简单了。#include#include#include#includeusing namespace std;double a[150][150];double dp[9][150];int n;void solve(){ memset(dp,0,sizeof(dp)); ...
阅读全文

浙公网安备 33010602011771号