摘要: #include<bits/stdc++.h>using namespace std;int order[300007];long long t[300007],ans[300007];int main(){ int n; long long m; scanf("%d%lld",&n,&m); fo 阅读全文
posted @ 2019-01-14 17:14 sewage 阅读(189) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long dp[107];int main(){ int cnt=1; dp[1]=1; for(int i=2;i<=1e9;i*=2){ dp[++cnt]=dp[cnt-1]*4+1;//记录长度为 阅读全文
posted @ 2019-01-14 14:37 sewage 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const int N=200005;int n,A[N];long long Mx,tot,S[N];vector<int>Adj[N];void DFS(int v,int p){ S[v]=A[v]; for 阅读全文
posted @ 2018-12-25 15:45 sewage 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const long long N=1e5+5;const long long MOD=1e9+7;long long n,x,y,ans=0;long long cost[N];pair<long long,lo 阅读全文
posted @ 2018-12-21 14:19 sewage 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const int maxn=1e6+7;pair<string,int>p[maxn];int nn,n;int cmp(pair<string,int>a,pair<string,int>b){ return 阅读全文
posted @ 2018-12-21 13:54 sewage 阅读(124) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int a[200007];stack<int>s;int main(){ int n; int mn=0; scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&a 阅读全文
posted @ 2018-12-21 13:33 sewage 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long a[100007];long long dp[1000007];const int mod=1e9+7;int main(){ int n; scanf("%d",&n); dp[0]=1; f 阅读全文
posted @ 2018-11-30 23:47 sewage 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int mi[100007];int main(){ int cnt=0; int flag=0; int ans=1; int n,k=0; scanf("%d",&n); for(int i=2;i*i<=n; 阅读全文
posted @ 2018-11-30 19:11 sewage 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long mx(long long l1,long long r1,long long l2,long long r2){ return max(0LL,min(r1,r2)-max(l1,l2)+1); 阅读全文
posted @ 2018-11-30 17:35 sewage 阅读(106) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const long long mod=998244353;int n;int a[100007];long long dp[100007][207][3];//第i位值为j时k是否成立,k=0,i<i-1,k=1 阅读全文
posted @ 2018-11-28 04:30 sewage 阅读(144) 评论(0) 推荐(0) 编辑