3626. 三元一次方程 签到。 暴力思路是三重枚举,可优化至两重枚举。 int n; int main() { int T; cin>>T; while(T--) { cin>>n; bool ok=false; for(int i=0;3*i<=n && !ok;i++) for(int j=0 ...
分类:
其他好文 时间:
2021-06-06 19:26:45
阅读次数:
0
这么简洁的题目当然不用数位 DP 啦。 将 \(n\) 搞成 \(10\) 的幂次之和计算。枚举后缀长度 \(i\),考虑它的贡献,因为不能填 \(7\) 也不用考虑前导零所以就是 \(9^i\)。 然后乘上 \(n-i\) 位置上的数字能取到的数量即可。 code: #include<bits/s ...
分类:
其他好文 时间:
2021-06-06 19:26:26
阅读次数:
0
def resum(request): usuari=Usuari.objects.order_by('usuari_id').values_list('usuari_id', flat=True) print(usuari) <QuerySet [1, 2, 3, 4, 5, 6, 50, 51] ...
分类:
其他好文 时间:
2021-06-06 19:24:17
阅读次数:
0
import configparser<!--more-->cf = configparser.ConfigParser()cf.read("config.ini", encoding='UTF-8')username=cf.get("user","username") auto=cf.get("a ...
分类:
编程语言 时间:
2021-06-06 19:16:51
阅读次数:
0
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 2 typedef struct student { int id; /* 学生学号 */ char name[20]; /* 学生姓名 */ char subject ...
分类:
其他好文 时间:
2021-06-06 19:16:23
阅读次数:
0
启动 % brew services start php@5.6 ==> Successfully started `php@5.6` (label: homebrew.mxcl.php@5.6) jiqing@jiqingdeMacBook-Pro nginx % ps -ef | grep ph ...
分类:
Web程序 时间:
2021-06-06 19:15:28
阅读次数:
0
HDFS客户端环境准备 1.根据拷贝编译后的hadoop jar包到非中文路径 2.配置HADOOP_HOME环境变量 3. 配置Path环境变量 4.创建一个Maven工程HdfsClientDemo 5.导入相应的依赖坐标+日志添加 <dependencies> <dependency> <gr ...
分类:
其他好文 时间:
2021-06-06 19:12:37
阅读次数:
0
<!doctype html> <html> <head> <meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'> <title>系统结构复习</title> </head> ...
分类:
其他好文 时间:
2021-06-06 19:11:48
阅读次数:
0
原本代码如下: Vertex<L> v = (Vertex<L>) obj; if(!v.getMyName().equals(this.vertexName)) return false; 会有警告。修改后在强制类型转换部分加入通配符’?’延迟类型决定,最后是 var v = (Vertex<?> ...
分类:
其他好文 时间:
2021-06-06 19:10:59
阅读次数:
0
shutdown和close都可以用来关闭TCP连接, 那么它们有区别与联系呢? 下面来研究下这个问题: 1. close 关闭连接和套接字. 成功返回0; 失败为-1, errno被设置 #include <unistd.h> int close(int fd); close会把描述符(sockf ...
分类:
系统相关 时间:
2021-06-06 19:09:08
阅读次数:
0