acm
文章平均质量分 64
Ostrichcrab
这个作者很懒,什么都没留下…
展开
-
hdu 1034 Candy Sharing Game 模拟题
Candy Sharing GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8086 Accepted Submission(s): 4834Problem DescriptionA number of students si...原创 2018-04-18 23:33:54 · 172 阅读 · 0 评论 -
51nod 1428 活动安排问题 贪心(两种方法)
有若干个活动,第i个开始时间和结束时间是[Si,fi),同一个教室安排的活动之间不能交叠,求要安排所有活动,最少需要几个教室? Input第一行一个正整数n (n <= 10000)代表活动的个数。第二行到第(n + 1)行包含n个开始时间和结束时间。开始时间严格小于结束时间,并且时间都是非负整数,小于1000000000Output一行包含一个整数表示最少教室的个数。Input示例3...原创 2018-06-04 00:40:33 · 231 阅读 · 0 评论 -
第十一届河南ACM Gene mutation(模拟)
提交地址:点击打开链接Gene mutation is the sudden and inheritable mutation of genomic DNA molecules. From the molecular level, gene mutation refers to the change of the composition or sequence of base pairs in t...原创 2018-06-01 18:25:45 · 465 阅读 · 0 评论 -
第十一届ACM河南省赛 Attack City and Capture Territory(Nim博弈)
提交地址点击打开链接裸Nim博弈The Three Kingdoms period was a relatively famous period in the history of China. From the Battle of Chibi (AD 211) to the reunification of China in the Western Jin Dynasty(AD 280). Du...原创 2018-06-01 17:41:30 · 640 阅读 · 0 评论 -
第十一届河南ACM 计划日(签到题)
提交地址点击打开链接2105 : 计划日时间限制:3 Sec 内存限制:256 MiB提交:102 答案正确:26提交 状态 讨论区题目描述为什么花那么多时间、精力还是学不好学不通,如何把握各科目的重难点,期中和期末如何梳理本学期各知识点及内部联系……在孩子学习的过程中,我们该如何帮助孩子快速提高成绩呢?打造名校进阶计划,让孩子会学习、会考试,实现名校梦想! Dr. Kong, 作为一名从教多...原创 2018-06-01 17:25:19 · 542 阅读 · 0 评论 -
山东省第九届省赛 F 容斥
转自点击打开链接时间限制: 10 Sec 内存限制: 128 MB 题目描述 Given l1,r1,l2,r2,l3,r3,l4,r4, please count the number of four-tuples (x1,x2,x3,x4) such that li≤ xi≤ ri and x1≠x2,x2≠x3,x3≠x4,x4≠x1. The answer should modulo 10...转载 2018-06-07 14:37:41 · 121 阅读 · 0 评论 -
51nod 1649齐头并进 (最短路)
在一个叫奥斯汀的城市,有n个小镇(从1到n编号),这些小镇通过m条双向火车铁轨相连。当然某些小镇之间也有公路相连。为了保证每两个小镇之间的人可以方便的相互访问,市长就在那些没有铁轨直接相连的小镇之间建造了公路。在两个直接通过公路或者铁路相连的小镇之间移动,要花费一个小时的时间。现在有一辆火车和一辆汽车同时从小镇1出发。他们都要前往小镇n,但是他们中途不能同时停在同一个小镇(但是可以同时停在小镇n)...原创 2018-05-24 17:06:31 · 172 阅读 · 0 评论 -
hdu 1166 敌兵布阵(树状数组模板)
#include<bits/stdc++.h>using namespace std;int N,c[50005];int lowbit(int i){ return i&(-i);}void add(int i,int value){ while(i<=N){ c[i] += value; i += lowbit...原创 2018-05-15 22:19:31 · 73 阅读 · 0 评论 -
数列求值 矩阵快速幂
之前补题的时候边界少处理一个,wa一发,初始矩阵打错一个数,又wa一发ORZ#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=110;const int MOD=1e9+9;#define mod(x) ((x)%MOD)int n;struct mat{ ...原创 2018-05-13 11:21:16 · 134 阅读 · 0 评论 -
poj 3070 矩阵快速幂
模板题->调用模板-> 修改->编译错误->改头文件->AC(自己根据递推式构造出矩阵)体会到了模板的好处#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=110;const int MOD=1e4;#define mod(x) ((x)%...原创 2018-05-13 10:25:34 · 122 阅读 · 0 评论 -
牛客网 K序列 子序列
链接:https://www.nowcoder.com/acm/contest/91/L来源:牛客网题目描述给一个数组 a,长度为 n,若某个子序列中的和为 K 的倍数,那么这个序列被称为“K 序列”。现在要你 对数组 a 求出最长的子序列的长度,满足这个序列是 K 序列。 输入描述:第一行为两个整数 n, K, 以空格分隔,第二行为 n 个整数,表示 a[1] ∼ a[n],1 ≤ n ≤ 10...原创 2018-04-18 23:45:35 · 316 阅读 · 0 评论 -
牛客网多校第三场 E (KMP求最小循环节)
本来的思路是用字符串哈希做的,搞来搞去搞不动。。。题意理解的还有点偏差ORZ,最后换了KMP,找到了最小循环节就好做的多了,有的题真的是找对了方法难度立即降低不少。我的丑代码:#include<stdio.h>#include <string.h>using namespace std;int next[1000005];char p[1000005];...原创 2018-07-26 23:36:49 · 133 阅读 · 0 评论