Hello, Can you please explain how the solution is 22 to the given sample example in the problem description. Click to view problem description
Thanks in advance
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hello, Can you please explain how the solution is 22 to the given sample example in the problem description. Click to view problem description
Thanks in advance
Name |
---|
Hi! For each triplet of columns it is sufficient to explain spottiness if its patterns only appears on spotty cows or if its patterns only appears on plain cows.
The triplet {1, 4, 7} is sufficient
The triplet {1, 2, 7} isn't sufficient because the pattern AAT appears on spotty cows and plain cows
The solution to the given sample example are the triplets:
I am having hard time understanding as to how to generate patterns through triplets for each type of cows. This is causing big trouble from my side.
From the below example
For spotty cows, the pattern formed by triplet 1,2,3 which is AAT can also be formed by spotless cows through triplet 1,7,3.
Please correct me if I am wrong?
You should consider triplets independently. The AAT pattern does not appear in the triplet {1,2,3} of any plain cow
thanks alot. I think I am getting the point now. I will do a bit of analysis on my side and keep you posted.
I was able to come up with a solution but the time complexity was not as good as O(N*M^3) and I had issues with my solution acceptance. Now, finally I was able to finally I was able to come up with O(N*M^3) solution and my solution now is accepted.
Thanks for your quick response.
You're welcome! :D
who can give me a hint, because I don't have any idea
Refer to this usaco.guide Video
Thanks, I will watch it and I hope I get an idea for the silver edition