| Show all threads Hide all threads Show all messages Hide all messages |
| WA#39 Can you help me? | SergeyGlazkov | 1854. Negotiations with Parthians | 3 May 2020 00:06 | 1 |
I understood my problem. It is about calculating sqrt, import math in python doing it wrong with very big numbers. Edited by author 03.05.2020 00:55 |
| WA25 | Ulugbek#& | 1346. Intervals of Monotonicity | 2 May 2020 20:37 | 2 |
WA25 Ulugbek#& 30 Apr 2020 09:32 does anybody have idea what it can be? Just retype your code in other language. For ex. C++, and you'll get AC. The reason is this site hates python and java coders :( Don't stop reading while not EOF Edited by author 02.05.2020 20:40 |
| Memory Limit Exceeded with 70KB memory usage. | Samarendra Dash | 1439. Battle with You-Know-Who | 2 May 2020 18:25 | 1 |
I am using a solution, where I store all the doors in a BST, and if door k is to be deleted then I delete the kth smallest element in the BST. Same for lookup, I search the kth smallest and print the number. In test case 2 it is showing memory limit exceeded with only some 66-69KB memory usages. But the question says 64MB memory is allocated. Then why is this happening? (I am using C++ to code this.) |
| ENDLINE | shafiq_02 | 1149. Sinus Dances | 2 May 2020 00:53 | 1 |
Don't forget to make an endline in your pretty code.... |
| БОЯН | Toshpulatov (MSU Tashkent) | 2080. Wallet | 1 May 2020 23:54 | 1 |
БОЯН Toshpulatov (MSU Tashkent) 1 May 2020 23:54 Ровно этаже задача на региональном этапе для школьников 2018-2019 год |
| Can you solve it in python within the time limit? | LearningPython | 1104. Don’t Ask Woman about Her Age | 1 May 2020 05:51 | 3 |
My python 3.3 program has TLE in problem 12. Has anyone a hint to speed up this algorithm. Changing to python 2.7.5 was enough to get AC Tried to solve in Python 2.7.18 and Python 3.8.2. Time limit exceeded on test 12 with time 1.015 s. Rewrote it in C and got 'accepted' with 0.031 s. |
| I think testset for this problem isn't right | Maxim Kiryushin | 1314. Chase in Subway | 30 Apr 2020 13:46 | 3 |
My AC program give answer 3 for a following test: 2 4 1 2 3 4 4 1 2 5 4 3 1 2 3 But I think answer must be: 3 4 Am I right? Yes. I think you are lucky you got AC. NO! My AC program give answer 3 for a following test: 2 4 1 2 3 4 4 1 2 5 4 3 1 2 3 But I think answer must be: 3 4 Am I right? |
| What does this sentence mean? | Fat Peter | 1314. Chase in Subway | 30 Apr 2020 13:37 | 6 |
the length of a route is determined by the number of spans only But what's span?! Read following few words - definition of span is there (in the subway, a span is a tunnel between two adjacent stations). but i still don't know... Span are edges!(I have no word to say~~~) (in the subway, a span is a tunnel between two adjacent stations). but i still don't know... |
| WA2 | Dimitar Dimitrov | 1090. In the Army Now | 29 Apr 2020 23:28 | 3 |
WA2 Dimitar Dimitrov 20 Jul 2009 16:16 Could you give me some test data ? Re: WA2 Tudor Zaharia 13 Aug 2011 18:47 Re: WA2 blunder woman 29 Apr 2020 23:28 Perhaps you accepted k,n instead of n, k as input. |
| Is it topological sort? | ajay jadhav | 1022. Genealogical Tree | 29 Apr 2020 12:08 | 1 |
I did get AC on this. I used queue and in_degree array. First pushed zero in_degree elements in queue and then visited neighbour for each element in front , reduced in_degree of neighbours by 1 each time to indicate one parent has reduced. Edited by author 29.04.2020 12:08 |
| Where's wrong? | Farrux | 2066. Simple Expression | 28 Apr 2020 14:13 | 2 |
import java.util.Scanner; public class Test{ public static void main(String[] args) {
Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a>=0 && b>=0 && c>=0 && a<=100 && b<=100 && c<=100 && a<=b && b<=c ){ if(a==0 && b==0 || a==0 && b==1|| b==0||c==0||(a==1&& b==1&&c==1)){ System.out.println(a-b-c); } else System.out.println(a-b*c); } } } import java.util.Scanner; public class Test{ public static void main(String[] args) {
Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a>=0 && b>=0 && c>=0 && a<=100 && b<=100 && c<=100 && a<=b && b<=c){ if(a==0 && b==0 || a==0 && b==1|| a==1&& b==1|| b==0||c==0||(a==1&& b==1&&c==1)){ System.out.println(a-b-c); } else System.out.println(a-b*c); } } } |
| What is test3? | Arthas | 1700. Awakening | 28 Apr 2020 09:32 | 4 |
Can somebody give me some tests? I can;t find what's wrong with my prog. Thanks a lot. oh... very stupid error. you should use .clone() in java. now TLE 10 Edited by author 21.02.2010 18:22 10 years have passed) I hope it will help somebody. I had WA3, i forgot to clear vector after set intersection, very stupid mistake Edited by author 24.03.2019 23:54 Edited by author 24.03.2019 23:54 this test helped me: 2 a: fuck it b: fuck this shit 1 a b answer: fuck reason: I indexed the words from 0, but I should from 1 |
| WA5 solution | Михаил Аршинов | 2098. Lada Priora | 27 Apr 2020 13:25 | 4 |
double dif = Math.abs(oform - neoform); if (oform > neoform && dif > 0.000001) { System.out.println("Cash"); } else { System.out.println("Insurance"); } It really helps me to get AC. Thank you Edited by author 23.10.2016 14:05 Edited by author 23.10.2016 14:05 |
| Why my code is wrong???C++ | RI_190010_11 | 1297. Palindrome | 27 Apr 2020 01:31 | 1 |
#include <iostream> #include <string> #include<vector> using namespace std; string turn(string s) { string news; for (int i = s.length() - 1; i >= 0; i--) news.push_back(s[i]); return news; } int main() { string s; string news; getline(cin, s); vector <int> l; vector <string> counts; for (int i = 0; i < s.length(); i++) { int n = s.length(); for (int j = 1; j <= s.length() - n + 1 && (s.length() - n + 1) <= (s.length() - i); j++) { news = s.substr(i, j); if (turn(news) == news && news.length() > 1) { l.push_back(news.length()); counts.push_back(news); } n--; } } int maxl = 0; string saves; for (int k = 0; k < l.size(); k++) { if (l[k] > maxl) { maxl = l[k]; saves = counts[k]; } } cout << saves; } |
| Some test | KuloR | 1416. Confidential | 25 Apr 2020 06:26 | 8 |
If you have WA25 and low try this test: 8 9 1 2 1 2 3 5 3 4 3 4 5 4 3 6 1 3 7 2 3 8 9 6 8 9 7 8 8 AC answer: Cost: 24 Cost: 25 What? The right answer should be Cost: 24 Cost: -1 Reply to the upper Edited by author 04.04.2011 20:38 Re: Some test Giorgi Shavgulidze [Tbilisi SU] [IFG] 9 Apr 2011 02:44 I think answer should be 24 24, as my program does. We can replace 3->8 with 3->6 and it changes nothing. In fact,it changes; What my program shows is 24 25 |
| WA#2 Help PLS | Virus TI | 1383. Flower-garden Designs | 21 Apr 2020 20:35 | 2 |
I can't figure out where my mistake is. Can someone give me some tests? lol Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:37 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 Edited by author 21.04.2020 20:38 |
| ( JAVA ), My Code is Running Fine (ACCEPTED) ( See it through for reference ) - Maximum | Gaurav Meena | 1079. Maximum | 21 Apr 2020 00:45 | 1 |
import java.util.*; public class Maximums { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int N = -564646878; // random value hehehehe while (N != 0) { N = scn.nextInt(); if (N == 0) { break; // As per the problems requirement it should terminate at 0 } else if (N == 1) { System.out.println(1); } else { N = N + 1; // problems indexing are upto N int[] arr = new int[N]; // creating an array to create desired sequence arr[0] = 0; arr[1] = 1; // initialising the array with the given values in question int max = Integer.MIN_VALUE; // to start with for (int i = 2; i < N; i++) { if (i % 2 == 0) { arr[i] = arr[i / 2]; // for even indexes if (arr[i] > max) { max = arr[i]; // comparing }} else { arr[i] = arr[(i - 1) / 2] + arr[((i - 1) / 2) + 1]; // for odd indexes if (arr[i] > max) { max = arr[i];// comparing }}} System.out.print(max); // finally printing the max value upto the given index 'N'. System.out.println(); // for new line ( P.S. I know i could have made the upper line to println but that's boring }}}} /// Happy Coding Dudes n Dudettes |
| why | CyberNinjaH23 | 1079. Maximum | 21 Apr 2020 00:36 | 2 |
why CyberNinjaH23 26 Jan 2020 15:01 why is the 10th element 4? isn't it 3? Ummm, I have got my answer accepted and I must tell you that you're right about the value is 3. Well, it's the answer value which is 4. Because 4 is the maximum value among all values up to the 10th index. i.e. 0 1 1 2 1 3 2 3 1 {4} 3 <----- Respected Values 0 1 2 3 4 5 6 7 8 9 10 <----- INDEX I hope that helped. If not ping me. I'll send you my solution. ping me at my ain't account - id (aquarius_gaurav). Peace. Edited by author 21.04.2020 00:36 |
| wa 11 | Abid_Jawad | 2072. Kirill the Gardener 3 | 20 Apr 2020 17:13 | 2 |
wa 11 Abid_Jawad 12 Apr 2020 20:07 a silly mistake got me wa. A simple testcase helped me. here it is- 3 3 2 1 Edited by author 12.04.2020 20:09 |
| W11 | zhuangqf | 2072. Kirill the Gardener 3 | 20 Apr 2020 17:08 | 6 |
W11 zhuangqf 4 Nov 2015 17:51 answer will be long or long long. Thank you!!! That is very helpful! Appreciate your suggestions!Nearly died with laughing!!!!Fage JJ boom the sky!!! thank you very much for your suggestion!!!! |