| Show all threads Hide all threads Show all messages Hide all messages |
| WA#10 | Trần Quang Chung | 1303. Minimal Coverage | 2 Apr 2011 14:39 | 6 |
WA#10 Trần Quang Chung 7 Jun 2006 20:53 AC in UVA but WA in timus Oh. If who WA this test can try: 10 -50000 5 0 6 3 10 0 4 I've got AC after have this test this can help too: 10 -50 50 |
| Wa5 -> Test data > 10^9 | Nguyen Khac Tung | 1029. Ministry | 2 Apr 2011 13:28 | 1 |
I changed my array from Longint to Qword and got accepted. Assumption is wrong |
| Help C++ | Надежда Халтурина | 1068. Sum | 2 Apr 2011 10:27 | 1 |
Help C++ Надежда Халтурина 2 Apr 2011 10:27 why the compiler does not accept the job site? that do not correctly? #include <iostream> #include <math.h> using namespace std; int main() { int N; int H=0; int S=0; int i; cin>>N; if(((N<10000)&&(N>1))||((N>-10000)&&(N<-1))) { H=abs(N); for( i=2;i<=H;i++) S=S+i; if(N<0) cout<<endl<<S*(-1); else cout<<endl<<S;} else cout<<"error"; return 0; } |
| Compilation Error C++ | Argos | 1295. Crazy Notions | 1 Apr 2011 14:31 | 1 |
Edited by author 01.04.2011 14:38 Edited by author 01.04.2011 14:38 |
| Happy Fool's Day, Timus :-) | Vladimir Yakovlev (USU) | | 1 Apr 2011 13:59 | 3 |
Wow, I have 32th place =) Nice one! Number of newly-solved problems since 20th of March? =) Edited by author 01.04.2011 15:06 |
| Tanya alway calls her boss first? right? | l@mho | 1362. Classmates 2 | 31 Mar 2011 19:18 | 3 |
This is not very well formulated. First, the problem statement says "She called her boss immediately, then her friend...", implying that she must call her boss first, even if that's not optimal. What about other employees? Must they also call their bosses before any subordinates? |
| When Q = N-1 | Moonlight [LNU] | 1018. Binary Apple Tree | 31 Mar 2011 17:23 | 2 |
When Q = N-1 you shouldn't remove any branch. I don't know why, but it works and my application was accepted. Otherwise you will get WA #1. A tree with N nodes has exactly N-1 edges. So if you want to preserve Q=N-1 edges, then it's no mystery that you shouldn't remove any branches :) |
| Help me!What is a wrong answer on test 11,can you explain me,please! My id is 104276CM | Aydar1 | 1021. Sacrament of the Sum | 31 Mar 2011 08:43 | 1 |
|
| To admins | tereshinvs | 1542. Autocompletion | 30 Mar 2011 23:53 | 2 |
Timotius Sakti got AC with strange time about 2.5 sec... Timotius Sakti got AC during the online contest, when time limit was equal to 3 sec. |
| For Pascal, qsort works fine . | Nguyen Khac Tung | 1207. Median on the Plane | 30 Mar 2011 19:34 | 1 |
Just be careful with the angles. |
| I use double hash but still tle. and i do not know how to use fread, fwrite in online judge,please help | Radi Muhammad Reza | 1827. Indigenous Wars | 29 Mar 2011 22:26 | 3 |
my algo should be n*50*order of hash probably large input is causing problem i can use fread and fwrite but don't know how to do it in online judge submission. please provide me with some code segment that utilize fread and fwrite. better be some eg problem as 1000. a+b problem thanks in advance. So did i. did you find some methods to solve it? please help me.thx a lot. yes. my hash was correct. but i used long long for calculation. i replaced with int except for one case and got ac. anyway my mod value for double hash was 499979. hash using just those 3 integers in 2e8 radix system and avoid long long as much as possible. good luck. anyway i still want to know the fread, fwrite magic. as so many problems i got ac in 0.015 sec but best timing was 0.001 sec. if u know, please help. Edited by author 29.03.2011 22:28 |
| any hint ? | ConanKudo | 1810. Antiequations | 29 Mar 2011 20:13 | 5 |
Could anyone give me the hint to solve this problem ? But we can't do transformations with antiequations such as with equations. For example, let we have a system: x1 != 0 (mod 3) x2 != 2 (mod 3). It has a solution (2; 0) If we add the antiequations, we'll get this one: x1+x2 != 2 (mod 3), but it's wrong for solution (2; 0) of the system! Am I right? Edited by author 29.03.2011 00:53 I think that your advice is absolutely right! Let for example det(Aij)<>0. Then Answer is 2^k,because (A*X)i in {0,1,2}\{bi} If det(Aij)==0 we can use gauss method to make standard worm of the matrix A. |
| Can you please tell me what's am wrong? | Axeus | 1068. Sum | 29 Mar 2011 18:10 | 2 |
import java.util.Scanner; public class Sum { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); if(num < 0){ num = Math.abs(num); num = ((num*(num+1)/2)-1)*-1; System.out.println(num); }else if(num > 0 && num < 10000){ num = num*(num+1)/2; System.out.println(num); }else if(num == 0){ num = 1; System.out.println(num); } System.out.flush(); } } Do not use scanner classes. I got WA for a program. Use the bufferedreader and then parse it. |
| Test 8 | Arsenal911 (Samara) | 1014. Product of Digits | 29 Mar 2011 14:21 | 1 |
Test 8 Arsenal911 (Samara) 29 Mar 2011 14:21 0 10 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 YES? |
| WA8 | vksv | 1130. Nikifor's Walk | 29 Mar 2011 11:41 | 1 |
WA8 vksv 29 Mar 2011 11:41 I am using recursion to solve the problem. But, I get WA8. I have debugged the code; but could not find any issues. What is the test case? Thanks, |
| WA#14 | dima11221122 | 1824. Ifrit Bomber | 29 Mar 2011 11:16 | 1 |
WA#14 dima11221122 29 Mar 2011 11:16 |
| What is the test #4? | Newbies | 1826. Minefield | 29 Mar 2011 11:09 | 6 |
OK, what about: 6 1 20 30 30 2011 2011 ? My answer is 2134: 1+20 -> 1 -> 2010+2011 -> 20 -> 1+30 -> 1 -> 1+30 -> 1 -> 1+20 |
| help help | SCUQIFUGUANG | 1058. Chocolate | 29 Mar 2011 10:37 | 1 |
Whether the barycenter of the polygon is must on the break-line ? thanks ~ |
| Either test is wrong or the picture! | Ahmed Ahmedov | 1319. Hotel | 29 Mar 2011 00:27 | 2 |
|
| WA#4.Where is my mistake? | Nikolay Protasov | 1048. Superlong Sums | 28 Mar 2011 20:02 | 2 |
import java.io.*; class Assert { static void check(boolean e) { if (!e) { throw new Error(); } } } class Scanner { StreamTokenizer in; Scanner(InputStream is) { in = new StreamTokenizer(new BufferedReader(new InputStreamReader(is))); in.resetSyntax(); in.whitespaceChars(0, 32); in.wordChars(33, 255); } String next() { try { in.nextToken(); Assert.check(in.ttype == in.TT_WORD); return in.sval; } catch (IOException e) { throw new Error(e); } } int nextInt() { return Integer.parseInt(next()); } } public class Main { PrintWriter out; Scanner in; void solve() { int n = in.nextInt(); int a = in.nextInt() + in.nextInt(); int b; for (int i = 1; i < n; i++) { b = in.nextInt() + in.nextInt(); out.print(a + b / 10); a = b % 10; } out.print(a); } void run() { in = new Scanner(System.in); out = new PrintWriter(System.out); try { solve(); } finally { out.close(); } } public static void main(String[] args) { new Main().run(); } } I tried it without exceptions, and I got TLE. try this test : 3 1 0 8 1 9 1 Try using java.util.Scanner and remove the two first classes. Edited by author 28.03.2011 20:08 |