Codeforces Round 195 (Div. 2)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
336 Codeforces Round 195 (Div. 2) FINISHED False 7200 355760999 Aug. 9, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1011 ) D Vasily the Bear and Beautiful Strings PROGRAMMING combinatorics math number theory 2400

B'Vasily the Bear loves beautiful strings. String s is beautiful if it meets the following criteria: A modification of string with length at least two is the following operation: we replace two last characters from the string by exactly one other character. This character equals one if it replaces two zeros, otherwise it equals zero. For example, one modification transforms string "01010" into string "0100", two modifications transform it to "011". It is forbidden to modify a string with length less than two. Help the Bear, count the number of beautiful strings. As the number of beautiful strings can be rather large, print the remainder after dividing the number by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line of the input contains three space-separated integers n, xe2 x80 x89m, xe2 x80 x89g (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x89n xe2 x80 x89+ xe2 x80 x89m xe2 x80 x89 xe2 x89 xa5 xe2 x80 x891, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89g xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891). Print a single integer -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). In the first sample the beautiful strings are: "01", "10". In the second sample the beautiful strings are: "0011", "1001", "1010", "1100". In the third sample there are no beautiful strings.'...

Tutorials

Tutorial Codeforces Round #195 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4254254 orzkac D Aug. 9, 2013, 4:56 p.m. OK FPC TESTS 94 404 0 2400
4253197 yuxingdubai D Aug. 9, 2013, 4:42 p.m. OK GNU C++ TESTS 94 62 1536000 2400
4256029 gzh1993n D Aug. 9, 2013, 5:21 p.m. OK GNU C++ TESTS 94 92 1740800 2400
4255478 andypanda D Aug. 9, 2013, 5:13 p.m. OK GNU C++ TESTS 94 124 0 2400
4254794 c0d3junki3 D Aug. 9, 2013, 5:03 p.m. OK GNU C++ TESTS 94 124 819200 2400
4256423 BOBAS D Aug. 9, 2013, 5:25 p.m. OK GNU C++ TESTS 94 124 1638400 2400
4251068 Triolossus_3 D Aug. 9, 2013, 4:14 p.m. OK GNU C++ TESTS 94 124 1638400 2400
4253747 cheezer94 D Aug. 9, 2013, 4:49 p.m. OK GNU C++ TESTS 94 156 2457600 2400
4256123 Ruthles D Aug. 9, 2013, 5:22 p.m. OK GNU C++ TESTS 94 218 3174400 2400
4255033 Hamition D Aug. 9, 2013, 5:07 p.m. OK GNU C++ TESTS 94 218 3174400 2400
4254798 PM2.5 D Aug. 9, 2013, 5:03 p.m. OK GNU C++ TESTS 94 218 3174400 2400
4253042 WHITE2302 D Aug. 9, 2013, 4:40 p.m. OK MS C++ TESTS 94 342 1638400 2400

remove filters

Back to search problems