552 - Filling the Gaps
Moderator: Board moderators
-
- Guru
- Posts: 647
- Joined: Wed Jun 26, 2002 10:12 pm
- Location: Hong Kong and New York City
- Contact:
552 - Filling the Gaps
Am I misinterpreting the problem? Can someone post
some sample please?
By the way, how is 0 0 handled? Should we print out "YES 0" like it said in the sample?
some sample please?
By the way, how is 0 0 handled? Should we print out "YES 0" like it said in the sample?
-
- Experienced poster
- Posts: 187
- Joined: Wed Dec 11, 2002 2:03 pm
- Location: Mount Papandayan, Garut
552 - filling the gaps
i cant' get what is the meaning of point 1. what is the meaning of pattern of *'s is different for all words in the set.You program has to check for a number of cases:
1. Whether the pattern of *'s is different for all words in the set and:
2. Compute the number of words obtained by replacing the *'s by 0's and 1's.
and how's about in sample input output, is in the last line of our output we must write "YES 0" ?
thanks.
-titid gede-
Kalo mau kaya, buat apa sekolah?
-
- New poster
- Posts: 43
- Joined: Fri Jun 25, 2004 9:37 pm
0 0 results in a "YES 0".
Part 1: Read in the strings. Replace all the 1's with 0's. If there are any duplicate strings, print "NO".
Input:
3 3
10*
*0*
*00
4 3
1100
1101
110*
3 3
10*
*0*
*00
5 4
00010
1111*
***10
11*10
4 3
1100
1101
110*
2 4
1*
*1
**
11
1 3
0
1
*
0 0
Ouput:
YES 4
NO
YES 4
YES 9
NO
YES 4
NO
YES 0
Part 1: Read in the strings. Replace all the 1's with 0's. If there are any duplicate strings, print "NO".
Input:
3 3
10*
*0*
*00
4 3
1100
1101
110*
3 3
10*
*0*
*00
5 4
00010
1111*
***10
11*10
4 3
1100
1101
110*
2 4
1*
*1
**
11
1 3
0
1
*
0 0
Ouput:
YES 4
NO
YES 4
YES 9
NO
YES 4
NO
YES 0
552 - Help me plz!!!
Hello, Users!!
I'm from Russia and my english isn't good. +)
Now is a time to make some homeworks in University. In my university there are the tasks from this website. I must make programm, but a have a lot of problems with my task. Please help me. Can you send me sourses or ideas of sourses please? I will be very happy, if you could help me.
Thanks +)
I'm from Russia and my english isn't good. +)
Now is a time to make some homeworks in University. In my university there are the tasks from this website. I must make programm, but a have a lot of problems with my task. Please help me. Can you send me sourses or ideas of sourses please? I will be very happy, if you could help me.
Thanks +)
That will not get you anywhere...
What you do is - try to come up with the solution yourself. Then if you can't, you post what you got so far. Then, maybe, you get a hint or two. repeat the process until you get the solution.
After you know what to do, try to implement it (code it). Again, if you get stuck (but really stuck), post what you have so far and what's not working. And then you might get some help.
Sending a coded solution to someone is not helping. I know, everyone says it, but you'll understand it when the final exam comes
Darko
What you do is - try to come up with the solution yourself. Then if you can't, you post what you got so far. Then, maybe, you get a hint or two. repeat the process until you get the solution.
After you know what to do, try to implement it (code it). Again, if you get stuck (but really stuck), post what you have so far and what's not working. And then you might get some help.
Sending a coded solution to someone is not helping. I know, everyone says it, but you'll understand it when the final exam comes
Darko
fuck
[insulting message deleted by moderator]
I get "YES 8" for my WA program.
I am doing all possible replacements of * by 0 and 1 to the word, and check whether the new string has appeared before. Then Output how many new string were found.
Can you explain why this input set will give an output "YES 9"?
Input
I am doing all possible replacements of * by 0 and 1 to the word, and check whether the new string has appeared before. Then Output how many new string were found.
Can you explain why this input set will give an output "YES 9"?
Input
Output5 4
00010
1111*
***10
11*10
YES 9
The 9 strings are..
Hope it helps.
Code: Select all
00010
00110
01010
01110
10010
10110
11010
11110
11111
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- Experienced poster
- Posts: 139
- Joined: Wed May 18, 2011 3:04 pm
Re: 552 - Filling the Gaps
At first, I was warried about the test cases may be large, but after submitted the code and got AC, I realized the number of test cases is small.
metaphysis: http://uhunt.onlinejudge.org/id/95895
My solutions for UVa problems: https://github.com/metaphysis/Code.
My solutions for UVa problems: https://github.com/metaphysis/Code.