I really need help to debug my code for JBOI 2012 Squares. I got 18/20 in mendo but I really can't find the bug this is my code (code) at the end of the code there is one of the test cases that fails. Can someone help me?

# | User | Rating |
---|---|---|

1 | Benq | 3746 |

2 | tourist | 3729 |

3 | maroonrk | 3539 |

4 | Radewoosh | 3538 |

5 | peehs_moorhsum | 3504 |

6 | ecnerwala | 3497 |

7 | Um_nik | 3491 |

8 | ksun48 | 3452 |

9 | jiangly | 3433 |

10 | Petr | 3276 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 206 |

2 | awoo | 182 |

3 | Errichto | 181 |

4 | Um_nik | 180 |

5 | -is-this-fft- | 175 |

6 | maroonrk | 174 |

7 | Radewoosh | 173 |

8 | tourist | 172 |

9 | SecondThread | 171 |

10 | rng_58 | 166 |

I found a cheater in yesterday's round. He/She was a tester and he/she submitted from another account.

I am not 100% sure but the coding style + template is exactly the same. Also, the submissions of the account are really fast for a low CM and his submission on problem C is very weird(105687315).

Please MikeMirzayanov check this out.

Problem: You have some sets and you want to check if set $$$B$$$ is subset of set $$$A$$$. You can erase or insert any element from any set. Let's say that $$$Q$$$ is the number of queries (check,insert or erase) and $$$Q <= 10^5$$$.

I think that may exist a solution using hash function. If you find the binary representation of all the sets (a bit is true only if it exists in the set) if there is a way to find the bitwise AND operation of two hash numbers then if $$$A$$$ & $$$B$$$ $$$=$$$ $$$B$$$ then $$$B$$$ is subset of $$$A$$$.

Any ideas about a solution?

Codeforces recently added dates from the past contest at your contests page or in your rating graph!

Does anyone know a side that I can submit for ejoi 2019?

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/25/2021 05:38:01 (j1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|