| Show all threads Hide all threads Show all messages Hide all messages |
| Here are second and third test case for people who WA#2 or #3 | Ilian | 1078. Segments | 3 Mar 2021 19:45 | 6 |
Test case 2: 9 -1 1 -2 2 -3 3 -10 10 3 6 4 5 2 7 1 8 0 9 Answer: 6 6 5 7 8 9 4 Test case 3: 100 272 422 352 367 102 435 274 469 532 554 88 468 28 761 334 381 62 236 858 955 104 930 4 892 467 749 39 695 189 709 217 790 571 999 126 355 138 779 570 645 31 222 372 511 345 888 535 731 435 953 87 869 172 863 442 936 450 704 452 697 862 896 887 977 510 844 135 225 95 932 632 888 30 704 165 523 47 306 107 645 22 34 237 712 779 796 505 964 419 495 171 751 449 616 62 642 355 954 101 266 71 585 284 723 69 900 781 998 21 338 619 950 173 239 394 502 183 605 113 999 30 748 122 833 541 829 65 453 650 741 141 562 355 928 360 852 83 997 563 590 482 668 318 980 84 170 233 858 9 484 637 799 104 611 483 856 29 889 16 463 530 709 774 979 414 654 332 527 406 476 257 735 57 257 201 508 259 806 62 955 410 790 37 720 490 893 573 779 241 400 315 640 242 940 165 929 54 814 356 501 Answer: 13 2 8 95 88 38 66 77 48 14 92 61 79 12 the answer to test 3 can also be 13 2 8 95 88 38 66 51 48 14 92 61 7 12 it can also be 13 45 58 22 84 96 52 86 46 19 62 26 79 12 can also be 13 85 58 22 84 96 52 86 46 19 62 11 35 69 Edited by author 03.03.2021 19:41 Edited by author 03.03.2021 19:41 |
| I don't understand the problem | Ryan Shaikh | 1008. Image Encoding | 3 Mar 2021 17:22 | 1 |
It says we have to start at the lowest left tile. Does that mean that the euclidean distance of the tile from origin should be minimum?? or does it mean that we have to look for left most layer and lowest tile in that?? |
| if u have wa 8 | Dmitriy | 1438. Time Limit Exceeded | 28 Feb 2021 17:01 | 1 |
try this test: label: a = 1 goto label |
| Is my idea right? | Lebedev_Nicolay[Ivanovo SPU] | 1371. Cargo Agency | 27 Feb 2021 15:17 | 3 |
I try to solve this problem as "offline LCA problem" with recursive DFS, but I have TLE? Where is mistake? Maybe if you solved LCA problem effective you can get AC, but there is easier way to solve this problem. u are late he got ac in 31 Jan 2009 |
| WA 17 | Felix_Mate | 1371. Cargo Agency | 27 Feb 2021 14:28 | 2 |
WA 17 Felix_Mate 21 Feb 2016 20:28 P.S. Нашёл баг, из-за которого был WA: если вы в Pascal пишите z:=n*(n-1), где z-int64, n-longint, то результат z будет типом longint; правильно так: z:=n; z:=z*(n-1). И ещё: лучше выводить не 4 знака в ответе, а все. Edited by author 03.08.2016 11:44 thnx a lot Felix_Mate i also face same situation. |
| hint | Toshpulatov (MSU Tashkent) | 1861. Graveyard in Deyja | 26 Feb 2021 23:41 | 1 |
hint Toshpulatov (MSU Tashkent) 26 Feb 2021 23:41 |
| WA4 test helped me | Zergatul | 2157. Skydiving | 25 Feb 2021 21:07 | 1 |
2 87 4547 87 2945 1516 64 913 9864 ----------- 9904.472185221 |
| One solution | boocoo | 1091. Tmutarakan Exams | 25 Feb 2021 19:02 | 1 |
A solution that doesn't make use of the max number being 10,000 is using inclusion-exclusion principle. Because when we take the sets of K that have a gcd divisible by 2 and the sets of K that have a gcd divisible by 3, you count twice the ones with a gcd divisible by 6, so you have to subtract those. It's similar to a solution to this problem: https://open.kattis.com/problems/coprimeintegers |
| Java Ans. | koti4 | 1263. Elections | 24 Feb 2021 14:26 | 1 |
import java.util.*; public class j { public static void main(String[] args){ Scanner input = new Scanner(System.in); int bin,sum = 0; int n=input.nextInt(); int m=input.nextInt(); int [] mas = new int [n]; for(int i = 0;i<m;i++){ bin = input.nextInt(); sum += 1; mas[bin-1] = mas[bin-1] + 1; } for(int i = 0;i<n;i++){ System.out.println(String.format("%.2f",mas[i]/(sum*0.01))+"%"); } } } |
| Why this isn't working? Java. | koti4 | 1880. Psych Up's Eigenvalues | 23 Feb 2021 20:23 | 1 |
import java.util.*; public class Main { public static void main(String[] args) { ArrayList<Integer> mas = new ArrayList<>(); Scanner input = new Scanner(System.in); int n,bin,delta = 0; n = input.nextInt(); for (int i = 0; i <n;i++){ bin = input.nextInt(); mas.add(bin); } n = input.nextInt(); for (int i = 0; i <n;i++){ bin = input.nextInt(); mas.add(bin); } n = input.nextInt(); for (int i = 0; i <n;i++){ bin = input.nextInt(); mas.add(bin); } Collections.sort(mas); delta = mas.size(); for (int i = 0;i<mas.size()-1;i++){ bin = mas.get(i); delta = delta - (mas.lastIndexOf(bin)-mas.indexOf(bin)+1); } delta = -1*delta-mas.size(); System.out.print(delta); } } |
| Easy 0-1 bfs with deque | 👾_challenger128_[PermSU] | 1930. Ivan's Car | 23 Feb 2021 19:48 | 1 |
|
| ( JAVA ), My Code is Running Fine ( See it through for reference ) - Reverse Root | Gaurav Meena | 1001. Reverse Root | 23 Feb 2021 14:45 | 3 |
import java.util.*; public class ReverseRoot { public static void main(String[] args) { ArrayList<Long> list = new ArrayList<>(); Scanner scn = new Scanner(System.in); while (scn.hasNextLong()) { long p = scn.nextLong(); list.add(p); } scn.close(); for (int i = list.size() - 1; i >= 0; i--) { System.out.printf("%.4f%n", Math.sqrt((double) list.get(i))); } } } Edited by author 17.02.2021 15:27 Scanner scn = new Scanner(System.in); long p; String line; while (!(line = scn.nextLine()).trim().equals("")) { p = Long.parseLong(line); list.add(p); } |
| WA5 | Alexey | 1080. Map Coloring | 23 Feb 2021 00:16 | 1 |
WA5 Alexey 23 Feb 2021 00:16 Does anyone know about test number 5? If you do, please download the values for this test. |
| If you have WA5 (C++) | 👾_challenger128_[PermSU] | 1709. Penguin-Avia | 22 Feb 2021 01:27 | 1 |
write line "#define int long long" and change "int main" to "signed main" |
| Why Time limit exceeded (Test 2) C++ | Vetlugaev Pavel Vladimirovich | 1123. Salary | 20 Feb 2021 23:55 | 1 |
What test number 2 can be? Edited by author 21.02.2021 00:09 |
| Who can give me some tests?I got WA all the time!(+) | Acid Pea | 1071. Nikifor 2 | 19 Feb 2021 15:53 | 7 |
program p1071; var x,y,z,s,i:longint; out:boolean; procedure check(p:longint); var x1,y1:longint; c:array[0..10000] of integer; begin fillchar(c,sizeof(c),0); x1:=x;y1:=y; repeat inc(c[x1 mod p]); x1:=x1 div p; until x1=0; repeat if c[y1 mod p]>0 then dec(c[y1 mod p]) else exit; y1:=y1 div p; until y1=0; out:=true; end; begin readln(x,y);z:=0;out:=false; for i:=2 to x do if x mod i=y mod i then begin check(i); if out then break; end; if out then write(i) else write('No solution'); readln; end. |
| TLE#16 | pashokts2001@gmail.com | 1279. Warehouse | 19 Feb 2021 00:21 | 1 |
TLE#16 pashokts2001@gmail.com 19 Feb 2021 00:21 Does anyone have a clue on what test №16 is? If something, I am writing on Python. Edited by author 19.02.2021 02:12 |
| boring string | Abid29 | 1036. Lucky Tickets | 18 Feb 2021 01:27 | 1 |
it wasted my whole day using string. then i use array instead of boring string and accepted |
| A simple dp solution is there... | kitesho | 1009. K-based Numbers | 16 Feb 2021 13:54 | 1 |
a valid n digit number can be found from valid n-1 and n-2 digit numbers Edited by author 16.02.2021 13:56 Edited by author 16.02.2021 13:56 |
| Вопрос по условию | InstouT94 | 1887. Frequent Flyer Card | 12 Feb 2021 15:54 | 1 |
[DELETED] Edited by author 17.09.2022 01:09 |