Hi, since the editorial for round #177 is too late, I wish someone would share his idea of solving div1 D and div1 E,
thanks.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
Hi, since the editorial for round #177 is too late, I wish someone would share his idea of solving div1 D and div1 E,
thanks.
I tried alot to think about an idea to solve this problem but I couldn't find the way to solve it so I need help.
thank you.
hi
I have searched the internet alot but didnt find a good article about min cost max flow
given a directed graph each edge has cost for transfering one unit and capacity that spicify maximum number of units can pass the edge find minmum total cost to transfer K units from node S to node T(not neccessery max flow only K units)
can you give me good article to solve this problem
thanks
I need help to solved this intersting problem link .
thank you in advance.
I need help to solve this problem
given a tree with N nodes and K robots you want minimize the total distance needed to visit each node at least once by one robot if all robots started at node i.
robots are allowed to stop at any node and don't move.
for each node i from 1 to N output the answer if all robots started from node i, more details is in the link above.
N<=15,000 K<=30
thanks..
Hi,
I got problem and can't solve it:
given an array consist of N integers A1,A2,A3...An
for each element i from 1 to n you should increase all elements j by (1) such that j<i and A[j]>=A[i]
example: the array is:
4 2 1 3
i=1 :
nothing before 1 so thing will happen here
i=2 :
A[i]=2 so we need to increase all element before i and bigger or equal than A[i] by 1
so the array become:
5 2 1 3
i=3 :
A[i]=1
increase all element before i and bigger ort equal than A[i] by 1
the array become:
6 3 1 3
finally when i=4 :
the array become:
7 4 1 3
so print the new array to the output
N=10^5
sorry for my English.
thanks in advance.
Hi,
problem:
Given an array with N elements you have to execute two different types of querys:
1- add to the array an element with value X (anywhere).
2- answer how many elements which have value bigger than l and smaller than r.
constrains:
number of querys<=100,000
N<=100,000
l<=r<=N
X<=10^9
I think it can be done using self-balancing binary search tree (for example AVL tree),
but is there is a way easier than this data structure?
I need an ONLINE solution
Hi,
Given an Array with N elements each element have 3 integers Say Ai,Bi,Ci.
you have to answer Q querys given in each query 3 integers X,Y,Z you have to say how many elements in the array satisfy Ai>=X , Bi>=Y Ci<=Z
N,Q<=10^5
I hope you help me or give me a hint, thanks.
13 days ago without a rated contest for div1.
I'm very bored, when will the next contest take place?
Hi, I wonder how to solve problem D. Little Elephant and Broken Sorting
I had been waiting for its solution in editorial but is was not published.
Hi, I have no idea how to solve this problem. can anyone help me?
Hi, Just take look how I solved 242E — XOR on Segment
here is my code
the time limit for this problem is 4000ms and the running time for my code is 4000ms :) :] :D
Hi,
I need help to solve this problem http://www.spoj.pl/problems/OILCOMP/
in this problem we 2D array A[H][W] and we need to select elements of the array without selecting any two neighbor elements and maximize the sum of the elements selected.
the neighbors of element A[ i ][ j ] is A[ i-1 ][ j ] , A[ i+1 ][ j ] , A[ i ][ j-1 ] , A[ i ][ j+1 ].
I heard that this problem can be solved two ways, the first is network flow and the second is dp with bitmasks
I need to know both ways please.
I need help with this problem ,because I have no idea how to solve this
problem statement:
You have an array with N elements (1<=N<=1000),
you need to sort this array in non-increasing order,
you can only move the element in position i to position j:
1- by swaping i and i+1 then swaping i+1 and i+2 ... swaping j-1 and j (if i<j)
2- by swaping i and i-1 then swaping i-1 and i-2 ... swaping j+1 and j (if i>j)
in both operations the cost of the operation is i+j
find the minimal cost that you can sort the array non-increasing order
input:
first line contains integer N
second line contains N space-separated integers the elements of the array
output:
one integer the minimal cost
Sample test:
input:
5
20 30 5 15 10
output:
11
Note:
in the sample test moving element in position 3 to 5 will cost (3+5)=8
moving the element in position 2 to 1 will cost (2+1)=3
total cost 3+8=11
Hi, If i want to compute (1065*1001) mod 1000 , the best way to do this is computing (1065 modulo 1000) and (1001 modulo 1000) then Multiplying the two numbers so (1065 modulo 1000) = 65 and (1001 modulo 1000) = 1 then 65 * 1 = 65 so: (1065*1001) mod 1000 = 65 this way is much easier than computing 1065*1001 then modulo 1000
so my question is: is there a way resemble to the way above working with division like (6072/1012) mod 5 thanks.
Name |
---|