码迷,mamicode.com
首页 >  
搜索关键字:norm l1    ( 1702个结果
Python——内置函数(2)
1、map 遍历序列,对序列中的每个元素进行操作,最终获取新的序列li = [11,22,33]l1=[1,2]l2=[1,2]l3=[1,2]def func(arg): return arg + 10 new_li = map(func,li)print new_linew_li = []for... ...
分类:编程语言   时间:2017-08-13 00:01:40    阅读次数:105
lintcode 99重排链表
描述 给定一个单链表L: L0→L1→…→Ln-1→Ln, 重新排列后为:L0→Ln→L1→Ln-1→L2→Ln-2→… 必须在不改变节点值的情况下进行原地操作。 样例 思路 先将链表整体一分为二,然后将后半段链表逆序,再依次插入前半段节点中。 ...
分类:其他好文   时间:2017-08-12 01:06:34    阅读次数:180
L1-047. 装睡
#include <iostream>#include <string.h>#include <vector>using namespace std; int main(){ vector<string> c; int n; cin >> n; int a, b; for(int i=0; i<n; ...
分类:其他好文   时间:2017-08-10 21:09:19    阅读次数:412
L1-042. 日期格式化
#include using namespace std; int main() { char date[11]; cin >> date; for(int i=6; i<10; i++) cout << date[i]; cout << date[5]; for(int i=0; i<5; i++... ...
分类:其他好文   时间:2017-08-10 10:05:26    阅读次数:141
L1-041. 寻找250
#include<bits/stdc++.h>using namespace std;int main(){ int erBaiwu; int i=0; while(scanf("%d", &erBaiwu)) { i++; if(erBaiwu==250) break; } cout << i; ...
分类:其他好文   时间:2017-08-09 22:11:04    阅读次数:361
L1-039. 古风排版
cin.getline(a, 3)只会向数组a中读进2个字符; #include <iostream>#include <stdio.h>#include <stdlib.h>#include <string.h> using namespace std; int main(){ int n; ch ...
分类:其他好文   时间:2017-08-09 21:18:30    阅读次数:132
L1-034. 点赞
ac代码: #include <iostream>#include <string.h>using namespace std; int main(){ int n; cin >> n; int m, a[1001], propertyTag; memset(a, 0, sizeof(a)); fo ...
分类:其他好文   时间:2017-08-09 13:04:25    阅读次数:142
L1-031. 到底是不是太胖了
#include <iostream>#include <math.h>using namespace std; int isTooFat(float &a, float &b){ a = (a - 100) * 0.9 * 2; //calculate the standard weight, u ...
分类:其他好文   时间:2017-08-08 19:59:09    阅读次数:114
linux云自动化系统运维19(磁盘阵列raid,lvm管理)
软件能做的raid1.读取速度加倍,两块磁盘一起读取raid0.写两块硬盘,一块写一半raid5:raid1+raid0三块磁盘mdadm-C/dev/md0-ayes-l1-n2-x1/dev/vdb{1..3}-C;创建-a:添加-l:优先级-n:使用的磁盘个数-x:闲置磁盘个数(备用)mkfs.xfs/dev/md0格式化mount/dev/md0/mnt/挂载到..
分类:系统相关   时间:2017-08-06 19:23:10    阅读次数:253
四川oi 萌萌哒 (分层并查集)
萌萌哒 题目描述 一个长度为 n 的大数,用 S1S2S3...Sn表示,其中 Si表示数的第 i 位, S1是数的最高位,告诉你一些限制条件,每个条件表示为四个数,l1, r1, l2, r2,即两个长度相同的区间,表示子串 Sl1Sl1+1Sl1+2...Sr1与 Sl2Sl2+1Sl2+2.. ...
分类:其他好文   时间:2017-08-06 12:46:24    阅读次数:196
1702条   上一页 1 ... 84 85 86 87 88 ... 171 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!