| Show all threads Hide all threads Show all messages Hide all messages |
| Для wa7 | a2ch | 1205. By the Underground or by Foot? | 3 Jan 2019 10:16 | 1 |
Спасибо парню из предыдущей ветки,лично мне это реально помогло Короче смысл в том,что в 7 тесте либо координаты A совпадают с координатами какой-нибудь станции (или тоже самое с B),либо у нескольких станций одинаковые координаты. Ну и прикол в том,что если вы строите матрицу смежности,то он будет считать что там нет пути, 0 же стоит |
| C++ AC | D4nick | 2031. Overturned Numbers | 3 Jan 2019 06:56 | 1 |
C++ AC D4nick 3 Jan 2019 06:56 the main difficulty here was to understand that you need to use <string> #include <iostream> #include <string> using namespace std; int main() { int n; string arr[4] = { "16", "06", "68", "88" }; cin >> n; if (n <= 4) for (int i = 0; i < n; i++) { cout << arr[i] << " "; } else cout << "Glupenky Pierre"; } |
| 2 Judges: TEST ARE WRONG!!! Here is a prove... (+) | Akshin Salimov | 1118. Nontrivial Numbers | 31 Dec 2018 14:35 | 9 |
Judjes tell me after you read my message, I will delete an AC program.
Here is th 1st program it got WA#3: [Program was deleted by author, beacuse it got AC =)] [Thx Vladimir! Judges if you need it, I can post it.] Here is 2nd program it got AC: [Program was deleted by author] [Judges if you need it, I can post that code for a while] Here is one test: 318 330 Correct answer is 323 (Triviality(323)=0.114551) AC programs answer for this tests was : 324 (Triviality(324)=1.619195) It means that AC program gave incorrect answer, but program which got WA#3 gave correct answer!!! It's shameful!!! Edited by author 20.01.2006 20:49 Edited by author 21.01.2006 02:45 What can you say about program which got wa? How can you make it to get AC? Your mistake is that you forget to add line prime:=true; in the end of prime(x) function AC!!! Akshin Salimov 21 Jan 2006 02:40 I got AC!!! Vladimir, Thank you very much! You are genius! Большое человеческое спасибо! My code: [code deleted] I have Time limit exceeded. I need optimal solution of this task. Help me please! Edited by moderator 19.11.2019 23:40 go to the sqrt(b), not to b/2 > go to the sqrt(b), not to b/2 could you help understanding why? for 20 the triviality is `(1+2+4+5+10)/20`, kind of meaning you would need to go to b/2. no? gotcha. you can do (i + N/i), so the N/i bit will make sure you would need to go only up to sqrt(N). thanks |
| Triviality(1)=? | Danila | 1118. Nontrivial Numbers | 31 Dec 2018 12:15 | 2 |
|
| WA#11 Give the test,please... | Andranik | 1688. Team.GOV! | 31 Dec 2018 03:43 | 3 |
What is the test #11?Give,please...... I believe test 11 is a test in which Ivan saves himself after the last restaurant. Example: 2000 3 2000 2000 2001 Answer: Free after 3 times. Edited by author 09.01.2011 19:55 Thank you, this is the reason of my WA11. |
| WA #6?? | Aniruddh Sriram | 1029. Ministry | 29 Dec 2018 04:08 | 1 |
WA #6?? Aniruddh Sriram 29 Dec 2018 04:08 I am using DP, it works for all TC on discussion. what could be wrong? |
| One line solution in Python))) | ViktYusk | 1044. Lucky Tickets. Easy! | 28 Dec 2018 03:21 | 1 |
print([None, 10, 10, 100, 670, 6700, 55252, 552520, 4816030, 48160300][int(input())]) |
| Input values of Test 7 | Oybek | 1161. Stripies | 27 Dec 2018 19:53 | 2 |
Hello. How can I find the input values for Test 7? It says that I have a wrong answer there. What is your code? Are you using double or float? |
| what's wrong with my code? | yungyBaSe | 1402. Cocktails | 26 Dec 2018 20:48 | 1 |
#include <iostream> #include <cmath> using namespace std; int fac(int n){ if (n==0){ return 1; } else { return n*fac(n-1); } } int wtf(int n,int k){ return fac(n)/fac(n-k); } int cock(int n){ int sum; for (int i=2;i<=n;i++){ sum += wtf(n,i); } return sum; } int main() { int n; cin >> n; cout << cock(n); return 0; } |
| Always Wa#5,who AC give me a tip | Pegasus | 1925. British Scientists Save the World | 24 Dec 2018 00:27 | 2 |
Result may be greater than 100 |
| 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 | Piratek-(akaDK) | 1658. Sum of Digits | 23 Dec 2018 14:41 | 5 |
tests Piratek-(akaDK) 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 | VasilySlesarev | 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!!!!!!!!!!!!!! |
| Не проходит шестой тест | Theodike | 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(); } } } |