Search found 28 matches

by wanderley2k
Fri Apr 27, 2007 11:22 pm
Forum: Volume 101 (10100-10199)
Topic: 10181 - 15-Puzzle Problem
Replies: 36
Views: 19765

IDA*

I was reading and trying solve this problem with tricks that were posted in this list. But I only recive TLE. I implemented IDA*. This is my code: #include <iostream> #include <set> #include <queue> #include <map> #include <vector> #include <algorithm> #include <assert.h> #include <stdio.h> #include...
by wanderley2k
Wed Aug 31, 2005 1:44 pm
Forum: Algorithms
Topic: help with shaping regions!!!
Replies: 2
Views: 1224

Try this. Take two shape and generate all Subshape. After test is a shape have other shape in it. If has other don
by wanderley2k
Thu Aug 25, 2005 10:15 pm
Forum: Volume 2 (200-299)
Topic: 298 - Race Tracks
Replies: 11
Views: 1987

298 - Race Tracks

I try solve this problem and got WA many times. I maked BFS with memorization and got a lot of WA! This is my code: #include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #inc...
by wanderley2k
Mon Jul 11, 2005 5:03 am
Forum: Volume 100 (10000-10099)
Topic: 10054 - The Necklace
Replies: 62
Views: 31292

Hi, I tried to solve this problem but I got WA only. My program: * Calc one euler cicle C * For all vertex not in C, calc euler cicle c and union with C This is my code: #include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #i...
by wanderley2k
Wed Jul 06, 2005 4:18 am
Forum: Volume 100 (10000-10099)
Topic: 10020 - Minimal coverage
Replies: 57
Views: 20594

Re: Test Cases

Some test cases for you. Pay attention to the first two of them. Strictly taken, I give a logically incorrect answer to the second test case as I assume a double number X to be equal to 0 if and only if its ABS VALUE is <= 0.000001. But this is OK. You may safely do the same. Be careful when compar...
by wanderley2k
Sat Jun 18, 2005 8:09 am
Forum: Volume 103 (10300-10399)
Topic: 10342 - Always Late
Replies: 25
Views: 10987

Hi Turjo, I saw that you solve this problem. What is output for test cases that you propose? And what is output for this test cases: 4 4 0 1 10 0 2 10 1 3 10 2 3 10 1 0 3 5 5 0 1 10 1 2 5 1 4 2 2 3 1 0 2 4 4 0 1 0 2 0 3 0 4 2 1 0 1 5 1 0 1 4 3 0 1 12 0 2 20 1 2 15 3 0 1 0 2 0 3 4 3 0 1 11 0 2 20 1 2...
by wanderley2k
Sun Jun 05, 2005 4:07 pm
Forum: Volume 5 (500-599)
Topic: 526 - String Distance and Transform Process
Replies: 34
Views: 15641

I got AC. My problem is with input. Have one space more in input.

Code: Select all

while(cin>>str1>>str2) // wrong

while(!cin.eof()) {
 cin>>str1;
 if (cin.eof()) break;
 cin>>str2;
} // It is correct

by wanderley2k
Thu Jun 02, 2005 2:12 pm
Forum: Volume 108 (10800-10899)
Topic: 10850 - The Gossipy Gossipers Gossip Gossips
Replies: 11
Views: 2849

Then what is wrong?

Do you have critical input?
by wanderley2k
Thu Jun 02, 2005 3:00 am
Forum: Volume 108 (10800-10899)
Topic: 10850 - The Gossipy Gossipers Gossip Gossips
Replies: 11
Views: 2849

10850 - The Gossipy Gossipers Gossip Gossips - WA

Hi guys, I try to solve the 10850 and receive many WA. I think that this problem is shortest-path. I create this output: 6 2 1 2 2 1 3 5 5 1 2 1 10 1 3 1 5 3 4 1 6 2 4 1 7 2 5 1 8 4 3 1 2 1 60 2 3 1 40 4 3 1 30 3 2 1 2 1 42 2 3 1 42 5 5 1 3 2 60 70 1 4 3 20 22 24 4 5 1 10 3 5 2 12 80 3 2 2 55 78 8 0...
by wanderley2k
Mon May 16, 2005 5:35 am
Forum: Volume 5 (500-599)
Topic: 526 - String Distance and Transform Process
Replies: 34
Views: 15641

Why wrong?

I do this algorithm and I don
by wanderley2k
Thu Jan 27, 2005 11:11 am
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 36126

Thanks Digit but I change the form to make the DP and got AC.


I make DP right to left and now I dont need to make search for lexico.
by wanderley2k
Sun Jan 23, 2005 3:16 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 36126

My code get correct output for all inputs too. If anyone have tricks or can search any error in my code. #include <iostream> #include <stdlib.h> using namespace std; #define MN 10 #define MM 100 #define FOR(i,n) for(int i=0;i<n;i++) #define FORI(i,j,n) for(int i=j;i<n;i++) #define DEBUG(x) int lin, ...
by wanderley2k
Thu Sep 23, 2004 5:26 am
Forum: Volume 2 (200-299)
Topic: 270 - Lining Up
Replies: 48
Views: 16191

Ok!

I got AC.. but with other code.. I wrote the code in n^2 ... in n^3 not is possible got AC in this problem.

Wanderley
by wanderley2k
Mon Sep 20, 2004 4:12 am
Forum: Volume 2 (200-299)
Topic: 270 - Lining Up
Replies: 48
Views: 16191

Hi, I tried to solve the 270 and for the test cases of Waterloo I receive AC but in UVA i got TLE. Why? the read of data I think that is correct :roll: [cpp] #include <stdio.h> #include <stdlib.h> #define MAX 2000 typedef struct { int x, y; } point; int ccw(point p0, point p1, point p2) { int dx1, d...
by wanderley2k
Wed Sep 15, 2004 9:59 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31757

Re: 10533 WA

please help me,i dont know why!! [cpp] if(t1==t2&&a[t1]==1) cout<<"1"<<endl; else if(t1==t2&&a[t1]==0) cout<<"0"<<endl; else if((a[t1]==1&&a[t2]==0)||(a[t1]==0&&a[t2]==1)||(a[t1]==1&&a[t2]==1)) cout<<c[t2]-c[t1]+1<<endl; else cout<<c[t2]-c[t1]<<endl; [/cpp] Try this only in your output [cpp] cout<<...

Go to advanced search