Search found 2 matches

by wurr
Tue Jul 08, 2014 9:49 am
Forum: Volume 107 (10700-10799)
Topic: 10702 - Travelling Salesman
Replies: 20
Views: 13218

Re: 10702 - Travelling Salesman

Thanks a ton brianfry, got my AC now :)
For anyone wondering what the problem was, end_cities, being an int, couldn't hold all possible city identifiers (up to 100).
by wurr
Sun Jul 06, 2014 7:31 pm
Forum: Volume 107 (10700-10799)
Topic: 10702 - Travelling Salesman
Replies: 20
Views: 13218

Re: 10702 - Travelling Salesman

Don't understand why I'm getting WA on this. Anyone can spot anything? Seems to pass all of brianfry's test cases :/
#include <cstdio>

using namespace std;

int main() {
while(1) {
int c,s,e,t;
scanf("%i%i%i%i", &c,&s,&e,&t);
if(c+s+e+t == 0) break;
int profit[c][c];
for(int i=0; i<c; i ...

Go to advanced search