| Show all threads Hide all threads Show all messages Hide all messages |
| What is the 5th test? | KVN-Khai>>Ann | 1925. British Scientists Save the World | 24 Dec 2018 00:27 | 3 |
Do you say about your problem? Result may be greater than 100 |
| tests | NickSergeev[MSU MindCraft] | 1658. Sum of Digits | 23 Dec 2018 14:41 | 5 |
tests NickSergeev[MSU MindCraft] 2 Nov 2008 01:24 1 1 1 2 2 11 2 4 2 3 3 111 3 5 12 3 9 3 4 4 1111 4 6 112 4 8 22 4 10 13 4 16 4 5 5 11111 5 7 1112 5 9 122 5 11 113 5 13 23 5 17 14 5 25 5 6 6 111111 6 8 11112 6 10 1122 6 12 222 6 14 123 6 18 33 6 20 24 6 26 15 6 36 6 Edited by author 07.04.2013 15:09 |
| WA on test № 7 | Vasily Slesarev | 1492. Vasya's Dad 2 | 22 Dec 2018 04:18 | 2 |
I have no ideas... Please, give me some tests! If you get WA on case 7, it's probably because you have three neighboring points in your answer to be on the same line. |
| If you have WA #3 | Smilodon_am [Obninsk INPE] | 1980. Road to Investor | 21 Dec 2018 01:55 | 1 |
Try below test (TWO edges between the first and the last vertices): 2 2 1 2 60 60 1 2 50 51 1 Answer: 0.000000 1 1 Edited by author 21.12.2018 01:56 |
| tl#7 | Viktor Krivoshchekov`~ | 2003. Simple Magic | 20 Dec 2018 15:54 | 1 |
tl#7 Viktor Krivoshchekov`~ 20 Dec 2018 15:54 Edited by author 05.06.2020 17:42 |
| How to write fast solution? | Alchemist | 1837. Isenbaev's Number | 20 Dec 2018 15:37 | 3 |
I can solve it by breadth-first search with Execution time:0.218, but how to solve it with Execution time:0.015 or 0.031??? I have no idea about it. Give me please idea or algorithm's name to solve it so fast. thank you! [code deleted] his work time 0.31 Edited by moderator 19.11.2019 23:11 You can solve fast using BFS)) [code deleted] work timeL 0.015 Edited by author 20.12.2018 15:38 Edited by moderator 19.11.2019 23:11 |
| WA 24!!!! WHAT'S WRONG????????????? | Maria | 1644. A Whole Lot of Walnuts | 19 Dec 2018 18:46 | 3 |
You are so awesome, that I want to become your girlfriend, pleeeeease marry me!!!!!!!!!!!!!! |
| Не проходит шестой тест | Vasya | 1786. Sandro's Biography | 19 Dec 2018 01:28 | 1 |
Прошу помочь. Написал алгоритм на питоне, все придуманные мной примеры работают, однако шестой тест неумолим... Подскажите, где ошибка? Код прилагаю string = input() find = 'Sandro' lst = [] string = ' ' + string + ' ' def counter(indexInFind, indexInString): global string global find summ = 0 index = 0 temp='' for i in range(indexInString - indexInFind, indexInString - indexInFind + 6): if string[i] == ' ': return # if string[i] != find[index]: summ += 5 index += 1 temp += string[i] return summ if temp.find('S') != -1 or temp.find('s') != -1 else summ+5 for i in range(len(string)): strfind = find.find(string[i]) if strfind != -1: lst.append(counter(strfind, i)) print(min(lst) if len(lst) != 0 else 35) Edited by author 19.12.2018 01:29 Edited by author 19.12.2018 01:29 Edited by author 19.12.2018 01:31 |
| ответ | Богдан | 1877. Bicycle Codes | 17 Dec 2018 19:29 | 1 |
ответ Богдан 17 Dec 2018 19:29 a=int(input()) b=int(input()) if (a%2) == 0 or (b%2) == 1: print('yes') else: print('no') |
| C# неправильный ответ | Ivan_Popovich | 1787. Turn for MEGA | 16 Dec 2018 15:45 | 1 |
помогите найти ошибку. вроде ответы правильные выдаёт using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp3 { class Program { static void Main(string[] args) { string[] a = Console.ReadLine().Split(); int b = Convert.ToInt32(a[0]); int c = Convert.ToInt32(a[1]); int d = 0; string[] e = Console.ReadLine().Split(); for (int f = 0; f < c; f++ ) { d = d + Convert.ToInt32(e[f]); } int g = d - b * c; if (g < 0) { g = 0; } Console.WriteLine(g); Console.ReadLine(); } } } |
| PASCAL WHY WA1?? | phloyd | 1493. One Step from Happiness | 15 Dec 2018 04:31 | 2 |
Am I stupid or what? code seems to be working var x,a,b:integer; function sum(x:integer): INTEGER; var s:integer; begin while x>0 do begin s:=s+x mod 10; x:=x div 10; end; sum:=s; end; begin read (x); a:=x div 1000; b:=x mod 1000; if (sum(a)=sum(b+1)) or (sum(a)=sum(b-1)) then writeln ('Yes') else writeln ('No'); end. Pay attention to inc and dec in your code. You should do first x+1 and x-1. I hope you understand me |
| WA#18 | Tural Vugar Gulmammadov | 1777. Anindilyakwa | 13 Dec 2018 21:41 | 8 |
WA#18 Tural Vugar Gulmammadov 9 Oct 2010 16:21 Can someone give me test #18??? Or give me some tests and answers??? Re: WA#18 Tural Vugar Gulmammadov 9 Oct 2010 17:03 For: 75000000000000000 50000000000000000 25000000000000000 answer is 2 (1 ≤ x1, x2, x3 ≤ 10^18) Try to use int64 Re: WA#18 Tural Vugar Gulmammadov 9 Oct 2010 20:22 Thanks, but i have already use int64/ but i dont know where's my error... :( I have submitted it more than one times with int64, but again and again I got WA on test19, however, same source code in Java using BigInteger was accepted at once. Re: WA#18 1_\/_@_|-|_ _ |>_/-\_$_E_4_|<_1_|-|_``~ 13 Dec 2018 21:41 45 1 12 You can have problems with sorting your array it was helped me. Good luck, bro! Edited by author 13.12.2018 21:43 Edited by author 13.12.2018 21:43 |
| WA #19 | FrostCode | 1777. Anindilyakwa | 13 Dec 2018 21:41 | 2 |
WA #19 FrostCode 29 Aug 2013 16:46 I didn't find a mistake in my program. And what is the test #19? I'am confused( Re: WA #19 1_\/_@_|-|_ _ |>_/-\_$_E_4_|<_1_|-|_``~ 13 Dec 2018 21:41 45 1 12 it was helped me. Good luck, bro! |
| AC on python | 1_\/_@_|-|_ _ |>_/-\_$_E_4_|<_1_|-|_``~ | 2033. Devices | 13 Dec 2018 21:18 | 1 |
AC on python 1_\/_@_|-|_ _ |>_/-\_$_E_4_|<_1_|-|_``~ 13 Dec 2018 21:18 tovars,prices,recomendations= [],[],[] for i in range(6): name = input() tovar = input() price = int(input()) if tovar in tovars: if prices[tovars.index(tovar)] > price: prices[tovars.index(tovar)] = price recomendations[tovars.index(tovar)] +=1 else: tovars.append(tovar) prices.append(price) recomendations.append(1) if recomendations.count(max(recomendations)) == 1: print(tovars[recomendations.index(max(recomendations))]) else: ans = [] ans1 = [] l = len(tovars) mm = max(recomendations) for i in range(l): if recomendations[i] == mm: ans.append(tovars[i]) ans1.append(prices[i]) print(ans[ans1.index(min(ans1))]) |
| To Admins: Please Add SBCL (Common Lisp) As A Supported Programming Language | spanner | | 13 Dec 2018 16:57 | 1 |
Could you please add Common Lisp as a language? SBCL is the most popular, and most performant, implementation of Common Lisp, and has been for some time (forked from CMUCL nearly 20 years ago)! It is also mostly maintained by Stas Boukarev. It has static typing, and it would be a beautiful language to solve Timus problems in. Common Lisp has been around for a very long time and its ANSI Standard has been the same for quite a number of years, so it is possible that there would not need to be many updates after it is added once. Adding the SBCL implementation as a supported language would be greatly appreciated by me and the Common Lisp community to be able to solve the amazing problems on this website with this very performant meta programming language. While attempting to get SBCL added, this repo could be used for reference -- https://github.com/optimisticlisper I really hope you will consider it. |
| what's wrong with this code.....???? | yks | 1293. Eniya | 13 Dec 2018 08:23 | 6 |
#include<stdio.h> #include<math.h> int main() { int n;
printf("%d\n",scanf("%d",&n)*n*scanf("%d",&n)*n*scanf("%d",&n)*n*2); } you write so complex, the answer is N*A*B*2 Should it work at all? Isn't it unspecified behavior - n is modified 3 times in the same expression? Brother, you should solve it step by step!Don't do all things in printf function.In this way u can easily find you bug! You can follow this method n*a*b*2 |
| suggestions for wa1 | OIer_cjf | 1102. Strange Dialog | 12 Dec 2018 14:39 | 5 |
At first,I got wa on test1,like many other authors.But later,I found it! All in one sentence,test the data below: 1 inputon Hello, The answer is YES and my program out puts YES, but I get WA1. Can you please help me what I am doing wrong. It passes all of my tests but gets wa 1. I'm confused too, maybe there are some design errors, like 'Yes' or 'yes'when you have to use "YES\n" I have the same problem and the reason of problem was: character '\r' at the end of test inputs string (at my PC i use Linux and there is no such problem). Then I start to check input for '\r' character and this code was accepted! it's good test. Thank you. |
| Структуры, указатель, динамический массив | Chika | | 11 Dec 2018 22:10 | 1 |
Create struct: struct Animal which has: - ID // ID of hero - name // name of animal (char *) (cin.getline) (cin.ignore()) - strength(int) // power of animal - frequency // number of hits in one iteration - HP // amount of life Your task is to show animal which won most rounds in the game. Input: n (how many animals) [2 <= n <= 10] n-times: ID name strength frequency goals HP goals Output: winner with amount of victory. Example: Input: 10 1 Lion John 30 2 100 // (0 1 0 0 1 0 1 0 0) 3 victory 2 Hen Rebecca 60 1 200 // (1 1 1 0 1 0 1 0 1) 6 victory 3 Tiger Alex 40 2 100 // (1 0 0 0 1 0 1 0 1) 4 victory 4 Buffalo James 40 3 100 // (1 1 1 0 1 0 1 0 1) 6 victory 5 Elephant Jack 50 1 300 // (1 1 1 1 1 0 1 0 1) 7 victory 6 Rhino Michael 30 1 200 // (1 0 0 0 0 0 1 0 0) 2 victory 7 Snake Oz 50 2 400 // (1 1 1 1 1 1 1 1 1) 9 victory 8 Cow Bettie 40 1 100 // (0 0 0 0 0 0 0 0 0) 0 victory 9 Crocodile Nick 20 3 500 // (1 1 1 1 1 1 0 1 1) 8 victory 10 Bear Drake 40 2 150 // (1 1 1 1 0 1 0 1 0) 6 victory Output : 7 Snake Oz 50 2 400 9 victory |
| for anyone who has WA#13 | Najmaddin Akhundov | 1402. Cocktails | 11 Dec 2018 11:31 | 3 |
use "long double" and to avoid rounding when you print the result, use cout << fixed <<setprecision(0)<< result << endl; Can you explain us why long double accepted and why double get WA13 ? |
| WA6 | ura | 1140. Swamp Incident | 10 Dec 2018 20:32 | 1 |
WA6 ura 10 Dec 2018 20:32 |