| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| re16 | Moshkov Danil | 2112. Полевые логи | 20 ноя 2019 12:50 | 2 |
re16 Moshkov Danil 17 ноя 2019 10:44 Edited by author 17.11.2019 11:13 8 A B C D E F G H 6 A HIT B IN HEAD A HIT C IN HEAD A REVIVE B B REVIVE C A HIT D IN HEAD C REVIVE D |
| WA 7 | 👨💻Stepavly👨💻 [ITMO] | 2147. Градостроение | 18 ноя 2019 22:59 | 1 |
WA 7 👨💻Stepavly👨💻 [ITMO] 18 ноя 2019 22:59 Can anyone help me? I have no idea about how this test looks like. |
| WA 30 | Disintegrator | 1389. Дорожные работы | 18 ноя 2019 19:14 | 4 |
WA 30 Disintegrator 8 апр 2014 03:36 I have WA 30, what did you do to AC? Ok, I got AC after lots of WA 30 attempts by iterating over the input in the reversed order, which makes no sense to me. My current best guess is that test #30 is broken, so there are at least two correct answers and it accepts only one of them as correct. Of course, my algo can delete edges in different order depending on the order in which it iterates over them, but I'm pretty sure it always removes the maximum number of edges. |
| idk why but my code do not work on TOJ compiler but it works on my pycharm compiler | Oleg Bozhenov | 1542. Автодополнение | 18 ноя 2019 03:36 | 1 |
So, when user starts looking for words, my program immediately writes the answer. Maybe that's why it isn't correct. For example: user -> 2 user -> ab program -> abc user -> xz program -> xzy |
| We can use O(n*prime(n)) to AC this problem.It's the most easy algorithms. | Зане | 1132. Квадратный корень | 17 ноя 2019 23:08 | 2 |
We can qsort(n) and enumeration to solve it. Notice that n is a prime.There are 2500 primes under 32767. Enumeration can solve this problem. And every ask have mostly 2 answers.最多2个解 There are 3512 primes under 32767. |
| WA1 | Dyryaev Daniil | 2114. Моё ремесло | 15 ноя 2019 01:31 | 2 |
WA1 Dyryaev Daniil 15 ноя 2019 01:26 I wrote the solution and had the correct answers on test cases, but i have wa1. Can someone help me or give advice? This is my solution: #include <iostream> #include <iomanip> #include <cmath> #include <algorithm> #include <numeric> #include <set> #include <map> #include <vector> #include <string> #include <cstring> #include <cstdlib> using namespace std; #define task void print(int array[], int n) { for (int i = 0; i < n; i++) { cout << array[i] << ' '; } } void optimization() { cin.tie(nullptr); ios_base::sync_with_stdio(false); } int factorial(int x) { int a = 1; for (int i = 2; i < x + 1; i++) { a *= i; } return a; } #ifdef task int main() { optimization(); int n, m; cin >> n >> m; int **field = new int *[n]; for (int i = 0; i < n; i++) { field[i] = new int[m]; } for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> field[i][j]; } } int q; int k; int x = 0; int y = 0; int max_drop = -1; int part_sum = 0; int move_to_right = -1; cin >> q; for (int quest = 0; quest < q; quest++) { cin >> k; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { move_to_right = k + 1; part_sum = 0; for (int down = i; down < i + k + 1; down++) { for (int right = j; right < j + move_to_right; right++) { if (down < n && right < m) { part_sum += field[down][right]; } } move_to_right--; } if (part_sum > max_drop) { max_drop = part_sum; x = i + 1; y = j + 1; } } } cout << max_drop << ' ' << x << ' ' << y << endl; max_drop = -1; } return 0; } #endif Re: WA1 Dyryaev Daniil 15 ноя 2019 01:31 upd: Before I used scanf and got wa1. Now with cin // cout i have tle17. |
| No subject | Roman Hrynevych | 1563. Баяны | 14 ноя 2019 22:45 | 1 |
Edited by author 14.11.2019 22:47 |
| How can be z==2? | Valeriya Krinitsyna | 1428. Джедайский ребус | 13 ноя 2019 22:05 | 1 |
In the example 2 2 3, z==5. Why do everybody say that z==2? |
| for python use sys.stdin | ai123ia | 1100. Таблица результатов | 12 ноя 2019 16:28 | 3 |
Thank you, dear! You are my saver! Thank. Now everything stopped at MLE |
| Python3 MLE на 11 тесте | Desserg | 1100. Таблица результатов | 12 ноя 2019 16:26 | 1 |
есть ли способы на питоне обойти прожорливость памяти? |
| WA#10! Help me please!!! | Pio | 1362. Одноклассники 2 | 12 ноя 2019 00:15 | 4 |
I also have WA10/ Help Someone! 9 8 2 0 4 3 0 0 5 6 0 0 0 0 9 0 7 0 1 correct answer 4 |
| some Test Please !!! | Arm | 1362. Одноклассники 2 | 12 ноя 2019 00:15 | 2 |
9 8 2 0 4 3 0 0 5 6 0 0 0 0 9 0 7 0 1 correct answer 4 |
| wa 10 | Michael Glushkov | 1489. Точки на параллелепипеде | 11 ноя 2019 21:39 | 1 |
wa 10 Michael Glushkov 11 ноя 2019 21:39 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1489 { class Point { public double x; public double y; public double z; static void Main(string[] args) { int A, B, C; string S = Console.ReadLine(); string[] SS = S.Split(); A = Convert.ToInt32(SS[0]); B = Convert.ToInt32(SS[1]); C = Convert.ToInt32(SS[2]); double x1, y1, x2, y2; double[] mas = Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); x1 = Convert.ToDouble(mas[0]); y1 = Convert.ToDouble(mas[1]); double[] mas2 = Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); x2 = Convert.ToDouble(mas2[0]); y2 = Convert.ToDouble(mas2[1]); Point a = new Point();
// A - x B - y C - z // x if (x1 <= C) a.x = 0; else if (x1 <= C + A) a.x = x1 - C; else a.x = A; // y if (y1 <= B) a.y = B - y1; else if (y1 <= B + C) a.y = 0; else if (y1 <= 2 * B + C) a.y = y1 - B - C; else a.y = B; // z if (y1 <= B) a.z = 0; else if (y1 <= B + C && x1 <= C + A && x1 >= C) a.z = y1 - B; else if (x1 <= C && y1 <= 2 * B + C) a.z = x1; else if (x1 >= C + A && y1 <= 2 * B + C) a.z = A + C + C - x1; else if (y1 >= B + C + B) a.z = 2 * (B + C) - y1; else a.z = C;
Point b = new Point();
// x if (x2 <= C) b.x = 0; else if (x2 <= C + A) b.x = x2 - C; else b.x = A; // y if (y2 <= B) b.y = B - y2; else if (y2 <= B + C) b.y = 0; else if (y2 <= 2 * B + C) b.y = y2 - B - C; else b.y = B; // z if (y2 <= B) b.z = 0; else if (y2 <= B + C && x2 <= C + A && x2 >= C) b.z = y2 - B; else if (x2 <= C && y2 <= 2 * B + C) b.z = x2; else if (x2 >= C + A && y2 <= 2 * B + C) b.z = A + C + C - x2; else if (y2 >= B + C + B) b.z = 2 * (B + C) - y2; else b.x = C;
double difx = (a.x - b.x); double dify = (a.y - b.y); double difz = (a.z - b.z); //if (difx * difx + dify * dify + difz * difz > 0) Console.WriteLine((Math.Sqrt(difx * difx + dify * dify + difz * difz))); //else Console.Write(0); } } } |
| WHY WA 5 | JAVATO | 1638. Книжный червь | 11 ноя 2019 10:35 | 7 |
I'm also getting WA5. Please help. try this tests: 1)in: 10 1 2 1 ans: 22 2)in: 10 1 1 1 ans: 10 thank you very much:)))))))))))))))))))))))))))))))))))))))))))))))))))))) |
| Whats wrong? C | Sanchir | 1001. Обратный корень | 10 ноя 2019 22:27 | 2 |
#include <stdio.h> #include <math.h> main(void) { long long i; while(scanf("%lli", &i) != EOF) printf("%.4f\n", (double)sqrt(i)); } You have print the integers in reverse order of the input sequence. |
| Why Runtime Error (Access Violation)?? | Labib Bin Mohtaram | 1001. Обратный корень | 10 ноя 2019 22:25 | 2 |
[code deleted] Edited by moderator 19.11.2019 23:31 Your array size is not enough to hold all the integers. |
| Why Runtime error on test 4?? | FromNothingToFinal | 1020. Ниточка | 10 ноя 2019 19:07 | 2 |
public class Problem { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int r = sc.nextInt(); double l = 0; if (n != 1) { double x1 = sc.nextDouble(); double y1 = sc.nextDouble(); double memoryX = x1, memoryY = y1; for (int i = 1; i <= n; i++) { if (i == n) { l += Math.sqrt((memoryX - x1) * (memoryX - x1) + (memoryY - y1) * (memoryY - y1)); continue; } double x = sc.nextDouble(); double y = sc.nextDouble(); l += Math.sqrt((x - memoryX) * (x - memoryX) + (y - memoryY) * (y - memoryY)); memoryX = x; memoryY = y; } } l += 2*Math.PI*r; System.out.printf("%.2f", l); sc.close(); } } radius can be float number |
| Advices with RE and WA | roman velichkin | 1020. Ниточка | 10 ноя 2019 19:07 | 1 |
Radius and coords can be float N can be 1 |
| Some test cases | Smilodon_am [Obninsk INPE] | 2143. Victoria! | 9 ноя 2019 01:18 | 1 |
Below test cases helped me to check the program: 2 3 .**|_|**. **.|_|*** ans: [good test] POBEDA 1A 2C 1F 5 6 ...|_|*** ...|_|*** ...|_|*** ...|_|*** ...|_|*** ans: POBEDA 1A 1C 3A 3C 5A 5C 5 12 ...|_|... ...|_|... ...|_|... ...|_|... ...|_|... ans: POBEDA 1A 1C 3A 3C 5A 5C 1D 1F 3D 3F 5D 5F 6 6 *..|_|*** ...|_|*** ...|_|*** ...|_|*** *..|_|*** ..*|_|*** ans: POBEDA 1C 2A 3C 4A 5C 6A 6 6 *..|_|*** ..*|_|*** ...|_|*** ...|_|*** *..|_|*** ...|_|*** ans: POBEDA 1C 2A 3C 4A 5C 6A 6 6 *..|_|*** *.*|_|*** ...|_|*** ...|_|*** *..|_|*** ...|_|*** ans: PORAZHENIE |
| Is 1001 unlucky or 1010? | roman velichkin | 1608. Счастливые билеты 2008 | 8 ноя 2019 10:25 | 1 |
I didn't get this task. Is 1001 unlucky number or 1010? |