I have tested several inputs & got right answer. Then why am I getting WA . Plz someone help. Here is my code:
#include<iostream>
#include<cmath>
using namespace std;
#define n 100000
int a[n];
int pr[50000];
int main()
{
int i,j;
for(i=0;i<n;i++)
a[i]=0;
a[1]=1;
for(i=2;i<n;i++)
{
if ...
Search found 2 matches
- Thu Feb 24, 2011 10:09 am
- Forum: Volume 5 (500-599)
- Topic: 583 - Prime Factors
- Replies: 171
- Views: 61643
- Wed Feb 16, 2011 8:07 pm
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 60470
Re: 495 Why WA??
if everything is right still getting WA
try making the array size 10000 instead of 5002
try making the array size 10000 instead of 5002