## Search found 146 matches

Tue May 20, 2003 2:14 pm
Forum: Volume 3 (300-399)
Topic: 307 - Sticks
Replies: 56
Views: 18429
How did you solve it? Can you share your method with us?

Thanks a lot!!
Sun May 18, 2003 4:17 pm
Forum: Volume 3 (300-399)
Topic: 307 - Sticks
Replies: 56
Views: 18429
The problem must be solved by Backtracking.
Sun May 18, 2003 2:33 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 32711
Try This Test Case : Note : that 2 is not emirp, but prime! Sample input: 2 1 10 11 71 9001 10009901 1321 1099933 Sample Output 2 is prime. 1 is prime. 10 is not prime. 11 is prime. 71 is emirp. 9001 is emirp. 10009901 is not prime. 1321 is emirp 1099933 is emirp. :lol: Hope this Helps. GOOD LUCK R...
Sat May 17, 2003 4:56 am
Forum: Volume 103 (10300-10399)
Topic: 10309 - Turn the Lights Off
Replies: 19
Views: 9118
I got Accepted !! Thanks a lot!! ^_^|
Fri May 16, 2003 3:46 pm
Forum: Volume 103 (10300-10399)
Topic: 10309 - Turn the Lights Off
Replies: 19
Views: 9118
But the problem need the minimum number of times!!It's difficult!!
I should do it by BFS or by Recursion ?Which is better?
Fri May 16, 2003 7:28 am
Forum: Volume 102 (10200-10299)
Topic: 10290 - {Sum+=i++} to Reach N
Replies: 27
Views: 12841

### 10290

My method is: [cpp] #include <iostream> using namespace std; void main() { register long long int n=0,front=0,tail=0,s=0,t=0,ans=0; while( cin>>n ){ s=0; front=1; tail=1; ans=0; t=n/2; while( front<=t ){ if(s<n){ s+=tail; tail++; }else if(s>n){ s-=front; front++; }else{ ans++; s+=tail; tail++; } }/*...
Fri May 16, 2003 7:11 am
Forum: C++
Topic: A very very small problem
Replies: 12
Views: 3942

### A very very small problem

What is the syntax " while( scanf("%d %d %d",&i,&j,&k)==3 ) ......"
in C++ (using cin) ?
Fri May 16, 2003 5:30 am
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 18123
I got accepted ! thanks a lot!
Thu May 15, 2003 10:39 am
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 18123

### 10400 Game Show Math :-)

I got TLE in this problem.
But I heard somebody use bit unit to solve problem.
Does anybody know what's the method?
Thanks!!:-)
Wed May 14, 2003 4:23 pm
Forum: Volume 103 (10300-10399)
Topic: 10309 - Turn the Lights Off
Replies: 19
Views: 9118
i used recursion. though i guess there're better methods than mine. (i heard somebody use looping) my algorithm: go from the top-row, - for each one in top-row, you can switch or not switch for the rest of the rows, - the upper row would determine whether you can switch or not. ie. if the upper row...
Sun May 11, 2003 4:09 pm
Forum: Other words
Replies: 12
Views: 1829

http://acm.uva.es/problemset/files.html
why?
Sun May 11, 2003 1:51 am
Forum: Volume 1 (100-199)
Topic: 141 - The Spot Game
Replies: 12
Views: 4196
In this problem....It said:

If the first pattern had been produced earlier, then any of the following three patterns (plus one other not shown) would terminate the game, whereas the last one would not.
Sat Apr 05, 2003 6:50 am
Forum: Volume 104 (10400-10499)
Topic: 10446 - The Marriage Interview :-)
Replies: 17
Views: 9867

### 10446 (about using "unsigned long long int" )

I already solved this problem and got AC.
But my program still have a small bug.
When n>=32 and back>=32 , the output is wrong!

input:

32 32
50 50
60 60

output:

Case 1: 1
Case 2: 1
Case 3: 1

It is very strange why I still can got AC?
Wed Mar 26, 2003 7:47 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 25297

### 10037 Bridges

I programmed this problem and got wrong answer.
But I can't find any bug in my program!!
Is there any trick?
Wed Mar 26, 2003 7:19 am
Forum: Volume 100 (10000-10099)
Topic: 10078 - The Art Gallery
Replies: 20
Views: 6454
Convex Hull Algorithm