随笔分类 -  洛谷

在洛谷的题目0.0
摘要:#include<iostream>#include<cstdio>#include<cstdlib>#include<algorithm>using namespace std; int p[20001]={0};int ansl[1001],ansr[1001]; struct node{ in 阅读全文
posted @ 2018-11-01 19:12 _Koreyoshi 阅读(494) 评论(0) 推荐(0)
摘要:【题目描述】 在一个热带雨林中生存着一群猴子,它们以树上的果子为生。昨天下了一场大雨,现在雨过天晴,但整个雨林的地表还是被大水淹没着, 猴子不会游泳,但跳跃能力比较强,它们仍然可以在露出水面的部分植物的树冠上来回穿梭,以找到喜欢吃的果实。 现在,在这个地区露出水面的有N棵树,假设每棵树本身的直径都很 阅读全文
posted @ 2017-09-19 19:19 _Koreyoshi 阅读(333) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h>using namespace std;int a[101],b[101],n;int main(){ cin>>n; for (int i=1;i<=n;i++) cin>>a[i]; for (int i=1;i<=n;i++) for (int j 阅读全文
posted @ 2017-01-19 19:39 _Koreyoshi 阅读(339) 评论(0) 推荐(0)
摘要:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#define N 100010#define INF 0xfffffusing namespace std;int n, m, q, x, y, cn 阅读全文
posted @ 2017-01-19 19:38 _Koreyoshi 阅读(114) 评论(0) 推荐(0)
摘要:#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>typedef long long ll;using namespace std; ll n,m,i,j,k; struct Matrix { ll a 阅读全文
posted @ 2017-01-19 19:35 _Koreyoshi 阅读(141) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h>using namespace std; int exGcd(int a,int b,int &x,int &y) { if(b==0) { x=1; y=0; return a; } int r=exGcd(b,a%b,x,y); int t=x; x 阅读全文
posted @ 2017-01-19 19:33 _Koreyoshi 阅读(187) 评论(0) 推荐(0)
摘要:#include<cstdio>typedef long long ll;const int maxn=100005;ll d[maxn],id[maxn],s[maxn],k;int n,m,c,x,y;void add(ll*b,int p,ll v){for(;p<=n;p+=p&-p)b[p 阅读全文
posted @ 2017-01-19 19:31 _Koreyoshi 阅读(135) 评论(0) 推荐(0)
摘要:#include<bits/stdc++.h>using namespace std;const int maxx = 100000 + 10;int Heap[maxx];int main() { int n,num = 0,x; scanf("%d",&n); for(int i=1; i<=n 阅读全文
posted @ 2017-01-19 19:30 _Koreyoshi 阅读(186) 评论(0) 推荐(0)