Search found 9 matches
- Fri Jan 14, 2011 9:48 pm
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 46019
Re: 147 __int64 can't hold big results.Please help
plz help me.. why wa.. #include<iostream> #include<cstdio> #include<algorithm> #include<vector> using namespace std; unsigned long long a[50000]; int main() { unsigned long long i,j; int coin[]={5,10,20,50,100,200,500,1000,2000,5000,10000}; a[0]=1; for(i=0;i<11;i++) { for(j=0;j<=30000;j++) a[j+coin[...
- Fri Jan 14, 2011 11:49 am
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 41111
Re: 562 - Dividing Coins
thx via. i cant understand why im getting wa. I should get re or ce.. bt making the the arry mark[101][25001] and mark[101][25001] get accepted its too weird to me.
- Fri Jan 14, 2011 10:02 am
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 41111
Re: 562 - Dividing Coins
why wa i have cant understand //C++ #include<iostream> #include<algorithm> using namespace std; #define max_(a,b)(a>b?a:b) int a[110]; int mark[10000][10000]; int store[10000][10000]; int n,t; int dp(int i, int w) { if(i==0 || w==0) return 0; else if(mark[i][w]==t) return store[i][w]; int res; if(a[...
- Mon Nov 15, 2010 8:12 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11858 - Frosh Week
- Replies: 20
- Views: 6390
Re: 11858 - Frosh Week
thax for ur help. At first i misunderstand the problem..
then i solve using marge sort..
bt i cant think any better way...
how they solve it under one second runtime...
can anyone help me ?
then i solve using marge sort..
bt i cant think any better way...
how they solve it under one second runtime...
can anyone help me ?
- Fri Nov 12, 2010 5:25 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11858 - Frosh Week
- Replies: 20
- Views: 6390
Re: 11858 - Frosh Week
hi im getting wrong answer.... i cant understand where is the problem...plz check my code C++ #define max 10000001 long int a[max]; int main () { long int i,n,cnt,t; // freopen("in.txt","r",stdin); while(scanf("%ld",&n)==1) { cnt=0; for(i=1;i<=n;i++) cin>>a ; for(i=...
- Sun Jul 04, 2010 1:53 am
- Forum: Volume 117 (11700-11799)
- Topic: 11773 - King's Wish
- Replies: 9
- Views: 4207
Re: 11773 - King's Wish
I think my algo is wrong .... ![:(](./images/smilies/icon_frown.gif)
nobody help me![:(](./images/smilies/icon_frown.gif)
![:(](./images/smilies/icon_frown.gif)
nobody help me
![:(](./images/smilies/icon_frown.gif)
- Sat Jul 03, 2010 1:20 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11773 - King's Wish
- Replies: 9
- Views: 4207
Re: 11773 - King's Wish
i have not find any simple equation for this problem im getting tle. plz give me a hints. here is my code.... #include<iostream> using namespace std; int main() { long int n,flag,i,x,j,l,w; scanf("%ld",&n); for(i=1;i<=n;i++) { flag=0; scanf("%ld",&x); for(j=2;j*j<=x;j++) ...
- Mon Jun 28, 2010 11:22 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 106313
Re: 102, WA
hey u should remind this line......
If more than one order of brown, green, and clear bins yields the minimum number of movements then the alphabetically first string representing a minimal configuration should be printed.
may be your program does not solve this for same minimum moves ......
If more than one order of brown, green, and clear bins yields the minimum number of movements then the alphabetically first string representing a minimal configuration should be printed.
may be your program does not solve this for same minimum moves ......
- Fri Jun 25, 2010 11:24 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10137 - The Trip
- Replies: 159
- Views: 65947
Re: 10137 - The Trip
im gatting WA im sick of this problem...... here is my code.... i thought i was a easy probem.... plz help me #include<iostream> using namespace std; double make2(double d) { long int a,e; double b,c,f,g; a=d; b=d-a; c=b*100; e=c; g=double(e*.01); c=b*1000; e=c; if((e%1000)>4) f=a+g+.01; else f=a+g;...