码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
Divide Two Integers -- LeetCode
Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 思路: 采用位运算。我们先将两个数都看作是正数。 我们将除数左移一位就是将它
分类:其他好文   时间:2016-01-30 13:27:53    阅读次数:136
重启Apache报错apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting的解决方法
启动apache提示 : apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could
分类:Web程序   时间:2016-01-30 13:17:15    阅读次数:150
codevs 2606 约数和问题
看到这道题我们首先考虑线性筛。然而???2*10^9直接跪掉。 考虑每个因子i对答案的贡献,为[n/i]*i。那么?分块处理即可。 #include<iostream>#include<cstdio>using namespace std;long long x,y;long long ans=0;
分类:其他好文   时间:2016-01-30 09:37:14    阅读次数:160
Jan 29 - Flatten Binary Tree To Linked List; DFS;
Using DFS to traverse the tree. 4 cases for each node in the tree: case 1: it's a leaf node, set a pointer pointing to the node. We're reaching an end
分类:其他好文   时间:2016-01-30 09:37:00    阅读次数:204
USACO Frame Up 矩阵覆盖 拓扑排序
矩阵覆盖的题, 可以转化为拓扑排序。写这个拓扑排序废了好大的劲以后好好看看。代码如下: /* ID: m1500293 LANG: C++ PROG: frameup */ #include <cstdio> #include <algorithm> #include <cstring> using
分类:编程语言   时间:2016-01-30 02:40:48    阅读次数:145
CHAR数组转成STRING:C++
有些时候,键入了CHAR数组却不会知道到底有多长,是不是很差评呢?但是,转成STRING就可以啦QWQ 1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 #include <algorithm> 5 using namesp
分类:编程语言   时间:2016-01-30 02:38:14    阅读次数:165
UVA11401-Triangle Counting-递推
给出一个数字n,计算从1到n能组成几个不同的三角形。 n的范围是10^6,大概就是递推吧。从F[i-1]到F[i]可以线性求出。要注意结果超出int。 #include <cstdio> #include <cstring> #include <algorithm> using namespace
分类:其他好文   时间:2016-01-30 02:29:40    阅读次数:156
BZOJ 2301 problem b
容斥+莫比乌斯反演+分块大法。 #include<iostream>#include<cstdio>#include<cstring>#include<cmath>using namespace std;long long miu[50005];long long a,b,c,d,k,t;long
分类:其他好文   时间:2016-01-30 02:23:17    阅读次数:127
各种获取信息
商品信息 using Ivony.Html.Parser; using Ivony.Html; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using System; using System.Collections.Generic;
分类:其他好文   时间:2016-01-30 02:07:02    阅读次数:237
PAT-B 1015. 德才论(同PAT 1062. Talent and Virtue)
1. 在排序的过程中,注意边界的处理(小于、小于等于) 2. 对于B-level,这题是比較麻烦一些了。 源代码: #include <cstdio> #include <vector> #include <algorithm> using namespace std; struct People
分类:其他好文   时间:2016-01-30 01:59:01    阅读次数:156
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!