Search found 6 matches
- Sat May 27, 2006 7:57 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65275
- Tue May 16, 2006 6:09 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65275
Finally i got acc... :D
I have changed my dp technique, so i got acc... What i don't realize so far is i do not need to trace the path one by one, i only need to store the minimum value for the path... And also i just realized that the dp table can help me to print the path... ^^.
- Thu May 11, 2006 12:45 pm
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65275
- Thu May 11, 2006 4:58 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65275
- Wed May 10, 2006 4:31 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65275
116 TLE... Plz help.... :(... 2x TLE
Can anyone help me to make it faster? I still have no idea how to store the lexicographically path efficiently.... I'm waiting for ur answer.... Thx... :)..
#include <stdio.h>
#include <math.h>
int cost[10][100], output[10][100];
int idx, num;
long min;
void lexico(int temp[100], int output ...
#include <stdio.h>
#include <math.h>
int cost[10][100], output[10][100];
int idx, num;
long min;
void lexico(int temp[100], int output ...
- Mon Mar 13, 2006 6:36 am
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65158
706.. Why WA ?
#include <stdio.h>
#include <string.h>
void main()
{
int s, i, j, k, l, row, col, idx;
char n[10];
do {
scanf("%d", &s);
scanf("%s", &n);
if(s==0) break;
col= s+2;
row= 2*s+3;
l= strlen(n);
if(n[0]!='0') for(idx=0;n[idx]=='0'&&idx<l;idx++);
else idx= l-1;
for(j=1;j<=row;j++) {
for(k ...
#include <string.h>
void main()
{
int s, i, j, k, l, row, col, idx;
char n[10];
do {
scanf("%d", &s);
scanf("%s", &n);
if(s==0) break;
col= s+2;
row= 2*s+3;
l= strlen(n);
if(n[0]!='0') for(idx=0;n[idx]=='0'&&idx<l;idx++);
else idx= l-1;
for(j=1;j<=row;j++) {
for(k ...