@Amin
I think your code is almost right. Just change data type for some variable or use type casting, like use "double usum,sum[]". In your last output section within loop i think no need to use else{},becoz sum[] already hold 0.00.
Search found 18 matches
- Tue Aug 16, 2011 5:45 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11348 - Exhibition
- Replies: 24
- Views: 14605
- Tue Aug 16, 2011 3:38 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11348 - Exhibition
- Replies: 24
- Views: 14605
Re: 11348 - Exhibition
I think this is the Key line of this problem " The percent of whole income that i-th friend will get is equal to the part of his unique stamp's type. "
I got several times WA but finally got the thing & get ACC.
Try this I/O:
Input:
3
3
3 1 1 2
2 4 5
3 4 2 6
3
3 2 2 2
2 4 4
3 5 5 5
3
3 0 1 0
2 4 ...
I got several times WA but finally got the thing & get ACC.
Try this I/O:
Input:
3
3
3 1 1 2
2 4 5
3 4 2 6
3
3 2 2 2
2 4 4
3 5 5 5
3
3 0 1 0
2 4 ...
- Mon Aug 15, 2011 10:00 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11348 - Exhibition
- Replies: 24
- Views: 14605
Re: 11348 - Exibition
I think this is the Key line of this problem " The percent of whole income that i-th friend will get is equal to the part of his unique stamp's type. "
I got several times WA but finally got the thing & get ACC.
Try this I/O:
Input:
3
3
3 1 1 2
2 4 5
3 4 2 6
3
3 2 2 2
2 4 4
3 5 5 5
3
3 0 1 0
2 4 ...
I got several times WA but finally got the thing & get ACC.
Try this I/O:
Input:
3
3
3 1 1 2
2 4 5
3 4 2 6
3
3 2 2 2
2 4 4
3 5 5 5
3
3 0 1 0
2 4 ...
- Sun Aug 07, 2011 9:56 pm
- Forum: Volume 120 (12000-12099)
- Topic: 12024 - Hats
- Replies: 5
- Views: 4629
Re: 12024
try this I/O. generating output by my Acc code.
Input :
Output :
Hope this will help you.
Input :
Code: Select all
3
11
12
6
Code: Select all
14684570/39916800
176214841/479001600
265/720
- Sun Aug 07, 2011 9:12 pm
- Forum: Volume 120 (12000-12099)
- Topic: 12036 - Stable Grid
- Replies: 2
- Views: 2166
Re: 12036 WA??
@tahmiid
I did not get ur procedure.I did not understand why u use n^4 when it can be solved only by counting?
Hope u will get it.
I did not get ur procedure.I did not understand why u use n^4 when it can be solved only by counting?
Hope u will get it.
- Thu Apr 21, 2011 8:32 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11953 - Battleships
- Replies: 23
- Views: 11401
11953 - Battleships(WA)
Any one has any critical test cases?
I did not find why my code goes for WA.I think my floodfill is ok
Thanks in advance
I did not find why my code goes for WA.I think my floodfill is ok
Code: Select all
Removed After ACC
- Sun Jan 23, 2011 7:50 am
- Forum: Volume 119 (11900-11999)
- Topic: 11902 - Dominator
- Replies: 20
- Views: 14155
Re: 11902 - dominator
WA
My code passed all input given in this thread.But still WA.Can anyone plz help me.It also works for disconnected graph
Code: Select all
Removed after Acc
- Fri Jan 21, 2011 4:51 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10986 - Sending email
- Replies: 65
- Views: 39492
Re: 10986 - Sending email(TLE)
please help me......
Why I have got TLE, can't understand
#include<iostream>
#include<vector>
#define inf 1000000000
#define SIZE1 20000
#define SIZE2 50000
using namespace std;
typedef vector<int>graph;
long Q[SIZE1+9],d[SIZE1+9];
graph G[SIZE2*2+9],W[SIZE2*2+9];
//min_heapify with respect ...
Why I have got TLE, can't understand
#include<iostream>
#include<vector>
#define inf 1000000000
#define SIZE1 20000
#define SIZE2 50000
using namespace std;
typedef vector<int>graph;
long Q[SIZE1+9],d[SIZE1+9];
graph G[SIZE2*2+9],W[SIZE2*2+9];
//min_heapify with respect ...
- Sun Jul 04, 2010 8:32 am
- Forum: Volume 117 (11700-11799)
- Topic: 11710 - Expensive subway
- Replies: 14
- Views: 7763
WA: 11710 - Expensive subway
I simply do mst then if reachable from the given station sum up it. if anyone not reachable then impossible.If am wrong can anybody help me. Here is my code:
Code: Select all
Code Removed
- Thu May 20, 2010 4:28 pm
- Forum: Volume 7 (700-799)
- Topic: 793 - Network Connections
- Replies: 102
- Views: 47733
WA: 793 - Network Connections
What's wrong in my code.I check all input test given in the board. But still WA.Can anyone plz help me. // Union finding-793
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
long p[1000000];
long parent(long x)
{
if(p[x]==-1)
return x;
else{
p[x]=parent(p[x]);
return p[x];
}
}
int ...
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
long p[1000000];
long parent(long x)
{
if(p[x]==-1)
return x;
else{
p[x]=parent(p[x]);
return p[x];
}
}
int ...
- Thu May 20, 2010 9:05 am
- Forum: Volume 4 (400-499)
- Topic: 459 - Graph Connectivity
- Replies: 133
- Views: 58092
Re: 459 - Graph Connectivity
Thanks Igor9669 really ugly output format.Finally AC after 4 TLE & 1 WA
- Fri May 07, 2010 10:48 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10374 - Election
- Replies: 44
- Views: 22966
WA: 10374 - Election
I Got WA again & again.Can anyone help me.What's problem in my code.
Thanks in advance. #include<iostream>
#include<string.h>
using namespace std;
int main()
{
long i,j,k,l,m,n,x,max;
char s[105][105],party[105][105],s1[10001];
scanf("%ld",&n);
x=0;
while(n--)
{
long a[1001]={0};
x ...
Thanks in advance. #include<iostream>
#include<string.h>
using namespace std;
int main()
{
long i,j,k,l,m,n,x,max;
char s[105][105],party[105][105],s1[10001];
scanf("%ld",&n);
x=0;
while(n--)
{
long a[1001]={0};
x ...
- Mon Apr 26, 2010 10:19 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58289
Re: 195: anagram, wrong answer
What's problem in my Code .PLZ help. #include <iostream>
#include<string.h>
#include <algorithm>
using namespace std;
int main ()
{
long i,j,k,l,n;
char myints[1000],s[1001];
scanf("%ld",&n);
while(n--)
{
long a[130]={0};
scanf("%s",&myints);
k=strlen(myints);
for(i=0;i<k;i++)
{
a ...
#include<string.h>
#include <algorithm>
using namespace std;
int main ()
{
long i,j,k,l,n;
char myints[1000],s[1001];
scanf("%ld",&n);
while(n--)
{
long a[130]={0};
scanf("%s",&myints);
k=strlen(myints);
for(i=0;i<k;i++)
{
a ...
- Mon Apr 26, 2010 4:04 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11775 - Unique Story
- Replies: 1
- Views: 2179
11775 - Unique Story
Can Any one PLZ Help me.My Code is here.Can Any one give me any critical input output. #include<iostream>
#include<cstring>
using namespace std;
char P[1001][1001],Q[1001][1001];
long c[3001][3001],b[3001][3001],p;
// ******************
void LCS(long x1,long y1)
{
long i,j,m,n,last;
m=x1;
n=y1 ...
#include<cstring>
using namespace std;
char P[1001][1001],Q[1001][1001];
long c[3001][3001],b[3001][3001],p;
// ******************
void LCS(long x1,long y1)
{
long i,j,m,n,last;
m=x1;
n=y1 ...
- Mon Apr 26, 2010 3:58 pm
- Forum: Volume 4 (400-499)
- Topic: 410 - Station Balance
- Replies: 41
- Views: 22806
Re: 410 WA
Got Accepted.
Thnaks Jan
Thnaks Jan