[cpp]
#include<iostream.h>
#include<math.h>
long x,y,p,q;
long A[50000];
int main()
{
bool k;
long E,e,D1,D2,arm;
cin>>E;
bool sxal;
for(e=0;e<E;e++)
{
k=1;
sxal=1;
cin>>p>>q;
long h;
D1=(long)pow(p+3*q,2)-8*q*q;
arm=(long)sqrt(D1);
if(D1<0 || arm*arm!=D1)
{
cout<<"Case "<<e+1 ...
Search found 5 matches
- Tue Jul 01, 2003 9:16 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 20159
- Sun Jun 15, 2003 7:20 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 20159
- Sun Jun 15, 2003 7:17 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10512 - A Day in Math-land
- Replies: 52
- Views: 20159
10512
I get WA :oops:
#include<iostream.h>
#include<math.h>
long x,y,p,q;
long A[50000];
int main()
{
bool k;
long E,e,D1,D2,arm;
cin>>E;
bool sxal;
//cout<<(long)sqrt(-9);
for(e=0;e<E;e++)
{
k=1;
sxal=1;
cin>>p>>q;
long h;
/*
if(p==0 && q==0)
{
cout<<"Case "<<e+1<<":\n";
cout<<p ...
#include<iostream.h>
#include<math.h>
long x,y,p,q;
long A[50000];
int main()
{
bool k;
long E,e,D1,D2,arm;
cin>>E;
bool sxal;
//cout<<(long)sqrt(-9);
for(e=0;e<E;e++)
{
k=1;
sxal=1;
cin>>p>>q;
long h;
/*
if(p==0 && q==0)
{
cout<<"Case "<<e+1<<":\n";
cout<<p ...
- Fri May 23, 2003 2:11 pm
- Forum: Volume 1 (100-199)
- Topic: 112 - Tree Summing
- Replies: 137
- Views: 32293
Da qo hamar plav utel chi
Et Xndir@ Exela mer Olimpiadayi xndir@ ev mi txa lucela.Gna iranic harcru.
- Fri May 23, 2003 2:00 pm
- Forum: Volume 3 (300-399)
- Topic: 357 - Let Me Count The Ways
- Replies: 90
- Views: 17674
[b] 357 Why WA?[/b]
[cpp]
This is my code !!!
#include<iostream.h>
#include<stdio.h>
long ans[100][6];
int a[6];
double r;
int i,n,k,j;
long m;
void findans()
{
long s;
a[1]=1;a[2]=5;a[3]=10;a[4]=25;a[5]=50;
for (i=1;i<6;i++)
for (j=1;j<100;j++)
{
if (j<a[i])
ans[j][i]=0;
else
{
if(j==a[i])
ans[j ...
This is my code !!!
#include<iostream.h>
#include<stdio.h>
long ans[100][6];
int a[6];
double r;
int i,n,k,j;
long m;
void findans()
{
long s;
a[1]=1;a[2]=5;a[3]=10;a[4]=25;a[5]=50;
for (i=1;i<6;i++)
for (j=1;j<100;j++)
{
if (j<a[i])
ans[j][i]=0;
else
{
if(j==a[i])
ans[j ...