| Show all threads Hide all threads Show all messages Hide all messages |
| 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 Kovrigin | 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 | __Andrewy__ | 1371. Cargo Agency | 27 Feb 2021 14:28 | 2 |
WA 17 __Andrewy__ 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. | Kirill`~ | 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. | Kirill`~ | 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 | 🐒🍌[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++) | 🐒🍌[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 |
| Easy | InstouT94 | 1375. Bill Clevers | 12 Feb 2021 14:28 | 1 |
Easy InstouT94 12 Feb 2021 14:28 Easy solution with O(p) and without using a primality of p. We can build a table of square roots modulo p and then... |