## Search found 36 matches

Fri Sep 07, 2012 8:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10006 - Carmichael Numbers
Replies: 66
Views: 20109

### Re: 10006 WA. Help Me!

Thank You BrianFry. I Got ACCCCCCCCCCCCCCCC
Fri Sep 07, 2012 7:10 pm
Forum: Volume 100 (10000-10099)
Topic: 10006 - Carmichael Numbers
Replies: 66
Views: 20109

### Re: 10006 WA. Help Me!

brianfry713 wrote:30 is normal.
i changed but again WA!
Mon Sep 03, 2012 2:20 am
Forum: Volume 100 (10000-10099)
Topic: 10006 - Carmichael Numbers
Replies: 66
Views: 20109

### 10006 WA. Help Me!

Code: Select all

``````    #include<stdio.h>
#include<math.h>
#define M 80000

char prime[M];

int main()
{
long n,i,c,l,flag;
sieve();
while(1)
{
scanf("%ld",&n); if(n==0) break;
printf("AC");
}
return 0;
}

``````
Wed Jul 25, 2012 9:17 am
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 24723

### 531 RE!!

My compiler is Code Block-10.0, It can compile my code but why UVA show RE???
Any one help me!!!

Code: Select all

``removed``
Thu Jul 19, 2012 10:16 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 35314

### 583 TLE

I am getting TLE. Any 1 help me 2 solve. #include<stdio.h> #include<math.h> int isPrime(long n) { long i,len=sqrt(n); for(i=2;i<=len;i++) { if(n%i==0) return 0; } return 1; } void recurtion(long n) { if(n<2) return 0; long i,len; for(i=2;;i++) { if(n%i==0) { if(isPrime(i)==1) { printf(" x"); printf(...
Tue Jul 17, 2012 2:05 pm
Forum: Volume 3 (300-399)
Topic: 389 - Basically Speaking
Replies: 94
Views: 21668

### Re: 389

brianfry713 wrote:On the sample I/O everything is not right justified.
Thank u Brianfry.
Sun Jul 15, 2012 7:40 pm
Forum: Volume 3 (300-399)
Topic: 389 - Basically Speaking
Replies: 94
Views: 21668

### 389

Code: Select all

``````AC
``````
Fri Jul 13, 2012 11:28 pm
Forum: Volume 119 (11900-11999)
Topic: 11965 - Extra Spaces
Replies: 31
Views: 7334

### 11965 why TLE???

#include<stdio.h> #include<string.h> void dis(char str[600]) { int len=strlen(str),i,flag=0; for(i=0;i<len;i++) { if(str[i]==' ' && flag==0) { printf("%c",str[i]); flag=1; } else if(str[i]!=' ') { printf("%c",str[i]); flag=0; } }printf("\n"); } int main() { int n,flag,m,i,cas=0; char c,str[600]; sc...
Fri May 25, 2012 2:08 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### Re: 10608 Why RE??

I modified my code but i am getting RE
Tue May 15, 2012 9:28 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### Re: 10608 Why RE??

brianfry713 wrote:Input:

Code: Select all

``````2
2 1
1 2
2 1
1 2``````
AC output:

Code: Select all

``````2
2``````
TLE!!!!!!!!!
Fri Apr 20, 2012 1:02 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### Re: 10608 Why RE??

TLE!!!!!
Thu Apr 19, 2012 7:56 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### Re: 10608 Why RE??

You fixed the issue you were having before, trying to access beyond the limit of the array. Now I think you might be getting RE because you are trying put too much memory on the stack. Instead of declaring a huge local array long a_mat[c+1][c+1] where c can be up to 30000, and the values are only 0...
Tue Apr 17, 2012 10:53 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### Re: 10608 Why RE??

brianfry713 wrote:if you declare a_mat of size c then you can only access up to c-1.

You're getting a seg fault during the sample input on line 16: a_mat[j]=0;

I could not understand what should i do here "a_mat[j]=0".
Tue Apr 17, 2012 4:08 pm
Forum: Volume 106 (10600-10699)
Topic: 10608 - Friends
Replies: 75
Views: 25972

### 10608 Why RE??

I can not understand why RE! Please Any One Help Me! :( #include<stdio.h> #define size 31000 bool adj_mat[size][size],visited[size]; main() { long n,node,con_no,a,b,i,dequeue,counter,tp,friends; scanf("%ld",&n); while(n--) { scanf("%ld %ld",&node,&con_no); if(con_no==0) printf("0\n"); else { adj_mat...
Tue Apr 17, 2012 8:50 am
Forum: Volume 117 (11700-11799)
Topic: 11716 - Digital Fortress
Replies: 39
Views: 10701

### Re: 11716 Why RE???????????

brianfry713 wrote:You're assuming there are only up to 1000 characters per line when the problem statement says up to 10000.
Thank You!