Show all threads Hide all threads Show all messages Hide all messages |
Stupid task (RTE 13) | andreyDagger | 1941. Scary Martian Word | 28 Nov 2021 11:47 | 1 |
Length of the first string can be bigger than length of the second string. I spent 15 submissions to realise this |
I was using STL container to store inequal words | Mahilewets | 1941. Scary Martian Word | 5 Jul 2017 00:16 | 2 |
When I was using STD::SET and STD::MAP, it was TLE #18. When I switched to STD::UNORDERED_SET and STD::UNORDERED_MAP, it was ACCEPTED 0.6 sec 38 MB. I was using reserve (1<<16) and max load factor of 0.25. After replacing everything by STD::VECTOR Accepted 46 ms 15 MB |
Format of input | Felix_Mate | 1941. Scary Martian Word | 4 Jul 2017 17:50 | 2 |
Братаны-кодеры в этой задаче нужен особый подход к считыванию Из условия неясно,какой формат,но пока что он следущий(.=пробел): ххх.ххх.ххх и т.д. ууу.ууу.ууу.ууу и т.д. Не используйте на Паскале eof,eoln. Часть моего говнокода: ... s:string[4]; ... len:=1; read(s); inc(c[90*90*(ord(s[1])-33)+90*(ord(s[2])-33)+(ord(s[3])-33)]); f:=length(s)=4; while f do begin inc(len); read(s); inc(c[90*90*(ord(s[1])-33)+90*(ord(s[2])-33)+(ord(s[3])-33)]); f:=length(s)=4; end; ... Timus is not an image board That is not 2ch or 4ch There is no need to use such words |
What is format of input? | Felix_Mate | 1941. Scary Martian Word | 8 Jul 2016 22:43 | 2 |
По условию может быть так(.-пробел):.........aaa.bbb.ссс. .....xxx.aaa.bbb.ccc. или .........aaa.bbb.ссс........ .....xxx.aaa.bbb.ccc........??????? И вообще,как в ЭТОЙ задаче считывать данные(на Паскале)? Edited by author 08.07.2016 21:27 Не может. В начале пробелов нет, между каждой группой ровно один пробел. Я делаю так: readln(s); i:=1; while i <= length(s) do begin //process [i], [i + 1], [i + 2] inc(i, 4); end; |
WA1! Who can give some tests? | Felix_Mate | 1941. Scary Martian Word | 7 Jul 2016 23:35 | 2 |
I tested my prog but I not found mistake Did you receive my email from a month ago? |
What is test case# 2 ? please help me . | draak_krijger | 1941. Scary Martian Word | 11 Jan 2016 01:21 | 1 |
|
The array should be large, as large as possible | lasercat | 1941. Scary Martian Word | 5 Jul 2014 21:57 | 1 |
if you stuck on WA#17, try enlarging your array size ^_< |
test 2 | [TDUweAI] daminus | 1941. Scary Martian Word | 19 Feb 2014 00:13 | 2 |
test 2 [TDUweAI] daminus 5 Jan 2013 15:08 what can be in test 2///// I guess it is an anti-hash string < https://en.wikipedia.org/wiki/Thue%E2%80%93Morse_sequence> My additive hash with N=10 uint64_t still works, while N=5 does not: F(i,N) r[i] += ((a<<40) ^ (b<<20) ^ c) * s[i] % q[i] a,b,c are letters; s[i] and q[i] are primes; F(i,n) is for(int i = 0; i < (n); ++i) |
What is optimal asymptotic? | Vladimir Plyashkun [CSU] | 1941. Scary Martian Word | 5 Jul 2013 00:10 | 2 |
What is optimal asymptotic for this problem? My algo has O(M*log(N)) where N - length of scary Martian word, and M - length of text of Ovchinnikov's book, but i have TLE on 21th test O(M + N) is optimal. But maybe you can succed with your asymptotic if use fast I/O |
the limits are so generous | tyomitch | 1941. Scary Martian Word | 20 Mar 2013 21:16 | 3 |
that you needn't parse the Martian letters, you can keep them as opaque strings, using them as map keys Why not? The problem is assumed to be warm-up on the contest - so any solutions with comparable asymptotics should pass without a problem Двигаем по книге "окно" длиной со "страшное слово", проверяем чтобы кол-во каждого символа алфавита в подстроке было строго равно колв-у того же символа в "страшном слове", обновляем на -1/+1 кол-ва для первого и последнего символов соотв-о. Для быстрой проверки каждой позиции по всем символам, входящим в "страшное слово" держать массив номеров символов, причем не удовлетворяющие условию кол-ва перемещать в начало, удовлетворяющие - в конец, тогда будет не больше двух сравнений на позицию |
About compilator | Aliaksei | 1941. Scary Martian Word | 5 Jan 2013 17:37 | 3 |
What I have to include for using function getline(cin,S)? include <string> Edited by author 05.01.2013 17:37 |
AHMEDE | [TDUweAI] daminus | 1941. Scary Martian Word | 5 Jan 2013 17:13 | 1 |
AHMEDE [TDUweAI] daminus 5 Jan 2013 17:13 ahmet mende altynjy barlag yalnysh jogap diyya, name bolmagy mumkin? mysal yaz hany shona.... |
How many cases here? | hnustpengtuo | 1941. Scary Martian Word | 5 Jan 2013 15:43 | 3 |
<- Edited by author 05.01.2013 15:44 |
What is the answer to this test? | Anatoly | 1941. Scary Martian Word | 5 Jan 2013 15:40 | 2 |
aaa aaa bbb aaa aaa bbb ccc aaa zzz aaa bbb ccc I think that it should be 1. right? |
ANSISTRING | [TDUweAI] daminus | 1941. Scary Martian Word | 5 Jan 2013 13:33 | 2 |
Can ansistring (pascal) take 500000*3+const symbols? Edited by author 05.01.2013 14:25 |