题目链接 题解 可以发现枚举两个在一组里的数会TLE,加之只有两个参数限制与数据范围,容易想到排序算法。 计算第$i$个人的分数和需要知道他在每一组里是$x$还是$y$,因此排序需要满足$a_i$前的数与$a_i$组合时为$x$更优,而$a_i$后的数与$a_i$组合时为$y$更优(反之亦可),也就 ...
分类:
其他好文 时间:
2021-01-12 11:02:49
阅读次数:
0
题目链接 题解 很普通的数位dp题呐,$state$表示$>0$的数位个数。 AC代码 #include<bits/stdc++.h> #define int long long using namespace std; int dp[20][5],a[20],cnt; int dfs(int po ...
分类:
其他好文 时间:
2021-01-12 11:02:11
阅读次数:
0
1 const 对象必须初始化 //error,const 对象必须初始化 //const int num1; 2 const修饰后值不能改变 const int num = 100; //error,const 对象一旦创建就不能再改变 //num = 1000; 默认情况下,const对象仅在该 ...
分类:
其他好文 时间:
2021-01-12 10:59:56
阅读次数:
0
1.创建自定义CKButton.js组件类 1 import React,{Component} from 'react'; 2 import { 3 View, 4 StyleSheet, 5 Button, 6 TouchableOpacity, 7 Text 8 } from 'react-n ...
分类:
其他好文 时间:
2021-01-12 10:48:48
阅读次数:
0
原题链接 考察:dfs或者bfs 暴力枚举即可,没有什么特别的技巧 dfs:找到了就标记一下,避免继续搜索(因为答案一定在long long里,所以超过18位就可以不用算了) bfs:用G++编译,找到当即退出.注意一定要让所有路径都有返回值否则报错 1 #include <cstdio> 2 #i ...
分类:
其他好文 时间:
2021-01-11 11:20:58
阅读次数:
0
position: <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA ...
分类:
Web程序 时间:
2021-01-08 11:15:12
阅读次数:
0
此博客链接:https://www.cnblogs.com/ping2yingshi/p/14238798.html 较大分组的位置 题目链接:https://leetcode-cn.com/problems/positions-of-large-groups/ 在一个由小写字母构成的字符串 s 中 ...
分类:
其他好文 时间:
2021-01-08 10:32:29
阅读次数:
0
利用纯css来完成它,主要用到的是动画以及伪类元素 最主要的代码其实就是一个伪类元素: content: attr(data-name); /* 写法二:content: "hello world 代码世界"; */ position: absolute; top: 0; left: 0; colo ...
分类:
Web程序 时间:
2021-01-07 12:38:09
阅读次数:
0
##先说结论 GreenDao的主键,如果要是用自增的话,必须将主键字段定义成简单类型的包装类型,即Integer、Long。 ##再探原因 GreenDao对数据表实体(这里假设为Student)生成StudentDao类时,该类会继承自AbstractDao并实现几个重要的虚方法,主要的CRUD ...
分类:
其他好文 时间:
2021-01-07 12:28:53
阅读次数:
0
package LeetCode_605 /** * 605. Can Place Flowers * https://leetcode.com/problems/can-place-flowers/ * You have a long flowerbed in which some of the ...
分类:
其他好文 时间:
2021-01-07 12:22:39
阅读次数:
0