码迷,mamicode.com
首页 >  
搜索关键字:for while    ( 28479个结果
字典序最小最小割
#include<bits/stdc++.h> #define N 300010 using namespace std; #define int long long int h[N],nxt[N],v[N],w[N],s,t,dep[N],ec,p[N],n,a[N],b[N],c[N],f[N] ...
分类:其他好文   时间:2021-02-17 14:04:51    阅读次数:0
多项式重工业基地
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:其他好文   时间:2021-02-17 14:03:19    阅读次数:0
python(二)内置类型
最重要的内置类型有数字、序列、映射、类、实例和异常。 真值检测 if和while都可以做真值检测,默认情况下,如果一个对象的__bool__()返回False或者__len__()返回0,那么该对象为假;否则都为真。 因此内置类型为假的情况有: 常量:None和False 任何值为0的数字类型:0, ...
分类:编程语言   时间:2021-02-17 14:02:30    阅读次数:0
[Bash] Create a Bash Script that Accepts Named Options with getopts
Getopts Let’s say you want to allow a user to pass a -v flag to turn on verbose logging in a script. Manually parsing out options passed to a script i ...
分类:其他好文   时间:2021-02-16 12:03:18    阅读次数:0
1010 一元多项式求导 (25 分)
如果求导之后没有任何非零项,需要输出0 0。 int main() { string line; getline(cin,line); stringstream ss(line); int a,b; bool first=true; while(ss>>a>>b) { a*=b; b--; if(b ...
分类:其他好文   时间:2021-02-16 11:53:11    阅读次数:0
Vue2.x Class & Style Bindings
Intoduciton: The way of using '' in html part confused me when I was learning Class&Style Bindings in Vue's official guide.(of course it's also becaus ...
分类:其他好文   时间:2021-02-15 12:40:17    阅读次数:0
剑指 Offer 57. 和为s的两个数字
题意 在一个有序数组里找两个和为s的数字 思路 1??有序,立刻联想到二分查找,我们可以依次遍历数组中的每个数字,然后二分查找另一个数字使得和可以为s。 2??双指针的写法 一开始分别放在最左和最右,对应为最小和最大的数字,记两个指针指向的元素的和为sum 如果sum > target,说明太大,则 ...
分类:其他好文   时间:2021-02-15 12:36:24    阅读次数:0
1069 The Black Hole of Numbers (20 分)
注意不满$4$位的话要补成$4$位。 string s; set<int> S; int main() { cin>>s; while(s.size()<4) s='0'+s; while(true) { sort(s.begin(),s.end(),greater<char>()); string ...
分类:其他好文   时间:2021-02-15 12:21:49    阅读次数:0
python3之流程控制
一、流程控制 Python支持两种基本流程控制结构 分支结构: 根据条件选择不同的代码块执行 循环结构: 根据循环条件重复代码块 if语句用于分支结构 for-in, while用于循环结构 break, continue用于循环控制 二 、分支结构 1 if条件判断 格式 基本格式 if cond ...
分类:编程语言   时间:2021-02-15 11:55:35    阅读次数:0
力扣228. 汇总区间
原题 1 class Solution: 2 def summaryRanges(self, nums: List[int]) -> List[str]: 3 left,right,lens,ans = 0,0,len(nums),[] 4 while left < lens: 5 right = ...
分类:其他好文   时间:2021-02-15 11:47:09    阅读次数:0
28479条   上一页 1 ... 31 32 33 34 35 ... 2848 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!