No. The problem is not like that.
For first example:
start:1 2 3 4 5 6 7 8 9 10
1st card:
1 2 . 4 5 6 7 8 9 10
1 2 . 4 5 . 7 8 9 10
1 2 . 4 5 . 7 8 . 10
2nd card:
1 2 . 4 5 . . 8 . 10
3rd card:
1 2 . 4 . . . 8 . 10
4th card:
1 2 . . . . . 8 . 10
5th card:
1 . . . . . . 8 . 10
1 ...
Search found 7 matches
- Sat Dec 16, 2006 1:08 pm
- Forum: Volume 4 (400-499)
- Topic: 402 - M*A*S*H
- Replies: 56
- Views: 21673
- Tue Jul 11, 2006 10:47 am
- Forum: Volume 6 (600-699)
- Topic: 616 - Coconuts, Revisited
- Replies: 37
- Views: 18236
- Tue Jul 04, 2006 10:51 am
- Forum: Volume 108 (10800-10899)
- Topic: 10856 - Recover Factorial
- Replies: 17
- Views: 17220
- Sun Jul 02, 2006 5:08 am
- Forum: Volume 106 (10600-10699)
- Topic: 10680 - LCM
- Replies: 38
- Views: 19678
10680 WA
Can anyone say where is wrong?
I try to solve it but fault :(
#define MAX 78599
int a[1000009];
int prime[MAX]={2,3,5},pows[168];
void calprime()
{
int i,j,k,flag;
for(i=3,j=7;i<MAX;j++,flag=1)
{
for(k=0;prime[k]*prime[k]<=j;k++)
if(j%prime[k]==0)
{
flag=0;
break;
}
if(flag)
prime[i ...
I try to solve it but fault :(
#define MAX 78599
int a[1000009];
int prime[MAX]={2,3,5},pows[168];
void calprime()
{
int i,j,k,flag;
for(i=3,j=7;i<MAX;j++,flag=1)
{
for(k=0;prime[k]*prime[k]<=j;k++)
if(j%prime[k]==0)
{
flag=0;
break;
}
if(flag)
prime[i ...
- Wed May 17, 2006 2:44 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10106 - Product
- Replies: 98
- Views: 40280
..
For example,
Your program print more.
Code: Select all
3
2
- Tue May 16, 2006 5:39 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11032 - Function Overloading
- Replies: 43
- Views: 22441
AC!
Actually the non-self-numbers generated by this formula
are about 20 000 only. Which is only about 2% of all
numbers generated by that formula. But still their existence
makes the problem harder.
Thank you for your hint!
I got AC. :)
But it used about 6.7sec...
Is there a faster method easy ...
- Tue May 16, 2006 2:44 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11032 - Function Overloading
- Replies: 43
- Views: 22441
Can anyone post test cases?
I already WA many times
So I want to test where my code go wrong
Can anyone post test cases for me?

So I want to test where my code go wrong

Can anyone post test cases for me?