随笔分类 -  杂—noip模拟赛

摘要:1.足球联赛 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; struct node{ int sc,id; }a[51]; char s[51 阅读全文
posted @ 2017-11-08 11:18 Echo宝贝儿 阅读(230) 评论(0) 推荐(0) 编辑
摘要:1.数学老师的报复 #include<iostream> #include<cstdio> using namespace std; int cnt; short int f[55000000]; long long a,b,n; long long qread(){ long long i=0,j 阅读全文
posted @ 2017-11-07 14:55 Echo宝贝儿 阅读(225) 评论(0) 推荐(0) 编辑
摘要:P3802 小魔女帕琪 P3802 小魔女帕琪 P3802 小魔女帕琪 题目背景 从前有一个聪明的小魔女帕琪,兴趣是狩猎吸血鬼。 帕琪能熟练使用七种属性(金、木、水、火、土、日、月)的魔法,除了能使用这么多种属性魔法外,她还能将两种以上属性组合,从而唱出强力的魔法。比如说为了加强攻击力而将火和木组合 阅读全文
posted @ 2017-11-05 09:43 Echo宝贝儿 阅读(386) 评论(2) 推荐(2) 编辑
摘要:三向城 #include<iostream> #include<cstdio> using namespace std; int n,x,y; int main(){ freopen("city.in","r",stdin);freopen("city.out","w",stdout); // fr 阅读全文
posted @ 2017-11-03 17:19 Echo宝贝儿 阅读(223) 评论(0) 推荐(0) 编辑
摘要:纸牌 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define maxn 300010 int n,a[maxn],b[maxn],w[maxn],nu 阅读全文
posted @ 2017-11-03 10:07 Echo宝贝儿 阅读(246) 评论(0) 推荐(1) 编辑
摘要:函数最值 #include<iostream> #include<cstdio> #include<cstring> #define maxn 100010 using namespace std; int n; long long a[maxn],ans,sum[maxn]; char s[max 阅读全文
posted @ 2017-11-02 17:01 Echo宝贝儿 阅读(179) 评论(0) 推荐(0) 编辑
摘要:卖书 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define maxn 1000010 using namespace std; int n,a[maxn],cnt1,cnt2; int qr 阅读全文
posted @ 2017-11-02 10:01 Echo宝贝儿 阅读(187) 评论(0) 推荐(2) 编辑
摘要:轮换 #include<iostream> #include<cstdio> #include<cstring> #define maxn 1010 using namespace std; int n,p,k,a[maxn],b[maxn],op[maxn][maxn],pos[maxn]; in 阅读全文
posted @ 2017-11-01 16:34 Echo宝贝儿 阅读(218) 评论(0) 推荐(1) 编辑
摘要:立方体 /* 输入数据中的p的位置是没有用的,而题目本质上是求C(n,k) */ #include<iostream> #include<cstdio> #define mod 1000000007 #define maxn 1000001 using namespace std; int n,k, 阅读全文
posted @ 2017-11-01 09:52 Echo宝贝儿 阅读(207) 评论(0) 推荐(1) 编辑
摘要:数列 #include<iostream> #include<cstdio> using namespace std; long long a,b,ans; void f(long long x,long long y){ if(y==0)return; ans+=x/y; f(y,x%y); } 阅读全文
posted @ 2017-10-31 16:19 Echo宝贝儿 阅读(191) 评论(0) 推荐(0) 编辑
摘要:集合 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int n,a[1000010],cnt; int main(){ freopen("multiset.in","r",stdin);fre 阅读全文
posted @ 2017-10-31 09:46 Echo宝贝儿 阅读(276) 评论(2) 推荐(1) 编辑
摘要:少女 #include<iostream> #include<cstdio> #include<queue> #include<cstdlib> #define maxn 200010 #define mod 1000000007 using namespace std; int n,m,head[ 阅读全文
posted @ 2017-10-30 16:11 Echo宝贝儿 阅读(295) 评论(0) 推荐(0) 编辑
摘要:星空 #include<iostream> #include<cstdio> using namespace std; int n,m; int main(){ freopen("star.in","r",stdin);freopen("star.out","w",stdout); while(1) 阅读全文
posted @ 2017-10-30 10:07 Echo宝贝儿 阅读(290) 评论(1) 推荐(0) 编辑
摘要:洗澡 /* 这个题不能单纯判断左括号和右括号的多少,而应该从左到右扫一遍,看应该如何配对 */ #include<iostream> #include<cstdio> #include<cstring> using namespace std; char s[100010]; int cnt,ans 阅读全文
posted @ 2017-10-29 16:24 Echo宝贝儿 阅读(217) 评论(0) 推荐(0) 编辑
摘要:遭遇 /* 因为选的楼是个集合,与顺序无关 而且总花费=c[1]+c[2]+c[3]+|h[1]-h[2]|+|h[2]-h[3]| 我们规定走的顺序从高到低,那么绝对值就可以去掉 所以就可以约掉中间的 枚举起点终点就行了 */ #include<iostream> #include<cstdio> 阅读全文
posted @ 2017-10-29 10:03 Echo宝贝儿 阅读(236) 评论(0) 推荐(0) 编辑
摘要:水题(贪心) (water) Time Limit:1000ms Memory Limit:128MB 题目描述 LYK出了道水题。 这个水题是这样的:有两副牌,每副牌都有n张。 对于第一副牌的每张牌长和宽分别是xi和yi。对于第二副牌的每张牌长和宽分别是aj和bj。第一副牌的第i张牌能覆盖第二副牌 阅读全文
posted @ 2017-10-28 16:25 Echo宝贝儿 阅读(718) 评论(0) 推荐(2) 编辑
摘要:立方数 (cubic) Time Limit:1000ms Memory Limit:128MB 题目描述 LYK定义了一个数叫“立方数”,若一个数可以被写作是一个正整数的3次方,则这个数就是立方数,例如1,8,27就是最小的3个立方数。 现在给定一个数P,LYK想要知道这个数是不是立方数。 当然你 阅读全文
posted @ 2017-10-28 10:06 Echo宝贝儿 阅读(396) 评论(3) 推荐(0) 编辑
摘要:财富 (treasure) Time Limit:1000ms Memory Limit:128MB 题目描述 LYK有n个小伙伴。每个小伙伴有一个身高hi。 这个游戏是这样的,LYK生活的环境是以身高为美的环境,因此在这里的每个人都羡慕比自己身高高的人,而每个人都有一个属性ai表示它对身高的羡慕值 阅读全文
posted @ 2017-10-26 14:03 Echo宝贝儿 阅读(312) 评论(0) 推荐(0) 编辑
摘要:三分咲 #include<iostream> #include<cstdio> #include<ctime> using namespace std; int n,m,s; int main(){ //freopen("Cola.txt","r",stdin); freopen("three.in 阅读全文
posted @ 2017-10-26 13:54 Echo宝贝儿 阅读(299) 评论(0) 推荐(0) 编辑
摘要:1 任务安排 manage.in/.out/.cpp1.1 问题描述你有 N 个工作,同一时刻只能做一个任务, 其中每个工作有其所需时间, 及完成的 Deadline(截止时间), 问要完成所有工作, 最迟要从什么时候开始。你最早可以从时间 0 开始工作。1.2 输入格式第一行一个整数 N,表示任务 阅读全文
posted @ 2017-10-25 11:20 Echo宝贝儿 阅读(193) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示