| Show all threads Hide all threads Show all messages Hide all messages |
| test for WA#8 | hoan | 1183. Brackets Sequence | 29 Jan 2017 06:37 | 7 |
input: ))(())(( output: ()()(())()() i hope it can help you. sorry for my poor english. GOOD LUCK!!! Hi, The output of my application for your test is the same. But the judge tell me WA#8 :S. try this input : [][] output : [][] hello,I get the same output as you said but yet i get WA#8.Any suggestions?! Try this (][)) .... answer should be ([][])() or (([][])) Thanks, man, that helped me :) |
| WA#3 | Rinotto | 1297. Palindrome | 27 Jan 2017 22:12 | 1 |
WA#3 Rinotto 27 Jan 2017 22:12 |
| WA #6 | Harry | 1998. The old Padawan | 26 Jan 2017 21:20 | 6 |
WA #6 Harry 5 Oct 2014 01:09 Please! Give me some tests. Me too!Have you solved this problem? Re: WA #6 SButterfly [Samara SAU] 7 Nov 2014 23:03 I have this WA too. Firstly, I used binary search to find the last element, which didn't fall. And my mistake was: if (currentSum == k) return med; the corrent ones: if (currentSum == k) return med-1; And for case, where we haven't found exactly k sum: .. }//end of binary search int answerIndex = l; int sum = getSum(left, lastAdded Index); if (sum <= k){ answerIndex = l - 1; } return answerIndex; But now I have TL11 |
| Test 2 note | ToadMonster | 1211. Collective Guarantee | 26 Jan 2017 16:09 | 1 |
Was wrong. Sorry Edited by author 26.01.2017 16:13 |
| WA 4 pls help | Herman | 2056. Scholarship | 26 Jan 2017 13:49 | 2 |
#include <iostream> #include <cmath> using namespace std; int main() { int n,s=0; bool f=0; float t; cin>>n; int M[n]; for( int i=0;i<n;i++) { cin>>M[i]; s+=M[i]; if(M[i]==3) f=1; } t=s/float(n); if(s/n==5) cout<<"Named"; else if(f==1 || t<4.5 ) cout<<"None"; else if(t>=4.5) cout<<"High"; } Nothing about the "common" scholarship... |
| Despair and Test Case #6 | Aleksandr | 1881. Long problem statement | 25 Jan 2017 20:06 | 2 |
I have successfully completed all tests given in the "Discussion" but for some reason test number SIX does not think so. Maybe somebody can give me the inputs and the expected answer? Much appreciated! BUMP Ok, maybe after looking at the code anyone could tell me anything :) public class Timus {
public static void main (String []args) throws IOException { PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String mn[] = in.readLine().split(" "); byte totalPages = 1, h = Byte.parseByte(mn[0]), // lines on a page currentLines = 1, w = Byte.parseByte(mn[1]), // symbols in a line currentSymbols = 0; short n = Short.parseShort(mn[2]);// ALL words String s = ""; // current word
for (int i = 0; i < n; i++) { s = in.readLine(); if (currentSymbols + s.length() <= w) currentSymbols += s.length() + 1; else { currentSymbols = (byte) (s.length() + 1); if (currentLines + 1 <= h) currentLines++; else { totalPages++; currentLines = 1; } } }
out.print(totalPages); out.flush(); } |
| No subject | MrBones | 1155. Troubleduons | 25 Jan 2017 08:45 | 1 |
Edited by author 25.01.2017 09:23 |
| if you have WA3 | MrBones | 1004. Sightseeing Trip | 25 Jan 2017 04:16 | 1 |
Try this test: 6 6 1 2 1 2 3 100 3 1 99 4 5 150 5 6 1 6 4 1 -1 Answer: 4 5 6 |
| Clarification on the task | Aleksandr | 1876. Centipede's Morning | 24 Jan 2017 17:25 | 2 |
Please, correct me if I am wrong. In the worst case, first of all our centipede will take 40 right slippers (40slip * 2sec) After that it will take all of the remaining right slippers ((rightSlippers-40) * 2sec) Then, because there are no right slippers left, it will take 40 left slippers(40slip * 1sec) And finally take remaining left slippers and throw them away ((leftSlippers-40) * 2sec) I guess I didn't understand the task correctly, may someone explain it to me? Update: I guess I should of have searched a little more, I found what is the case. If any of you are interested the solution is that there may be another situation where we have >40 left slippers, so first we take 39 right ones, then 40 left ones, throw remaining lefts away and take our last right. Depending on which one is longer, you may use this solution or the one I posted before. P.S. of course you don't have to throw away the remaining slippers once all legs are dressed, my bad. |
| WA #4 , help me plz.. | Vonni | 1875. Angry Birds | 24 Jan 2017 00:23 | 1 |
What is it? So, in russian vertion of problem x[i]>0, y[i]>0... is it true? Whether is there any mistake while doing translation from English to Russian? Where should I seek an error? Edited by author 24.01.2017 00:30 Edited by author 24.01.2017 00:30 |
| [To admins] Differences between translations and mistakes in the problem statement | labirint (mirea) | 1347. Blog | 23 Jan 2017 22:07 | 1 |
Things I've noticed: 1) (En) There is no other tags in the text of blog (Ru) В тексте блога нет других тэгов <blog> I believe the English translation implies that the text of the blog can't contain any tags at all except for <blog> 2) (En) string of small Latin between the symbols Should it be "string of small Latin _letters_" ? 3) (En) consists a name of the blogger Shouldn't it be 'consists of the name of' or 'contains the name of'? 4) (En) The input contains only small and capital Latin letters, digits, symbols greater than, lower than, slash, full stops, commas and underlining symbols. Input may also contain line feeds - they're not mentioned in both translations. 5) (En) a list of those who’s blogs Should be "whose", not "who's". 6) (En) you are to output s string “1: ” "s string" -> "a string" 7) (En) A tag is the line that consist of "consist" -> "consists" |
| WA #8 java | mehdi_wm | 1820. Ural Steaks | 23 Jan 2017 20:07 | 4 |
import static java.lang.Math.*; import java.util.*; public class UralSteaks { public static void main(String[] args) { Scanner in=new Scanner(System.in); int n,k; n=in.nextInt(); k=in.nextInt(); int t=(int)ceil(2*(float)n / (float)k); System.out.print(t); }
} help plz! |
| i got AC,perhaps be useful for you | 1508090114 | 2010. Sasha the Young Grandmaster | 23 Jan 2017 11:39 | 1 |
first of all try test 1 1 1 all answer will be 0 here is my code [code deleted] Edited by moderator 20.10.2019 21:28 |
| WA4 | Grandmaster | 1071. Nikifor 2 | 23 Jan 2017 00:19 | 1 |
WA4 Grandmaster 23 Jan 2017 00:19 |
| test #5 | andrei parvu | 1471. Distance in the Tree | 22 Jan 2017 22:44 | 5 |
test #5 andrei parvu 17 Aug 2008 00:54 can anyone tell me what is the 'problem' with test #5, because I get stack overflow, although I don't declare any local variables in my recursive function (I use a vector to simulate the stack) I have the same problem ,first! but I find that test#5 may be not a tree! for example: 3 0 1 1 1 0 1 1 0 1 so you should use array to record whether a node have been in the stack. sorry: the example is 4 0 1 1 1 2 1 2 0 1 1 0 1 But your example is not a tree... there are cicle... Re: test #5 Mescheryakov_Kirill [SESC17]💻 by Kirom 22 Jan 2017 22:44 |
| Solved in O(1). | Marginean Ciprian | 1639. Chocolate 2 | 22 Jan 2017 21:09 | 2 |
Oh, its realy easy! Just: if ((a*b) % 2 = 0) res = "first" else res = "second"; |
| WA #2 | Vishakha Banka | 1133. Fibonacci Sequence | 22 Jan 2017 19:52 | 1 |
WA #2 Vishakha Banka 22 Jan 2017 19:52 I got wrong ans on test case 2. what is the test case? Please help. |
| StopStalk: Tool to analyse your algorithmic programming progress and code collectively with your friends | Raj Patel | | 22 Jan 2017 15:19 | 1 |
We have recently translated StopStalk ( https://www.stopstalk.com ) to Russian language due to multiple requests from our Russian users. Please do check it out, you will surely love it if you are a Competitive Programmer :) |
| Please, tell me, why it is wrong? (Python 3.4) | Teiwaz | 1001. Reverse Root | 22 Jan 2017 13:08 | 5 |
a = input() from math import sqrt for q in a.split()[::-1]: print("%.4F" % sqrt(float(q))) input() would only take one line as input. Try using sys.stdin.read() . For testing, copy the input from example, paste it, press enter and CTRL+D import sys, math _in = sys.stdin.read() for nr in _in.split()[::-1]: print ("%.4f" % math.sqrt(float(nr))) Thanks it worked. Really not obvious thing here. |
| accepted | Grandmaster | 1095. Nikifor 3 | 22 Jan 2017 03:44 | 1 |
is this problem supposed to be solved with random shuffling, or i just got lucky? |