Search found 5 matches

by john_cu_cse
Sat Apr 07, 2012 6:08 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11794

Re: TLE 374 Big MOd!

Thanks...I got AC.
by john_cu_cse
Fri Apr 06, 2012 2:13 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11794

Re: TLE 374 Big MOd!

whats wrong in my cod ..i am getting wrong answer #include<stdio.h> #include<stdio.h> #include<math.h> long BigMod(long b,long p,long m); int main() { long B,P,M,T,ans; while(scanf("%ld%ld%ld",&B,&P,&M)!=EOF) { ans=BigMod(B,P,M); printf("\n\n"); printf("%ld",ans); } return 0; } long BigMod(long b,lo...
by john_cu_cse
Sun Nov 06, 2011 11:44 pm
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 18270

Re: 11462 - Ages Sort

#include<stdio.h> int main() { long long int a[2000005],b,l,c,i,j,k,n; while(scanf("%lld",&n)==1) { if(n==0) break; for(i=0;i<n;i++) { scanf("%lld",&a ); } for(j=0;j<n-1;j++) { for(k=0;k<n-j-1;k++) { if(a[k]>=a[k+1]) { c=a[k]; a[k]=a[k+1]; a[k+1]=c; } } } for(l=0;l<n;l++) { printf("%lld ",a[l]); } }...
by john_cu_cse
Thu Sep 08, 2011 2:48 pm
Forum: Volume 117 (11700-11799)
Topic: 11777 - Automate the Grades
Replies: 32
Views: 5715

Re: 11777 why no AC?

why it gives wrong answer #include<stdio.h> int main() { int a,b,c,d,e,f,g,i,t,sum,total; scanf("%d",&t); for(i=1;i<=t;i++) { scanf("%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f,&g); if(e<f&&e<g||e==f&&f==g) sum=(f+g)/2; else { if(f<e&&f<g||e==f&&f==g) sum=(e+g)/2; else { if(g<e&&g<f||e==f&&f==g) sum=(e+f)/2; ...
by john_cu_cse
Fri Jul 15, 2011 10:54 am
Forum: Volume 119 (11900-11999)
Topic: 11958 - Coming Home
Replies: 24
Views: 5436

Re: 11958 - Coming Home

#include<stdio.h> int main() { int a,b,c,d,e,f,g,h,k,dif,T,i,j; char z; scanf("%d",&T); for(i=1;i<=T;i++) { scanf("%d%d%c%d",&a,&b,&z,&c); g=b*60+c; for(j=1;j<=a;j++) { scanf("%d%c%d%d",&d,&z,&e,&f); if(j==a) { h=d*60+e; dif=h-g+f; if(d<=b) { k=24*60-g; dif=d*60+e+k+f; } printf("Case %d: %d\n",i,dif...

Go to advanced search