Selenium Java环境配置
前提 安装好java环境 有idea 创建项目 1. 选择 gradle groovy 2.首先关闭gradle wrapper的下载(网速好可以直接下载) 配置 gradle 环境 i. 如果下载gradle wrapper超时,可以修改为国内镜像 123456distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/dists# 国内镜像,加快下载distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.4-bin.zipzipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists ii. build.gradle 文件替换成如下内容 123456789101112131415161718192021222324252627282930313233343536373839plugins { id 'java'}group...
P5318 查找文献
【深基18.例3】查找文献 题目描述 小 K 喜欢翻看洛谷博客获取知识。每篇文章可能会有若干个(也有可能没有)参考文献的链接指向别的博客文章。小 K 求知欲旺盛,如果他看了某篇文章,那么他一定会去看这篇文章的参考文献(如果他之前已经看过这篇参考文献的话就不用再看它了)。 假设洛谷博客里面一共有 $n(n\le10^5)$ 篇文章(编号为 1 到 $n$)以及 $m(m\le10^6)$ 条参考文献引用关系。目前小 K 已经打开了编号为 1 的一篇文章,请帮助小 K 设计一种方法,使小 K 可以不重复、不遗漏的看完所有他能看到的文章。 这边是已经整理好的参考文献关系图,其中,文献 X → Y 表示文章 X 有参考文献 Y。不保证编号为 1 的文章没有被其他文章引用。 请对这个图分别进行 DFS 和 BFS,并输出遍历结果。如果有很多篇文章可以参阅,请先看编号较小的那篇(因此你可能需要先排序)。 输入格式 共 $m+1$ 行,第 1 行为 2 个数,$n$ 和 $m$,分别表示一共有 $n(n\le10^5)$ 篇文章(编号为 1 到 $n$)以及$m(m\le10^6)$...
Selenium Python环境配置
前提 安装好基本的环境 pycharm安装 chrome浏览器下载 下载驱动 国内驱动镜像下载 https://registry.npmmirror.com/binary.html?path=chromedriver/ 如果无法连接,就从这个网址下载驱动 https://getwebdriver.com/ 安装驱动 i. 这边以 getwebdriver.com 为例子 ii. 上图中显示123为最新(为了方便这边建议你直接升级到最新的chrome浏览器的版本),点击Stable版本 iii. 按照系统架构下载(一般下载x64) iv. 下载完成后把压缩包中的chromedriver.exe放入chrome文件夹中 配置驱动 将chromedriver.exe所在位置添加至Path中 添加我这边是(C:\Program Files\Google\Chrome\Application) 大功告成 配置pycharm环境 打开设置 找到python interpreter,点击右侧的 +...
GXCPC2023 LowBit
One day Colin learned how to represent a number in binary form. For example, the binary form of $(11){10}$ is $(1011){2}$ , and he was very excited! Further, Eva taught Colin a well-known binary function $lowbit(x)$ which represents the value of the bit corresponding to the lowest $ 1 $ of $ x $ in binary form. For example, $lowbit(11)=1$, $lowbit(4) = 4$ Colin thought this function was amazing, so he thought of an interesting problem, and then it comes: Given a binary form of a number...