| Show all threads Hide all threads Show all messages Hide all messages |
| В чём ошибка? Помогите знатоки программирования , пожалуйста)) | Nikita | 1563. Bayan | 18 Dec 2019 17:13 | 2 |
Помогите ,пожалуйста , что не так? #include <iostream> #include <string> using namespace std; int main() { int n, s = 0; cin >> n; string a[1000]; for (int i = 0; i < n; i++) { getline(cin, a[0]); for (int j = n + 1; j < n; j++) { if (a[i] == a[j]) { break; s++; } } } cout << s; return 0; } Edited by author 02.12.2019 20:46 у тебя код неверный Edited by author 18.12.2019 17:14 |
| WA 3 | So Sui Ming | 1227. Rally Championship | 18 Dec 2019 12:00 | 3 |
WA 3 So Sui Ming 6 Sep 2017 11:01 I passed all test cases mentioned in the discussion. There are 4 tests in my algorithm: - is there a loop (from M and N) ? - is the graph connected ? - is there a cycle? - for each component of the graph: find the longest path and compare the length with S any hint? Edited by author 06.09.2017 11:02 Edited by author 06.09.2017 11:02 i had problems with 3rd test case. this input should help you: 1 1 5 1 1 2 the key here was to look closely at restrictions: 1 ≤ M ≤ 100; 1 ≤ N ≤ 10 000 assuming there could not be several ways from different x and y, and no loops from x to x, there should be at most 4950 connections between cities 3rd test contains road from X to X, so answer is "YES" |
| Useful test | hadooken | 1181. Cutting a Painted Polygon | 18 Dec 2019 11:06 | 1 |
10 RGRGRBGBGB Possible answer: 7 4 6 3 6 2 6 1 6 1 7 1 8 1 9 |
| WA10 | Jumabek_Alihonov | 1786. Sandro's Biography | 17 Dec 2019 15:54 | 3 |
WA10 Jumabek_Alihonov 5 Apr 2012 18:12 I think here the line begins with something like: andro.... or ndroS.... |
| Runtime Error in python | Milena Araujo | 1136. Parliament | 16 Dec 2019 16:49 | 5 |
I just rewritten my AC solution in python (it was originally written in Java) and I got Runtime Error on test #7. Any hint on why this happen ? Any test ? It gives me the same results as my Java solution .. I'm also got RE#1 with Python 3.3. And finally rewrite code in C++ and got AC.. Look sys.setrecursionlimit |
| Test 5 | Desserg | 1136. Parliament | 16 Dec 2019 15:11 | 1 |
Test 5 Desserg 16 Dec 2019 15:11 solution found 1 1 Edited by author 16.12.2019 16:48 Edited by author 16.12.2019 16:51 |
| What's wrong with this code? | Ultra_Satan | 1001. Reverse Root | 16 Dec 2019 12:50 | 2 |
#include <iostream> #include <iomanip> #include <cmath> #include <vector> using namespace std; int main() { cout << setprecision(4); vector<double> v; double n; while (cin >> n) v.push_back(n); for (int i = v.size() - 1; i >= 0; i--) cout << sqrt(v[i]) << endl; } WA1 typically means your program can't even pass the task example. Let's see your: https://ideone.com/Y8Uxei - yes, output is wrong. |
| So easy / phyton 3 solution | SMMaster | 1000. A+B Problem | 15 Dec 2019 16:38 | 1 |
a, b =map(int, input().split()) print(a + b) |
| So easy / phyton 3 solution | SMMaster | 1243. Divorce of the Seven Dwarfs | 15 Dec 2019 16:37 | 1 |
a = int(input()) c= a//7 d=c*7 print(a-d) |
| Первый тест некорректен | Kogut.Ivan'` | 2111. Plato | 15 Dec 2019 15:45 | 5 |
Если мы можем оставлять часть груза в городах(любое кол-во груза), то ответ будет 24(может и меньше). Ошибка в условии или некорректно сформулировано условие? Цитата из условия: "Грузовик Платона загружается один раз в столице." Следовательно, если мы оставим часть груза в каком-то городе, то назад его погрузить уже не сможем. Messages should be written in English reshke'` , если бы он хотел, чтобы наши иностранные дружбаны его поняли, то я думаю написал бы на английском. a2ch : There is nothing called foreign friends, please remember we are global citizen first. We all are programmers and that is our identity. Please keep smiling. --------------------------- Там нет ничего, что называется иностранными друзьями, пожалуйста, помните, мы в первую очередь гражданин мира. Мы все программисты, и это наша личность. Пожалуйста, продолжай улыбаться. |
| hint/ намек | anupam ghosh | 2056. Scholarship | 15 Dec 2019 15:21 | 1 |
Please read "if a student has got satisfactory marks, the scholarship is not given" this statement again and again which means if in any of the subject a student gets 3.0 he will not get any scholarship. -------------------------------------------------- Пожалуйста, прочитайте «если студент получил удовлетворительные оценки, стипендия не предоставляется», это утверждение снова и снова означает, что если по какому-либо предмету студент получает 3,0 балла, он не получит стипендию. |
| ПОМАГИТЕ!ВСЕ ПРАВИЛЬНО НО НЕПРАВИЛЬНО!!!!!! | Yarik0514 | 2066. Simple Expression | 15 Dec 2019 12:53 | 2 |
import java.util.Arrays; import java.util.Scanner; public class ppppp { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int g = in.nextInt(); if (0 <= n && n <= k && k <= g && g <= 100){ int[] mas = {n, k, g}; boolean isSorted = false; int buf; while (!isSorted) { { isSorted = true; for (int i = 0; i < mas.length - 1; i++) { if (mas[i] > mas[i + 1]) { isSorted = false; buf = mas[i]; mas[i] = mas[i + 1]; mas[i + 1] = buf; } } } } int da = mas[0] - mas[1] * mas[2]; System.out.println(da); } } } Да тут есть ошибка!В коде есть ошибка нужно посмотреть код заново!И выявить ошибку! ОТВЕТ ДЛЯ ЭТОЙ ЗАДАЧИ a-b-c or a-b*c это нужно вписать в код и все получится! |
| i am | Yarik0514 | 2066. Simple Expression | 15 Dec 2019 12:50 | 1 |
i am Yarik0514 15 Dec 2019 12:50 lol Edited by author 15.12.2019 12:57 Edited by author 15.12.2019 12:57 Edited by author 15.12.2019 12:57 |
| input taken in while loop, sqrt is calculated with 9 point precision then also WA. | neel rayal | 1001. Reverse Root | 14 Dec 2019 17:59 | 1 |
#include<bits/stdc++.h> using namespace std; int main() { unsigned long long int n; while(cin >> n) { cout << fixed << setprecision(9) << sqrt(n) << "\n"; } return 0; } |
| ADMINS | Viktor Krivoshchekov`~ | 1732. Ministry of Truth | 13 Dec 2019 06:51 | 2 |
ADMINS Viktor Krivoshchekov`~ 12 Dec 2019 17:37 Add test. My solution O(n^2) on python AC admins is died Edited by author 13.12.2019 06:53 |
| This is a nice problem. Loved solving it | anupam ghosh | 2138. The Good, the Bad and the Ugly | 10 Dec 2019 17:53 | 1 |
|
| [Hint] Very easy problem | hadooken | 1229. Strong Brickwork | 10 Dec 2019 14:13 | 1 |
Check all 2x2 squares A[i][j] A[i][j+1] A[i+1][j] A[i+1][j+1] Make sure you always can cover this square at least one of the methods x x y y or x y x y Edited by author 10.12.2019 14:13 Edited by author 10.12.2019 14:15 |
| [Hint] If you got WA 4 | hadooken | 1934. Black Spot | 10 Dec 2019 13:26 | 1 |
Check that you are dealing with an undirected graph! |
| [Hint] If you got WA 2 | hadooken | 1934. Black Spot | 10 Dec 2019 13:21 | 1 |
You need to minimize number of visited islands firstly. Test: 3 3 1 3 1 3 99 1 2 0 2 3 0 Answer: 2 0.99 1 3 |
| Why example is correct? | ToadMonster | 2111. Plato | 10 Dec 2019 12:53 | 2 |
Let we visit towns by distance ascending: 1, 2, 3 So total fine is : (6+5) + (5*2+3*2) + 3 = 11 + 16 + 3 = 30 Where am I wrong? My mistake: Total fine is : (6+5) + (5*2+3*2) + 3*3 = 11 + 16 + 9 = 36 |