摘要: import os import sys import codecs import string def batch_rename(cfgname): # 获得目录下的所有文件 src_list = os.listdir("D:/picsample/picsample") print(src_lis 阅读全文
posted @ 2020-12-19 18:08 acwarming 阅读(157) 评论(0) 推荐(0) 编辑
摘要: (一)As is symbolically shown in the caricature,1.一图一主两动 sb 形容词 as well as 形容词,doing sth(次要动作),is doing sth(主要动作)2.一图两主两动 sb1 is doing sth1,on the contr 阅读全文
posted @ 2020-12-12 13:21 acwarming 阅读(6) 评论(0) 推荐(0) 编辑
摘要: proper 正确 合适 vertex(vertices)顶点 respectively 个别 分别 indices 指标 索引 shipping 运输 incompatible 不相容 oxidizing 氧化 flammable liquid 易燃液体 combinatorial 组合的 opt 阅读全文
posted @ 2020-11-29 21:29 acwarming 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 并查集就是给你一个图,里面有很多点,并就是把点合并一个集合,把a点搞为b点父亲;查就是查点在哪个集合,查a点的父亲祖先是谁。 初始化点的父亲是自己 int Find(int x){ if(father[x] != x)//如果父亲不是自己,那就递归找父亲 father[x] = Find(fathe 阅读全文
posted @ 2020-11-19 12:49 acwarming 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1000; ll n, m, k, q, p;double sum, sum1, sum0; string s, r; int a[ 阅读全文
posted @ 2020-11-19 12:46 acwarming 阅读(161) 评论(0) 推荐(0) 编辑
摘要: bfs像二叉树的层序遍历 像这个图走bfs就{1, 2, 3, 4, 5, 6, 7, 8}这样走; dfs就{1, 2, 5, 6, 3, 7, 8, 4}。 bfs与queue相结合,走到哪就把哪加进queue,出时把最先进的那个点弹出,同时把弹出这个点有关连的点加入queue。 例:Luogu 阅读全文
posted @ 2020-11-19 12:43 acwarming 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Bellman Ford不常用下面有它的优化SPFA for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { d[v[i]] = min(d[v[i]], d[u[i]] + w[i]); } } Dijkstra d[s] = 0;/ 阅读全文
posted @ 2020-11-19 12:42 acwarming 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 当老师叫我们帮他做事,比如文件内内容再分类,我们就可以建个面板,里面有各要导入文件按钮,先把分类内容copy下,再点按钮导入进txt文件就行啦。 以下为java代码,使用了tableLayout布局 package classification; import java.awt.*; import 阅读全文
posted @ 2020-11-19 12:39 acwarming 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 预备知识:懒惰标志,就是在二叉树里,a有b c两个子儿子,现在要给b c各加1,先不直接加到b c上,把它俩要加的值先加到a上,待要实际用时a再把值传给他们。 线段树是算法竞赛中常用的用来维护 区间信息 的数据结构。 线段树可以在 O(log n) 的时间复杂度内实现单点修改、区间修改、区间查询(区 阅读全文
posted @ 2020-11-19 12:35 acwarming 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1.查看系统、内核cat /etc/redhat-releaseuname -r 2.查看CPUgrep “CPU” /proc/cpuinfo 3.运行时间uptime 4.查看系统位数getconf LONG_BIT 5.查看硬盘和分区df -h 6.软件安装与卸载yum update #更新系 阅读全文
posted @ 2020-11-19 12:33 acwarming 阅读(83) 评论(0) 推荐(0) 编辑