Search found 9 matches

by techyvish
Tue Feb 03, 2015 2:15 pm
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 133
Views: 58278

Re: 459 - Graph Connectivity

thanks brianfry713, got AC, It expects new line between each line. :D
by techyvish
Mon Jan 26, 2015 4:47 pm
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 133
Views: 58278

Re: 459 - Graph Connectivity

Hi, I tried all inputs in forum. I'm getting correct answers locally, but getting WA with online judge.:evil: Please help !!
here is the code.



#include <stdio.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream ...
by techyvish
Wed Nov 26, 2014 1:54 am
Forum: Volume 13 (1300-1399)
Topic: 1357 - Cells
Replies: 4
Views: 2517

Re: 1357 - Cells

any one ???
by techyvish
Fri Nov 21, 2014 8:47 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37466

Re: 280 - Vertex

Hi Sorry lighted,
here is the complete code.



#include <stdio.h>
#include <stdio.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ...
by techyvish
Fri Nov 21, 2014 8:43 pm
Forum: Volume 13 (1300-1399)
Topic: 1357 - Cells
Replies: 4
Views: 2517

Re: 1357 - Cells

hi brianfry713 thanks for replying, sorry I haven't copy pasted complete code.
It compiled and gave me TimeLimit error.

here is the complete code

//
// uva12219.cpp
// Codeforces
//
// Created by Vishal Patel on 17/11/2014.
// Copyright (c) 2014 Vishal Patel. All rights reserved.
//

#include ...
by techyvish
Thu Nov 20, 2014 1:35 am
Forum: Volume 13 (1300-1399)
Topic: 1357 - Cells
Replies: 4
Views: 2517

Re: 1357 - Cells

Here is my code.


#define fin cin

struct _node
{
_node* nodes[101];
_node *parent;
int value;
};
typedef struct _node node;
bool gfound = false ;

node *nodes[300008];

bool testParent(node *node, int parent)
{
bool found = false;
while ( node->parent != NULL ) {

node = node->parent ...
by techyvish
Thu Nov 20, 2014 1:22 am
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37466

Re: 280 - Vertex

Thanks lighted for replying :D , I'm not reading from file when I submit to the online judge.
I tried all inputs from the forum in uDebug and I got the same answers using my code, but I'm not able to find out
which test case fails. :( Could you please help me to find out ?
by techyvish
Wed Nov 19, 2014 7:53 am
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 37466

Re: 280 - Vertex

please help me find my mistake. works with output in forum but returns WA in Online Judge.

Here is my code.



typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef vector<vector<int > > vvi;
typedef vector<string> vs ...
by techyvish
Wed Nov 19, 2014 2:35 am
Forum: Volume 13 (1300-1399)
Topic: 1357 - Cells
Replies: 4
Views: 2517

Re: 1357 - Cells

Hi I'm getting Time limit error, Can some one please shed some light on solution ?

my approach is create parent link for each node while creating graph and store each node in an array for quicker access.
And for each test cases look for a child in an array and then follow parent link.

Go to advanced search