Search found 17 matches

by sady
Sat Nov 01, 2014 8:29 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 27026

Re: 143 - Orchard Trees

plz plz someone help.
what getting me wrong answer?
by sady
Sat Nov 01, 2014 8:28 pm
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 27026

Re: 143 - Orchard Trees wa plz help

#include<cstdio>
#include<math.h>
#include<algorithm>
#define eps 1e-9
using namespace std;
class p
{
public:
double x,y;
p(){}
p(double x, double y)
{
this->x=x;
this->y=y;
}
};
p a[3];
double Area;

void lowest_y()
{
int i=0;
for(int k=1;k<3;++k)
{
if(a[k].y<a[i].y || (a[k].y==a[i].y ...
by sady
Sat Oct 11, 2014 9:31 am
Forum: Volume 2 (200-299)
Topic: 218 - Moth Eradication
Replies: 60
Views: 19734

Re: 218 - Moth Eradication runtime error

plz help :oops: :cry:
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<cmath>
#define limit 12000000
class Pair
{
public:
double x,y;
};
Pair ob[limit], pre;
int trap;
void lowest_y();
void sort_CCW_order();
double dis(Pair a, Pair b)
{
return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y ...
by sady
Sun Aug 24, 2014 7:23 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37354

Re: 280 - Vertex

:lol: got ac
but any help regarding my mistake in previous code would be appreciated :P :D
by sady
Sun Aug 24, 2014 2:27 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37354

Re: 280 - Vertex

plzzz someone help me.
i couldn't find my mistake.
:oops: :oops: :(
by sady
Sat Aug 23, 2014 8:06 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37354

uva 280 - Vertex: why wa??plz help

i checked the sample input of the thread. it gives me correct output.
plz help me to find my bug. thanks in advance. :cry: :cry: :cry: #include<cstdio>
#define limit 101
#define inf 1e9
inline int max(int a, int b)
{
return ((a>b)?a:b);
}
inline int min(int a, int b)
{
return ((a<b)?a:b);
}
int ...
by sady
Wed Aug 06, 2014 4:17 pm
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 17002

Re: 386:WA: Help me plzzzzzzzzzzzzzzzzzz....

Subhan-Allah After making double to int as you said i got accepted. :P
You are e genius lighted. :o :D
by sady
Wed Aug 06, 2014 3:52 pm
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 17002

Re: 386:WA: Help me plzzzzzzzzzzzzzzzzzz....

It is not correct to compare double and long directly.
You can solve this problem with integers without double. :)
thanks lighted :D
a few minutes ago i did find my mistake after hours of hard work. :lol:

But still wrong answer. :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
by sady
Wed Aug 06, 2014 9:42 am
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 17002

why getting WA?? Help me plzz

:cry: :cry: :cry: :cry: :cry: :cry:

Code: Select all

 removed after AC
by sady
Tue Apr 22, 2014 8:13 am
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 65289

Re: 116 WA plz help

:oops: I have tried all test case in the forum bt still WA. plz plz plz anyone help #include<cstdio>
#include<algorithm>
#include<iostream>
#include<string>
long long tsp[10][100];
int path[10][100], row, col;
int main()
{
long long mini;
int in[3]={-1,0,1},r,mr,c;
while(scanf("%d %d", &row, &col ...
by sady
Mon Jan 06, 2014 11:58 am
Forum: Volume 108 (10800-10899)
Topic: 10807 - Prim
Replies: 31
Views: 21497

Re: 10807 - Prim, Prim.

i used kruskal . greedily add edges to A and B simultaneously. getting WA. plz give me some critical input for which my code not working.
//prim prim
//simultaniously kruskal apply krte hbe aladavabe kruskal apply kora jbe na
//greedily a b r jnno edge select krte hbe
#include<iostream>
#include ...
by sady
Sun Jan 05, 2014 3:36 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101849

Re: 10035 - primary arithmetic help!

why WA??
brianfry plz help me to find the mistake.
#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
int main()
{
string a,b;
int len1,len2,carry,count,i;
while(cin>>a>>b)
{
if(a=="0" && b=="0")break;
count=0;
len1=a.size();
reverse(a.begin(),a ...
by sady
Fri Jan 03, 2014 6:22 pm
Forum: Volume 7 (700-799)
Topic: 721 - Invitation Cards
Replies: 25
Views: 11016

721 - Invitation Cards

got accepted[img][/img]
by sady
Tue Dec 31, 2013 10:49 am
Forum: Volume 7 (700-799)
Topic: 721 - Invitation Cards
Replies: 25
Views: 11016

721 - Invitation Cards

i used dijkstra . first handling multi edges by picking the min cost. first of all, using single source shortest path to count cost of reaching destination , secondly using single destination shortest path . Finally summing total cost
but i'm getting TLE. i used adjacency list of size vertices ...
by sady
Sat Dec 28, 2013 6:21 pm
Forum: Volume 121 (12100-12199)
Topic: 12157 - Tariff Plan
Replies: 12
Views: 8705

12157 Tariff Plan Why WA? Please, help me

i'm getting PE . :cry:

Go to advanced search