We're back! Thank you all for your patience during this unexpected downtime today. We're sorry for the inconvenience this has caused. If you have any further issues with Codewars, please contact us at [email protected].
Codewars的动态
最相关的动态
-
CodeForces Round 951 (Div-2) able to solve 3 1.) find maxi of a[0] and a[1] and then iterate for i=2 to n and do maxi=min(max(a[i-1],a[i])-1,maxi) and print maxi.. 2.)store xor of X and Y store in bitset and then convert them into string and do iterate on string check if we get '1' ignore it else do ans++ and print round of 2^ans 3.)find lcm and then do sum of lcm/arr and then push them in vector and check if sum>=lcm print -1 else print value of array... Vivek Gupta Abhishek Saini #icpsc #summercamp #linkedin #community #reach #tweet #follow #comment #share #problemsolving #like #leetcode #codeforces #codechef #geeksforgeeks #tweet #codingninjas #leetcode2024 #codeforces #codechef
要查看或添加评论,请登录
-
-
Hello Folks, today was my day 16/180 to become candidate master on codeforces. I attempted some problems of tle sheet and did few codeforces problems. Today, I didn't gave more than 30 minutes on each question, and after not able to solve those problems I watched their solutions and learned how to solve them. This helped me attempt more number of problems. Here is my today's progress -
要查看或添加评论,请登录
-
-
Codeforces Div3 950 I took Codeforces Round 950 yesterday and answered two questions. My approach to the 2 question. A. Problem Generator ?Just used simple if to compare and count the character and push to an array. After that, calculate which character is less compared to m rounds, add that number to a variable, and display.(Best to use map.) 2.Choosing Cubes So, check the first K cubes among them after sorting to find the favourite cube. After that, check rest of the cubes. Use if to display "yes,"no", or "maybe.". I didn't perform as well as I could have, and I know I can improve. I'll make sure to practice more questions like these. #codeforces #contest #ICPSC #summergrind
要查看或添加评论,请登录
-
-
Hello Everyone, I just participated in CodeForces Round 961 (Div. 2) and managed to solve the first two problems, which were quite tricky. Problem A: Diagonals This is a greedy problem. Always start by filling the chips from the middle diagonal since it has the largest size, then move to both sides. Submission Link : https://lnkd.in/g7ymHGhK Problem B1: Bouquet (Easy Version) This is a standard two-pointers problem. First, sort the given array (petals). Then, use the two-pointers technique to calculate the maximum number of petals such that the difference a[j]?a[i]≤1 and the total petals are less than or equal to m. Submission Link : https://lnkd.in/gprgzeW2 Problem B2: Bouquet (Hard Version) I tried a brute-force approach, but it resulted in TLE. If anyone has a more efficient approach, your input would be greatly appreciated. #CompetitiveProgramming #CodeForces #Consistency
要查看或添加评论,请登录
-
-
It's been a minute since I really leaned on code assessments... when the hiring manager is torn on the level, it might be a good extra check. I like to use a bench mark of the score being the BEST dev on the team take it as well. Here are a few I have used in the past: Codility Hackerrank Coderbyte So quick question: which one are we liking these days?
要查看或添加评论,请登录
-
Codeforces Round 950 (Div. 3) Hey, I gave codeforces round 950 today and solved 2/8 questions, not really the best performance & could have done much better, would be practicing more questions around the same. Here's my approach to the 2 questions- A. Problem Generator Used a map to store the occurrence of each letter and compared their count with the no. of rounds m, and if the count is less added the difference between the count and m to the sum, and finally returned sum. B. Choosing Cubes Firstly, found the favourite character, sorted the string in decreasing order, and then compared the value at the kth index in the array with the favourite character. Would be upsolving C and D Vivek Gupta Abhishek Saini #ICPSC #summergrind #iwillnotwastemysummer #codeforces #contest
要查看或添加评论,请登录
-
-
Hey Everyone I participated in yesterday's contest, Codeforces div3 954 and solved A and C. My approach to the 2 questions. A> I take three variables and calculate the absolute value, and through the min function, I compare the three and display it. C> After taking input, I sort the m indices and string c in lexographical order, and through the indices, I update the main string s and display it. B> Though I understand B, but difficult to implement it. Will Upsolve B and D. #CP #codeforces #Dsa AlgoZenith Vivek Gupta Abhishek Saini
要查看或添加评论,请登录
-
-
Just participated in Codeforces Round 992 (Div. 2). I was able to solve A, B, C. Here are my solutions. Not a great performance because i was too slow submitting C. Problem A: Game of Division We can simply implement and check all options with nested for loop since the constraints allow it. https://lnkd.in/grs9Du99 Problem B: Paint a Strip if we do an operation1 at position x we can do another operation 1 at position (2*x +2) and fill 1's in between them with operation 2. since, there was no limit on n over all testcases. the positions at which op1 should be performed have to be precomputed. and answer each testcase with linear or binary search (both will work). https://lnkd.in/gDBit2Tr Problem C: Ordered Permutations first observation was to find this array [1, 3, 5, ... n, ..... 6, 4, 2], this array gives the maximum sum and contributions of each number will follow this pattern 1: n, 2: n -1, 3: n-2, ...... n: 1 we just have to place the values from 1 to n in the extreme possible positions of the array total possible permutations = 2^(n-1) https://lnkd.in/gf4Xpcmx
要查看或添加评论,请登录
-
-
Codeforces Round 974 (Div 3) Solved 3 / 8 A: The number of people getting the gold can be calculated in a single traversal. B: Calculate the total odd numbers from n - k + 1 to n and if they are odd then the answer is NO else answer is YES C: Sort the array and x = arr[n / 2] * 2 * n - sum(arr). If n < 3 then answer is -1. If x < 0 then answer is 0 else answer is x + 1. #codeforces
要查看或添加评论,请登录
-