Search found 19 matches

by tajbir2000
Wed Jun 09, 2010 7:28 pm
Forum: Volume 117 (11700-11799)
Topic: 11790 - Murcia's Skyline
Replies: 28
Views: 20035

Re: 11790 - Murcia's Skyline-WA

WA need critical input

#include<stdio.h>

#define size 10001
typedef struct{
long index;
long a;
}data;
data I[size],D[size];
int main(){
long i,j,n,T,cas=1,height[size],temp[size],max_i,max_d,max;

//freopen("i.txt","r",stdin);

scanf("%ld",&T);
while(T--){
printf("Case %ld. ",cas ...
by tajbir2000
Wed Sep 02, 2009 6:52 pm
Forum: Volume 102 (10200-10299)
Topic: 10282 - Babelfish
Replies: 48
Views: 27596

Re: 10282 - Babelfish

I am getting WA.....Where is the problem?

#include<iostream>
#include<map>
#include<string>

using namespace std;
map<string,int>M;
typedef struct{
char final[205];
}data;
data A[100005];

int main(){
int i,cnt,j,k;
char str[205],tempa[200],tempb[200];

//freopen("i.txt","r",stdin);
cnt=0 ...
by tajbir2000
Fri Jan 23, 2009 7:35 pm
Forum: Volume 113 (11300-11399)
Topic: 11368 - Nested Dolls
Replies: 9
Views: 6891

Re: 11368 - Nested Dolls

i have got some problems of my code
input.
1
3
9 6 10 5 10 7

output
2

(9 6,10 7)and(10 5)

but my code gives.
3
by tajbir2000
Fri Jan 23, 2009 6:35 pm
Forum: Volume 113 (11300-11399)
Topic: 11368 - Nested Dolls
Replies: 9
Views: 6891

why WA????


#include<stdio.h>
#include<stdlib.h>

typedef struct{
int H,W;
}doll;

doll d[20002];

compare_function(const void *a,const void *b){
doll *x= (doll *)a;
doll *y= (doll *)b;

if(x->W != y->W)return x->W - y->W;
else return x->H-y->H;
}


int main(){
int cas,n_doll,i,j,k,count;

scanf("%d ...
by tajbir2000
Tue Jan 20, 2009 4:03 pm
Forum: Volume 6 (600-699)
Topic: 602 - What Day Is It?
Replies: 56
Views: 28069

why WA???????help me


#include<stdio.h>

int main(){
int i,mon[]={31,28,31,30,31,30,31,31,30,31,30,31},sum,track;
char month[][15]={"January","February","March","April","May","June","July","August","September","October","November","December"};
char date[][15]={"Saturday","Sunday","Monday","Tuesday","Wednesday ...
by tajbir2000
Mon Jan 19, 2009 9:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10174 - Couple-Bachelor-Spinster Numbers.
Replies: 3
Views: 2550

Re: 10174 - Couple-Bachelor-Spinster Numbers

THANKS mf I HAVE GOT aC

THERE WERE SOME PROBLEMS IN MY CODE.....I HAD NOT CONSIDERED -VE INT AND
c) Find out how many square couple numbers are there within a certain range (including the terminal numbers).
AGAIN THANKS.......
by tajbir2000
Mon Jan 19, 2009 7:43 pm
Forum: Volume 101 (10100-10199)
Topic: 10174 - Couple-Bachelor-Spinster Numbers.
Replies: 3
Views: 2550

can any one give me some input of Spinster Number?????

i have not got 1!!!!!!!!!!!!! :roll:
by tajbir2000
Sun Jan 11, 2009 9:11 pm
Forum: Volume 114 (11400-11499)
Topic: 11482 - Building a Triangular Museum
Replies: 9
Views: 4392

Re: 11482 - Building a Triangular Museum

i m getting pe with this code pls help me....

#include<stdio.h>
int main(){
int m,n,i,l,j,k, temp,q,w, e,space,cnt=1;
while(scanf( "%d %d",&m,&n)&&m&&n){

printf("Triangular Museum %d\n",cnt);
temp=m*n-1;
for(j=1;j<=n; j++){
for(i=1;i<=m; i++){
for(k=1;k<=temp; k++)
printf(" ");
if(i ...
by tajbir2000
Sun Jan 11, 2009 8:44 pm
Forum: Volume 101 (10100-10199)
Topic: 10168 - Summation of Four Primes
Replies: 51
Views: 30007

why runtime error??????

Code: Select all

REMOVED AFTER AC
:D
by tajbir2000
Thu Jan 08, 2009 3:23 pm
Forum: Volume 9 (900-999)
Topic: 913 - Joana and the Odd Numbers
Replies: 32
Views: 17433

Re: 913 - Joana and the Odd Numbers

Re: 913 - Joana and the Odd Numbers

Post by sizogee on Wed Sep 10, 2008 3:24 am
Getting TLE...



ur program is not breaking at EOF.Read problem stat. wil u get N=0?????

code>>like this >>>
while(scanf("%lld",&x)==1 ...
by tajbir2000
Tue Jan 06, 2009 11:04 am
Forum: Volume 112 (11200-11299)
Topic: 11220 - Decoding the message.
Replies: 54
Views: 28440

why tle????pls help me

got AC
by tajbir2000
Sun Dec 28, 2008 10:48 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 64781

Re: 488wa!!!!!!!please help me!!!!!!!!where is the problem

i have got ac......... :lol: i had missed it
((((The outputs of two consecutive cases will be separated by a blank line.)))
by tajbir2000
Wed Oct 29, 2008 6:58 pm
Forum: Volume 114 (11400-11499)
Topic: 11482 - Building a Triangular Museum
Replies: 9
Views: 4392

Re: 11482 - Building a Triangular Museum

still getting wa :(
i have checked blank line case
by tajbir2000
Tue Oct 28, 2008 8:26 pm
Forum: Volume 114 (11400-11499)
Topic: 11482 - Building a Triangular Museum
Replies: 9
Views: 4392

11482 - Building a Triangular Museum

what's the problem???? :(
i m getting wa!!!!!


#include<stdio.h>
int main(){
int m,n,i,l,j,k, temp,q,w, e,space,cnt=1;
while(scanf( "%d %d",&m,&n)&&m&&n){
printf("Triangular Museum %d\n",cnt);
temp=m*n-1;
for(j=1;j<=n; j++){
for(i=1;i<=m; i++){
for(k=1;k<=temp; k++)
printf(" ");
if(i ...
by tajbir2000
Sun Oct 26, 2008 6:12 pm
Forum: Volume 114 (11400-11499)
Topic: 11495 - Bubbles and Buckets
Replies: 6
Views: 7033

Re: 11495 - Bubbles and Buckets using bubble sort tle

here is my code
#include<stdio.h>
int main(){
int cas,i,j,count,temp,a[100005];
while(scanf("%d",&cas)&&cas){
count=0;
for(i=0;i<cas;i++)scanf("%d",&a[i]);
for(i=0;i<cas-1;i++){
for(j=i+1;j<cas;j++){
if(a[i]>a[j]){
temp=a[i];
a[i]=a[j];
a[j]=temp;
count++;
}
}
}
if(count%2==0 ...

Go to advanced search