WHY WA !!?
#include <iostream>
using namespace std;
int main ()
{
int t=1,num[99],sum[10000],s,c;
bool res;
while (cin>>s)
{
res=true;
for (int j=0;j<s;j++)
cin>>num[j];
for (int k=0;k<s-1;k++)
if (num[k]<1 || num[k]>=num[k+1] )
{
res=false;
break;
}
c=0;
for (int i=0;i<s;i ...
Search found 6 matches
- Mon Mar 18, 2013 6:55 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11063 - B2-Sequence
- Replies: 73
- Views: 51906
- Mon Mar 18, 2013 6:54 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11063 - B2-Sequence
- Replies: 73
- Views: 51906
Re: Why WA in UVa: 11063 - B2-Sequence?
WHY WA !!?
#include <iostream>
using namespace std;
int main ()
{
int t=1,num[99],sum[10000],s,c;
bool res;
while (cin>>s)
{
res=true;
for (int j=0;j<s;j++)
cin>>num[j];
for (int k=0;k<s-1;k++)
if (num[k]<1 || num[k]>=num[k+1] )
{
res=false;
break;
}
c=0;
for (int i=0;i<s;i ...
#include <iostream>
using namespace std;
int main ()
{
int t=1,num[99],sum[10000],s,c;
bool res;
while (cin>>s)
{
res=true;
for (int j=0;j<s;j++)
cin>>num[j];
for (int k=0;k<s-1;k++)
if (num[k]<1 || num[k]>=num[k+1] )
{
res=false;
break;
}
c=0;
for (int i=0;i<s;i ...
- Sat Mar 16, 2013 4:45 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 65238
488 - Triangle Wave
I really dont know whats wrong with my code !?
I got WA!!!
#include <iostream>
using namespace std;
int main()
{
int t,a,f;
cin>>t;
for (int i=0;i<t;i++)
{
cin>>a>>f;
for (int i=0;i<f;i++)
{
for (int j=1;j<=a;j++)
{
cout<<j;
for (int k=1;k<j;k++)
{
cout<<j;
}
cout<<endl ...
I got WA!!!
#include <iostream>
using namespace std;
int main()
{
int t,a,f;
cin>>t;
for (int i=0;i<t;i++)
{
cin>>a>>f;
for (int i=0;i<f;i++)
{
for (int j=1;j<=a;j++)
{
cout<<j;
for (int k=1;k<j;k++)
{
cout<<j;
}
cout<<endl ...
- Sat Mar 16, 2013 7:30 am
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 65238
Re: 488 - PRESENTATION ERROR!
Plz Help !
- Sat Mar 16, 2013 2:01 am
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 65238
Re: 488 - PRESENTATION ERROR!
here is my I/O :
i dont see anything wrong !!
Code: Select all
2
3
2
1
22
333
22
1
1
22
333
22
1
4
3
1
22
333
4444
333
22
1
1
22
333
4444
333
22
1
1
22
333
4444
333
22
1
- Fri Mar 15, 2013 5:50 pm
- Forum: Volume 4 (400-499)
- Topic: 488 - Triangle Wave
- Replies: 270
- Views: 65238
Re: 488 - PRESENTATION ERROR!
Whats wrong with this code please !!! .. i checked the I/O !! and nothing !!
I got WA!
#include <iostream>
using namespace std;
int main()
{
int t,a,f;
cin>>t;
for (int i=0;i<t;i++)
{
cin>>a>>f;
for (int i=0;i<f;i++)
{
for (int j=1;j<=a;j++)
{
cout<<j;
for (int k=1;k<j;k++)
{
cout<<j ...
I got WA!
#include <iostream>
using namespace std;
int main()
{
int t,a,f;
cin>>t;
for (int i=0;i<t;i++)
{
cin>>a>>f;
for (int i=0;i<f;i++)
{
for (int j=1;j<=a;j++)
{
cout<<j;
for (int k=1;k<j;k++)
{
cout<<j ...