题目链接 https://cn.vjudge.net/problem/UVA-571 分析 刚做了道倒水问题的题想看看能不能水二倍经验,结果发现了这道题 题意翻译:https://www.cnblogs.com/devymex/archive/2010/08/04/1792288.html 设A容量\(x\),B容量\(y\) 我们把将水倒入A视为\(+x\),将倒空B视为\(-y\),若A满,就倒入B视为\(-x\) 由于\(a,b\)是互质的,根据裴蜀定理一定有\(x,y\)保证有\(ax+…
[JZOJ5281]钦点题解--瞎搞+链表 题目链接 于 暴 力 过…
Problem H. Horrible Truth Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100610 Description In a Famous TV Show “Find Out” there are n characters and only one Horrible Truth. To make the series breathtaking all way long, the sc…
链接:https://www.nowcoder.com/acm/contest/104/B来源:牛客网 题意:A few days ago, WRD was playing a small game called Salty Fish Go. We can simplify the rules of the game as follows. 给你v,l,n,m代表有v个速度,下一行分别给出v个速度,l长的路,n个随机地点随机改变速度的加油站,m个随机地点宝藏.问拿到所有宝藏的时间期望. 题解:瞎…
B. Cards 题目连接: http://www.codeforces.com/contest/626/problem/B Description Catherine has a deck of n cards, each of which is either red, green, or blue. As long as there are at least two cards left, she can do one of two actions: take any two (not ne…
安装ubuntu系统后有很多东西需要自己瞎搞一下,这里把一些瞎搞的过程记录在这里,方便以后重新装系统后重新配置. 一.安装. 可以在windows下制作启动盘(软碟通),然后开机u盘启动即可安装,预留出50G大小的硬盘差不多了. 安装过程中预留4G的交换空间,剩余的直接挂在到:/ 下即可: 其它的东西基本上不需要动了. 下面是基础的软件安装: 二.vim 安装命令: sudo apt-get install vim vim的基础配置:vim ~/.vimrc "=================…
Pairs Forming LCM (LightOJ - 1236)[简单数论][质因数分解][算术基本定理](未完成) 标签: 入门讲座题解 数论 题目描述 Find the result of the following code: long long pairsFormLCM( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ) for( int j = i; j <= n; j++ ) if( lcm(i, j) ==…
Help Hanzo (LightOJ - 1197) [简单数论][筛区间质数] 标签: 入门讲座题解 数论 题目描述 Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he had a little problem with Hanzo Hattori, the best ninja and the love of Nakurur…
Aladdin and the Flying Carpet (LightOJ - 1341)[简单数论][算术基本定理][分解质因数](未完成) 标签:入门讲座题解 数论 题目描述 It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first myste…
Sigma Function (LightOJ - 1336)[简单数论][算术基本定理][思维] 标签: 入门讲座题解 数论 题目描述 Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a number. For exam…