@Nahiyan Kamal
to convert thita into radian,
thita = thita * pi / 180;
pi = acos(-1.0)
thita is always between 0 to 360 degree
so take care of it, if it goes beyond limit
try this input :
3
5
lf 60
fd 20
rt 30
fd 50
rt 45
3
fd 20
lf 15
fd 17
6
fd 50
lf 90
fd 50
lf 90
fd 50
lf 90
output ...
Search found 6 matches
- Thu Jun 17, 2010 7:06 am
- Forum: Volume 115 (11500-11599)
- Topic: 11505 - Logo
- Replies: 8
- Views: 15080
- Wed Jun 16, 2010 9:56 pm
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49652
Re: 492: WA, dont know why...
@Tausiq if the input length is more then array size then it will cause RTE.
i think the case you mentioned below is a reason for WA.
Obaida vai, BTMouseKing gave the post becoz he is getting WA
so, i mentioned some cases that might help him to recover from WA.
cause of RTE was just a free ...
- Wed Jun 16, 2010 9:46 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11597 - Spanning Subtree
- Replies: 4
- Views: 4723
Re: 11597 - Spanning Subtree
How many edges are possible if vertex_number = 4 ?
as there is no self-loop, u can draw 6 edges
try this using pen-paper
similarly, when vertex_number = 6,
highest number of edges = 15
int edges = 0;
for ( int i = 1; i <= vertex_number; i++ ) {
for ( int j = i + 1; j <= vertex_number; j ...
as there is no self-loop, u can draw 6 edges
try this using pen-paper
similarly, when vertex_number = 6,
highest number of edges = 15
int edges = 0;
for ( int i = 1; i <= vertex_number; i++ ) {
for ( int j = i + 1; j <= vertex_number; j ...
- Fri Aug 14, 2009 7:16 pm
- Forum: Volume 4 (400-499)
- Topic: 492 - Pig-Latin
- Replies: 213
- Views: 49652
Re: 492: WA, dont know why...
Judge's input may be too big that u can't grasp that in an array, whatever the bound is
so try to read the input character by character
do not use " fflush(stdin); "
This is a man.
hisTay isay aay anmay.
a
aay

so try to read the input character by character
do not use " fflush(stdin); "
This is a man.
hisTay isay aay anmay.
a
aay
- Fri Aug 14, 2009 6:55 pm
- Forum: Bugs and suggestions
- Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
- Replies: 62
- Views: 11217
Re: 200 - WA
try to avoid pointers
not because of i don't understand pointer well
but it's not recommended :)
I haven't checked ur code
but did test some inputs-outputs
and a question arose in my mind
why this code getting wrong ans ??
it should get Runtime error !
try these inputs
Input 1 :
QEWR
YSFDG ...
not because of i don't understand pointer well
but it's not recommended :)
I haven't checked ur code
but did test some inputs-outputs
and a question arose in my mind
why this code getting wrong ans ??
it should get Runtime error !
try these inputs
Input 1 :
QEWR
YSFDG ...
- Mon Jun 29, 2009 7:31 am
- Forum: Volume 101 (10100-10199)
- Topic: 10102 - The path in the colored field
- Replies: 34
- Views: 17281
10102 - The Path in the Colored Field
i don't know, what should i say ! :o
this is my first post ..
verdict shows wrong ans. :-?
i did check various input as far i can .. but couldn't find any bug
i've used bfs here
here is my code :
#include <iostream.h>
#include <queue>
using namespace std;
struct node {
int row;
int column ...
this is my first post ..
verdict shows wrong ans. :-?
i did check various input as far i can .. but couldn't find any bug
i've used bfs here
here is my code :
#include <iostream.h>
#include <queue>
using namespace std;
struct node {
int row;
int column ...