Search found 12 matches

by Mizanur Rahman(IUK)
Fri Dec 10, 2010 8:44 pm
Forum: Volume 117 (11700-11799)
Topic: 11716 - Digital Fortress
Replies: 39
Views: 11081

Re: 11716 - Digital Fortress

Why WA please help me ,i am tired #include<iostream.h> #include<math.h> #include<string.h> #include<stdio.h> int main() { char a[11050]; int i,n,j,Case,k,p; cin>>Case; for(k=0;k<Case;k++) { scanf("%[^\n]",a);i=getchar(); n=strlen(a); p=sqrt(n); if(p*p==n) { for(j=0;j<p;j++) { i=j; for(;i<n;i=i+p) co...
by Mizanur Rahman(IUK)
Fri Dec 10, 2010 8:38 pm
Forum: Volume 117 (11700-11799)
Topic: 11743 - Credit Check
Replies: 6
Views: 3443

11743 - Credit Check

#include<stdio.h> #include<iostream.h> int main() { long int i,n; cin>>n; for(i=1;i<=n;i++) {long int j,sum1,k,count,tmp; char a[20]={'0'}; sum1=0; scanf("%[^\n]s",a);getchar(); count=0;j=0; while(count!=16) { if(a[j]!=32) { k=int (a[j])-48; if(count%2==0) { k=k*2; if(k>=10) { tmp=k%10; k=k/10; k=k...
by Mizanur Rahman(IUK)
Wed Dec 08, 2010 6:08 pm
Forum: Volume 115 (11500-11599)
Topic: 11541 - Decoding
Replies: 12
Views: 4827

Re: 11541 - Decoding WA Please help me

#include<iostream.h> #include<stdio.h> #include<string.h> int main() { char a[2000]; int i,j,n[2000],t,k,count=0; cin>>t; for(k=1;k<=t;k++) {count=0; i=0; scanf("%c",&a[i]); cout<<"Case "<<k<<": "; while(a[i]!='\n') { i++; scanf("%d%c",&n[i-1],&a[i]); if((int(a[i-1])>=65)&&(int(a[i-1])<=90))///////...
by Mizanur Rahman(IUK)
Tue Dec 07, 2010 5:41 pm
Forum: Volume 118 (11800-11899)
Topic: 11876 - N + NOD (N)
Replies: 9
Views: 4478

Re: 294-Divisors WA please help me

#include<stdio.h> #include<math.h> unsigned long int divisor(unsigned long int a) { unsigned long int i,count=0,tmp=sqrt(a); //if(a==1)return -1; for(i=1;i<=tmp;i++) { if(a%i==0) count=count+2; } if(a==tmp*tmp)count=count--; return count; } int main() { unsigned long int n,i,count,tmp=0,ans,a,b,j; ...
by Mizanur Rahman(IUK)
Mon Dec 06, 2010 9:08 pm
Forum: Volume 115 (11500-11599)
Topic: 11530 - SMS Typing
Replies: 41
Views: 8575

Re: 11530 - sms typing -- Why WA???? Please help me

#include<iostream.h> #include<stdio.h> int main() { long int i,n,count; char a; cin>>n; for(i=0;i<n;i++) { count=0; a=getchar(); while(a!='\n') { if(a=='a'||a=='d'||a=='g'||a=='j'||a=='m'||a=='p'||a=='t'||a=='w'||a==' ') count=count+1; else if(a=='b'||a=='e'||a=='h'||a=='k'||a=='n'||a=='q'||a=='u'|...
by Mizanur Rahman(IUK)
Mon Nov 01, 2010 6:26 pm
Forum: Volume 118 (11800-11899)
Topic: 11898 - Killer Problem
Replies: 6
Views: 3333

Re: 11898 - Killer Problem

