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 | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 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