| Show all threads Hide all threads Show all messages Hide all messages |
| TLE 17 | Drema [KhAI] Tihov Ilya | 1595. Perfect Sequence | 18 Feb 2016 17:25 | 2 |
TLE 17 Drema [KhAI] Tihov Ilya 29 Jun 2009 15:34 How you solved this problem with out many long surpluses? I had TLE 17 too, i solved this by making some tests and observing the rule |
| stupid test WA2 | lallala | 1212. Battleship | 17 Feb 2016 22:34 | 1 |
|
| Ошибка на 7 тесте! Что не так? | O'lmas | 2012. About Grisha N. | 17 Feb 2016 21:17 | 2 |
#include <iostream> using namespace std; int main() { int n; cin>>n; if(1<=n&&n<=11) { int a=12-n; if(a*3/4<=4) cout<<"YES"; else cout<<"NO"; } return 0; } |
| WA7 | Kot_Angens | 1673. Admission to Exam | 17 Feb 2016 18:49 | 2 |
WA7 Kot_Angens 23 Sep 2015 11:17 Re: WA7 6eJIa9IzZzTeHb 17 Feb 2016 18:49 |
| WA7 | Dan Fox | 1673. Admission to Exam | 17 Feb 2016 18:47 | 2 |
WA7 Dan Fox 23 Aug 2014 21:05 What in 7 th test??? I've tested my inverse eiler function. It works! Re: WA7 6eJIa9IzZzTeHb 17 Feb 2016 18:47 Try: 815799600 Output will be: 815860603 Edited by author 17.02.2016 18:48 |
| mathematical proof of the solution SPOILERS!!! | lallala | 1870. Zinium 2 | 17 Feb 2016 18:13 | 1 |
SPOILERS!!!SPOILERS!!! Do not look without solving the problem! let (xi,yi) are coordinates of n points. Following sets {xi} {yi} {xi+yi} {xi-yi} are some permutations of {1,2,...,n} by module n. if n%2==0 Then Sum(xi)+Sum(yi)=Sum(xi+yi) (mod n) it is not true since, n*(n+1)!=(n*(n+1))/2 (mod n) (since n -even) if n%3==0 Then Sum(xi*xi)+Sum(yi*yi)=Sum( (xi+yi)*(xi+yi) )+Sum( (xi-yi)*(xi-yi) ) it is not true since, ( n*(n+1)*(2n+1) )/3!=( 2*n*(n+1)*(2n+1) )/3 (mod n) (since n%3==0) Here, I used the fact that if (xi) is permutation of {1,2,...,n} by module n then sum of them is n*(n+1)/2 (mod n). Same with summing (xi*xi). |
| WA in JAVA - Why? | Kirill | 1001. Reverse Root | 17 Feb 2016 00:19 | 4 |
import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.*; public class Try2 { public static void main(String[] args) { DecimalFormatSymbols s = new DecimalFormatSymbols(); s.setDecimalSeparator('.'); DecimalFormat f = new DecimalFormat("#,####0.0000",s); Scanner in = new Scanner(System.in); while (in.hasNextLong()) { System.out.println(f.format(Math.sqrt(in.nextLong()) )); } } } Task: > For each number Ai from the last one till the first one ... So, did you try to check your solution on sample? Did you notice that numbers in your answer are in the wrong order? So, did You solve this problem with sqrt in wrong order? If You did, explain how? |
| is N<=18? | begi | 1013. K-based Numbers. Version 3 | 16 Feb 2016 18:14 | 3 |
If N=10^18 "digits" then complexity can be too big. Also I didn't quite understand the logic of mod M, if the test is 2 10 5: then correct answer is 0, if the test is 2 10 13, then correct answer is 3 {10, 11, 12}? Thank you! Your test case helped me getting an AC. No. N=10^18 is correct If use recurrence to calculating n = 1 then n = 2 then n = 3 etc then complexity too big But there is shortcut to make exponential jumps in calculating (hint: matrix) |
| problem 1000 (a+b) | wardun | 1000. A+B Problem | 16 Feb 2016 14:43 | 6 |
why wrong answer? #include<stdio.h> int main() {float a,b,sum; printf("a:");scanf("%f",&a); printf("b:");scanf("%f",&b); sum=a+b; printf("a+b:%f",sum); return 0;} Even i got the wrong answer . On a glance at your code if you give input as 1 and c ( letter ) you get a result 39 .which according to the problem statement is incorrect. It is concerned about addition of number so add test cases like checking whether input is valid for program . Edited by author 01.04.2013 15:28 You mustn't print any prompts. For example: "a: " or "b: ". Also you only must make the sum of two INTEGER numbers. Is no necessary to use float, only use int. You have been already informed that no prompts allowed. Another note - are you sure you can use "float" type? In example ( http://acm.timus.ru/help.aspx?topic=cpp) int is used instead. Float has less mantissa size - can be WA on big integers (big means "> 2^24"). Checked your solution locally and via online judge - answer for test is "6.000000", expected answer is 6, WA1. Edited by author 16.02.2016 14:48 |
| Question about statement | 2rf | 1484. Film Rating | 16 Feb 2016 14:10 | 3 |
Is it guaranteed that input is always correct? For example, is this test possible 1.7 1.6 1 ? Edited by author 19.04.2011 03:28 Yes, input is correct. There are no such tests. What's wrong with this test? Answer is 1... Any one vote with "1" will put the rating below 1.6... (Task says "not greater than Y") |
| Impossible | Daniel | 1484. Film Rating | 16 Feb 2016 14:04 | 6 |
Is there any tests where the answer is Impossible? I cant invent any where y=1 answer should be "Impossible" "where y=1 answer should be "Impossible"" sorry. it is not right because 1.0 ~ 1.04 9.1 10.0 1 you will never be able to get 10.0 (9.1+170)/18 = ? (9.95~10) ;) But actually 9.1 10.0 1 already fits to task - rating isn't greater Y! So seems answer should be 0 in this case... Edited by author 16.02.2016 15:27 Edited by author 16.02.2016 15:27 |
| Объясните пожалуйста в чем подвох? c# | Alexandr | 1000. A+B Problem | 15 Feb 2016 14:32 | 2 |
У меня на visual studio эта программа работает. Здесь же runtime error using System; public class lol { static void Main() { int a, b; a = Convert.ToInt32(Console.ReadLine()); b = Convert.ToInt32(Console.ReadLine()); a = a + b; Console.WriteLine(a); } } Run example as is - one line input - "1<space>5<eol>". Your local run will fail too. |
| why this algo is wrong | nomercy | 1789. Searching for the Dodecahedron | 14 Feb 2016 17:17 | 3 |
ans.push_back(2); ans.push_back(2); for (int i = 2;;++i){ if (i == n){ ans.push_back(i); break; } ans.push_back(i+1); ans.push_back(i-1); ans.push_back(i); } WA3 if n==5 answer 12 2 2 3 1 2 4 2 3 5 3 4 5 Edited by author 14.02.2016 15:53 Edited by author 14.02.2016 15:53 Here's a simple program testing your answer. It outputs all the possible paths when the figure is still not found. You can modify constants in the header to test another one. program test1789; const nmoves = 12; nwidth = 5; mv: array[1..nmoves] of longint = (2, 2, 3, 1, 2, 4, 2, 3, 5, 3, 4, 5); var i: longint; path: array[0..nmoves] of longint; procedure Solve(v, z: longint); var q: longint; begin if (v < 1) or (v > nwidth) then exit; if z > nmoves then begin for q:=0 to nmoves do write(path[q], ' '); writeln; end else begin //if (v < 1) or (v > nwidth) then exit; if v = mv[z] then exit; path[z]:=v - 1; Solve(v - 1, z + 1); path[z]:=v + 1; Solve(v + 1, z + 1); end; end; begin for i:=1 to nwidth do begin path[0]:=i; Solve(i, 1); end; end. UPD: A small fix, moving one line into a proper place. Edited by author 14.02.2016 16:28 |
| Is the length of the row exactly the same as the sum of the length of ships in it? | yuelin | 1115. Ships | 13 Feb 2016 14:41 | 2 |
I am not sure, but I think yes! |
| If you have WA3, test | KOTMAKRUS [SPbPU] | 1917. Titan Ruins: Deadly Accuracy | 13 Feb 2016 00:31 | 1 |
test 1002 1000000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1 2 answer 1002 2 Edited by author 13.02.2016 00:31 |
| HELP ME PLEASE | Valentina | 1086. Cryptography | 12 Feb 2016 23:02 | 1 |
Господа, помогите, пожалуйста, новичку ликвидировать "access violation"! Here is 'access violation' error but i don't see anything wrong and my code works perfectly on my computer. Could anybody help? var a :array [1..1000] of integer; kol,s,ch,n,i,k,j,q:integer; begin readln(n); for i:=1 to n do read(a[i]); ch:=3; for i:=1 to n do begin if a[i]=1 then writeln('2'); kol:=0; k:=1; ch:=3; while k<a[i] do begin for s:=2 to (ch-1) do if ch mod s = 0 then kol:=kol+1; if kol=0 then k:=k+1; if k=a[i] then writeln(ch); ch:=ch+1; kol:=0; end;
end; end.
Edited by author 12.02.2016 23:11 |
| Easy problem, but can be deceiving | jbjslair | 2068. Game of Nuts | 12 Feb 2016 16:57 | 1 |
Notice that they play "optimally". |
| I have O(n) | lallala | 1181. Cutting a Painted Polygon | 12 Feb 2016 16:27 | 1 |
|
| Tests and answers. | Grandmaster | 1073. Square Country | 11 Feb 2016 18:04 | 1 |
i write the output and the square roots. Input 41 Answer 2 16 25 Input 51 Answer 3 1 1 49 Input 19 Answer 3 1 9 9 Input 102 Answer 3 1 1 100 Input 18467 Answer 3 25 6561 11881 Input 6334 Answer 3 25 225 6084 Input 26500 Answer 2 256 26244 Input 19169 Answer 2 400 18769 Input 15724 Answer 3 36 1764 13924 Input 11478 Answer 3 4 25 11449 Input 29358 Answer 3 4 5329 24025 Input 26962 Answer 2 1681 25281 Input 24464 Answer 3 64 64 24336 Input 5705 Answer 3 4 225 5476 Input 28145 Answer 2 256 27889 Input 23281 Answer 3 9 7396 15876 Input 16827 Answer 3 49 5329 11449 Input 9961 Answer 3 16 144 9801 There can be any solution but the number of square roots is unique |
| Handling of small N | Andreas | 1014. Product of Digits | 11 Feb 2016 02:26 | 3 |
Program must return Q=10 if N==0 and Q=1 if N==1. This is not what one should expect from the description of the problem. what should it return for N = 5? Is Q 5 or 15 then? Thanks Your task is to find the MINIMAL positive integer number Q... If n=5 you must print 5, no 15. |