这场比赛的题都偏水,比赛的时候切了 A ~ E A Matrix Game 刚开始看错题了,以为是不能相邻,然后就不会了. 又读了一遍题,发现不能同行或同列,那就判断一下奇偶性就行了. code: #include <bits/stdc++.h> #define ll long long #defi ...
分类:
其他好文 时间:
2020-06-09 16:36:17
阅读次数:
59
A:迷宫问题 总时间限制: 1000ms 内存限制: 65536kB描述 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷 ...
分类:
其他好文 时间:
2020-06-09 16:22:16
阅读次数:
62
ActiveMQ作为消息队列Queue以及Topic主题订阅模式的Broker,在我们使用Windows开发环境时,需要如下配置 1 下载Jdk 略 此处作为开发人员jdk环境是比不可好的,所以jdk配置不再赘述,运行ActiveMQ是需要jdk支持的 2 下载ActiveMQ,地址如下: http ...
如下代码内容是关于C++霍夫曼编码(Huffman Coding)的代码。 #include<iostream> #include<string> #include<queue> using namespace std; class node{ public: content=con; weight ...
分类:
编程语言 时间:
2020-06-09 12:58:15
阅读次数:
88
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bil ...
分类:
其他好文 时间:
2020-06-09 09:22:23
阅读次数:
54
刚开始觉得 24 题都是板子,不屑于写题解,结果第 6 道就教我做人了……orz 按照惯例,“机器人路径规划问题”是假题,不写。 另外,网络流 24 题的全称是“网络流与线性规划 24 题”,所以里面有些题不需要网络流也可以解决,怎么简单怎么来。 约定:用有序对 \((cap,cost)\) 表示这 ...
分类:
其他好文 时间:
2020-06-08 19:11:58
阅读次数:
58
Headers <algorithm> <vector> <array> <list> <stack> <queue> <set> <map> <unordered_set> <unordered_map> <string> <iterator> <utility> <tuple> <numeric ...
分类:
编程语言 时间:
2020-06-07 21:34:14
阅读次数:
88
1 package com.atguigu.queue; 2 3 import java.util.Scanner; 4 5 public class CircleArrayQueueDemo { 6 7 public static void main(String[] args) { 8 9 // ...
分类:
编程语言 时间:
2020-06-07 19:40:31
阅读次数:
72
一般工厂模式用的比较广,在Java中尤为常见,因为相对比较简单,所以使用场景比较广泛; 例如在Springboot在整合RabbitMQ,创建EXCHANGE的代码,QUEUE的代码等都能看到。 1.一般工厂模式 1.1 基本概念 定义一个创建对象的接口,让子类决定实例化哪个类。工厂类的方法,使一个 ...
分类:
其他好文 时间:
2020-06-07 19:19:48
阅读次数:
59