| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| No subject | Сергей | 1118. Нетривиальные числа | 28 апр 2014 23:41 | 1 |
|
| 2 тест | jex | 1118. Нетривиальные числа | 28 апр 2014 18:22 | 2 |
Какой там 2 тест? у меня не проходит(time limted); |
| WA #3, plz, help!!! | Ravshan | 1644. Куча орехов | 28 апр 2014 17:20 | 4 |
People, can u help with test #3? I'm receiving WA... "It is known as a fact, that ten walnuts is always enough and two walnuts are always not enough." thanks!! that helped me!! I make the same mistake too. It is never too careful to read the question. |
| To admins (idea about new problem) | vortexxx192 [ONPU] | 1510. Порядок | 28 апр 2014 15:02 | 2 |
Hi! That is no surprise for you that O(N*logN) solution using C++ map<int, int> fits in 1 second perfectly. An idea is to create a problem "Order: version 2" with lower time limit (0.5 sec or something like that) and, maybe, higher amount of input. For what? Just for saying "YOU SHALL NOT PASS"© to O(N*logN) solutions and giving a chance only to O(N) algorithms (like Boyer-Moore Majority Vote Algorithm). And difficulty, of course, should be increased correspondingly. Thanks for attention. Long live Timus! Edited by author 11.01.2014 08:22 Looks like they take your advice, although not exactly. But not we can not get pass by using map. |
| Levenshtein | staticor | 1786. Биография Сандро | 28 апр 2014 11:33 | 2 |
Not. This is not Levenshtein problem. It's different. |
| Can anybody clarify this to me? | Tural Neymanov | 1796. Парк аттракционов | 28 апр 2014 06:02 | 3 |
Is such an input possible? 2 0 0 0 1 0 100 this means that teacher gave 1020 but the 20 that were given were unnecessary, and it's said that every note is needed. Thanks. No. Btw, my AC solution gives 0 on this test. That, there not such test case here. Because your code should be wrong. The answer for this is : 1 10, which is my AC code give, and should be as we calculate by ourselves. But according to the question statement, it should not give such test cases. Because the teacher would not give unnecessary money. Edited by author 28.04.2014 06:04 |
| Why WA #4? | Maqsud Erjonov | 1404. Легко взломать! | 27 апр 2014 18:03 | 6 |
var sh,de:string; a:array[1..100]of integer; i,n:Integer; begin readln(sh); n:=length(sh); for i:=1 to n do a[i]:=ord(sh[i])-97; for i:=2 to n do if a[i]<a[i-1] then a[i]:=a[i]+((a[i-1]-a[i])div 26 + 1)*26; for i:=n downto 2 do a[i]:=a[i]-a[i-1]; a[1]:=a[1]-5; de:=''; for i:=1 to n do de:=de+chr(97+a[i] mod 26); writeln(de); end. i didn't understand where is my mistake Edited by author 05.08.2011 16:43 Edited by author 05.08.2011 16:43 You are great! I got the same mistake. if you problem input is "adham" . what is output? output is "vdetm" . You should know if the first letter is "a" or "b" or "c" or "d" or "f" (char)("a" + 26) is correct way! |
| Почему по лимиту не проходит код? Код прост да неузнаваемости??? | Сергей | 1118. Нетривиальные числа | 27 апр 2014 13:36 | 1 |
Паскаль почти все задачи по лимиту не проходят на одно и то же время, почему??? |
| Description of the mistake in the format of the sample input | Bahturin Alexander (SibSUTI) | 1638. Книжный червь | 27 апр 2014 13:04 | 11 |
The correct format of the input is: <width of the book w/o the cover> <width of the cover> <number of the book where the worm _finishes_> <number of the book where the worm _starts_> (so, the last two were just given in the incorrect order) I disagree. Order of input data is absolutely correct. So whould you mind explaining me the 'Sample output'? I treated the input as I wrote above and got AC.. I did as he told and got AC, too. You are wrong, guys. Input format is correct. You're lucky that ACed the problem without thinking about it. Think - and you'll find out that input specification is indeed correct - it's a very famous logical puzzle =) The input format is entirely correct. The problem requires knowledge about how REAL books are USUALLY placed on shelves. The problem is very old trick really. I am sure many of contestants were already familiar with it (I was). Edited by author 12.10.2008 20:12 Edited by author 12.10.2008 20:12 So.. Do you (all of you who says that input format is correct) mean that books are stored in a way that the last page is the leftmost one? If so than it's not surprising that the solution which swaps numbers of the books gets AC. yes, just imagine. when you place books on the shelf, the books are facing inwards, which means, the first page is on the right and the last page is on the left. Hah, I wasn't familiar with this particular trick, but I've done enough of the "simple" problems on Timus now to know that many problems derive their difficulty not from the underlying algorithm, but in correctly understanding problem statements which are sometimes tricky, ambiguous, or rely on unstated assumptions (like this one, assuming how people "normally" put books on shelves, and which side of the book contains the first page). So I'm learning to always ask "what's the catch?" and got AC first time on this one (after initial WA on many other "simple" problems). So solving Timus problems is successfully training me to read problems very carefully! If you are really smart, try the problems not one get AC before, otherwise get the hell out of your pretentious mask. |
| Can understand this problems statement mean | Nguyen Trung Hieu | 1194. Рукопожатия | 27 апр 2014 10:32 | 2 |
Someone can explain the example test case and how this work for me? I read this problem many many times but still can't understand what this mean :( You have to get inside the Author's head, and ask him/her. I am not going to be bothered with such problem any more. |
| To Admin | caoqinxiang | 1224. Спираль | 26 апр 2014 19:36 | 4 |
input 2 1 output 0 this is correct. however this solution get WA. AC program writes 1, which is wrong in fact. yea, U're Right It depends... Think more... In fact. It is 1. Think... |
| New here, compilation error I do not understand what I have done wrong | Ali Hassan | | 26 апр 2014 19:21 | 1 |
Edited by author 26.04.2014 19:40 |
| TEST 6 example | Adhambek | 1654. Шифровка | 26 апр 2014 15:17 | 3 |
input : tatu!.?.?.!utat output : "" Edited by author 20.06.2013 00:20 Edited by author 20.06.2013 00:21 Edited by author 20.06.2013 00:35 Штирлиц же "Убирает все пробелы и знаки препинания." That's a totally wrong test cases. The AC program won't give "". It is still original string. Besides there are NOT punctuation inside string. |
| No subject | Sunnat | 1001. Обратный корень | 26 апр 2014 15:13 | 1 |
object _1001 { def main(args: Array[String]): Unit = { println(scala.io.Source.stdin.getLines.flatMap(_.split(" ").filter(!_.isEmpty())).toArray.reverse.map(t => math.sqrt(t.toDouble)).mkString("\n")) } } |
| WA 12 | Kirill_Khapov | 1876. Утро сороконожки | 26 апр 2014 10:15 | 2 |
WA 12 Kirill_Khapov 26 апр 2014 10:13 #include <iostream> using namespace std; main() { int a, b; cin >> a >> b; if (39+2*a>a+2*b) cout << 39+2*a; else cout << 40+2*b; } my code is wrong :CC where is error? Edited by author 26.04.2014 10:14 |
| This Problem more looks like a joy! - Careful - telling you why. | BillSu | 1723. Книга Сандро | 25 апр 2014 16:35 | 1 |
One single letter count! Of course, Any substring would include one letter. |
| here my c code | Sunnat | 1149. Танцы синуса | 25 апр 2014 13:26 | 2 |
#include<stdio.h> main() { int n,i,j; scanf("%i",&n); for(i=1;i<n;i++) printf("("); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { if(j>1) printf((j&1)?"+":"-"); printf("sin(%i",j); } for(j=1;j<=i;j++)printf(")"); printf("+%i",n+1-i); if(i!=n)printf(")"); } } A concise code. Much better than mine. |
| Why this is not correct? | Mes | 1710. Борис, ты не прав! | 24 апр 2014 14:04 | 1 |
I keep getting wrong answer at the 2 example. Isn't it from the examples provided? If so, why for 0 0 4 3 6 0 the solution NO 0 0 5 0 1.6 1.2 is not correct? A1B1 is equal to A2B2, B1C1 is equal to B2C2, C1A1 is different from C2A2, the cosine is the same, therefore the angle is the same. |
| How do you know this sequence is fibonucci ???? | . : : m 3 r L i N : : . | 1225. Флаги | 24 апр 2014 13:24 | 5 |
m = f(n) = f(n-1) + f(n-2) why f(n-1) :- put W and [R,...(n-1)] or R and [W,...(n-1)] why f(n-2) :- put R,B and [W,..(n-2)] or W,B and [R,...(n-2)] HTH How supernatural it is~~ ^_^ ! 哇靠~~这么科幻~~~ Looking Good! That's it! Why I got stuck! |
| Can't decrease program time (c#) | bulka94 | 1209. 1, 10, 100, 1000... | 24 апр 2014 08:33 | 2 |
using System; namespace TestOfCSharp { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int[] output = new int[N]; for (int c = 0; c < N; c++) { int K = int.Parse(Console.ReadLine()); int counter = 0; for (int j = 1; j <= K; j += counter, counter++) if (j == K) output[c] = 1; } foreach (int c in output) Console.Write("{0} ", c); } } } Use formula wisely, not for... |