Search found 7 matches

by micheal_sunny
Thu Oct 19, 2006 7:05 am
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554

i use int instead of long
i got ac
can anyone tell me why?

Thanks , all of you~~~ :) :)
by micheal_sunny
Thu Oct 19, 2006 6:56 am
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554


#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
long long feq,a;
long long ans,test;
while (scanf("%lld",&test)!=EOF)
{
feq =0;
ans=0;
for (int i=0;i<test;i++)
{
scanf("%lld",&a);
if (feq ==0)
{
ans = a;
}
else
{
if (a == ans)
{
feq ++;
}
else
feq ...
by micheal_sunny
Wed Oct 18, 2006 4:55 pm
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554

hi timo
thanks for you idea
and i wrote it by c++ got a wa i dont know whether i dont understand what you said or there is something mistake
can you pls check it ?
The sample is right

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
long feq,a;
long ans,test;
while ...
by micheal_sunny
Tue Oct 17, 2006 3:56 pm
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554

hi misof :)
I don't know the tricky solution which you talk about, can you tell me more ?
And you say there is the standard solution: load all numbers into memory, and find the median. can you say clearly about this, I am intertesting about what you say.
Oh, by the way :Time limit: 5 Seconds ...
by micheal_sunny
Sat Oct 14, 2006 1:12 pm
Forum: Volume 102 (10200-10299)
Topic: 10236 - The Fibonacci Primes
Replies: 28
Views: 16247

10236 - The Fibonacci Primes

can anyone tell me how to solve the problem
i konw the algorithm which can gets n-th fib in lgn,but i met overflow problem when i want to calculate the all digits
is there any secret or formula which i dont konw,please tell me
Thanks for watch and reply
by micheal_sunny
Sat Oct 14, 2006 11:41 am
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554

it is form other online judge that is called zoj
i give the description
Seven (actually six) problems may be somewhat few for a contest. But I am really unable to devise another problem related to Fantasy Game Series. So I make up an very easy problem as the closing problem for this contest.

Given ...
by micheal_sunny
Sat Oct 14, 2006 11:37 am
Forum: Algorithms
Topic: how to choose the num ???
Replies: 13
Views: 5554

how to choose the num ???

there is a sequence like 1,4,-1,-3,4,9,2,4
i wanted to choose "4",because '4' appear 3 times , other numbers are less than 3
i don't konw whether i tell the problem clearly
i give a sample again
5 9 1 6 5
i want "5"

can anyone tell me how to solve this,thank you very much
sorry for my poor english

Go to advanced search