#include
void fun(long s,long *t)
{
int d;
long s1=1;
*t=0;
while(s>0)
{
d=s%10;
if(d%2!=0)
{
*t=d*s1+*t;s1*=10;
}
s/=10;
}
}
void main()
{
long s,t;
printf("\nPlease enter s:");
...
分类:
其他好文 时间:
2014-07-22 00:08:33
阅读次数:
189
//$str 待截取的字符串//$len 截取的字符个数//$chars 已经截取的字符数//$res 保存的字符串//$chars 保存已经截取的字符串个数//$offset 截取的偏移量//$length 字符串的字节数//若$len>$str的字符个数,造成无谓的while循环,($off.....
分类:
其他好文 时间:
2014-07-22 00:00:36
阅读次数:
220
Help Me with the Game
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3344
Accepted: 2145
Description
Your task is to read a picture of a chessboard positi...
分类:
其他好文 时间:
2014-07-21 23:38:44
阅读次数:
265
挺水的一道题,规律性很强,在数组中找出最大的数max,用max/m计算出倍数t,然后再把数组中的书都减去t*m,之后就把数组从后遍历找出第一个大于零的就行了
#include
#include
using namespace std;
int main(){
// freopen("in.txt","r",stdin);
int a[105],n,m;
while(~sca...
分类:
其他好文 时间:
2014-07-21 23:29:23
阅读次数:
312
#include
void fun(char *p,char *b)
{
int i,k=0;
while(*p)
{
i=1;
while(i<=3 && *p)
{
b[k]=*p;
k++;p++;i++;
}
if(*p)
{
b[k++]=' ';
}
}
b[k]='\0';
}
void main()
{
char a[80],b...
分类:
其他好文 时间:
2014-07-21 23:29:22
阅读次数:
235
网络上总结的方法汇总:
1: public byte[] intToByte(int i) {
byte[] abyte0 = new byte[4];
abyte0[0] = (byte) (0xff & i);
abyte0[1] = (byte) ((0xff00 & i) >> 8);
aby...
分类:
其他好文 时间:
2014-07-21 23:29:20
阅读次数:
367
直接套KMP模板
#include
#include
#include
using namespace std;
int s[1000005],w[10005],next[10005];
int b,c;
void show()
{
int i,j;
i=0;
next[0]=-1;
j=-1;
while(i<c)
{
if(j=...
分类:
其他好文 时间:
2014-07-21 23:29:03
阅读次数:
334
[oracle@jp ogg]$ ./ggsci
./ggsci: error while loading shared libraries: /u01/app/oracle/ogg/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
关闭selinux,首先修改参数
[root@jp ...
分类:
数据库 时间:
2014-07-21 23:27:50
阅读次数:
294
Description
The cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which h...
分类:
其他好文 时间:
2014-07-21 22:32:18
阅读次数:
278
1、打开外部程序1.1os.system—>发送命令,让系统执行,没有返回值os.popen—>可执行系统命令,可以获取标准输出lll=os.popen(‘ls’)lll.read()os.popen2—>元组方式返回标准输入和标准输出stdin,stdou=os.popen2(‘sort’)s=‘’’ecdbe’’stdin.write(s)stdin.clo..
分类:
编程语言 时间:
2014-07-21 19:27:02
阅读次数:
322