1025 "P1019 单词接龙" 往年的$noip$原题,纯搜索吧,没啥可讲的,直接暴力枚举,暴力判断就行 没有必要每次都存一个很大的字符串,只要存当前的字符串就行了 每个字符串可以用两次 不能包含关系。。。好像也没啥了吧 cpp include using namespace std; cons ...
分类:
其他好文 时间:
2019-10-25 18:47:49
阅读次数:
118
#include <bits/stdc++.h> using namespace std; /* 这道题的难点在于怎样加x或者y才能使的a转化为b,并且加的x和y的和最少 这道题竟然用了floyd,转换成求最短路 这才深刻地体会到,我根本不会算法 */ const int maxn=10; cons... ...
分类:
其他好文 时间:
2019-10-19 11:19:36
阅读次数:
74
开发中有时我们需要对小数进行取整,或者只保留 N 位小数进行显示。下面分别对这两种情况进行说明。这里假设我们有如下数字进行处理: var num = 5/3; console.log(num); var num = 5/3; console.log(num); var num = 5/3; cons ...
分类:
Web程序 时间:
2019-10-10 11:28:02
阅读次数:
186
let app = new Vue({ el:'#app', data:{ info:'message', num:100, result:true, arr:[1,2,3,4,5], dic:{ name:'kevin', age:18 } } }) </script> <script> cons ...
分类:
其他好文 时间:
2019-10-09 19:32:41
阅读次数:
111
1 #include<iostream> 2 #include<cmath> 3 #include<cstdio> 4 using namespace std; 5 struct Point{ 6 double x,y; 7 Point operator - (const Point& b)cons ...
分类:
其他好文 时间:
2019-10-04 13:35:59
阅读次数:
71
Redis发布消息模式 生产消费模型 Redis发布消息通常有两种模式: 1:队列模式(queuing) 2:发布-订阅模式(publish-subscribe) 任务队列:顾名思义,就是“传递消息的队列”。与任务队列进行交互的实体有两类,一类是生产者(producer),另一类则是消费者(cons ...
分类:
其他好文 时间:
2019-10-02 14:33:06
阅读次数:
81
结论 Map:存放键值对,区别于 Object,键可以是任何值。 Set:存放不重复的值 Map 存储键值对,读取时与插入顺序一致。 var map = new Map([[1, "1"], [3, "3"], [2, "2"]]); map.set("foo", "bar"); for (cons ...
分类:
编程语言 时间:
2019-09-27 01:24:19
阅读次数:
87
1. 根据上面描述,注入userServiceImpl这个Bean时失败,(失败的原因就是实现接口,而springboot的事务默认是使用jdk的动态代理,即基于接口))。在action层中注入的Bean是实现类,因此就会报错。 解决:将此注入Bean的方式改成了其接口 2. Action:Cons ...
分类:
编程语言 时间:
2019-09-23 14:56:10
阅读次数:
161
import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' import Vuex from 'vuex' Vue.use(Vuex) cons... ...
分类:
其他好文 时间:
2019-09-11 09:22:19
阅读次数:
94
Parentheses 题目描述 Dave loves strings consisting only of '(' and ')'. Especially, he is interested in balanced strings. Any balanced strings can be cons ...
分类:
其他好文 时间:
2019-09-03 21:56:48
阅读次数:
62