给原排列 求 其前面有多少个数比他大,
给每个数1...2..n前面有多少个数比他大,求原序列
第一个直接统计
第二个从1开始找出第inv【i】+1个空位置放进去就好
printf里的format 原来可以用if表达式 - -
#include
using namespace std;
int n;
void Gao()
{
int a[100],b[100]={0};
...
分类:
其他好文 时间:
2014-08-07 19:09:50
阅读次数:
171
Java字符串的格式化与输出
在C语言中格式化输出可以通过printf()函数实现,在Java中无需借助第三方工具同样可以实现此功能,自Java SE5后,java也提供了C语言中printf()风格的格式化输出方法。目前,有三种方法实现格式化输出,参考如下:
一、格式化输出的三种方法
1.System.out.format()
Java SE5引入的format方法可以用于PrintSt...
分类:
编程语言 时间:
2014-08-07 19:05:20
阅读次数:
269
在Hadoop的HDFS部署好了之后并不能马上使用,而是先要对配置的文件系统进行格式化。在这里要注意两个概念,一个是文件系统,此时的文件系统在物理上还不存在,或许是网络磁盘来描述会更加合适;二就是格式化,此处的格式化并不是指传统意义上的本地磁盘格式化,而是一些清除与准备工作。本文接下来将主要讨论Na...
分类:
其他好文 时间:
2014-08-07 18:30:50
阅读次数:
264
Distance QueriesTime Limit: 2000msMemory Limit: 30000KBThis problem will be judged onPKU. Original ID:198664-bit integer IO format:%lld Java class nam...
分类:
其他好文 时间:
2014-08-07 18:28:00
阅读次数:
215
Easy Problem from Rujia Liu?
Time Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Description
Easy Problem from Rujia Liu?
Though Rujia Liu usually sets...
分类:
其他好文 时间:
2014-08-07 15:54:00
阅读次数:
259
青蛙的约会Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit Status输出Description两只青蛙在网上相识了,....
分类:
其他好文 时间:
2014-08-07 12:42:59
阅读次数:
226
Ekka Dokka
Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu
Submit
Status
Description
Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's ...
分类:
其他好文 时间:
2014-08-07 09:52:29
阅读次数:
249
题目:Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You ....
分类:
编程语言 时间:
2014-08-07 07:14:10
阅读次数:
257
两种方式,一个是在数据库查询的时候就截取,另一个就是在使用的时候截取。1.数据库select date_format(日期字段,’%Y-%m-%d’) as ‘日期’ from test2.java程序SimpleDateFormat dateFm = new SimpleDateFormat("y...
分类:
数据库 时间:
2014-08-07 02:57:08
阅读次数:
216
G -Self Numbers(2.2.1)Time Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIn 1949 the Indian mathematician D.R. K...
分类:
其他好文 时间:
2014-08-07 00:27:37
阅读次数:
249