Search found 13 matches

by f.maru
Fri Oct 04, 2013 1:29 pm
Forum: Volume 101 (10100-10199)
Topic: 10114 - Loansome Car Buyer
Replies: 38
Views: 21219

Re: 10114 - Loansome Car Buyer

Hi
my program answers are wrong but they are logical because i check them.

#include<iostream>
using namespace std;
int main()
{
double month, down,loan,numd,d[200]={0};
while(cin>>month>>down>>loan>>numd)
{

int q;
for(int i=0;i<numd;i++)
{
cin>>q;
cin>>d[q];
}
double set;
for(int i=0 ...
by f.maru
Thu Sep 12, 2013 11:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 20615

Re: 10963 - The Swallowing Ground

Sry but I had submitted my code without printing blank line befor reading n but I got WA and it the output is same as what wrote
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,y1,y2,q,tes;
bool flag=false;
cin>>tes;
int ms;
for(int j=1;j<=tes;j++)
{
cin>>n;
for ...
by f.maru
Wed Sep 11, 2013 11:52 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 20615

Re: 10963 - The Swallowing Ground

You ean don't use cout<<endl before cin>>n in the for?
I tried this but I got WA.
And I think I have to seperate output with bank line except first output like leap year...
by f.maru
Wed Sep 11, 2013 3:18 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 20615

Re: 10963 - The Swallowing Ground

i tried sample and i got correct answer
this is my new code i still don't know what to do if someone can help me

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,y1,y2,q,tes;
bool flag=false;
cin>>tes;
int ms;
for(int j=1;j<=tes;j++)
{
cout<<endl;
cin>>n;
for ...
by f.maru
Wed Sep 11, 2013 1:25 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 83863

Re: 10070 - Leap Year or Not Leap Year and …

TNX brianfry713 i got ac
by f.maru
Tue Sep 10, 2013 12:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10963 - The Swallowing Ground
Replies: 47
Views: 20615

Re: 10963 - The Swallowing Ground

can sb help me i get Wa
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,y1,y2,q,tes;
bool flag=false;
cin>>tes;
int ms;
for(int j=2;j<=tes;j++)
{
cout<<endl;
cin>>n;
for(int t=1;t<=n;t++)
{

cin>>y1>>y2;
q=abs(y1-y2);
if (t==1)
ms=q;
if (q!=ms)flag=true ...
by f.maru
Tue Sep 10, 2013 9:13 am
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 83863

Re: 10070 - Leap Year or Not Leap Year and …

So how can i notice if it is the last case
and i think i cant use this
#include<iostream>
#include <math.h>
#include <cmath>
#include <string>
using namespace std;
int sum,m1,m2;
void sumi(string v)
{
m1=m2=sum=0;
for (int t=0;t<v.length();t++)
{
if (t%2==0)
m1+=v[t]-48;
else
m2+=v[t]-48 ...
by f.maru
Mon Sep 09, 2013 9:42 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 83863

Re: 10070 - Leap Year or Not Leap Year and …

Hi guys, this is my program it gave true answer for all test case but i got WA can sb help me plzzzz

#include<iostream>
#include <math.h>
#include <cmath>
#include <string>
using namespace std;
int sum,m1,m2;
void sumi(string v)
{
m1=m2=sum=0;
for (int t=0;t<v.length();t++)
{
if (t%2==0)
m1 ...
by f.maru
Thu Aug 08, 2013 1:21 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 21931

Re: 445 - Marvelous Mazes - Wrong answer

i need some help what is wrong with this code?
#include<iostream>
#include<string>
using namespace std;
void draw(int n,char t)
{
if (t!='!')
for(int i=1;i<=n;i++)
cout<<t;
else
cout<<endl;
}
void drw (string a)
{
if (a!="")
{
int w=0;
while(w<=a.length())
{

if (a[w]=='!')
draw(1 ...
by f.maru
Thu Aug 08, 2013 12:03 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 116641

Re: 102 whats wrong with this?

TNX i got AC
by f.maru
Wed Aug 07, 2013 3:34 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 116641

Re: 102 whats wrong with this?

i have tried that but i got WA answer
#include<iostream>
using namespace std;

int main()
{
long long bin[4][4],q[7];
while(cin>>bin[1][1]>>bin[1][2]>>bin[1][3]>>bin[2][1]
>>bin[2][2]>>bin[2][3]>>bin[3][1]>>bin[3][2]>>bin[3][3])
{
long long min=10000000,e=0;
//bcg
q[1]=bin[2][1]+bin[3][1 ...
by f.maru
Sat Aug 03, 2013 2:23 pm
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 116641

Re: 102 whats wrong with this?

WA can sb help?
#include<iostream>
using namespace std;
long long bin[4][4],q[6];
int main()
{
while(cin>>bin[1][1]>>bin[1][2]>>bin[1][3]>>bin[2][1]
>>bin[2][2]>>bin[2][3]>>bin[3][1]>>bin[3][2]>>bin[3][3])
{
int min=100000,e;
//bcg
q[1]=bin[2][1]+bin[3][1]+bin[1][3]+bin[3][3]+bin[1][2]+bin[2 ...
by f.maru
Wed Jul 31, 2013 2:38 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 56481

Re: 272 - TEX Quotes (WA)

Hi guys
i think my program is correct but i got WA
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string g,f;

int w=1;
while(getline(cin,g))
{
f.clear();
if(g.length()>0)
{
for(int i=0;i<=g.length();i++)
{

if (int(g )==34)
{

if(w%2==1)
f+="``";
if(w%2 ...

Go to advanced search