| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Output limit exceeded on #11 | Rafikov Ramil | 1100. Таблица результатов | 27 ноя 2009 12:25 | 1 |
|
| English statement is not complete? | SkidanovAlex | 1703. Рука робота | 27 ноя 2009 02:40 | 2 |
Just wonder, probably I'm not attentive enough, but where in English statement it is said that shoulder joint is located at (0,0,0)? In Russian statement it is very clear stated in Input Data Specification, while I see nothing about that in English statement. You are right. The english statement is fixed now. |
| For all Who used hash and got WA6 | SP2 | 1213. Тараканы! | 26 ноя 2009 19:36 | 2 |
I used hash which have pased all tests I have got WA6 several times here is my program program Project2; {$APPTYPE CONSOLE} const s=['a'..'z','A'..'Z','0'..'9']; var name:array[1..10000000] of boolean; c,n,i,j:longint; ch:char; str:string; begin readln(str); read(ch); if ch='#' then begin writeln('0'); exit; end; while ch <> '#' do begin c:=100*ord(ch); j:=0; while (ch in s)and(ch<>'#') do begin c:=c+ord(ch); read(ch); inc(j); end; name[c]:=true; while (not (ch in s))and(ch <> '#') do read(ch); end; j:=0; for i:=1 to 10000000 do if name[i] then inc(j); writeln(j-1); readln; readln; end. Only delete readln; readln; And all will be OK! |
| WA #11 C++ | Alexanyan Sos (RAU II course) | 1024. Перестановки | 26 ноя 2009 17:54 | 2 |
WA #11 C++ Alexanyan Sos (RAU II course) 11 дек 2008 23:49 what's wrong?? [code deleted] Edited by moderator 04.12.2019 20:54 In pascal I replace 'integer' to 'int64' and got AC. I thing in C you must replace 'int' to 'long long' |
| Why WA in test №7? What's wrong? Who can help me? | P-RocK | 1071. Никифор 2 | 26 ноя 2009 15:49 | 1 |
var x,y,x1,y1,f,l:longint;a,b,c:array[1..1000] of byte; i,k,s,r,w,z:word; begin read(x, y); l:=2;w:=0; While (f<>1)and(l<=10) do begin i:=1; x1:=x; s:=0; c:=a; b:=a; Repeat c[i]:=x1 mod l; x1:=x1 div l; inc(i); inc(s) until x1=0; y1:=y;k:=0; i:=1; Repeat b[i]:=y1 mod l; y1:=y1 div l; inc(i); inc(k) until y1=0; r:=b[k];z:=1;i:=s; Repeat If c[i]=r then begin r:=b[k-z];inc(z);end; dec(i); until (z=k+1)or(i=0); If z=k+1 then begin f:=1;w:=l;end; inc(l); end; If w=0 then writeln('No solution') else writeln(w) end. Help me please... |
| Tests | Looksery ONU 1 2/3 | 1720. Summit Online Judge | 26 ноя 2009 03:20 | 2 |
Tests Looksery ONU 1 2/3 15 окт 2009 01:32 Give pls some tests, for different errors Re: Tests Fly [Yaroslavl_SU] 26 ноя 2009 03:20 4 5 7 13 3 6 11 99 6 8 11 99 10 13 20 200 50 56 20 200 30 33 20 200 19 21 20 200 11 11 20 200 10 10 20 200 10 15 17 18 10 15 16 19 10 15 15 20 20 33 14 19 1 1 1 1 2222222222222221 2222222222222222 100000000000000000 200000000000000000 16 19 5 11 10 33 16 25 10 21 16 25 1 2 18 20 1 2 19 20 1 2 20 20 30 33 30 33 30 33 31 32 Answers: 5 89 87 178 40 69 109 17 19 0 0 2 0 1 3105 or so :) 0 10 10 3 2 1 4 2 |
| WHO ACCEPT? | aatrue | 1019. Перекрашивание прямой | 25 ноя 2009 19:03 | 4 |
Who can give me a code,I want to learn how to slove this problem....My code always WA... Thanks! Edited by author 19.09.2008 09:44 I have accepted it. It's very easy problem :) Can you tell me an algorithm of this problem? at first n2, but my nlogn algo accepted just now. segment tree & binary search |
| WA5 | igorsky | 1650. Миллиардеры | 25 ноя 2009 17:49 | 2 |
WA5 igorsky 25 ноя 2009 17:26 I've got WA5. Could you please give some tests or hints? Thanks in advance. I've found the reason. Bug was related with case-insensetive sorting of output. |
| Hint | daftcoder [Yaroslavl SU] | 1729. Сундук мертвеца | 24 ноя 2009 01:51 | 2 |
Hint daftcoder [Yaroslavl SU] 14 ноя 2009 11:23 For accuracy of calculations use power-reduction formulas /* 2 * sin ^ 2 (a) = 1 - cos(2a) */ in the formula that calculates chords long. Re: Hint daftcoder [Yaroslavl SU] 24 ноя 2009 01:51 2 * R * sin( a / 2 ) = sqrt ( 2 R R 2 sin^2 ( a / 2 ) ) = sqrt ( 2 R R ( 1 - cos ( a ) ) = sqrt ( 2 R R - 2 R R cos ( a ) ) = sqrt ( R^2 + R^2 + 2 * R * R * cos ( a ) ) |
| Could anyone answer? | tashlion | | 24 ноя 2009 00:22 | 2 |
Could anyone advice me what books I should read and use for solving different problems Try "Introduction to Algorithms" by Cormen, Leiserson and Rivest :) |
| Weak tests | Oleg Strekalovsky [Retired] | 1741. Монстр общения | 23 ноя 2009 01:43 | 21 |
Weak tests Oleg Strekalovsky [Retired] 3 ноя 2009 15:34 Мy very crazy program passed 19 Tests and get TLE 20. I may be wrong, but I think, that the first 19 tests are weak. My program can't passed so many tests with bug in algorithm. My be it is needed to check this tests and emulate EVERY possible and impossible situations. Your solution didn't pass so tests are OK. Tests are weak if your wrong solution passes all of them. I wrote bad solution and get AC at 19!!! tests. I use DP and DFS. It is very strange, that this bad solition passed so many tests... Maybe the first 19 tests are some small tests that some programs go wrong at it. 1741 is median of contest. Halph of problems are harder hailpf are simpler. I am myself made 1741 from 1 submission. But there is 1735:modelling optimal packing different subsets sum problem for which great Erdesh was able to give 500$ Finally AC by DP. I had a good sleep 8) Why do you think that 19 is "many"? Some problems on Timus Online Judge have more than 200 tests. :) Problem not in amount, but in qualitative. My wrong solution must not passed so many and get TLE, because it must get WA early :) That's all. Topic closed. You must get AC for this problem with the first attempt. It's very easy problem. =) You should not think about "weak" tests in this case) Fyodor Menshikov created test, where my AC program failure =) We always encourage you to send good tests to us :) Yep =) Some times I create "not bad" heuristic solution. I know, that it is not good, but some times only my coatch (not Timus) can create failure test after he sees the code :) Please said me I'm right? cracked on cracked, pirated licensed on licensed, cracked pirated on licensed, cracked, pirated thanks! Program can't be cracked. Update can be cracked. If update is Licensed or Cracked,then program became Licensed. If update is Cracked or Pirated,then program became Pirated. I correct my code, but I also got wa#8. What is wrong in my idea? 1) sort by xi; 2) linear algo to find D[n][pirated] and D[n][licensed] 3) when write(min(D[n][pirated], D[n][licensed])) or please give me some useful tests. thanks! Edited by author 17.11.2009 02:59 I correct my code, but I also got wa#8. What is wrong in my idea? 1) sort by xi; 2) linear algo to find D[n][pirated] and D[n][licensed] 3) when write(min(D[n][pirated], D[n][licensed])) or please give me some useful tests. thanks! Edited by author 17.11.2009 02:59 My solution use DFS. I try to get answer not for last program, but for first. We have one "start point" and many "end points". Use recursion to get min cost of updating to every version of program. Other only via email(only Russian) Edited by author 17.11.2009 15:28Oleg, use phrase "min cost" more carefully. =) Usually it means min cost max flow problem :)) Test by Fyodor Menshikov was added to the test set. Test by Fyodor Menshikov was added to the test set. Yep =) I'v got 2 WA, but last result is AC. I think, only I got WA. It's easy to break program, looking at it code =) Edited by author 23.11.2009 18:40 |
| WA on Test 4 | Armen Tsirunyan | 1360. Философский спор | 22 ноя 2009 21:41 | 3 |
Hi, everyone. I hate this problem, too, but there's a strange thing going on with test 4. My algorithm is very straightforward and it cannot possibly lead to a WA. It could be a TLE, I admit, but can anybody explain to me HOW is WA possible with this code? #include <iostream> #include <cmath> using namespace std; int main() { double t = 0; double eps; double x, y; cin>>x>>y>>eps;
eps*=eps; t = 0; while(true) { double c = cos(t) - y; double d = sin(pow(t,0.5)) - x ; if( c*c+d*d > eps/2) t+=0.007; else { break; } } cout<<t; return 0; } OK, I got AC. And I found my mistake. And inasmuch as I do hate this problem, and don't think this is a good problem, I want to tell everybody how to solve it. So, first of all, output the answer with precision 10^-5; Second of all, find the smallest positive t, such that cos(t) = y; Then while(sin(sqrt(t)) !~ x) t+=2pi. That's all. Good luck with this goddamn(this isn't a taboo word, is it?:)) problrm Thank you for your advice! Whith it I got AC without any WA!:) |
| WA 25 | sos1g3 [TSOGU] | 1238. Folding | 22 ноя 2009 11:35 | 1 |
WA 25 sos1g3 [TSOGU] 22 ноя 2009 11:35 My programm using dp... Why I have WA 25.Give any test,please. Sorry for bad English. |
| Sample test case | ftc | 1652. Банковский кризис | 22 ноя 2009 10:07 | 2 |
Could anybody explain, why Bank 3 could not buy debt of Bank 2 to Bank 1 and thus become responsible. As I think, it contradicts only common sense, but not the statement. But if we use common sense, should we disallow only such kind of loops (where A owes B and B owes A) or any loops (e.g. A owes B, B owes C, C owes A) ? |
| What is the test case 1? | Mohsen Biglari | 1007. Кодовые слова | 21 ноя 2009 22:32 | 3 |
I got WA#1, now I ACed May be it'll help you: my mistake was that I replaced 0 by 1 |
| about using material | tashlion | 1083. Факториалы!!! | 21 ноя 2009 17:04 | 1 |
Could any one advice me what books I should read and use for solving different problems |
| compilator | Ioffeg | | 21 ноя 2009 16:32 | 1 |
Please, add gnu c++ compilator. |
| AC at last!! :) | Denis Koshman | 1384. Пусти козла в огород 4 | 21 ноя 2009 16:32 | 2 |
Precision of 1e-8 is ok to get AC (provided that you use only square roots, no trigonomety). I got AC using sin, cos broadly. |
| I don't know why mine got problem with the program C++ | CJH1996 | 1000. A+B Problem | 21 ноя 2009 15:00 | 5 |
#include<iostream> using namespace std; int main() { int a,b; cout<<"a" <<endl; cin>>a; cout<<"b" <<endl; cin>>b; cout<<a+b <<endl; system("pause"); } Can you tell me what's the prob????????? I don't understand what is the meaning of output and input even though i read the website you have told me. Can you briefly tell me about the meaning of output and input and the meaning of these two? I hope I can learn something from you. This problem haven't say print "a"and"b"letter before input.So I change your programme. #include<iostream> using namespace std; int main() { int a,b; cin>>a; cin>>b; cout<<a+b <<endl; system("pause");//return 0; } this can be better: #include<iostream> using namespace std; int main() { int a,b; while(cin>>a>>b) {cout<<a+b<<endl;} return 0; } Edited by author 21.11.2009 15:02 |
| What is wrong with my code ? | Sepehr Mousavi | 1636. Штрафное время | 20 ноя 2009 04:08 | 2 |
First, i sent my solution in Pascal and i got WA2 and then i wrote it in C++ and i got Accepted. I want to know my mistake in my Pascal solution. Here's my code in Pascal : [code deleted] Edited by moderator 17.11.2019 18:35 readln(n); You should read, not readln. |