| Show all threads Hide all threads Show all messages Hide all messages |
| Easy | Nodir NAZAROV Komilijonovich [TUIT-Karshi] | 2031. Overturned Numbers | 5 Dec 2014 19:28 | 1 |
Easy Nodir NAZAROV Komilijonovich [TUIT-Karshi] 5 Dec 2014 19:28 only 4 cases Edited by author 05.12.2014 19:38 Edited by author 05.12.2014 19:39 |
| Mistake | Nodir NAZAROV Komilijonovich [TUIT-Karshi] | 2035. Another Dress Rehearsal | 5 Dec 2014 18:55 | 1 |
Mistake Nodir NAZAROV Komilijonovich [TUIT-Karshi] 5 Dec 2014 18:55 found my mistake. sorry for this post. Edited by author 05.12.2014 22:16 Edited by author 05.12.2014 22:16 |
| сколько всего тестов в этой задаче? | СУНЦ УрФУ petrov nikita | 1415. Mobile Life | 5 Dec 2014 13:37 | 2 |
You will not solve this problem ((( Edited by author 05.12.2014 13:37 Edited by author 05.12.2014 13:37 |
| if somebody had an 2 and 10-11 WA | daemon | 1100. Final Standings | 5 Dec 2014 12:59 | 3 |
if 2 - try 2 4 0 3 2 if 10-11 - just not use sort. especially bubble one))) I have 2 and this test works correct Edited by author 05.12.2014 13:00 |
| WA14 | Makar | 1419. Maps of the Island Worlds | 4 Dec 2014 21:47 | 1 |
WA14 Makar 4 Dec 2014 21:47 Can't get it. What in this test case. P.S. finding bridges from e-maxx with deep of recursion. |
| very annoying problem | arrammis | 2011. Long Statement | 4 Dec 2014 20:48 | 1 |
i had 9 wroung attempts, 10 was AC lol |
| WA testcase #1 | Manish Jangir | 1837. Isenbaev's Number | 4 Dec 2014 18:18 | 2 |
i tried BFS. but WA in test #1. Can anyone suggest some test cases? Thanks.. Don't output last CRLF. Bad cheker. |
| What about 4-th test?Please help.Here is source: | Search | 1617. Flat Spots | 4 Dec 2014 17:01 | 10 |
#include<iostream> #include<algorithm> using namespace std; int main() { int i,n,a[155],k=0; cin>>n; for(i=0;i<n;i++) cin>>a[i]; sort(a,a+n+1); for(i=0;i<n;i++) if(a[i]==a[i+3]) k++; cout<<k; return 0; } Re: * Search 1 Apr 2008 20:04 Re: * tolia 7 Mar 2009 18:40 #include<iostream> #include<algorithm> using namespace std; int main() { int i,n,a[155],k=0; cin>>n; for(i=0;i<n;i++) cin>>a[i]; sort(a,a+n+1); for(i=0;i<n;i++) if(a[i]==a[i+3]) k++; cout<<k; return 0; } Re: * Adhambek 26 May 2013 09:48 look at my test .... use your program 10 600 600 600 600 600 600 600 600 600 600 I think your answer is 7... But true answer is 2! Edited by author 26.05.2013 09:50 Re: * Ivan Metelev 4 Dec 2014 17:01 Sorry, but true answer is 1, on my opinion Edited by author 04.12.2014 17:01 Edited by author 04.12.2014 17:02 Re: * LLIRIK 3 Apr 2008 22:59 5 600 600 600 600 600 what is the answer for this test? my programm writes 1 isn't it right?? Re: * Rashid Gaziyev 26 Oct 2010 11:00 |
| My approach-will it be correct | Ankit Tripathi | 1017. Staircases | 4 Dec 2014 10:45 | 1 |
I construct vertical blocks made of bricks. Now, blocks are of height 1,2,3,...n-1. Now, to make these many i need n*(n-1)/2 bricks. But, I have n bricks so I have to remove former minus latter number of bricks, which is n(n-3)/2. Now, the problem can be changed to number of ways of obtaining n(n-3)/2 from numbers 1,2,3,...n-1 while each number can be used only once. If you find the approach to be correct, please tell me how to obtain this number.(I am a newbie in coding..:)). |
| Incorrect reasoning ? | artem | 1225. Flags | 4 Dec 2014 02:12 | 2 |
Let me know please, why i should not think in this way - i have A ways to make n-1 strip sequences. If i will add red or white strip from the left side, i have A ways to make n strip sequences. R/W + [n-1.....] But in the same time i can add red or white strip from the right side, and so i'll have another A ways to make n strip sequences. [n-1....] + R/W So, now i have 2*A ways to make n strip sequences. What's wrong in this kind of argumentation ? Some ways may be counted twice, so the ways will be less than 2A |
| WA #13, what's the issue? | Holykill (AUA) | 1964. Chinese Dialects | 3 Dec 2014 21:31 | 1 |
so what is the trick with the test 13? Here is my code: public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); int k = input.nextInt(); long[] arr = new long[k]; long first = 20000000000000L; int first_location = 0; long second = 2000000000000L; for (int i = 0; i < k; i++) arr[i] = input.nextInt();
for (int i = 0; i < k; i++) if (arr[i] < first) { first = arr[i]; first_location = i; } arr[first_location] = 0;
for (int i = 0; i < k; i++) if (arr[i] < second && arr[i] != 0) second = arr[i]; long answer = first + second - n; if (answer > 0) System.out.println(answer); else System.out.println(0);
} |
| why? 2 test | DioniS | 1243. Divorce of the Seven Dwarfs | 3 Dec 2014 15:54 | 1 |
var a:array[1..20] of integer; n,n1:string; x,k,i,s,code:integer; begin read(n); x:=length(n); k:=x div 3; if x mod 3>0 then k:=k+1; for i:=1 to k do begin n1:=copy(n,x-3*i+1,3); val(n1,k,code); a[i]:=k; delete(n,x-2*i,3); end; k:=x div 3; if x mod 3>0 then k:=k+1; if k div 2=0 then begin a[1]:=-1*a[1]; a[3]:=-1*a[3]; a[5]:=-1*a[5]; a[7]:=-1*a[7]; a[9]:=-1*a[9]; a[11]:=-1*a[11]; a[13]:=-1*a[13]; a[15]:=-1*a[15]; a[17]:=-1*a[17]; end else begin a[2]:=-1*a[2]; a[4]:=-1*a[4]; a[6]:=-1*a[6]; a[8]:=-1*a[8]; a[10]:=-1*a[10]; a[12]:=-1*a[12]; a[14]:=-1*a[14]; a[16]:=-1*a[16]; end; for i:=1 to 17 do s:=s+a[i]; write(abs(s mod 7)); end. |
| I use Suffix array and Z-function. Both of them get me Accepted | Adhambek | 1590. Bacon’s Cipher | 3 Dec 2014 15:28 | 1 |
TIME Memory Suffix array - 0.031 s 534 kb Z-function - 0.187 s 132 kb Edited by author 03.12.2014 15:29 |
| WA 12 | MOPDOBOPOT (USU) | 1768. Circular Strings | 2 Dec 2014 20:42 | 2 |
WA 12 MOPDOBOPOT (USU) 15 Aug 2012 20:37 My algo is to check that: 1) all spins done in same side 2) all sides are equal 3) all angles are equal 4) in any comparsions precision equals 0.000001 (I tried many variants of precision but got WA12 in any case) It's hard for me to find tests in this problem :( What the hell is 12 test? Edited by author 04.10.2012 12:13 make sure every edge longer than 1e-6 |
| more example plz? | Faruk | 1290. Sabotage | 2 Dec 2014 10:52 | 1 |
|
| WA4 | Ekaterina_Pogodina | 1470. UFOs | 1 Dec 2014 21:58 | 1 |
WA4 Ekaterina_Pogodina 1 Dec 2014 21:58 |
| how shall i get 150000 integers in an array,what the prblm with this code! | Faruk | 1100. Final Standings | 1 Dec 2014 21:10 | 1 |
#include <stdio.h> int main() { long int n, id[150000], m[150000], max, x, i, j; while(scanf("%ld", &n)==1) { for(i=0; i<n; i++) { scanf("%ld %ld", &id[i], &m[i]); } for(i=0; i<n; i++) { max=0; for(j=0; j<n; j++) { if(m[j]>max) { max=m[j]; x=j; } } printf("%ld %ld\n", id[x], max); m[x]=0; } } return 0; } |
| Can anybody explain the sample please? | WinTokk | 1373. Pictura ex Machina | 1 Dec 2014 08:38 | 6 |
I don't understand the sample. Or I should say I don't understand the meaning of the problem... :( First brushstroke has a point of turn in (0, 1), second - in (2, 1), thrid - in (1, -1), fourth - in (2.5, 0.5). Hope, now you will understand. Thank you very much! I've got accepted with this knowledge:) Why can't the third brushstroke be in (1, 1)? In this case the frame will be smaller, won't be? Why can't the third brushstroke be in (1, 1)? In this case the frame will be smaller, won't be? It said, "90 degrees clockwise". And it would have been much harder. =) Edited by author 01.12.2014 08:39 |
| Help Please, WA test 7 | Malarg | 1005. Stone Pile | 1 Dec 2014 01:58 | 2 |
[code deleted] Edited by moderator 29.01.2022 19:09 Try this test case: 5 5 8 13 14 15 correct answer = 1 split = 5 8 14 | 13 15 sum = 27 | 28 |
| HELP ME!!! What's wrong with it? (C++) | lem_TOJ | 1001. Reverse Root | 1 Dec 2014 01:51 | 2 |
#include <iostream> #include <math.h> #include <vector> #include <stdio.h> using namespace std; int main() { unsigned long long a; vector<unsigned long long> b; cin.clear(); while(cin>>a,!cin.eof()) { b.push_back(a); } for(vector<unsigned long long>::iterator it = b.begin() ; it != b.end(); ++it) { printf("%.4lld\n", sqrt(*it)); } return 0; } Edited by author 23.05.2014 07:23 Edited by author 23.05.2014 07:23 It seems that you print numbers to right order, you should print them to reverse order. Like this: for (vector<...> : reverse_iterator it = b.rbegin(); it != b.rend(); ++t) ... |