Yeah,epsilon.I tried what you said,and I got accepted.
Because the algrithm is easy,I just used an direct program(sure an ugly one).I will try to simplify my program after then.
Thanks for your help !!
Search found 6 matches
- Thu Dec 19, 2002 5:17 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116782
- Thu Dec 19, 2002 5:49 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116782
Prolem 102: Why Out Limit Exceeded??
I don't quite understand why I got this result...
[c]
#include<stdio.h>
#include<string.h>
void main()
{
int k;
long sum,tmp;
long B[3],G[3],C[3];
while(scanf("%D%D%D%D%D%D%D%D%D",&B[0],&G[0],&C[0],&B[1],&G[1],&C[1],&B[2],&G[2],&C[2])!=EOF)
{
sum=B[1]+B[2]+C[0]+C[2]+G[0]+G[1];
tmp=sum ...
[c]
#include<stdio.h>
#include<string.h>
void main()
{
int k;
long sum,tmp;
long B[3],G[3],C[3];
while(scanf("%D%D%D%D%D%D%D%D%D",&B[0],&G[0],&C[0],&B[1],&G[1],&C[1],&B[2],&G[2],&C[2])!=EOF)
{
sum=B[1]+B[2]+C[0]+C[2]+G[0]+G[1];
tmp=sum ...
- Thu Dec 19, 2002 5:47 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108876
- Sat Dec 14, 2002 10:30 am
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108876
- Wed Dec 11, 2002 5:32 pm
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 55042
Problem 107:Got a WA...
I still got WA..
Here's my C code:
[c]#include<stdio.h>
#include<math.h>
void main()
{
double n,N,result1,result2,result3,result4;
/*"n" stands for the layers of the cats, "N" means the number of the cats in the hat*/
long input1,input2;
double a,b,c,i,j,multi1,multi2;
double exp=0;
while ...
Here's my C code:
[c]#include<stdio.h>
#include<math.h>
void main()
{
double n,N,result1,result2,result3,result4;
/*"n" stands for the layers of the cats, "N" means the number of the cats in the hat*/
long input1,input2;
double a,b,c,i,j,multi1,multi2;
double exp=0;
while ...
- Sat Dec 07, 2002 2:54 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108876
Help --101:Why I got WA?
I've confirmed my program for million times,but it still responds me WA...
[c]
#include<stdio.h>
#include<string.h>
int num[24][24];
/*num[Y][X] ,Y=across X=straight*/
void throw(int);
int find_y(int a)
{
int i,j;
for(i=0;i<24;i++)
{
for(j=0;j<24;j++)
{
if(num [j]==a)
return i ...
[c]
#include<stdio.h>
#include<string.h>
int num[24][24];
/*num[Y][X] ,Y=across X=straight*/
void throw(int);
int find_y(int a)
{
int i,j;
for(i=0;i<24;i++)
{
for(j=0;j<24;j++)
{
if(num [j]==a)
return i ...