ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1570. Eating High

If You have WA 13
Posted by 107th 26 Aug 2008 12:09
look at overflow!!! in test 13 there are meny than 32 different dishes!!!

my bug was:

int h = j;
...
d[i] |= (1 << h);

change it to
__int64 h = __int64(j);
...
d[i] |= (__int64(1) << h);

Edited by author 26.08.2008 17:18
Re: If You have WA 13
Posted by Fyodor Menshikov 11 May 2009 02:06
Limit for dishes is 100. Why __int64 (64 bit) should be better than int (32 bit)? In both cases you need an array, don't you?
Re: If You have WA 13
Posted by Abid29 16 Apr 2021 13:44
3 4
a 4 4
b 1 1
c 3 3