E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
1541
HDU
1541
Stars
pid=
1541
画星星,注意要把所有点向右平移一位,否则update会死循环(在(0,0)) ps:数组一定要开够啊啊啊 View Code #include <stdio.h&
·
2015-11-13 00:07
tar
【HDU
1541
】 树状数组(入门题)
pid=
1541
题目大意: 开始输入一个n(表示有n颗星星)。接下来n行,每行输入一个x,y,代表星星的坐标,注意y是递增输入。
·
2015-11-12 23:08
树状数组
HRBUST
1541
集合划分【01背包】
Description 对于从1到N (1 <= N <= 39) 的连续整数集合,能划分成两个子集合,且保证每个集合的数字和是相等的。举个例子,如果N=3,对于{1,2,3}能划分成两个子集合,每个子集合的所有数字和是相等的: {3} 和 {1,2} 这是唯一一种分法(交换集合位置被认为是同一种划分方案,因此不会增加划分方案总数) 如果N=7,有四种方法能划分
·
2015-11-12 15:26
集合
hdu
1541
Stars(树状数组)
pid=
1541
题被划在线段树里 刚开始想着是求区间k值 写着写着觉得错了 看着像求逆序数 写了个树状数组 怎么都过不了 无奈。。
·
2015-11-12 14:43
树状数组
HDUOJ-----
1541
Stars
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3680 Accepted Submission(s): 1449 Pr
·
2015-11-12 12:29
tar
HDU
1541
Stars (树状数组)
题意:直角坐标系上有n个点 每个点的值为它左下的点的数量 求0。。。n-1每个数值出现的次数 思路:题目中已经给出y递增 x在y相同时递增 从而可以一边输入一边利用树状数组将结果求出
·
2015-11-12 10:22
树状数组
hdu
1541
简单题
简单题,直接贴代码 /* * hdu
1541
/win.cpp * Created on: 2011-11-14 * Author : ben */#include <cstdio>
·
2015-11-12 09:00
HDU
hdu
1541
/poj 2352:Stars(树状数组,经典题)
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4052 Accepted Submission(s): 1592 Problem Des
·
2015-11-11 17:35
树状数组
csu
1541
: There is No Alternative(Kruskal 最小生成树)
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int MAXN=1000000+5; struct road { int f,t; int w; }; road vi
·
2015-11-11 16:43
native
CSU
1541
There is No Alternative (最小生成树判相同边)
1541
: There is No Alternative Time Limit: 3 Sec Memory Limit: 256 MB Submit: 
·
2015-11-11 13:22
native
HDU
1541
Stars (线段树||树状数组)
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4897 Accepted Submission(s): 1934 Problem Des
·
2015-11-11 13:58
树状数组
HDOJ
1541
HDU
1541
Stars ACM
1541
IN HDU
pid=
1541
题目描述: Stars Time Limit: 2000/1000 MS
·
2015-11-11 07:42
ACM
hdu
1541
Stars poj 1195 Mobile phones(二维) poj 2155 Matrix(二维) hdu 3584 Cube(三维) 树状数组
/* * hdu
1541
.c * * Created on: 2011-9-7 * Author: bjfuwangzhu */#include<stdio.h>
·
2015-11-11 06:26
mobile
九度OJ
1541
二叉树【数据结构】
pid=
1541
题目描述: 旋转是二叉树的基本操作,我们可以对任意一个存在父亲节点的子节点进行旋转,包括如下几种形式(设被旋转节点为x,其父亲节点为p): 1.
·
2015-11-08 13:18
数据结构
九度oj
1541
二叉树
pid=
1541
简答题如下: 1 #include<algorithm> 2 #include<iostream> 3 #include<cstring
·
2015-11-07 15:15
二叉树
hdu
1541
Stars
pid=
1541
Stars Description Astronomers often examine star maps where stars are represented by points
·
2015-11-07 10:10
tar
hdu
1541
Stars
Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and
·
2015-11-03 22:56
tar
HDU
1541
star (树状数组)
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5400 Accepted Submission(s): 2133 Problem Des
·
2015-11-03 21:39
树状数组
用dblink链接oracle
apps using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.205.100)(PORT =
1541
·
2015-11-02 10:35
oracle
HDU
1541
树状数组
pid=
1541
StarsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total
·
2015-11-01 14:28
树状数组
hdu
1541
Stars(树状数组)
pid=
1541
开始知道是用树状数组做,但想了好半天不知道怎么用,总觉得要先排序才能做。但是排序的话复杂度就上去了啊。
·
2015-10-31 15:11
树状数组
hdoj
1541
Problem :
1541
( Stars ) Judge Status : Accepted RunId : 2816947 &
·
2015-10-31 11:47
OJ
树状数组Hdu
1541
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> #include <stack> #include <queue> #include <vector>
·
2015-10-31 10:37
树状数组
BNUOJ
1541
Air Raid
Air Raid Time Limit: 1000ms Memory Limit: 10000KB This problem will be judged on PKU. Original ID: 1422 64-bit integer IO format: %lld Java class na
·
2015-10-31 08:26
raid
HDU_
1541
_Stars
首先,我们可以把树状数组的横坐标x看作c[i]数组的下标i,由于y是递增的,所以如果有两个数的横坐标相同,则... #include<iostream> #include<string.h> #define MARK 32005 int c[MARK],lev[MARK]; int sum(int x) //计算最大下标为x的前缀和 { int re
·
2015-10-30 13:49
tar
hdu
1541
pid=
1541
题意:给定一些点,求在这点左下方的点的个数; 思路:此题可以用二维树状数组做,但仔细看题,可以得到给出的y是从小到大的,这样,只需对x进行操作,进而转换为在x左边的点有多少个 代码
·
2015-10-30 13:26
HDU
HDU_
1541
Stars(树状数组)
poj上1A, HDU上6A,我晕啊!注意几点: 1、多组数据; 2、memset(c, 0, siezeof(c)); 3、memset(ans, 0, sizeof(ans)); my code: View Code #include <stdio.h>#include <string.h>#define N 32010int c[N], n,
·
2015-10-30 10:20
树状数组
表格边框魔鬼教程(zhuan)
表格边框魔鬼教程 作者:Poorfish 时间: 2003-06-27 文档类型:原创 来自: 浏览统计 total:33301 | year:5155 | Quarter:
1541
| Month
·
2015-10-28 09:15
教程
工作日记
第二轮工作开始,今天处理处理
1541
数据。 JesseZhao要忙毕业论文,退出编委会,准备请小陆参与进来,顶替他的位置。 还有设计模式和开源项目、VSTS三个分支没有开工。
·
2015-10-27 14:50
工作
HDOJ
1541
Stars(线段树单点更新)
StarsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):6668 AcceptedSubmission(s):2657ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarerepre
helloiamclh
·
2015-10-21 14:00
HDU-
1541
Stars 树状数组
pid=
1541
题义为给定N个点按照先x轴,后y轴坐标排序,求某一点的左下角的星星数量,刚开始用二维的树状数组来做,结果肯定是内存不过用。
·
2015-10-21 11:40
树状数组
HDU
1541
Stars 树状数组
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #defineMaxn15233 #defineMaxx32333 #defineMOD typedeflonglongll; #defineFOR
Griffin_0
·
2015-10-13 23:00
树状数组
HDU
1541
Stars 树状数组
pid=
1541
题目大意:有n颗星星,每颗星星的权值为它左下角的星星的个数(不包括它本身),现在按y升序(y上按x升序)给出你n个星星的坐标,输出权值为0,1,...,n-1的星星的数目。
AC_Gibson
·
2015-10-12 15:00
HDU
1541
Stars (树状数组)
根据题意我们要维护前n-1个点中按照x值排序的前缀和,那么我们就可以用树状数组来维护一个大小为32000+的数组的前缀和,然后logn的更新,logn的查询就能过了。#pragmawarning(disable:4996) #include #include #include usingnamespacestd; constintM=32005; constintN=15005; intC[M]
acraz
·
2015-09-20 08:00
POJ 2352 && HDU
1541
Stars(BIT)
Description在坐标上有n个星星,如果某个星星坐标为(x,y),它的左下位置为:(x0,y0),x0 #include #include usingnamespacestd; #definemaxn33333 intn,x,y,b[maxn]; intgetsum(intx) { intsum=0; while(x>0) { sum+=b[x]; x-=x&-x; } returnsum;
V5ZSQ
·
2015-08-31 08:00
HDU -
1541
-stars
//题意:给定一些点,求在这点左下方的点的个数;思路:此题可以用二维树状数组做,但仔细看题,可以得到给出的y是从小到大的,这样,只需对x进行操作,进而转换为在x左边的点有多少个AC代码:#include #include #defineN32005 inta[N];intb[N];intn;intlower_bit(inti){returni&(-i);}voidadd(inti,intv){wh
zyx520ytt
·
2015-08-22 09:00
hdu
1541
-Stars(树状数组)
StarsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):6453 AcceptedSubmission(s):2561ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarerepre
lljjccsskk
·
2015-08-15 21:00
CSU
1541
There is No Alternative (最小生成树+枚举)
题目链接:传送门题意:有n个点,m条边,要使n个点全部连起来且要花费最小,问有哪些边是必须要连的。 分析:要使花费最小肯定是做最小生成树,但是题目要求哪些边是必须要用的。我们可以这样思考,我们先求一次最小生成树,然后把这些用到的边统计起来,然后依次枚举这n-1条边,使他们不能用,然后继续做最小生成树,如果最后求的值和第一次不一样的话那么这条边是肯定要连的。代码如下:#include #includ
u013790563
·
2015-06-26 11:00
hdu
1541
Stars
ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarerepresentedbypointsonaplaneandeachstarhasCartesiancoordinates.Letthelevelofastarbeanamountofthestarsthatarenothigherandnottotherightoftheg
Kirito_Acmer
·
2015-05-29 10:00
线段树
HDOJ Stars
1541
(树状数组)
StarsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5677 AcceptedSubmission(s):2247ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarerepre
ydd97
·
2015-05-27 18:00
hdoj
1541
Stars 【树状数组 线段树】【单点更新 区间求和】
StarsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):5640 AcceptedSubmission(s):2235ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarereprese
chenzhenyu123456
·
2015-05-17 22:00
hdu
1541
Stars
/************************************************Author:xryzEmail:
[email protected]
:4-2121:20:06FileName:a.cpp*************************************************/ #include #include #include #
xinag578
·
2015-04-21 21:00
树状数组(一)
题目链接:HDU
1541
解题思路:树状数组基础题目常规做法果断得超时,于是得用树状数组来解决,但是本人作为一个初学者表示根本想不懂,于是乎看了个博客,想了一下,然后就懂了。
fuyukai
·
2015-03-28 14:00
UniversalImageLoader的一个小问题
从Log看是这个样子: 1 03-19 15:41:44.167 1500-
1541
/xxx
·
2015-03-19 18:00
loader
UniversalImageLoader的一个小问题
从Log看是这个样子:103-1915:41:44.1671500-
1541
/xxxD/ImageLoad
AngelDevil
·
2015-03-19 18:00
hdu
1541
Stars 树状数组模板题
#include#include#includeusingnamespacestd;constint maxn=15010;constintmaxlen=32010;inttree[4*maxn];intlowbit(intn){ return(n&-n);}intgetsum(inti){ intsum=0; while(i>0) { sum+=tree[i]; i-=low
cq_pf
·
2015-03-06 16:00
HDU
1541
Stars
ProblemDescriptionAstronomersoftenexaminestarmapswherestarsarerepresentedbypointsonaplaneandeachstarhasCartesiancoordinates.Letthelevelofastarbeanamountofthestarsthatarenothigherandnottotherightoftheg
jtjy568805874
·
2015-02-21 16:00
HDU
树状数组
树状数组专题
pid=
1541
StarsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSub
Enjoying_Science
·
2015-02-12 12:00
位运算
算法
ACM
二叉索引树
八数码
P
1541
八数码时间:1000ms/空间:131072KiB/Java类名:Main背景 Yours和zero在研究A*启发式算法.拿到一道经典的A*问题,但是他们不会做,请你帮他们.描述在3×3的棋盘上
u012629369
·
2014-11-15 11:00
搜索
UVA -
1541
To Bet or Not To Bet (DP+概率)
DescriptionAlexanderCharlesMcMillanlovestogamble,andduringhislasttriptothecasinoheranacrossanewgame.Itisplayedonalinearsequenceofsquaresasshownbelow.AchipisinitiallyplacedontheStartsquare.Theplayerthe
u011345136
·
2014-09-06 10:00
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他