在处理遥感影像时,总会遇到存储数据命名的问题,有效的使用IDL 字符串函数可以得到理想的效果。1.FILE_BASENAME():返回文件名 file = 'F:\data\myfile.img' title = file_basename(file,'.img') print,title >my....
分类:
其他好文 时间:
2014-11-27 14:11:41
阅读次数:
369
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2014-11-27 06:44:59
阅读次数:
215
#include void main(){ int i=0; int wan,qian,shi,ge; do{ printf("请输入一个5位数:"); scanf("%d",&i); wan=i/10000; qian=(i/1000)%10; shi=(i...
分类:
编程语言 时间:
2014-11-26 23:54:15
阅读次数:
250
file函数:file dirname name 返回文件所在目录file exists name 测试文件是否存在,存在返回1,否则返回0file extension name 返回文件扩展名file join path path 合并path形成一个新路径file mkdir name 创建目录...
分类:
其他好文 时间:
2014-11-26 23:51:26
阅读次数:
206
样例输入:Confuciiuss say:Madam,I'm Adam;样例输出:Madam,I'm Adam这个题我们首先要解决三个问题一个是大小写的问题一个是把符号忽略的问题 一个是输入字符串问题首先是输入字符串问题 我推荐使用fgets(buf,sizeof,stdin),这个输入关键字不会使...
分类:
其他好文 时间:
2014-11-26 22:12:06
阅读次数:
270
题意:
输入一个字符串,我们可以交换这个字符串中的相邻字符;问至少经过多少步交换可以得到一个回文串;如果无论怎么交换都得不到回文串,输出“Impossible”;
思路:
首先由回文串的定义和性质,可以得到两种不可能情况:1.当这个串长度为奇数时,如果出现次数为奇数次字母的数目不为1,则显然不可能。2.当这个串长度为偶数时,如果出现次数为奇数次字母的个数大于0,则不可能。
...
分类:
其他好文 时间:
2014-11-26 21:03:56
阅读次数:
143
这里,我介绍一下O(n)回文串处理的一种方法。Manacher算法.原文地址:http://zhuhongcheng.wordpress.com/2009/08/02/a-simple-linear-time-algorithm-for-finding-longest-palindrome-sub-...
分类:
其他好文 时间:
2014-11-26 18:38:27
阅读次数:
167
夏商两代陶器上的纹饰有别于仰韶文化陶器。夏代陶器盛行在器表加饰数周附加堆纹、划纹和弦纹,主要纹饰有篮纹、方格纹、绳纹、回文、圆圈纹等。商代早期的陶瓷饰品纹饰以绳纹为主,另有云雷纹、双钩纹、圆圈纹等,中后期的陶器纹饰有饕餮纹、夔纹、方格纹、人字纹、花瓣纹、云雷纹、涡漩纹、曲折纹、蝌蚪纹、凹线纹、弦纹等...
分类:
其他好文 时间:
2014-11-26 13:42:57
阅读次数:
197
??
Description
Long long ago, there lived two rabbits Tom and Jerry in the forest. On a sunny afternoon, they planned to play a game with some stones. There were n stones on the ground and the...
分类:
其他好文 时间:
2014-11-26 11:25:50
阅读次数:
194
如果你想输入的是一个int型的数字,但是输入了字符,你想要它提示,怎么实现?用 cin.fail()+cin.clear()+cin.sync()....
分类:
编程语言 时间:
2014-11-26 11:24:53
阅读次数:
181