Page **1** of **1**

### 10882 - Koerner's Pub

Posted: **Tue Aug 09, 2005 4:29 pm**

by **sohel**

Since the range is so small (100), I thought of a bruteforce solution but that gives wrong answer.

My method:

given

A intersection B

B intersectin C

A intersectin C

find A intersectin B intersection C... right?

my code:

Code: Select all

```
Removed after getting AC..
thanks to mf.
}
```

Can someone give some input/output... or prove my method wrong.

Posted: **Tue Aug 09, 2005 5:37 pm**

by **mf**

The lower bound may be 0, for example in "34 33 33".

Posted: **Wed Aug 10, 2005 11:32 am**

by **sohel**

Thanks..

.. got AC.

Sometimes it is hard to think of the obvious !!

Well, for me anyways.

### I/O needed.

Posted: **Sat Aug 13, 2005 4:46 am**

by **_.B._**

Greetings!

Any I/O for spare?

No idea why the WA

Thanks in advance!

Posted: **Sat Aug 13, 2005 8:40 am**

by **sohel**

How do you check whether the given data is faulty?

### Ouch!

Posted: **Sun Aug 14, 2005 4:55 am**

by **_.B._**

Ouch!, forgot to take some comments away after correction

From

Code: Select all

`low = obligatorios + (a[0] / 2); // + (a[0] % 2);`

to

Code: Select all

`low = obligatorios + (a[0] / 2) + (a[0] % 2);`

Well, had other mistake.

By the way, I considered data faulty if:

- Higher value is

**>** than 100.

- Lower value is

**<** than the intersection of the other 2 values.

Keep posting!

Posted: **Fri Jun 23, 2006 2:02 am**

by **lovemagic**

i get WA.

can smbody plz tell me what's the output of this input?

71 60 60

72 60 60

70 60 60

72 60 6

10 10 10

34 33 33

33 35 35

0 0 1

1 1 1

34 34 34

100 100 80

80 80 100

Posted: **Fri Jun 23, 2006 2:25 am**

by **lovemagic**

at last got AC.....

i did a mistake & that was:

i overlooked there would be some friday when

**Ai != Ci != Mi. **

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 7:27 am**

by **ahm.kam_92**

Hi everyone ...

It's my first time here.

i hope it's helpful

i had coded this problem and got WA ...

may anyone suggest any tricky input or check my code ?

Thanks in advance

that is my code:

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 4:25 pm**

by **helloneo**

Try this case..

Input

Code: Select all

```
12
71 60 60
72 60 60
70 60 60
72 60 6
10 10 10
34 33 33
33 35 35
0 0 1
1 1 1
34 34 34
100 100 80
80 80 100
```

My output is ..

Code: Select all

```
Case #1: Between 46 and 60 times.
Case #2: Between 46 and 60 times.
Case #3: Between 45 and 60 times.
Case #4: The records are faulty.
Case #5: Between 0 and 10 times.
Case #6: Between 0 and 33 times.
Case #7: Between 2 and 33 times.
Case #8: Between 0 and 0 times.
Case #9: Between 0 and 1 times.
Case #10: Between 1 and 34 times.
Case #11: The records are faulty.
Case #12: Between 80 and 80 times.
```

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 7:30 pm**

by **ahm.kam_92**

Oops!

seems that i am stupid .. i have done this conditions to be faulty and that is wrong:

Code: Select all

```
if(min(a,b)>c){printf("Case #%d: The records are faulty.\n",i+1);continue;}
if(min(a,c)>b){printf("Case #%d: The records are faulty.\n",i+1);continue;}
if(min(b,c)>a){printf("Case #%d: The records are faulty.\n",i+1);continue;}
```

i hope that is the only bug .. i will try it now.

Thanks very much.

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 7:42 pm**

by **ahm.kam_92**

still WA

i dunno what is still wrong it is passing all the cases u have suggested.

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 8:39 pm**

by **omar_elruby**

check case 7 again, your program gives a wrong output, it's just a small mistake

...

### Re: 10882 - Koerner's Pub

Posted: **Mon Jan 05, 2009 9:07 pm**

by **ahm.kam_92**

it is AC thanks