| Show all threads Hide all threads Show all messages Hide all messages |
| : please help me why it is wrong | xinxin | 1224. Spiral | 30 Oct 2016 16:22 | 2 |
#include<stdio.h> #include<string.h> int f(int n,int m) { if(n==1||m==1) return 0; if(n==2&&m>1) return 2; if(n==3&&m==2) return 3; if(m>2&&n>2) return f(n-2,m-2)+4; } int main() { int n,m; scanf("%d %d",&n,&m); printf("%d",f(n,m)); fflush(stdin); getchar(); return 0; } Input "N=1 M=1" doesn't give you zero. |
| Problem 1311 Stable Construction has been changed | Vladimir Yakovlev (USU) | 1311. Stable Construction | 30 Oct 2016 16:01 | 1 |
* The minimal height of the wall is set to 1 (previously 0). * The total number of bricks is set to be between 1 and 100 000 (previously, not more than 1 000 000, but there were no such tests). * New tests have been added. * All accepted solution have been rejudged, 98 authors have lost their AC. |
| Please help I am getting runtime error in java 1.8 | Kandarp | 1837. Isenbaev's Number | 30 Oct 2016 11:08 | 2 |
[code deleted] Edited by moderator 19.11.2019 23:13 check 1 a aa aaa answer a undefined aa undefined aaa undefined |
| First number? | monsky | 1003. Parity | 29 Oct 2016 23:46 | 1 |
It looks as first input number (sequence length) isn't needed for solution. |
| I CAN HELP | Mixael | 1197. Lonesome Knight | 29 Oct 2016 21:27 | 1 |
int a[10]={-1,1,2,2,1,-1,-2,-2,-1,1}; ... for(i=1;i<=8;i++) if(x+a[i-1]>0 && x+a[i-1]<9 && y+a[i+1]>0 && y+a[i+1]<9) h++; DO IT!!! :) |
| What's wrong my algo? I got WA2, always. | xurshid_n | 2059. Not common palindromes | 28 Oct 2016 04:34 | 1 |
Let C = A + '$*&' + B for string C build Palindrom Tree. calculate frequency of each palindrom : f(A,p) calculate frequency of each palindrom : f(B,p) x = count(f(A,p)>f(B,p)) y = count(f(A,p)==f(B,p) && f(A,p)!=0) z = count(f(A,p)<f(B,p)) //little code: freq[i][0] ---> f(A,p); freq[i][1] --> f(B,p). for(int i = 0; i < a.size(); ++i){ add_letter(a[i]); freq[last][0]++;} add_letter('$'); add_letter('*'); add_letter('&'); for(int i = 0; i < b.size(); ++i){ add_letter(b[i]); freq[last][1]++;} for(int z = sz-1; z > 0; z--){ v = link[z]; freq[v][0] += freq[i][0]; freq[v][1] += freq[i][1]; } int x=0,y=0,z=0; for(int i = 2; i< sz; ++i)// skip roots { x += (bool)(freq[i][0] > freq[i][1]); y += (bool)(freq[i][0] == freq[i][1] && freq[i][0] !=0); z += (bool)(freq[i][0] < freq[i][1]); } |
| WA test 10 C++ | TIU_Sarexer | 1083. Factorials!!! | 26 Oct 2016 21:47 | 1 |
#include <iostream> #include <string> using namespace std; int main() { int num, res; string c, b = "!", a = "!"; cin >> num >> c; res = num; int sign = 0; for (int i = 1; b <= c; i++) { b = b + a; sign = i; } if (num%sign != 0) { for (int i = 1; i*sign < num; i++) { res = res * (num - i*sign); } res = res *(num%sign); } else { for (int i = 1; i*sign < num; i++) { res = res * (num - i*sign); } } cout << res; return 0; } |
| Why task score is so different with #1203 Scientific Conference? | ToadMonster | 1112. Cover | 26 Oct 2016 20:59 | 1 |
Solved both tasks with the same algorithm. Think this task is over-valued. Edited by author 26.10.2016 20:59 |
| TLE | beka | 1846. GCD 2010 | 26 Oct 2016 16:28 | 1 |
TLE beka 26 Oct 2016 16:28 just submitted code and got TLE on 15test, submitted same code after few minutes and got accepted. submitted again and got TLE on 24test for same code. |
| Time Limited | Shohruh_1999 | 1209. 1, 10, 100, 1000... | 26 Oct 2016 14:33 | 1 |
|
| Problem 1992 CVS has been rejudged | Vladimir Yakovlev (USU) | 1992. CVS | 25 Oct 2016 17:41 | 3 |
All solutions have been rejudged with the current time limit. Also, few more tests have been added. 10 authors have got AC while 23 other have lost. I have replaced standart C# input functions with my low level parse method and got Accepted. Is this the goal of that rejudgement? Well, I just resubmitted the previous solution with visual c++. I do every query O(1) operations and use scanf and printf. I think the version of your g++ compiler is not that good. There were some troubles with scanf and printf at some new versions of g++ compiler. |
| why i always wa in test #11. | cse_acm_jsh | 1937. Davy Jones’s Organ | 25 Oct 2016 16:16 | 2 |
|
| If you get WA11!!! | xurshid_n | 1937. Davy Jones’s Organ | 25 Oct 2016 16:15 | 1 |
source code of algorithm Manaker (find all palindroms in O(n)), where explained in e-maxx.ru is incorrect :), see comments to below of that page. Edited by author 25.10.2016 16:17 |
| I think you can add delete wall operation | Shen Yang | 1390. Shots at Walls | 25 Oct 2016 06:08 | 1 |
it is also not worth than 10000+ rating... |
| Solved WA #21 with the following test | yeguzi | 1346. Intervals of Monotonicity | 24 Oct 2016 21:21 | 1 |
|
| YES , Accepted ,haha | Shen Yang | 1415. Mobile Life | 24 Oct 2016 19:03 | 1 |
|
| WA #3 | Vishakha Banka | 1084. Goat in the Garden | 24 Oct 2016 18:58 | 1 |
WA #3 Vishakha Banka 24 Oct 2016 18:58 I'm getting wrong ans on test case 3. Can someone please give a hint? Here's my solution in Java: FastReader sc = new FastReader(System.in); double a = sc.nextDouble(); double r = sc.nextDouble(); double ans; if (r <= a / 2) { ans = Math.PI * r * r; } else { double angle = (2 * Math.PI) - (8 * Math.acos(a / (2 * r))); ans = (r * r * angle / 2) + (2 * a * Math.sqrt(r * r - a * a / 4)); } System.out.println(String.format("%.3f", ans)); |
| Problem 1820 Ural Steaks has been rejudged | Vladimir Yakovlev (USU) | 1820. Ural Steaks | 24 Oct 2016 12:31 | 1 |
New tests have been added to the problem, all accepted solutions have been rejudged. 490 authors have lost their AC. |
| What count of pattern for n=36? | OpenGL | 1708. Sum of Digits 2 | 23 Oct 2016 18:56 | 5 |
Edited by author 17.06.2009 19:29 I also get 47062 and use 1500+ms 85000K in codeforces custom test, how to optimize memory? YES Accepted memory is too hard... Edited by author 23.10.2016 18:54 Edited by author 23.10.2016 18:54 I hope admin can decrease the Time limit to 1s, to encourage me continue to optimise time. |
| Test case for Wrong Answer 1 | j.n.j.d.1 | 1297. Palindrome | 23 Oct 2016 15:25 | 1 |
Can anyone provide test case for WA#1, please? |