Search found 84 matches

by vahid sanei
Fri Mar 06, 2009 6:38 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7151

Re: 11585 - Nurikabe

in every 2 x 2 subsquare there is at least one unshaded space.
those arent 2 x 2 subsquare but i checked
by vahid sanei
Fri Mar 06, 2009 3:20 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7151

Re: 11585 - Nurikabe

Input

Code: Select all

4
1 2 0
##
1 1 0
.
1 1 0
#
1 2 1
0 0 1
.#
Output

Code: Select all

not solved
not solved
not solved
solved
by vahid sanei
Fri Mar 06, 2009 12:53 pm
Forum: Volume 115 (11500-11599)
Topic: 11518 - Dominos 2
Replies: 24
Views: 8586

11518 - Dominos 2

I get TLE , Please help me
here is my code :

Code: Select all

REMOVED 
by vahid sanei
Fri Mar 06, 2009 9:42 am
Forum: Volume 104 (10400-10499)
Topic: 10452 - Marcus
Replies: 21
Views: 9491

Re: 10452 - Marcus, help!

I got Acc with bfs method
but i can`t solve this problem with dfs and recursive method
how can i solve this problem with rec ? :-?
plz send me ,your acc code with recursive method,
thanks in advance
:wink:
by vahid sanei
Fri Mar 06, 2009 9:39 am
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7151

Re: 11585 - Nurikabe

what is faster than scanf and printf ? :-?
by vahid sanei
Thu Mar 05, 2009 8:26 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7151

Re: 11585 - Nurikabe

Sohel you got Acc in 0.170 sec
i use bfs for this problem but i got acc in 0,540 , how can i reduce time of my code ? :-?



thanks in advance
by vahid sanei
Thu Mar 05, 2009 8:50 am
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17501

Re: 11503 - Virtual Friends

I got Acc in 1.570 sec :D
by vahid sanei
Tue Mar 03, 2009 7:03 pm
Forum: Volume 114 (11400-11499)
Topic: 11474 - Dying Tree
Replies: 7
Views: 3964

Re: 11474 - Dying Tree

i got WA and i changed this struct node{ char kind; [b]double[/b] xx,yy; int index; }; to struct node{ char kind; int xx,yy; int index; }; and I got Acc :-? I dont know ,Why ! (maybe for reading inputs if xx=3 , so for double xx is 2.99999999) and i have another problem problem says : 0 < n < 100, 0...
by vahid sanei
Tue Mar 03, 2009 1:51 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17501

Re: 11503 - Virtual Friends

I got Acc in 2.920 sec , how can i reduce time of my algo ?
I use union-find and map




thanks in adnance
by vahid sanei
Tue Mar 03, 2009 1:45 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 26669

Re:What`s different?

thanks mf.
This works

Code: Select all

int find_root(int n){
   if(n==list[n].p)   return n;
   return find_root(list[n].p);
}
by vahid sanei
Tue Mar 03, 2009 9:10 am
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 26669

What`s different?

Why this function for finding root gives me WA :-? int find_root(int n){ if(n==list[n].p) return n; find_root(list[n].p); } and this`s correct int find_root(int n){ if(n!=list[n].p) list[n].p=find_root(list[n].p); return list[n].p; } and what`s different between these two functions? thanks in advance
by vahid sanei
Mon Mar 02, 2009 7:23 pm
Forum: Volume 105 (10500-10599)
Topic: 10509 - R U Kidding Mr. Feynman?
Replies: 41
Views: 13490

Re: 10509 - R U Kidding Mr. Feynman?

To theharshest
i think you should use EPS

...
i got acc in 0.130 and i use pow() , how can i calculate n^(1/3) in faster method ?
thanks in advance :wink:
by vahid sanei
Mon Mar 02, 2009 5:35 pm
Forum: Volume 101 (10100-10199)
Topic: 10188 - Automated Judge Script
Replies: 58
Views: 30602

Re: 10188 - Automated Judge Script

these kind of problems just waste time :x
i used vector<string>
but Judge dont check ' \n ' in inputs , "all of them are just one string"
it was better if judge checked '\n'
by vahid sanei
Sat Feb 28, 2009 3:44 pm
Forum: Volume 5 (500-599)
Topic: 568 - Just the Facts
Replies: 39
Views: 16544

Re: 568 time limit helllp

because n is to 10000 and you should use 100000
if n was to 100000 you should use 1000000 , i think :D
by vahid sanei
Sat Feb 28, 2009 9:52 am
Forum: Volume 103 (10300-10399)
Topic: 10336 - Rank the Languages
Replies: 21
Views: 9424

Re: 10336 - Rank the Languages

to bishop
try this:
input

Code: Select all

1
4 8
ttuuttdd
ttuuutdd
uuutuudd
uuttuudd
correct output is

Code: Select all

World #1
t: 3
d: 1
u: 1

Go to advanced search