Search found 10 matches

by Nut_Boltu
Sat May 18, 2013 9:02 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 97041

Re: 10200 - Prime Time

thanks brianfry713. i changed the data type from long int to int.
and also changed the line " printf("%0.2lf\n",result);" to "printf("%0.2lf\n",result+1e-7);".
Got AC. :)
by Nut_Boltu
Fri May 17, 2013 11:54 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 97041

Re: 10200 - Prime Time

First i got WA/Now i m getting RE.anyone plz help.

#include<iostream>
#include<cmath>
#include<cstdio>
#include<cstring>
using namespace std;
long int prime [100010043];

bool IsPrime(long int num)
{
for(long int i=3;i<=sqrt(num);i+=2)
{
if(!(num%i)) return false;
}
return true;
}
void ...
by Nut_Boltu
Tue Mar 19, 2013 7:12 pm
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 52009

11059 - Maximum Product

Why m i getting WA? plz anyone reply.

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
long long n,product,arr[25],MaxP;
int count=1;
while(cin>>n)
{
for(int i=0;i<n;i++) cin>>arr[i];

MaxP=0;
for(int i=0;i<n;i++)
{

for(int j=i;j<n;j++)
{
product = 1;
for(int k=i ...
by Nut_Boltu
Sun Mar 17, 2013 6:55 am
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 52009

Re: 11059 - Maximum Product

I m getting WA. plz Help.

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
long long n,product,arr[25],MaxP;
int count=1;
while(cin>>n)
{
for(int i=0;i<n;i++) cin>>arr[i];

MaxP=0;
for(int i=0;i<n;i++)
{

for(int j=i;j<n;j++)
{
product = 1;
for(int k=i;k<=j;k ...
by Nut_Boltu
Tue Mar 12, 2013 8:16 pm
Forum: Volume 118 (11800-11899)
Topic: 11804 - Argentina
Replies: 11
Views: 5966

Re: 11804 - Argentina

Thanks. Get AC. :)
by Nut_Boltu
Mon Mar 11, 2013 10:31 pm
Forum: Volume 118 (11800-11899)
Topic: 11804 - Argentina
Replies: 11
Views: 5966

Re: 11804 - Argentina

I m getting WA. PLz Help :(

#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>

using namespace std;

struct playerInfo
{
char name[50];
int attackingAbility;
int defendingAbility;
};
bool comparebyAttack(const playerInfo &a,const playerInfo &b)
{
if(a ...
by Nut_Boltu
Fri Jan 18, 2013 1:05 pm
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 31488

Re: 306 Cipher (WA)

Thanks. i just skipped the line "After each block there is one empty line."
I printed empty line in between two blocks. :(
by Nut_Boltu
Thu Jan 17, 2013 4:52 pm
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 31488

306 Cipher (WA)

I m getting WA. please someone help.
Here's my code below:


#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int Cycle[201][201];
int numofpos[201];

void findCycle(int N,int S[])
{
int find[201],count,init;
for(int j=0;j<N;j++)
{
init=j;
for(int i=0;i<N;i++) find[i ...
by Nut_Boltu
Thu Dec 13, 2012 3:32 pm
Forum: Volume 125 (12500-12599)
Topic: 12578 - 10:6:2
Replies: 16
Views: 6466

Re: 12578 - 10:6:2

thanks.... ACC. :D
by Nut_Boltu
Wed Dec 12, 2012 8:30 pm
Forum: Volume 125 (12500-12599)
Topic: 12578 - 10:6:2
Replies: 16
Views: 6466

12578 - 10:6:2

i m getting WA!!!.
plz Help.

#include<cstdio>
#include<cmath>
int main()
{
int T,L;
double redArea,greenArea;
scanf("%d",&T);
while(T--)
{
scanf("%d",&L);
int r=L/5;
int W = L*6/10;
redArea=acos(-1)*pow(r,2);
greenArea=L*W-redArea;
printf("%.2lf %.2lf\n",redArea,greenArea);
}

return 0 ...

Go to advanced search