Saving data in the format of 1990-2-10 to 1990-2-1990 :00:00 is swollen? $ sri nbsp; $ sri2; $ sri10; $ sri nbsp; $ sri_n. -. $ sri_y. -. $ sri_r; the field type for storing the data is datetime; is it a database field problem. why can I save the format 1990-2-10 to the database as 00:00:00?
$ Sri = "
In the format of 1990-2-10, it turns to 1990-2-1000:00:00. what can I do? $ sri = "1990 ";
$ Sri = "2 ";
$ Sri = "10 ";
$ Sri = $ sri_n. "-". $ sri_y. "-". $ sri_r;
The field type for storing the data is datetime;
Is it a database field problem? why...
Reply to discussion (solution)
Datetime includes year, month, day, hour, minute, and second. I
The main idea: Farmer John again disgusting us! This time he brought some cows, these steaks into a column, their position given, each cow has a tone. Each of these cows communicates with each of the two cows, but there will be some cost when communicating, i,j two bulls = max (vi,vj) * |posi-posj|. The cost of exchange between all cows.Thinking: At first I thought it was the biggest or the smallest cost, and then carefully read the question found to think more, is simple statistics, but the dat
The comparison between tree array and segment tree is that the tree-like array is superior in both memory and time.The idea of a big problem is to sort the V from small to large, before looking for (i.e., smaller coordinates than v)V * SUM (ABS (XI-X)) so ABS cannot be processed, we use another tree-like array to record the number of cows in the X-y interval, before that record in the X-y interval of the cow's coordinates and
Accepted
484
79
C++
1131
Tre
single integer that is the sum of all the volumes of the conversing cows.
Sample Input
43 12 52 64 3
Sample output
57
--------------------Split line--------------
Question:
Given the hearing and coordinates of an nheaded ox, it is required for every two cows to talk (max (V (I), V (j) * ABS (DIS [I]-Dis [J]). A total of N * (n-1)/2 (n/1) conversations are required.
Ideas:
Sort the listening of the ox from small to large, so the I-th ox conversation needs to be calculated.
1: Number A, coord
Evaluation PortalTest Instructions:n the cows are barking at each other, each cow has a deaf-ear degree ai, position bi;So that two cows can hear each other. Required Volume abs (BI-BJ) *max (AI, AJ)The total volume at which all cows can hear each otherinput43 12 52) 64 3Output57Ideas:N-party violence is obviously, well written, but must be hung!So we need to use data structures to optimizeCode#include #include#defineLowbit (x) x (-X)#definell Long Longusing namespacestd;Const intmxn=21000;struc
integer this is the sum of the volumes of the conversing cows.Sample Input43 12 52) 64 3Sample Output57First according to the hearing value from small to large order, to ensure that the current cow with the front of the contact, take the current cow's hearing value, and then use two tree-like array, a record of all the coordinates of the number of locations, so that you can query the number is greater than the current coordinates and less than the current number of coordinates, and another reco
Title Source: POJ 1990 Moofest
Test instructions: Even if the sound between two cows is 2 the maximum value of the cow v * * The distance between the cows
Idea: Follow v from small to large insert a tree array because from small to large sort each insert a cow I current v maximum is the V of the ox I
Statistics x is smaller than his number S1 x is larger than his number S2 S2 is the number of cattle in the current tree-like array minus S1 in minus one
Poj 1990 MooFest (tree array code)MooFest
Time Limit:1000 MS
Memory Limit:30000 K
Total Submissions:6265
Accepted:2765
DescriptionEvery year, Farmer John's N (1
Each cow I has an associated "hearing" threshold v (I) (in the range 1 .. 20,000 ). if a cow moos to cow I, she must use a volume of at least v (I) times the distance between the two cows in order to be heard by cow I. if two cows I and j wish to converse
Reprint please indicate the source, thank you http://blog.csdn.net/ACM_cxlove? Viewmode = ContentsBy -- cxlove
A number axis is provided. Some nodes have a cow, each cow has a position Xi, and a hearing value VI. When talking to two cows, the desired sound is the distance * max (Vi, vj) Ask the total sound http://poj.org/problem? Id = 1990
Max (Vi, vj) is easier to process. If you sort all cows in ascending order of VI, consider that the current oX I,
Recently learned a tree-like array, this problem tangled for a long time, after all, because there is no understanding of the tree array how to use.I feel that many of the great gods on the internet are only talking about the principle, for our novice beginners are afraid to be scared away.Here I would like to use the pragmatic approach (in fact, I think its principle should be more enlightening to us, may bring a lot of potential benefits):It is important to note that the bit array in the bit's
I-moofest
Time limit:1000 ms
Memory limit:30000kb
64bit Io format:% I64d & % i64usubmit status
DescriptionEvery year, Farmer John's n (1
Each cow I has an associated "hearing" threshold V (I) (in the range 1 .. 20,000 ). if a cow moos to cow I, she
Black eyes and smiling faces,It's hard to forget you.This is how old times go,It's been a few years in a hurry.The vast treasure road is my treasure,Searching and searching are my footsteps.Black and lacquer, without your gentleness,In the morning
The homogeneous structure of the root tree means that the two trees have the same shape and the subtree can be rotated. Therefore, when the number of subnodes of the subtree is the same, the homogeneous structure can be determined.
You do not need
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.