| Show all threads Hide all threads Show all messages Hide all messages |
| А как создать свой тутрнир? | Anna | | 2 Nov 2017 20:54 | 1 |
Скажите, пожалуйста, как можно на Вашем сайте создать свою "олимпиаду", турнир по программированию. |
| WA #8 | Amil Khare | 1135. Recruits | 2 Nov 2017 08:06 | 2 |
WA #8 Amil Khare 2 Nov 2017 06:30 Please Help and give me some tests! Never mind got it. The case is like this 10 <<<<><>>>> I just forgot to count the '>' that can never be used for swapping. |
| No subject | Hopelessness | 1563. Bayan | 1 Nov 2017 20:44 | 1 |
Edited by author 01.11.2017 20:58 |
| About WA1 | Pavel Kurochkin | 1102. Strange Dialog | 1 Nov 2017 18:21 | 1 |
If in the line "outputon", this does not mean that you need to put "out" and "puton", since sometimes you can put "output" and "one". Сheck out this test: 1 outputone Answer : "YES" Perhaps this will help you. Edited by author 01.11.2017 18:28 Edited by author 01.11.2017 18:29 |
| Problem | jackkiu158 | 1045. Funny Game | 1 Nov 2017 13:23 | 1 |
Problem jackkiu158 1 Nov 2017 13:23 If start from all the leaf airport that from one airport could win, start from this airport suerly will lose. Otherwise,he could win. |
| I know what's the problem if you've got WA6 | MAK | 1645. Ski Race | 1 Nov 2017 12:39 | 1 |
My program had such mistake: it has printed results in the order in which athletes have finished the race, but the task is to print results in order in which athletes have started one. |
| I got WA on the test 2 | Bakhodir Boydedaev | 1226. esreveR redrO | 31 Oct 2017 23:14 | 3 |
Here is my code which has been written in java. Please help me. I cannot understand what wrong is. Or some tests you have ?. Thanks. public class EsreveRredrO_1226 { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String s = reader.readLine(); solve(s); } public static void solve(String s) { String text[]; text = s.split(" "); for (int i = 0; i < text.length; i++) { String revers = ""; String temp; for (int j = text[i].length() - 1; j >= 0; j--) { revers = revers.concat(String.valueOf(text[i].charAt(j))); } if (revers.charAt(0) == '!' || revers.charAt(0) == ',' || revers.charAt(0) == '.' || revers.charAt(0) == '?' || revers.charAt(0) == ':' || revers.charAt(0) == ' ') { temp = revers.substring(1, revers.length()); revers = temp.concat(String.valueOf(revers.charAt(0))); } if (i != text.length - 1) System.out.print(revers + " "); else System.out.print(revers); } } } Edited by author 04.09.2017 00:45 I remember the problem is quite a pain in the ass I remember in that problem you should pay attention on all symbols If there is new line \n\r you print so If just \n you print \n If there is no EOF you don't print EOF I have not read your code I have WA2 for a long time And those symbols at the end of the line were related to those WA's Thanks for your words. I did care each symbol and didn't print any additional character at the end, and got AC. :) |
| test case for #6 WA | Craig Tucker | 1252. Sorting the Tombstones | 31 Oct 2017 02:47 | 1 |
6 1 3 2 6 5 4 answer: 0 Edited by author 31.10.2017 02:47 |
| awful description | Craig Tucker | 1252. Sorting the Tombstones | 31 Oct 2017 02:26 | 1 |
it's one of the most awful descriptions of the problems i've ever seen. some corner cases, which are really questionable, are not explained. it really irritates because instead of solving the next problem you need to guess what the answer is. how should i know what is the answer for 1? i am not linguist, but smth tells me, that there are no situation when you can find elements in between in the list of one element. what is the answer? should i put 0, 1, etc? after all it's not a competition, i can't even ask the judge or stuff how should i interpret the problem itself. Edited by author 31.10.2017 02:27 |
| Can't find tests to prove algorithm wrong (WA 3) | Kirill | 1139. City Blocks | 31 Oct 2017 01:00 | 3 |
I wrote simple implementation but can't figure out test to prove my solution wrong. 4 3 -> 4 3 3 -> 2 4 5 -> 6 4 6 -> 7 3 8 -> 8 6 5 -> 8 6 8 -> 10 #include "stdio.h" #include <stdlib.h> int main(void) { int bigger, lesser, a, b; scanf("%d", &a); scanf("%d", &b); if (a >= b) { bigger = a - 1; lesser = b - 1; } else { bigger = b - 1; lesser = a - 1; }
if (bigger % lesser == 0) { printf("%d\n", bigger); return 0; }
printf("%d\n", bigger + lesser - 1);
return 0; } Found it 7 11 -> 14 13 21 -> 16 GCD is the key ;-) |
| Test 8: | Adhambek | 1427. SMS | 30 Oct 2017 22:57 | 2 |
4 100 aaaaaaaaaaaaaaaaaaaa11aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111 ans : 4 I still get this one right and get WA on test 8. Is this test real? |
| I do simple check to what part does the point below. What's wrong? WA#6. Some tricky tests? Thanks (-) | Alexey | 1489. Points on a Parallelepiped | 30 Oct 2017 01:20 | 11 |
Edited by author 15.10.2006 11:24 Check each region by x and y, e.g. if (b+c<=y && y<=b+c+b && c <= x && x<=c+a) // bottom region I had some mistakes like If y>=a+b+c ... but must be If y>=b+b+c I have one check per one side. For example If y<=b - the point is on the lowest side (on the picture). If x<=c - the point is on the leftest side. etc. So, it is enough to check, you see, but WA#7. Thanks for help but still need it. ) You need check y > b+b+c and y < b+c.. because when point on the edge .... You can do mistake ... (I was wrong in this) I have AC, so thank U very much! But I still don't understand my mistake. It is guaranted that the point is in the picture, so I can only check one coordinate... Cann't understand... be careful when you do checks like if (x <= a) then ... it can produce WA, becouse if x = a, point can lie on another side Yes, that is true. Thank you. The test that makes the difference is: ------- 2 2 2 0 4 4 0 ------- before this correction the answer was 4.8989794856 (wrong!) but the right answer is 2.8284271247 (verifyed with AC program). This is great test. Thank you! TY, Paul Diac! Edited by author 30.10.2017 01:21 no mes SuperLight 26 Jun 2009 19:31 If you use real numbers, you can get situation, when point lies on none of 6 sides. So you should work with epsilon. Or you can use exact arithmetic, just multiply numbers by 100! It means 100 and !, not 100! :) Edited by author 26.06.2009 17:41 |
| (1489!) Please, what answer is for this test: | Nickolas | 1489. Points on a Parallelepiped | 30 Oct 2017 01:14 | 4 |
346 158 618 955.0 105.0 891.0 93.0 65.1152, isn't it????? Edited by author 21.04.2008 16:38 65.11528238 Should be 65.1153 if you print 4 digits (but the problem requires to print at least 6). |
| я сделал С++ | Vadim23 | 2012. About Grisha N. | 29 Oct 2017 19:56 | 1 |
#include <iostream> using namespace std; int main() { int n; cin>>n; if(1<=n&&n<=12) { int a=12-n; if(a*45<=4*60) cout<<"YES"; else cout<<"NO"; } return 0; } |
| How you've get 0.001 ? | KOTnt | 1025. Democracy in Danger | 29 Oct 2017 14:31 | 4 |
Tell me please how you have get timing 0.001 ? It mustn't be a code, may be just method or algorithm. Thanks I think it's impossible to get time less than 0,015 sec at new testing system (since approx. end of 2008). Look at problem 1000 - simple operation, but you can't now get time less than 0.015 neither on C++ nor on Pascal. Furthermore, step between time measurment is about 0,016 (so you can get 0,015 or 0,031 but nothing between) And furthermore, when you run you some hard solution sequental some times, it will get significant different time result. For example, my Pascal AC solution for 1001 sended a few of times takes 0.078, 0.093 or 0.109 sec I think it because mistake in time-measurment method. I think they using a system-clock (RTC) that renew after significant time. So, if testing system is hard loaded (for example testing many authors in parallel) the testing will take more time relatively ro Real-Time Clock, than when system is idle (at early morning, for example). So, testing system is incorrect and you can't reach time less than 0.015 until realisation of system will be changed Excuse my English I understood, thank you ) Your English is OK My code runtime is 0.001. If you use bitwise operation your code will get AC in 0.001. Here is my code. If you want you can learn. [code deleted] Edited by moderator 20.11.2019 00:08 |
| I didn't Understand the solution | Iamyeasin | 1025. Democracy in Danger | 29 Oct 2017 14:10 | 1 |
If I divide first and then add 1 with (n or other group numbers), I get WA. But if I add 1 at first and then I divide that time i get AC. I have seen some of the discussion, but couldn't find the logic.Can someone help me out? |
| my simple accepted code | kazanski | 1226. esreveR redrO | 29 Oct 2017 07:20 | 1 |
#include <iostream> #include <iomanip> #include <map> #include <vector> #include <cmath> #include <vector> #include <algorithm> #include <cmath> using namespace std; int letter(char c) { return (('a'<=c&&c<='z')||('A'<=c&&c<='Z')); } int main() { //freopen("a","r",stdin); string s; while(getline(cin,s)) { vector<int> l,r; for (size_t i=0;i<s.length();i++) { if (letter(s[i])) { if (!i||!letter(s[i-1])) { l.push_back(i); } if (i+1==s.length()||!letter(s[i+1])) { r.push_back(i+1); } } } for (int i=0;i<l.size();i++) { reverse(s.begin()+l[i],s.begin()+r[i]); } cout << s << endl; } return 0; } |
| No subject | DarkSun1997 | 1826. Minefield | 28 Oct 2017 19:28 | 1 |
Edited by author 28.10.2017 19:36 |
| WA3…… | LeiQ | 1221. Malevich Strikes Back! | 28 Oct 2017 16:53 | 3 |
WA3…… LeiQ 31 Oct 2016 17:50 I test all case in discussion,but all answers right... Can someone help..Thanks!!! ...solved... one test case: 8 1 1 0 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 answer: 3 It's working for me but still WA3 |
| is there any effient algo to solve n<=11,m<=11?? | Shen Yang | 1596. Knight Mare | 28 Oct 2017 12:27 | 2 |
I know how to construct larger cases when knowing solution n<=11&&m<=11,but brute_force for small tests is tooooooooo slow.. |