hi .. who can help me ? i got WA for this Q many time .. my Algorithm is very simple .. i add the edge weights and store them in sumEdges .. if there are 2 odd nodes , i find the min path between this 2 node with dijkstra algorithm , then add with sumEdges.. then print sumEdges ..
[#include ...
Search found 4 matches
- Sun Jul 22, 2007 9:12 pm
- Forum: Volume 1 (100-199)
- Topic: 117 - The Postal Worker Rings Once
- Replies: 58
- Views: 25277
- Fri Sep 29, 2006 8:19 pm
- Forum: Volume 1 (100-199)
- Topic: 108 - Maximum Sum
- Replies: 233
- Views: 52134
- Fri Sep 22, 2006 11:58 am
- Forum: Volume 110 (11000-11099)
- Topic: 11099 - Next Same-Factored
- Replies: 24
- Views: 13169
11099 Time Limit
Hi...
I get TLE for this problem..
Who can help me ?
This is My code:
#include <iostream>
using namespace std;
const int Max=1000005;
int a[Max];
int prime[Max];
void main(){
long int i,j,sw;
long int num;
for(i=0;i<Max;i++){
a[i]=1;
prime[i]=1;
}
for(i=2;i<Max;i++){
if(a[i]==1){
for ...
I get TLE for this problem..
Who can help me ?
This is My code:
#include <iostream>
using namespace std;
const int Max=1000005;
int a[Max];
int prime[Max];
void main(){
long int i,j,sw;
long int num;
for(i=0;i<Max;i++){
a[i]=1;
prime[i]=1;
}
for(i=2;i<Max;i++){
if(a[i]==1){
for ...
- Fri Sep 22, 2006 11:54 am
- Forum: Volume 110 (11000-11099)
- Topic: 11099 - Next Same-Factored
- Replies: 24
- Views: 13169
11099 Time Limit
see the next post!!!