由题意推得结论:p+q-gcd(p,q);
/*
* hdu 1722--Cake
* date 2014/7/15
* state AC
*/
#include
#include
using namespace std;
/*
int gcd(int x,int y)
{
while(x!=y)
{
if(x>y)x=x-y;
else y...
分类:
其他好文 时间:
2014-07-15 10:32:39
阅读次数:
184
我的主题是,有时候知道一些细节会让你写出更好的代码。...
分类:
编程语言 时间:
2014-07-15 10:26:52
阅读次数:
225
#!/bin/bash while[1]doa=$(ifconfigeth0|grep'RXpac'|awk'{print$2}'|awk-F:'{print$NF}')echo-ne"$a\r"#不换行刷新数据 doneecho参 数:-n 不要在最后自动换行 -e 若字符串中出现以下字符,则特....
分类:
其他好文 时间:
2014-07-15 09:43:48
阅读次数:
191
VS3013安装update 2以后,打开offie出现“please wait while windows configures microsoft visual studio professional 2013”提示,每次打开都会有。解决办法:在C:\Windows\Microsoft.NET\...
控制传递语句(Control Transfer Statements)
控制转移语句改变你代码的执行顺序,通过它你可以实现代码的跳转。Swift有四种控制转移语句。
continue
break
fallthrough
return
我们将会在下面讨论continue、break和fallthrough语句。return语句将会在函数章节讨论。
Continue
...
分类:
其他好文 时间:
2014-07-14 20:37:17
阅读次数:
340
10951071
2014-07-06 16:14:52
Time Limit Exceeded
1556
3000MS
584K
400 B
G++
长木
#include
#include
#define maxn 100000 + 2
int arr[maxn];
int main()
{
int n, a, b;
while(scanf("...
分类:
其他好文 时间:
2014-07-14 18:12:43
阅读次数:
264
当你循环输入的时候我们有几种方法
一:while(scanf("%d %d",&a,&b)!=EOF)//>0//==1
反正有很多种,但是今天早上我用两个代码提交发现了问题
相同的算法但是第一个超时
#include
#include
#define max 1000000+10
#include
using namespace std;
int a[max];
int cmp(int...
分类:
其他好文 时间:
2014-07-14 16:46:36
阅读次数:
201
[root@Server3Learn]#catuseradd-final.sh
#!/bin/bash
#
DEBUG=0
ADD=0
DEL=0
help(){
echo"Usage:$(basename$0)-v|--verbose|--adduser1,user2,...|--deluser1,user2,...|-h|--help"
}
while[$#-ne0]
do
case$1in
-h|--help)
help
exit0
;;
-v|--verbose)
DEBUG=1
shi..
分类:
其他好文 时间:
2014-07-14 16:25:52
阅读次数:
230
Finding the Centroid of a Room Boundary It's been a while since my last post and I'm sure most of you were like... "Where the hell is Don!".... it's o...
分类:
其他好文 时间:
2014-07-14 10:35:17
阅读次数:
247
CTreeCtrl运用删除无效资源递归的运用自写遍历目录函数递归遍历所有子目录一、删除无效资源 1、打开资源文件 2、找到无效链接删掉二、自写遍历目录函数 CFileFind findfile; int nfound=findfile.FindFile(dirpath); while(nfound)...
分类:
其他好文 时间:
2014-07-14 10:28:09
阅读次数:
205