TLE Please help me #include<stdio.h> #include<stdlib.h> #include<math.h> #include<vector> #include<algorithm> using namespace std; int main() { int t,i; scanf("%d",&t); for(i=1;i<=t;i++) { long int n,tmp,q,j,k; //long int v[200000],k; vector<long int > v,p; // vector<long int >::iterator l; scanf("...
by Mizanur Rahman(IUK)
Mon Nov 01, 2010 5:17 pm
Forum: Volume 118 (11800-11899)
Topic: 11850 - Alaska
Replies: 32
Views: 10144

Re: 11850-Alaska

wrong answer please send me some critical input #include<stdio.h> #include<math.h> #include<stdlib.h> int sort(int a[],int n) { int i,j; for(i=0;i<n-1;i++) { for(j=0;j<n-i-1;j++) if(a[j]>a[j+1]) { int tmp=a[j];a[j]=a[j+1];a[j+1]=tmp; } } return 0; } int main() { int n,i; scanf("%d",&n); while(n) { ...
by Mizanur Rahman(IUK)
Mon Nov 01, 2010 3:33 pm
Forum: Volume 118 (11800-11899)
Topic: 11888 - Abnormal 89's
Replies: 11
Views: 6171

Re: 11888 - Abnormal 89's

TLE.... Please Help me #include<stdio.h> #include<string.h> int pal(char a[]) { char b[200000]={' '}; //strcpy(b,a); long int n=strlen(a),i; //strrev(b); for(i=0;i<n;i++) b[i]=a[n-i-1]; if(strcmp(a,b)==0) return 1; return 0; } int al(char a[]) { long int n=strlen(a); long int i,k; for(i=0;i<n-1;i++...
by Mizanur Rahman(IUK)
Tue Oct 05, 2010 6:47 pm
Forum: Volume 117 (11700-11799)
Topic: 11728 - Alternate Task
Replies: 5
Views: 3289

Re: 11728 - Alternate Task

why WA???? #include<iostream.h> #include<math.h> long int nprime(long int n) { long int i,s=0,st=1,p=0,count=0; for(i=2;i<=sqrt(n);i++) { if(n%i==0) { n=n/i; if(p!=i||count%2!=0){p=i;s=s+i;} else count++; i=1;st=0; } } if(st==0) { // if(count>=1&&p==n) // s=s+n; //else if(p!=n||count%2!=0) s=s+n; } ...
by Mizanur Rahman(IUK)
Mon Aug 23, 2010 1:09 pm
Forum: Volume 114 (11400-11499)
Topic: 11470 - Square Sums
Replies: 9
Views: 3914

Re: 11470 - Square Sums

Why RE?? Please help me.
by Mizanur Rahman(IUK)
Wed Aug 18, 2010 1:42 pm
Forum: Volume 101 (10100-10199)
Topic: 10191 - Longest Nap
Replies: 75
Views: 23434

Re: 10191 - Longest Nap

Why wa??? Please help me #include<stdio.h> struct f { int h1,m1,h2,m2; }st[100],tmp; int main() { char c,a[260]; int naph,napm,i,kh,km,n,sh,sm,eh,em,tm1,tm2,j=1; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) scanf("%d%c%d%d%c%d%[^\n]",&st[i].h1,&c,&st[i].m1,&st[i].h2,&c,&st[i].m2,a); // for(i=0;i<n;...
by Mizanur Rahman(IUK)
Wed Aug 18, 2010 12:15 pm
Forum: Volume 116 (11600-11699)
Topic: 11639 - Guard the Land
Replies: 7
Views: 3510

11639 - Guard the Land

#include<iostream.h> #include<stdio.h> int main() { int i,j,n,x1,x2,x3,x4,y1,y2,y3,y4,strong,total,weak,sign1,sign2,sign3,sign4,sign5,sign6; cin>>n; for(int k=1;k<=n;k++) { sign1=0,sign2=0,sign3=0,sign4=0,sign5=0; cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4; if(x1>x3){i=x1;j=y1; x1=x3;y1=y3; x3=i;y3=j; i=x2...

Go to advanced search