Search found 82 matches

by abid_iut
Thu Dec 03, 2015 11:37 pm
Forum: Volume 120 (12000-12099)
Topic: 12015 - Google is Feeling Lucky
Replies: 8
Views: 7639

Re: 12015 - Google is Feeling Lucky

Someone help. Any idea why it is giving WA? :(

Code: Select all

got AC  :) 
by abid_iut
Wed Dec 02, 2015 11:05 pm
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 43487

Re: 11340 - Newspaper

Seemed like a straight forward problem. Giving me correct answer too. Still getting WA. WHY???!!! Can anyone help? :( #include <iostream> #include <cstdio> #include <string> #include <map> using namespace std; int calculateprice(string line, std::map<unsigned char, int> &P) { std::map<unsigned char,...
by abid_iut
Fri Apr 08, 2011 12:26 pm
Forum: Volume 100 (10000-10099)
Topic: 10004 - Bicoloring
Replies: 93
Views: 29409

Re: 10004 - Bicoloring WA

my problem gives me correct output for all possible input given in different threads, but it is WA. what is the problem can anyone tell me please... here is the code #include<iostream> #include<cstdio> #include<queue> #define MAX 201 using namespace std; queue<int>que; int n,m; int path[MAX][MAX]; i...
by abid_iut
Fri Apr 08, 2011 12:16 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 39932

Re: 336 Run Time Error!!

Can anyone tell where is the problem please... here is the code #include<iostream> #include<cstdio> #include<queue> #define MAX 100 using namespace std; int path[MAX][MAX]; int distinct[MAX]; int flag[MAX]; int n,index; int ccount; long dist[MAX]; queue<int>map; void initiation(){ int i,j; for(i=0; ...
by abid_iut
Sun Feb 13, 2011 7:18 am
Forum: Volume 109 (10900-10999)
Topic: 10935 - Throwing cards away I
Replies: 15
Views: 9982

Re:

There is no negative values for n. But n can be 1. You can try the following input output set. Input: 1 10 11 17 0 Output: Discarded cards: Remaining card: 1 Discarded cards: 1, 3, 5, 7, 9, 2, 6, 10, 8 Remaining card: 4 Discarded cards: 1, 3, 5, 7, 9, 11, 4, 8, 2, 10 Remaining card: 6 Discarded car...
by abid_iut
Tue Nov 30, 2010 1:05 pm
Forum: Volume 4 (400-499)
Topic: 414 - Machined Surfaces
Replies: 49
Views: 9001

Re: 414 showing TLE!!!!!

I dont understand why it is showing TLE.... can anyone please help here is my code: #include<stdio.h> #include<stdlib.h> #include<math.h> long n; long counts[20]; char line[30]; int main(){ long i,j,maxx,difference; long count; //freopen("414.txt","r",stdin); while(1){ scanf("%ld",&n); if(n==0)break...
by abid_iut
Sun Jun 07, 2009 3:32 pm
Forum: Volume 109 (10900-10999)
Topic: 10919 - Prerequisites?
Replies: 10
Views: 6183

Re: 10919 - Prerequisites? why RTE

please help.. I am getting RTE here is the code #include<stdio.h> int main(){ long n,m,array[150],n1,m1,ccount,i,k,test[150],itr,it,flag1=0; bool flag[150]; while(1){ k=0; scanf("%ld",&n); if(n==0)break; scanf("%ld",&m); for(i=0;i<n;i++)scanf("%ld",&array[i]); for(int tr=0;tr<m;tr++){ ccount=0; scan...
by abid_iut
Wed Jan 21, 2009 6:37 am
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 14942

Re: WA~ problem 325 Identifying Legal Pascal Real Constants

please help me I am getting WA here is my code: #include<stdio.h> #include<string.h> char line[10000]; int main(){ int i,flag; while(scanf("%s",line)==1){ if(line[0]=='*')break; flag=0; for(i=0;line[i];i++){ if(line[i]>='0' && line[i]<='9'){flag=3;} else {flag=0;break;} } if(flag==3){printf("%s is i...
by abid_iut
Mon Jan 05, 2009 6:20 pm
Forum: Volume 103 (10300-10399)
Topic: 10338 - Mischievous Children
Replies: 56
Views: 20277

Re: 10338 - Mischievous Children

i have considered k=0; but still it is WA here is the code: #include<stdio.h> #include<string.h> #include<math.h> char line[100]; long same[100]; long long ans,fact; int i,j; long long factorial[22]={1,2,6,24,120,720,5040,4320,362880,3628800LL,39916800LL,479001600LL,6227020800LL,87178291200LL,130767...
by abid_iut
Sun Jan 04, 2009 8:34 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 15443

Re: 10125 - Sumsets

I got TLE I thought it would pass O(n^4)algorithm here is the part of the code: for(a=0;a<n;a++){ for(b=0;b<n;b++){ if(a==b)continue; for(c=0;c<n;c++){ if(c==a || c==b)continue; for(d=0;d<n;d++){ if(d==a || d==b || d==c)continue; if(num[a]+num[b]+num[c]==num[d]) if(num[d]>max)max=num[d]; } } } } if(...
by abid_iut
Sun Jan 04, 2009 8:03 pm
Forum: Volume 101 (10100-10199)
Topic: 10102 - The path in the colored field
Replies: 34
Views: 13071

Re: 10102 - The Path in the Colored Field

I am getting CE it is giving code.cpp: In function 'int cal()': code.cpp:19: error: 'abs' was not declared in this scope code.cpp: At global scope: code.cpp:29: error: '::main' must return 'int' here is the code: #include<stdio.h> #include<math.h> #define MAXN 10000 char field[1000]; int o,t; struct...
by abid_iut
Sun Jan 04, 2009 6:18 pm
Forum: Volume 103 (10300-10399)
Topic: 10338 - Mischievous Children
Replies: 56
Views: 20277

Re: 10338 - Mischievous Children

I have changed the code accordingly
But now it is WA
pls anyone help
here is the code:

Code: Select all

Removed
by abid_iut
Sun Jan 04, 2009 5:55 pm
Forum: Volume 8 (800-899)
Topic: 846 - Steps
Replies: 30
Views: 15940

Re: 846 - Steps

Thanks A lot
it was lack of concentration
anyway thanks a lot once again :)
by abid_iut
Sun Jan 04, 2009 5:45 pm
Forum: Volume 103 (10300-10399)
Topic: 10338 - Mischievous Children
Replies: 56
Views: 20277

Re: 10338 - Mischievous Children

getting CE!!
I thought unsigned long long can handle 20!
is it? or any other problem
where should I change
here is the code:

Code: Select all

Removed
pls help :(
by abid_iut
Fri Jan 02, 2009 9:26 pm
Forum: Volume 4 (400-499)
Topic: 460 - Overlapping Rectangles
Replies: 25
Views: 2482

Re: [460] Is This Multiple Input??? -_-;;;

is my multiple input taking is ok or it is something different?? OR is there any other problem in the code? I am getting WA please help someone here is the code: #include<stdio.h> int max(int a,int b){ return (a>b)?a:b; } int min(int a,int b){ return (a<b)?a:b; } int main(){ long test,n,xll1,xll2,yl...

Go to advanced search