I am new at forum. I got wrong answer, but unable to understand why?
Here is my code
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
int n=0;
while(cin>>n && n!=EOF)
{
bool pqBool = true;
int c=0,v=0, q=0,st=0, j=0, k =0, pq =0, aLength=0, sLength=0 ...
Search found 8 matches
- Thu Apr 16, 2015 8:40 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11995 - I Can Guess the Data Structure!
- Replies: 60
- Views: 19031
- Wed Dec 18, 2013 11:12 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11309 - Counting Chaos
- Replies: 18
- Views: 10254
WA: 11309 - Counting Chaos
Why I got wrong answeer. please help anyone
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<cstdio>
using namespace std;
int main ()
{
int i, j, t, x, m, n, a[10]={0};
cin>>t;
while(t--)
{
scanf("%d:%d",&m,&n);
x = 100*m+n;
while(1)
{
x++;
if(x%100==60 ...
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<cstdio>
using namespace std;
int main ()
{
int i, j, t, x, m, n, a[10]={0};
cin>>t;
while(t--)
{
scanf("%d:%d",&m,&n);
x = 100*m+n;
while(1)
{
x++;
if(x%100==60 ...
- Sat Dec 14, 2013 5:28 pm
- Forum: Volume 120 (12000-12099)
- Topic: 12032 - The Monkey and the Oiled Bamboo
- Replies: 23
- Views: 12597
Re: 12032
I can not find the error. please help......
/**************************************12032_monkey.cpp**************************************************/
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
long int t, n, m, p, l, d, i, a[100000 ...
/**************************************12032_monkey.cpp**************************************************/
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
long int t, n, m, p, l, d, i, a[100000 ...
- Tue Dec 03, 2013 6:26 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10591 - Happy Number
- Replies: 61
- Views: 30979
Re: 10591 - Happy Number
i cannot understand why i get wrong answer for 11011111
/************************************10591_Happy_Number.cpp*************************************/
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
unsigned long long n, m, i, j, k, sum;
cin>>n;
j = 0;
while(n ...
/************************************10591_Happy_Number.cpp*************************************/
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
unsigned long long n, m, i, j, k, sum;
cin>>n;
j = 0;
while(n ...
- Thu Nov 28, 2013 4:45 pm
- Forum: Volume 2 (200-299)
- Topic: 299 - Train Swapping
- Replies: 81
- Views: 24014
299 why worng answer? please help me
/************************************299_train_swaping.cpp*************************************/
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n, m, a[1000]={0}, i, j, k;
cin>>n;
while(n--)
{
scanf("%d",&k);
for(i = 0;i<k;i++)
{
scanf("%d",&a );
}
m =0;
for(i ...
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n, m, a[1000]={0}, i, j, k;
cin>>n;
while(n--)
{
scanf("%d",&k);
for(i = 0;i<k;i++)
{
scanf("%d",&a );
}
m =0;
for(i ...
- Fri Nov 22, 2013 8:34 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11455 - Behold my quadrangle
- Replies: 21
- Views: 24979
Re: 11455 - Behold My Quadrangle
reza_cse08 wrote:First sort the value then check it.
"Do not think think about the property (a+b+c)>d(for this problem) only check (a+b+c)>=d. although it can not make a quadrangle"
For this problem the uvatoolkit also give the wrong answer.
- Fri Nov 22, 2013 8:34 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11455 - Behold my quadrangle
- Replies: 21
- Views: 24979
Re: 11455 - Behold My Quadrangle
First sort the value then check it.
"Do not think think about the property (a+b+c)>d(for this problem) only check (a+b+c)>=d. although it can not make a quadrangle"
For this problem the uvatoolkit also give the wrong answer.
"Do not think think about the property (a+b+c)>d(for this problem) only check (a+b+c)>=d. although it can not make a quadrangle"
For this problem the uvatoolkit also give the wrong answer.
- Mon Nov 18, 2013 7:07 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11958 - Coming Home
- Replies: 24
- Views: 8258
Re: 11958 - Coming Home
why I get wrong answer .................
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
unsigned long long int aa[1000], n, t, bf, bf1, af, af1, i, a, temp, time, m;
char c;
t =0;
cin>>n;
while(n!=0)
{
t++;
cin>>a;
cin>>bf1>>c>>af1;
temp = bf1 ...
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
unsigned long long int aa[1000], n, t, bf, bf1, af, af1, i, a, temp, time, m;
char c;
t =0;
cin>>n;
while(n!=0)
{
t++;
cin>>a;
cin>>bf1>>c>>af1;
temp = bf1 ...