| Show all threads Hide all threads Show all messages Hide all messages |
| WA #7 | Vitalgor | 1513. Lemon Tale | 4 Jul 2016 13:18 | 1 |
WA #7 Vitalgor 4 Jul 2016 13:18 Give me some test, please!!! |
| Inconsistency in description | Otrebus | 1168. Radio Stations | 3 Jul 2016 20:32 | 1 |
If N = M = 1, then 1 ≤ K ≤ min(M*N-1, 1000) = 0. |
| Weak tests? | Forecoding | 1593. Square Country. Version 2 | 3 Jul 2016 01:34 | 10 |
I noticed that all primes in factorization of N are also strong pseudoprimes to base just 2 or 3. Added some tests on that. Thanks. Well, it's strange, but my program with primality test that checks for strong pseudoprimes to base 2 and 3 still gets AC. N = 25326001 The answer is 3, my program with weak primality test answers 2. Thanks, your tests have been added. 3 authors have lost their AC. Sorry, but can you give me 97 test, please? Forecoding, i guess i can help. Email me your TL97 code. I think it will be too hard to understand my code :) I don't really need to understand it too deeply to help, but oh well, as you wish. I get tired, so I send my code. Good luck :) |
| Anyone have any ideas on what Test 8 is doing? | SquidBoy | 1306. Sequence Median | 2 Jul 2016 12:59 | 4 |
Had some issues implementing the heap, and then realised had a nice Access Violation (didn't bother to check we weren't exceeding the bounds on the heaps underlying array). Now I'm stuck on Test #8 - but I've tried every test I've seen suggested in the comments....Anyone got a nice test to try ??? I've even tried generating up to about 190000 random numbers < 2^31-1 in Excel (3 columns) and my median always agrees with theirs.... I've Also tried the same number of ordered numbers (incrementing by 1) as well as random but sorted numbers in a single column (sorted in both directions). I suspect I have some silly output issue (rather than a logic issue - but that might just be because I;m arrogant). Ok, for those who have trouble with test 8. Apparently 0 is a valid value in the tests (I'd assumed that POSITIVE meant "strictly greater than 0" - I would have thought including 0 is NON-NEGATIVE rather than POSITIVE). Once I catered for the possibility of 0 in the heap, everything was happy.... In my case I was getting wrong one of the elements for the semi-sum. |
| cin/cout is possible; WA5 | ASK | 1890. Money out of Thin Air | 2 Jul 2016 08:50 | 2 |
use cin.sync_with_stdio(false) Btw, WA5 was due to int instead of int64_t why did i use scanf still wa? |
| What is test 3? | organmusic | 1058. Chocolate | 2 Jul 2016 02:15 | 1 |
All tests have published here passes. Test 3 gives WA persistently. What is it like? I fixed 4 digits after decimal point of a result (that is, for example: 3.0000) Does it matter? Edited by author 02.07.2016 02:19 Edited by author 02.07.2016 02:19 |
| Idea for linear solution :) | Alexander Rybak | 1058. Chocolate | 2 Jul 2016 01:53 | 4 |
Not very hard to prove, then the breakage-line must create EQUAL ANGLES with sides, connected by it. This idea immediately gives the O(N^3) algorithm. But it could be improved even to O(N). :) Edited by author 20.08.2008 20:22 It could be corners instead of sides for the following input. 6 0 0 2 1 4 0 4 4 2 3 0 4 to Erick Wilts CONVEX poligon |
| WA test #4 or #6. Here's the bug!! | Dang Quang Huy | 1078. Segments | 1 Jul 2016 20:08 | 1 |
test #4, if you sort the left nodes then before updating the DP[i], you should check whether their left nodes are coincide or not. e.g: 4 1 2 1 3 1 4 1 5 test #6: this test has n == 1, you just need to print 1 and 1 in the output. |
| runtime error java | Mostafa Tantawy | 1197. Lonesome Knight | 1 Jul 2016 10:10 | 1 |
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package test; import java.util.ArrayList; import java.util.Scanner; /** * * @author MMT */ public class P1197 {
public static void main(String[] args){ // declaration of variables Scanner in_number=new Scanner (System.in); Scanner in_string=new Scanner (System.in);
int n=0; ArrayList res=new ArrayList(); String s=" "; char c1=' '; int c2=0; int contr=0; n=in_number.nextInt();
if(n>0 && n<101){ for(int i=0;i<n;i++){
s=in_string.next();
c1=s.charAt(0); c2=Integer.parseInt(s.substring(1)); if((((char)c1+1) <'i') &&(((char)c1+1) >'`') && ((c2+2)<=8) && ((c2+2)>0) ) contr++; if((((char)c1-1) >'`') &&(((char)c1-1) <'i') && ( (c2+2)<=8) && ((c2+2)>0)) contr++; if( (((char)c1+1)<'i') &&(((char)c1+1) >'`') && ( (c2-2)>0) && ( (c2-2)<=8)) // right contr++; if((((char)c1-1) >'`') &&(((char)c1-1) <'i') && ( (c2-2)>0) && ( (c2-2)<=8) ) // right contr++; if((((char)c1+2) <'i') &&(((char)c1+2) >'`') && ( (c2+1)<=8) && ((c2+1)>0))// not checked contr++; if((((char)c1-2) >'`') &&(((char)c1-2) <'i') && ( (c2+1)<=8) && ((c2+1)>0)) // right contr++; if((((char)c1+2) <'i') &&(((char)c1+2) >'`') && ( (c2-1)>0) && ( (c2-1)<=8)) // not checked contr++; if((((char)c1-2) >'`') &&(((char)c1-2) <'i') && ( (c2-1)>0) && ( (c2-1)<=8)) // right contr++;
res.add(contr); contr=0; c1=' '; c2=0; s=" "; } for(int j=0;j<res.size();j++){ System.out.println(res.get(j));
} }/* char x = 'a'; x=(char) (x-1); System.out.println(x); */} } Edited by author 01.07.2016 10:11 |
| test solution | Brenomp | | 1 Jul 2016 00:44 | 1 |
|
| Statement | P_Nyagolov | 1077. Travelling Tours | 29 Jun 2016 19:02 | 1 |
|
| С# Solution | german_goncharov | 2023. Donald is a postman | 29 Jun 2016 14:31 | 1 |
using System; namespace Csharp_2023 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int num = 1; int sum = 0; for (int z = 1; z <= n; z++) { string str1 = Console.ReadLine(); for (int f = 1; f <= n; f++) { if (str1[0] == 'A' || str1[0] == 'P' || str1[0] == 'O' || str1[0] == 'R') { if (num == 1) sum += 0; else if (num == 2) sum += 1; else if (num == 3) sum += 2; num = 1; break; } else if (str1[0] == 'B' || str1[0] == 'M' || str1[0] == 'S') { if (num == 1) sum += 1; else if (num == 2) sum += 0; else if (num == 3) sum += 1; num = 2; break; } else if (str1[0] == 'D' || str1[0] == 'G' || str1[0] == 'J' || str1[0] == 'K' || str1[0] == 'T' || str1[0] == 'W') { if (num == 1) sum += 2; else if (num == 2) sum += 1; else if (num == 3) sum += 0; num = 3; break; } } } Console.WriteLine(sum); } } } |
| plz tell me why my answer is wrong | MichealChen | 1209. 1, 10, 100, 1000... | 29 Jun 2016 13:36 | 1 |
//i try to run the code passed, i seems it make the same answer as me //i don't know what's wrong accur,plz help me.Does there is any wrong in way i solve this problem? import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner cin = new Scanner ( System.in ); int a,temp;//count store time of test //find 1,1 is easy to find //1 is at (n+1)n/2 +1 int count=cin.nextInt(); for (int j=1; j<=count; j++) { a=cin.nextInt(); temp=(int) Math.floor(Math.sqrt(2*(j-1))); if((temp*(temp+1)/2+1)==j){ System.out.print("1 "); }else { System.out.print("0 "); } } } } |
| How to? | Jane Soboleva (SumNU) | 2087. Trains | 29 Jun 2016 06:17 | 1 |
How to? Jane Soboleva (SumNU) 29 Jun 2016 06:17 So like, i spent a few days thinking of a possible way to do this, and one of the ideas that hit me was finding the closest parent of two vertices in O(log n) like it's done in tasks 1329 or 1471; in a case of this task, we can quickly find a parent of previous train and current train — a particular turnout that we need to switch, ignoring a potentially huge number of turnouts before this one. We switch it, make a step forward, and then repeat the algo in a subtree. Or so i thought this ideally would be. I also use the array that has, for each vertex, the trainroute that was passing by through this vertex last time. More or less, because we can't mark them all anyway, because it won't differ from a brute force then and will lead to TL. Anyways, i have found a countertest for my program: 6 6 X-L.X.X.X.X ..|.|.|.|.| S-R-R-R-R-R ..|.|.|.|.| X-R.X.X.X.F ..........| X.X.X.X.X.F |.|.|.|.|.| L-L-L-L-L-R |.|.|.|.|.| X.X.X.X.X.X 5 1 1 4 2 6 3 3 6 5 4 1 3 5 4 3 For which, my bruteforce shows a correct answer 12 2 2 2 F 3 2 3 F 4 2 4 L 5 2 4 F 6 2 3 L 6 2 5 F 7 2 3 F 11 5 5 F 12 5 5 L 12 5 4 F 14 5 5 F 16 5 3 R , but my "quick" algo doesn't have the 14 5 5 F row. It'll take too much space explaining fully why this happens, but in short, on a certain subtree it sees the route that went through that spot a bit too much time ago, and falsely assumes that further turnouts are arranged for that route. Which is not fully true. (here's a final "last visitor" map if it can potentially explain it) 00 00 00 00 00 00 03 04 03 33 33 33 00 00 00 00 00 33 00 00 00 00 00 33 00 00 33 33 35 33 00 00 00 00 00 00 So that makes me wonder, if my idea is right overall (it looked pretty to me at first...) but just my implementation is bad, or is the idea itself is a no-go and i should try something entirely different? Though quite likely i'll just give up, i spent a bit too many days on this without good outcome... |
| No subject | Gulliput | 1005. Stone Pile | 29 Jun 2016 01:31 | 1 |
Edited by author 01.07.2016 01:40 Edited by author 01.07.2016 01:40 |
| Time limit update in problem 1269 Obscene Words Filter | Vladimir Yakovlev (USU) | 1269. Obscene Words Filter | 26 Jun 2016 22:33 | 1 |
The new time limit is 1.0 seconds (old - 0.5s). All submissions have been rejudged. The number of authors who has AC remain almost the same. |
| if k<=n-2 then no solution? | __Andrewy__ | 1735. Theft of the Century | 26 Jun 2016 10:59 | 1 |
Edited by author 31.07.2017 12:48 |
| The Rust Programming Language was added | Vladimir Yakovlev (USU) | | 26 Jun 2016 04:36 | 1 |
|
| Don't use unsigned long long, use simple long long. (was WA7) | Raven | 1017. Staircases | 25 Jun 2016 18:37 | 2 |
Used unsigned long long. At result got WA7. Just clear unsigned everywhere and i got AC. Strange behavior. There was no negative numbers, it's really strange. i used unsigned but didn't get any wrong answer |
| WA 12 | BZz13 | 1208. Legendary Teams Contest | 23 Jun 2016 18:48 | 2 |
WA 12 BZz13 17 Jun 2016 19:10 5 1 2 a 4 b c 3 a b 5 c d 6 7 d answer 3 |