2008年9月28日星期日

Using Mathematica(New kind of science) to crack EulerProject.org

Using Mathematica(New kind of science) to crack EulerProject.org

2008年9月27日星期六

First TopCoder Program (SRM 291 DIV II)

I am still confused about string and vector and how to calculate the score( I got 95 out of 250, but why?).....I won't give up.
PS: it's really painful to change Pascal to C++. It's ulgy to dispaly my code in Blogger...

#include

class FarFromPrimes{
public:

int count(int A, int B);
{
int s[100000];
int flag;
int ans=0;
for (int i=0;i<=100000;i++)
s[i]=0;
for (int i=2;i<=317;i++)
{
if (s[i]==0)
{
for (int j=2;j<=100000/i;j++)
s[i*j]=1;
}
}
for (int i=A;i<=B;i++)
{
flag=0;
for (int j=i-10;j<=i+10;j++)
if (s[j]==0)
{
flag=1;
break;
}
if (flag==0)
ans++;
}
return ans;
}
}

2008年9月12日星期五

Life Check List

1. Make a Nuclear Fusion Reactor 2. Code a Operating System or Programming Language 3. U TRIZ 4. U Dynamic Programming 5. U Ludwig Wittgenstein at his logical level 6. Abolish English + U English 7. Develop Anti-Symbolic Meta-Mathematics 8. U ENIAC(speclize of Electric Engineering), Make a Chipset 9. Develop Biomimic 2.1. U AVL inside Linux 写一段相声 Pure Online Judge about Dynamic Programming