Why I m getting WA.
#include<stdio.h>
int main()
{
/*
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
*/
char cyper[26]={'z','y','x','w','v','u','t','s','r',
'q','p','o','n','m','l','k','j','i','h','g','f','e','d','c',
'b','a'};
char ch;
int test,T=1;
scanf("%d",&test ...
Search found 14 matches
- Sun Apr 24, 2011 4:19 am
- Forum: Volume 8 (800-899)
- Topic: 865 - Substitution Cypher
- Replies: 28
- Views: 21062
- Mon Mar 07, 2011 8:53 pm
- Forum: Volume 6 (600-699)
- Topic: 627 - The Net
- Replies: 18
- Views: 10617
WA: 627 - The Net (Systemdown)
Why i got WA everytime...I think its a very simple BFS.
#include<cstdio>
#include<stack>
#include<queue>
#include<set>
using namespace std;
class Net{
private:
long I,J,path[305],m,n,sou,des,test;
queue<long> Q;
stack<long> P;
set<long> s[305];
set<long>::iterator it;
bool flag[305 ...
- Sun Feb 27, 2011 10:53 pm
- Forum: Volume 6 (600-699)
- Topic: 657 - The die is cast
- Replies: 46
- Views: 30395
WA: 657 - The die is cast
I dnt know why i getting WA...I passed all I/O in boards...Help me pls..Here is my code.. :cry:
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
long t=0;
class Die{
private:
char cast[60][60],ch;
vector<long> v,x,s,sorting;
long I,J;
public:
bool Input ...
- Thu Jan 20, 2011 7:52 am
- Forum: Volume 6 (600-699)
- Topic: 627 - The Net
- Replies: 18
- Views: 10617
kisuna
vul sobi vul
- Wed Dec 15, 2010 1:20 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10856 - Recover Factorial
- Replies: 17
- Views: 17133
Re: 10856 - Recover Factorial
On this problem Read this line Carefully to avoid WA.
"Factorial numbers are expressible as the multiplication of zero or more prime numbers."
Faiem Rahman
MBSTU,Bangladesh.
"Factorial numbers are expressible as the multiplication of zero or more prime numbers."
Faiem Rahman
MBSTU,Bangladesh.
- Fri Nov 12, 2010 2:53 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11340 - Newspaper
- Replies: 154
- Views: 68858
Re: 11340 - Newspaper

In this problem must use "unsigned char"...Or u will get WA...again and again just like me.

- Thu Nov 04, 2010 10:00 pm
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 21943
WA: 445 - Marvelous Mazes
#include<stdio.h>
int main()
{
char ch;long I,sum=0,n=0;
while((ch=getchar())!=EOF)
{
if(ch>=48&&ch<=57)
{sum=sum+ch-48;n=1;
}
else
{
if(ch=='b')
{for(I=1;I<=sum;I++)
printf(" ");
}
else if(ch=='!')
{ printf("\n");
}
else if(ch!='\n')
{
for(I=1;I<=sum;I++)
printf("%c",ch ...
int main()
{
char ch;long I,sum=0,n=0;
while((ch=getchar())!=EOF)
{
if(ch>=48&&ch<=57)
{sum=sum+ch-48;n=1;
}
else
{
if(ch=='b')
{for(I=1;I<=sum;I++)
printf(" ");
}
else if(ch=='!')
{ printf("\n");
}
else if(ch!='\n')
{
for(I=1;I<=sum;I++)
printf("%c",ch ...
- Thu Oct 14, 2010 1:46 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10302 - Summation of Polynomials
- Replies: 29
- Views: 18956
Re: 10302 - Summation of Polynomials
whats the problem of the formula (n*(n+1)/2)^2 ???
i got AC.but using another formula to solve it.
anyone can explain me whats happen with this formula???
i got AC.but using another formula to solve it.
anyone can explain me whats happen with this formula???
- Tue Sep 07, 2010 8:57 pm
- Forum: Volume 5 (500-599)
- Topic: 591 - Box of Bricks
- Replies: 80
- Views: 24994
Re: 591
"Output a blank line after each set."
Read this Carefully...its a problem about input/Output...
ur Output should look like.......
6
5 2 4 1 7 5
Set #1
The minimum number of moves is 5.
4
5 10 3 2
Set #2
The minimum number of moves is 5.
0
Wish ur best luck....
Read this Carefully...its a problem about input/Output...
ur Output should look like.......
6
5 2 4 1 7 5
Set #1
The minimum number of moves is 5.
4
5 10 3 2
Set #2
The minimum number of moves is 5.
0
Wish ur best luck....
- Tue Sep 07, 2010 8:50 pm
- Forum: Volume 5 (500-599)
- Topic: 591 - Box of Bricks
- Replies: 80
- Views: 24994
Re: 591
why u r sorting???
it is possible without sorting...and very fast...
it is possible without sorting...and very fast...
- Sat Sep 04, 2010 9:47 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10005 - Packing polygons
- Replies: 49
- Views: 23102
10005-WA
#include<stdio.h>
#include<math.h>
double a[101][2],b,i,j,k,m,p,c=0, l,r;
main()
{
while(scanf("%lf",&b)==1)
{
if(b==0)
break;
c=0;
for(i=1;i<=b;i++)
for(j=0;j<2;j++)
scanf("%lf",&a [j]);
scanf("%lf",&r);
r=r*2;
p=b-1;
m=2;
for(i=1;i<b;i++)
{
k=m;
for(j=p;j>=1;j--)
{
l=((a [0]-a[k][0])*(a ...
#include<math.h>
double a[101][2],b,i,j,k,m,p,c=0, l,r;
main()
{
while(scanf("%lf",&b)==1)
{
if(b==0)
break;
c=0;
for(i=1;i<=b;i++)
for(j=0;j<2;j++)
scanf("%lf",&a [j]);
scanf("%lf",&r);
r=r*2;
p=b-1;
m=2;
for(i=1;i<b;i++)
{
k=m;
for(j=p;j>=1;j--)
{
l=((a [0]-a[k][0])*(a ...
- Thu Sep 02, 2010 7:30 am
- Forum: Volume 4 (400-499)
- Topic: 406 - Prime Cuts
- Replies: 187
- Views: 60503
Re: 406-WA
Now I got AC...
- Thu Sep 02, 2010 7:28 am
- Forum: Volume 4 (400-499)
- Topic: 406 - Prime Cuts
- Replies: 187
- Views: 60503
Re: 406-WA
I found my problem.
The Output should....
10 2
10 2: 2 3 5
1 1
1 1: 1
my mistake is blank space between output....
The Output should....
10 2
10 2: 2 3 5
1 1
1 1: 1
my mistake is blank space between output....
- Thu Sep 02, 2010 12:43 am
- Forum: Volume 4 (400-499)
- Topic: 406 - Prime Cuts
- Replies: 187
- Views: 60503
Output-406
Remember,
The Output should....
1 1
1 1: 1
(blank space is here)
21 2
21 2: 5 7 11
Now try......
The Output should....
1 1
1 1: 1
(blank space is here)
21 2
21 2: 5 7 11
Now try......