| Show all threads Hide all threads Show all messages Hide all messages |
| WA #5 | Faeton (Kyiv - Mohyla Academy) | 1588. Jamaica | 14 Mar 2012 20:05 | 3 |
WA #5 Faeton (Kyiv - Mohyla Academy) 13 Feb 2008 03:20 8 0 10 0 20 10 20 100 20 0 30 0 99 0 100 0 0 |
| Test 14 | ezsilmar | 1718. Rejudge | 14 Mar 2012 19:35 | 1 |
Try this: 2 AAA WA 7 BBB AC Answer is 1 2 |
| question2 | sklyack | 1283. Dwarf | 14 Mar 2012 16:32 | 2 |
What output on test like this: 10 0 50 ? In this case it seems the dwarf will never die. They can't live without gold. :))I think that the limit is at least 1. :D |
| Why WA#1?? | Baranina | 1404. Easy to Hack! | 14 Mar 2012 14:43 | 7 |
#include <cstdio> int n,m,i,l,t[201]; char s[201]; int main() { scanf("%s",s); n=0; while(s[n])t[n]=s[n++]-'a'; m=5; for(i=0;i<n;i++) { l=(26+t[i]-m)%26; printf("%c",97+l); m=t[i]; } printf("\n"); return 0; } Edited by author 11.04.2008 23:51 don't use namespace std here! And you will get Ac! try avoiding \n in the end. At least my AC doesn't. I've go AC. WA#1 took place, cause there is some trash in input. It's very very not fear for admins/judges not to warn about it in problem statement ! WA#1 pikavel 14 Mar 2012 14:43 Got AC with reading a string, and WA#1 with symbol reading (commented block), but both ways of reading work correctly on my computer. It seems that input consists EOL symbol '\n'. int main() {
char c; int n=0; char sym[101]; int code[101];
scanf("%s",sym); n=strlen(sym); for (int i=0;i<n;i++) code[i]=sym[i]-0x61;
/* while (scanf("%c",&c)!=EOF) { code[n]=c-0x61; n++; } */ ... |
| PI | misha_4ever | 1020. Rope | 14 Mar 2012 13:42 | 4 |
PI misha_4ever 14 Nov 2010 12:19 Use PI with at least 3 precision numbers, i.e. 3.141... That was my mistake Re: PI Tkachenko_Roman 12 Aug 2011 14:46 Thanks for good advice. Now I got AC. Re: PI pikavel 13 Mar 2012 12:35 Is there any defined costant for pi in c/с++? M_PI from math.h works correctly on my computer, but judge's compiler doesn't know it. Edited by author 13.03.2012 13:18 Re: PI Erop [USU] 14 Mar 2012 13:42 I use this: const double PI = acos(-1.); |
| Help!!! | OncescuCostin | 1073. Square Country | 14 Mar 2012 02:49 | 1 |
Help!!! OncescuCostin 14 Mar 2012 02:49 Why I have Crash (access violation)? |
| Test 5. what's wrong?? please help!! | Kirik | 1025. Democracy in Danger | 12 Mar 2012 22:56 | 2 |
program f; var x,m,i,amount,s,j,g,k:integer; a: array [1..10000] of integer; begin read (m); for i:=1 to m do read (a[i]); for i:=1 to m do begin for j:=1 to m-1 do for g:=1 to m-j do if a[i]>a[i+1] then begin k:=a[i]; a[i]:=a[i+1]; a[i+1]:=k; end; end; amount:=(m div 2) +1; for i:=1 to amount do s:=s+(a[i]div 2)+1; write (s); end. Incorrect sort algorithm. Variable 's' not initialized. |
| WA 4 Test | Looksery DotaClub | 1527. Bad Roads | 12 Mar 2012 17:01 | 1 |
WA 4 Test Looksery DotaClub 12 Mar 2012 17:01 Can anybody help me to find out what does the fourth test case look like? Everything is ok with output format in my programm but I still get WA4. Any suggestions or test cases? Edited by author 12.03.2012 17:01 |
| Players' decisions | Alexey | 1374. Misere | 12 Mar 2012 04:08 | 1 |
Am I right in the following assumptions? 1. If result of the game depends on second or third player's lead, the misere will not be played. 2. If result of the game depends on first player's lead (who declared the misere contract), we should assume that he or she always selects correct card. Edited by author 12.03.2012 04:21 |
| Confusing problem statement | Siroj Matchanov | 1225. Flags | 12 Mar 2012 02:52 | 3 |
What is the number N ? Is it the number of colors or of flags? From the problem discussion, it turns out to be a fibonacci sequence. And... N = 3 M = 4 N = 4 M = 6 ---------?? how come? N = 5 M = 10 and etc... How come M = 6 when N = 4? N, the number of the stripes, stripes isn't a color neither flags, it's just the columns of the table ;) Edited by author 11.11.2011 20:24 Let red color is 1, white color is 2 and blue color is 3. We can get only 6 positions that correspond to our condition. They are 1321, 2132, 1321,2312,1212,2121, is it right? |
| WA #14 | Jane | 1106. Two Teams | 12 Mar 2012 01:04 | 2 |
I used BFS. #include<stdio.h> #define maxn 1200 int a[maxn][maxn], queue[maxn], n, d, c, ans[maxn], k; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ for(int j=1;j<n;j++){ scanf("%d",&a[i][j]); if(a[i][j]>0) a[i][0]++; else break; } } if(n<=1){ printf("0"); return 0; } for(int i=1;i<=n;i++) if(a[i][0]==0){ printf("0"); return 0; } d = 1; for(int i=1;i<=n;i++){ if(ans[i]==0){ ans[i] = 1; k++; c++; queue[c] = i; do{ for(int i=1;i<=a[queue[d]][0];i++){ if(ans[a[queue[d]][i]]==0){ ans[a[queue[d]][i]]=ans[queue[d]]+1; if(ans[a[queue[d]][i]]%2) k++; c++; queue[c] = a[queue[d]][i]; } } d++; }while(d<=c); } } printf("%d\n",k); for(int i=1;i<=n;i++) if(ans[i]%2) printf("%d ",i); return 0; } Help me! please! mistake in this operator j<n. Wrong input for(int i=1;i<=n;i++){ for(int j=1;j<n;j++){ scanf("%d",&a[i][j]); |
| WA #3,what is the text #3??? | Harhro94 [Hrayr Harutyunyan] | 1818. Fair Fishermen | 11 Mar 2012 23:44 | 3 |
what is correct answer in case n=3;a1=0;a2=0;a3=0; is it 27 or 0? Известно, что рыбаки поймали хотя бы одну рыбу. Известно, что рыбаки поймали хотя бы одну рыбу. It is known that they caught at least one fish. |
| When No Solution?? | coder | | 11 Mar 2012 22:44 | 1 |
N and M both are odd numbers --> No Solution ? |
| Help TL #22 | Varun Sharma | 1354. Palindrome. Again Palindrome | 11 Mar 2012 18:36 | 2 |
Hi, I am using a very naive algorithm to solve this problem and that's getting TL on later test cases. Can someone tell the name of the efficient algorithm which we can use for this problem ? Thanks If you are using Java then use StringBuilder instead of Strings. |
| What is test 1? | JAVATAR | 1297. Palindrome | 11 Mar 2012 16:25 | 2 |
What is test 1? I have even tried out.println('ArozaupalanalapuazorA'); but no luck. Yeah, found, the test 1 is something like this, abcabadkl a palindrome inside the string. |
| Useful hints about ranges of M (amount of edges) | Smilodon_am [Obninsk INPE] | 1416. Confidential | 11 Mar 2012 15:36 | 1 |
Note that M (amount of edges) could be as more as N^2. Tests #12 and #15 contain perhaps M equal about 250000. Edited by author 11.03.2012 16:06 |
| Funny precision trouble and WA14 | Anatoly | 1332. Genie Bomber | 11 Mar 2012 13:48 | 1 |
Hi there, I had WA14 until replace just one parenthesis: sqr(...) + sqr(...) < sqr(...) + eps // WA sqr(...) + sqr(...) < sqr(... + eps) // AC I didn't think about such small things like this before. P.S. argument of 3rd sqr is positive Edited by author 11.03.2012 13:57 |
| WA #1 :: Windows end-of-line | [MAI] Safronov Alexey | 1094. E-screen | 11 Mar 2012 12:54 | 1 |
If you read input char-by-char, you should skip "\r" too, not only "\n". |
| It's simple to get AC, but is there any evidence of the fact? | Roman Atangulov | 1761. Binary Palindrome | 11 Mar 2012 05:44 | 2 |
Edited by author 21.03.2010 20:34 |
| WTF??? check that! | Rafikov Ramil | 1243. Divorce of the Seven Dwarfs | 11 Mar 2012 05:35 | 2 |
i used: char n; while(cin.get(n)) {...} and get WA on a first test!!! but when a change it to : char n; while(cin>>n) {...} i got AC.... Why??? i think it not right.... Maybe you haven't included the <string.h> header. :) |