09 2019 档案

摘要:参考 "一个博客" 的输入挂,先挂在此处,以备以后使用。 正确代码: java import java.io. ; import java.util. ; import java.math. ; public class Main{ public static void main(String[] 阅读全文
posted @ 2019-09-28 21:04 DIY-Z
摘要:判断题 1 1 F:将向量空间想象为一个首尾相接的圆环,并称这种向量为循环向量。存储在其中的队列称为循环队列(Circular Queue)。这种循环队列可以以单链表的方式来在实际编程应用中来实现。因此,循环队列是一个抽象的数据结构,而单向循环链表或循环数组是具体的实现方式,不是数据结构本身。 单选 阅读全文
posted @ 2019-09-27 08:07 DIY-Z 阅读(193) 评论(0) 推荐(0)
摘要:这个把题目给的代码也包含进去了,注意看,这个题使用的接口看一看,想想它给题目带来了什么好处。多看看题目给的代码,将整道题都搞懂。 阅读全文
posted @ 2019-09-23 17:28 DIY-Z
摘要:![](https://img2018.cnblogs.com/blog/1698539/201909/1698539-20190921172256424-1796294815.png) ```c #include #include #include #include using namespace std; const int maxn = 500; const int INF = 0x3f3f 阅读全文
posted @ 2019-09-21 17:24 DIY-Z 阅读(283) 评论(0) 推荐(0)
摘要:c include include include include include using namespace std; const int maxn = 1000000; char s[maxn]; int main() { // freopen("input.txt", "r", stdin 阅读全文
posted @ 2019-09-21 16:12 DIY-Z
摘要:题目分析 首先规定优先级,括号为最高优先级,乘号或除号为次优先级,加或减号为最低优先级,至于数字,碰到就直接输出即可。 既然是数字,就有小数,整数,正数,负数之分,还有关于二元运算符的输出,在括号内的二元运算符优先输出,优先级高的优先输出(当然括号不算啊) 根据题意,在输出时可分为以下几种情况。 ( 阅读全文
posted @ 2019-09-21 15:59 DIY-Z 阅读(583) 评论(0) 推荐(0)
摘要:题意:给出n个点的坐标,问取出其中任意点围成的区域的最小值! 很明显,找到一个合适的三角形即可。 c include include include include include include using namespace std; const int maxn = 100 + 10; con 阅读全文
posted @ 2019-09-20 09:22 DIY-Z 阅读(660) 评论(0) 推荐(0)
摘要:这道题很坑,注意在G++下提交,否则会WA,还有就是a或b中较大的那个数的范围。。 c include include include using namespace std; const int maxn = 1e6 + 10; int prime[maxn]; bool isprime[maxn 阅读全文
posted @ 2019-09-20 08:50 DIY-Z 阅读(105) 评论(0) 推荐(0)
摘要:```c #include #include #include using namespace std; const int maxn = 100000; int T, N, D; int x, y; int f[maxn]; void init() { for(int i = 0; i D) ans++; } } printf("%d\n",ans); } } ``` 阅读全文
posted @ 2019-09-20 08:45 DIY-Z 阅读(157) 评论(0) 推荐(0)
摘要:![](https://img2018.cnblogs.com/blog/1698539/201909/1698539-20190918170635447-1314955488.png) ![](https://img2018.cnblogs.com/blog/1698539/201909/1698539-20190918170645064-1215698036.png) ![](https:... 阅读全文
posted @ 2019-09-18 17:07 DIY-Z 阅读(131) 评论(0) 推荐(0)
摘要:```c #include #include #include #include #include using namespace std; priority_queue, greater > p; int N, a; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", st... 阅读全文
posted @ 2019-09-17 21:30 DIY-Z
摘要:也可以使用其他方法,不过这个还是比较快的(O(n)的时间复杂度) 阅读全文
posted @ 2019-09-12 16:51 DIY-Z
摘要:![](https://img2018.cnblogs.com/blog/1698539/201909/1698539-20190912163823762-326472736.png) ```c #include #include #include #include #include using namespace std; //这里看不明白的话可以看看c语言中typedef的用法:https:... 阅读全文
posted @ 2019-09-12 16:39 DIY-Z
摘要:题目分析 " 题目 " 讲的是给你一个串,里面是加法、乘法混合运算(个人赛中误看成是加减乘除混合运算),有两种算法,一种是乘法优先运算,另一种是依次从左向右运算(不管它是否乘在前还是加在前)。 个人赛中试着模拟了一下,TLE了,又尝试优化,还是TLE,T了四发,最终以崩溃结束。回去看了看别人代码,发 阅读全文
posted @ 2019-09-10 20:15 DIY-Z 阅读(134) 评论(0) 推荐(0)
摘要:题意分析 " 题目 " 讲的主要是给你一个01串,然后给你要变成的01串格式,问你要转换成这一格式最少需要移动的步数。 题目不难,但当时并没有AC,3个小时的个人赛1道没AC,归根到底是没有逼自己去想,又想的太多,还没敢去想,还是太菜,最后把自己整崩溃了,过后看完别人代码发现此题并不难,模拟即可,现 阅读全文
posted @ 2019-09-10 19:58 DIY-Z 阅读(202) 评论(0) 推荐(0)
摘要:题意分析 1.题目大致说的是让你输出符合这种条件(在所给的字符串中至少有一个不是它的子串)的字符串对应的label,若没有输出 1; 2.判断子串可以用string.h下的strstr(s1, s2)函数,若s2 是s1的子串则返回在s1中s2首字母对应的地址,若不是则返回NULL,想进一步了解st 阅读全文
posted @ 2019-09-05 23:15 DIY-Z 阅读(251) 评论(0) 推荐(0)
摘要:以下内容全部转载自 "AC_Gibson" 巴什博弈 A和B一块报数,每人每次报最少1个,最多报4个,看谁先报到30。这应该是最古老的关于巴什博奕的游戏了吧。 其实如果知道原理,这游戏一点运气成分都没有,只和先手后手有关,比如第一次报数,A报k个数,那么B报5 k个数,那么B报数之后问题就变为,A和 阅读全文
posted @ 2019-09-04 16:31 DIY-Z 阅读(384) 评论(0) 推荐(0)
摘要:"题目" 大意 :从a城市到b城市的路径中,尽可能让一路上的最大噪音最小。 题目思路 :设d [ i ] [ j ]表示 i 到 j 的最大噪音的最小值。 那么d [ i ] [ j ] = min( d[ i ] [ j ] ,max( d [ i ] [ k ] , d [ k ] [ j ]) 阅读全文
posted @ 2019-09-01 22:05 DIY-Z
摘要:用到的东西 1. Floyd算法(不考虑路径的长度,只关心两点之间是否有通路,可用于求有向图的传递闭包) 2. STL map中的count用法 3. 利用dfs输出同一个圈内的名字 题意 题目中给出 n 的人的名字,m组关系,表示前者给后者打电话 。如果两个人互相打过电话(直接或者间接),那么这两 阅读全文
posted @ 2019-09-01 22:00 DIY-Z
摘要:x号视为 √ 数据结构基本概念 1. 数据的()包括集合、线性结构、树形结构和图形结构四种基本类型。 (2分) [ ] 存储结构 [x] 逻辑结构 [ ] 基本运算 [ ] 算法描述 2. 下列关于数据的逻辑结构的叙述中,()是正确的。 (2分) [x] 数据的逻辑结构是数据元素间关系的描述 [ ] 阅读全文
posted @ 2019-09-01 15:29 DIY-Z