Search found 128 matches

by lbv
Mon Jun 23, 2014 12:25 am
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 34166

Re: 116 Help me

Hello, I tried every test case there, but my code still cannot pass You may try: Input 6 8 -7 -58 -78 -85 73 96 26 -68 68 33 -82 -80 79 -79 -35 -38 -35 91 24 -41 -60 74 20 -76 34 3 -49 23 -94 -27 46 -51 15 68 -35 -63 14 41 -31 -19 -77 -62 -49 52 -41 17 64 24 5 11 8 2 2 11 10 -16 10 -4 -16 -15 -18 3...
by lbv
Sat Jun 21, 2014 8:19 pm
Forum: Volume 101 (10100-10199)
Topic: 10114 - Loansome Car Buyer
Replies: 38
Views: 12971

Re: 10114 - Loansome Car Buyer

Blief.S wrote:What is the problem in this code plz.....some test cases didn't pass..... got no idea why??
I'd suggest you start by taking the time to read the previous messages in this thread. For example, the message just above yours has good advice that applies to your code.
by lbv
Sat Jun 14, 2014 11:28 pm
Forum: Volume 7 (700-799)
Topic: 796 - Critical Links
Replies: 54
Views: 21948

Re: 796 - Critical Links

i m getting WA need hellp.... Carefully read the "Output" section. You may try: Input 8 0 (3) 2 6 7 1 (1) 6 2 (2) 0 6 3 (1) 4 4 (2) 3 5 5 (1) 4 6 (3) 0 1 2 7 (1) 0 6 0 (1) 4 1 (2) 2 3 2 (3) 1 4 5 3 (1) 1 4 (2) 0 2 5 (1) 2 Output 4 critical links 0 - 7 1 - 6 3 - 4 4 - 5 5 critical links 0 - 4 1 - 2 ...
by lbv
Fri Jun 13, 2014 12:27 am
Forum: Volume 103 (10300-10399)
Topic: 10309 - Turn the Lights Off
Replies: 19
Views: 8553

Re: 10309 - Turn the Lights Off

Getting wrong answer in 10309. I think this problem illustrates an issue that is controversial and yet very common in UVa's archives. The input is not necessarily as neat as you see in the samples, so be very careful not to make any unnecessary assumptions. For example, the only thing that input sp...
by lbv
Thu Jun 12, 2014 10:29 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 24196

Re: 119 Why WA??

I'm unfortunately getting Runtime Error. Tried all test cases available on the boards. Using memset to fill with zeros a variable like "string names[10]" doesn't make much sense and is likely to end in memory corruption. string is an opaque data structure and its internals depend on your C++ standa...
by lbv
Thu Jun 12, 2014 10:07 pm
Forum: Volume 119 (11900-11999)
Topic: 11995 - I Can Guess the Data Structure!
Replies: 60
Views: 6307

Re: 11995 - I Can Guess the Data Structure!

Faithkeeper_Rangwan wrote:Got RTE, don't know where it came from.
Try:

Input

Code: Select all

5
1 10
2 10
2 20
2 30
1 40
Output

Code: Select all

impossible
by lbv
Wed Jun 11, 2014 8:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 51636

Re: UVA 10070

why is this getting WA Your program doesn't pass the sample tests from the problem statement. Notice that blank lines are significant and the output from your program should match the expected output exactly . Also try configuring your compiler to show you all warnings, and pay attention to those m...
by lbv
Sun Jun 08, 2014 10:40 pm
Forum: Volume 106 (10600-10699)
Topic: 10655 - Contemplation - Algebra
Replies: 42
Views: 10081

Re: 22.05.04 Contest Problem E 10655

Repon kumar Roy wrote:I am getting Runtime Error For this problem ..
You may try:

Input

Code: Select all

2 1 0
0 0
Output

Code: Select all

2
by lbv
Sun Jun 08, 2014 10:32 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 75544

Re: 10038 - Jolly Jumpers WA

Could you please tell me why 1 1 or 1 2 is a jolly. (..) As the problem statement specifies, a sequence of n integers is a jolly jumper if: n > 0 The set of integers formed by the absolute differences of successive elements is the same set as the integers { 1, 2, ..., (n-1) } As you say, a sequence...
by lbv
Fri Jun 06, 2014 8:58 pm
Forum: Volume 4 (400-499)
Topic: 499 - What's The Frequency, Kenneth?
Replies: 93
Views: 9891

Re: 499 - What's The Frequency, Kenneth?

nguyencaothong wrote:Could you please find me the reason why my code was WA? I'm stuck :(
Take the time to read the previous messages of this thread and try the test cases given. For example, try the I/O posted by PromeNabid around Jun 28, 2012.
by lbv
Tue Jun 03, 2014 3:57 pm
Forum: Volume 114 (11400-11499)
Topic: 11456 - Trainsorting
Replies: 20
Views: 10156

Re: 11456 - Trainsort

Wouldn't you need to find the LIS and LDS with each car as the starting point? Usually when you calculate the LIS/LDS of a sequence, you calculate all the partial results in one pass. That is, you calculate the LIS of the range [ 0 : i ] for 0 <= i < n . Now, your question could also be written as:...
by lbv
Fri May 30, 2014 12:21 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 54596

Re: 10035 - Primary Arithmetic

muktadir.rhmn wrote:please help. why WA???
The code you posted doesn't pass the sample cases from the problem statement. Notice that the output from your program must match the expected output exactly. For example the strings "operation" and "operations" are considered different.
by lbv
Fri May 30, 2014 12:07 am
Forum: Volume 115 (11500-11599)
Topic: 11542 - Square
Replies: 16
Views: 5212

Re: 11542 - Square

Need some testcases.getting WA Please help. Try: Input 2 95 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 ...
by lbv
Sun May 25, 2014 10:34 pm
Forum: Volume 117 (11700-11799)
Topic: 11733 - Airports
Replies: 23
Views: 7145

Re: 11733 - Airports

kindly could you give some other classes that would help me in I/O routines ? Here's all I could find from my old code: http://pastebin.com/rp6rzUK9 Feel free to do with it whatever you want. However, if you want to hear a suggestion, I'd encourage you to use it only as a reference. I think one of ...
by lbv
Sun May 25, 2014 12:03 am
Forum: Volume 117 (11700-11799)
Topic: 11733 - Airports
Replies: 23
Views: 7145

Re: 11733 - Airports

Gives me Time Limit ......any help please ? This problem has a very tight time limit and a large amount of input, so a really efficient method to read data is needed. I'm not sure if StringTokenizer cuts it. I used to write in Java for competitions a few years ago, so I went back and looked at the ...

Go to advanced search