here is a challenging problem in its own : link is below http://codeforces.net/blog/entry/4611
i have tried different approaches for this one , but none produces answers for 10 testcases within 1 minute time .
hope somebody is able to crack it .
# | 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 | 170 |
2 | Um_nik | 162 |
3 | atcoder_official | 160 |
3 | maomao90 | 160 |
5 | djm03178 | 158 |
5 | -is-this-fft- | 158 |
7 | adamant | 154 |
7 | Dominater069 | 154 |
9 | awoo | 152 |
9 | luogu_official | 152 |
here is a challenging problem in its own : link is below http://codeforces.net/blog/entry/4611
i have tried different approaches for this one , but none produces answers for 10 testcases within 1 minute time .
hope somebody is able to crack it .
hello ,
i am a newbie in the world of algorithmic competition , and hope if anybody can mentor me in this arena.
since the min cost flow algorithms operate on integers , if the cost matrix containes double numbers , how can we adapt it to min cost flow algorithms
can anybody share code snippet for min cost max flow algorithm , specially for the transportation problem types.
there are 10000 stations numbered from 0 to 9999. from each station , some load has to be transferred to another station by train . the fuel consumption of train between 2 successive station is 1 litre .
Find the minimum amount of fuel , in which loads can be transferred to all the destination stations.
constraints: the load for each station is between 1 and 100 inclusive. a train cannot carry more than 50 kgs of load at one time. a train cannot carry loads of several stations at the same time even if it can take more load . several stations can send their load to a station at the same time.
the first train leaves station 0.
Input : the destination station and load to be transferred for each of the 10000 stations.
need help in solving this problem
hi all, it would be helpful if somebody can give links to problems related to dfs and bfs.
given , there are 3 points in 2d space . also there are 10000 points in 2d space . each of the 3 points in the first set can be related to at max 3500 points from the 2nd set. how to assign all the 10000 points in the 2nd set , to the 3 points in 1st set , so that the sum of distances of points in 2nd set from points in 1st set is minimised ?
There are 10000 stations numbered from 0 to 9999. from each station , some load has to be transferred to another station by train . the fuel consumption of train between 2 successive station is 1 litre .
Find the minimum amount of fuel , in which loads can be transferred to all the destination stations.
constraints: the load for each station is between 1 and 100 inclusive. a train cannot carry more than 50 kgs of load at one time. a train cannot carry loads of several stations at the same time even if it can take more load . several stations can send their load to a station at the same time.
the first train leaves station 0.
Input : the destination station and load to be transferred for each of the 10000 stations.
there are 10000 stations numbered from 0 to 9999. from each station , some load has to be transferred to another station by train . the fuel consumption of train between 2 successive station is 1 litre .
Find the minimum amount of fuel , in which loads can be transferred to all the destination stations.
constraints: the load for each station is between 1 and 100 inclusive. a train cannot carry more than 50 kgs of load at one time. a train cannot carry loads of several stations at the same time even if it can take more load . several stations can send their load to a station at the same time.
the first train leaves station 0.
Input : the destination station and load to be transferred for each of the 10000 stations.
need help in solving this problem
hi everyone,
Is there any indicative list of datastructure related problems in SGU problem set,
specially "TREES" .
my approach is to create 3 rotations for each box and sort the boxes according to increasing base area.
Then run LIS on the sorted data.
it gives correct results for test samples in the problem , still getting WA.
Need help !!!!
here is my solution for thi problem from EL JUDGE ,
but the time limit is exceeds by 1 second ,
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;
typedef struct{
int m;
int s;
}rec;
bool compare(const rec& r1,const rec& r2)
{
return(r1.m + r1.s <= r2.m + r2.s);
}
int main()
{
int n,i,j;
int best[100000] ;
cin>>n;
i = 0;
vector<rec> v;
rec r;
while(i < n)
{
//cin>>r.m;
//cin>>r.s;
scanf("%d",&r.m);
scanf("%d",&r.s);
v.push_back(r);
i++;
}
for(i = 0;i<=n;i++)
best[i] = 4000000;
best[0] = 0;
sort(v.begin(),v.end(),compare);
int maxcount = 0;
for(i= 0; i < n;i++)
{
for(j = maxcount + 1; j > 0;j--)
{
if(v[i].s >= best[j -1] && (v[i].m + best[j -1] < best[j]))
{
best[j] = v[i].m + best[j -1];
if(j > maxcount) maxcount = j;
}
}
}
cout<<maxcount<<endl;
return 0;
}
need help to optimise this , the input length can be upto 100000
hi all ,
i have read few english versions of some russian programming books .
And my love for them has increased .
But i have one book by author "Menshikov" . Its is russian language (djvu format).
I want to convert it into english .
Help please !!!!!!!! :)
for me it wa quite a problem , since i strictly used C++ to solve it.
Name |
---|