| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Binary tree | Mahilewets Nikita [BSUIR] | 2104. Игра с полоской | 8 окт 2017 10:10 | 1 |
You can build binary tree Left child corresponds to inward fold Right child corresponds to outward fold Root is unfolded strip Build tree from root to leaves and before going deeper check winning conditions |
| Question about ' like ' parsing and apostrophe encoding | Mickkie | 1177. Сопоставление с шаблоном | 8 окт 2017 07:07 | 2 |
How to deal with case like this ' ' like ' like ' like ' like ' 'like ' it can be splitted as ( ) & ( like ' like ' like ' 'like ) or ( ' like ) & ( like ' like ' 'like ) or ( ' like ' like ) & ( like ' 'like ) or ( ' like ' like ' like ) & ( 'like ) Can you clarify this statement Inner entrance of apostrophe symbol (ASCII 39) into string or template is encoded by double apostrophe symbol And if it's true the case ''hi'' like ''hi'' will be changed to '"hi'' like '"hi' Am I right? Then how is this case possible? '''''' like '_''' The apostrophe symbol (ASCII 39) if appear in string or template will be double (now it becomes 2 successive apostrophe symbols). The English problem statement is wrong to me since it made us think that ASCII 39 is replaced by ASCII 34 or something. But in fact, ASCII 39 is replaced by two ASCII 39. At least, I got AC after using my above interpretation. |
| WA#8 | [TH0312]LeMinhTruyen | 1080. Раскраска карты | 7 окт 2017 01:39 | 2 |
WA#8 [TH0312]LeMinhTruyen 4 дек 2012 13:27 Does anyone know about test number 8?. If you do, please upload some, thank you very much. Re: WA#8 Nikita Manovich 7 окт 2017 01:39 I believe the test is simple. I had WA #8 and the only problem I had I forgot to initialize first vertix to RED color. Test: 1 0 result:0 |
| Wrong:1000A+N problem| C | sandalphon | 1000. A+B Problem | 6 окт 2017 18:49 | 2 |
#include <stdio.h> int main() { int a,b; scanf("%d,%d",&a,&b); printf("a+b=%d\n",a+b); return 0; } Don't print unnecessarily information like "a+b=" |
| WA on test 10, ac on poj | tahara | 1162. Currency Exchange | 6 окт 2017 18:21 | 1 |
please, how can I get test cases on this oj? |
| Problem 2094 was rejudged | ...†.†.†... Stigius ...†.†.†... | 2094. Тысяча чертят | 6 окт 2017 14:35 | 3 |
Error in jury solution was fixed, all test answers updated, few new tests added. Most authors lost their AC. Big thanks to the Winger for pointing out an issue and helping with fixing it. What error was fixed,maybe my code has the same error?? oh yeah Accepted.. with guess,and |
| AC in 0.015 sec | cosmicray001 | 2001. Математики и ягоды | 5 окт 2017 19:54 | 1 |
#include <bits/stdc++.h> using namespace std; int main() { int a, a2, a3; int b, b2, b3; scanf("%d %d %d %d %d %d", &a, &b, &a2, &b2, &a3, &b3); int bb1 = a - a3; int bb2 = b - b2; printf("%d %d\n", bb1, bb2); return 0; } |
| Run time eror(Stack Overflow)why? | Chowdhury Md. Ishmam Rahman | 1001. Обратный корень | 5 окт 2017 18:28 | 3 |
#include<stdio.h> #include<math.h> #include<stdlib.h> #define SIZE 128*1024 int main() { int i,n=0; long long int num[SIZE],N; printf("enter your aray value:\n"); while(scanf("%lld",&N)!=EOF) { num[n]=N; n++; } for(i=n-1;i>=0;i--){
printf("%0.4lf\n",(double)sqrt(num[i])); } return 0; } ohhh...thanks for your great suggestion. |
| who has wa4 | CoolBoy | 1588. Ямайка | 5 окт 2017 17:13 | 4 |
4th test is: 3 0 0 9999 10000 9998 9999 So double should be used instead of float...When I replaced float with double my code passed this test... And, the answer should be 28283 thats wroung answer for that test ! - you shouldn't add to the sum same distance twice !! ans is 14141 ! No! Right answer is 28283, because the points are not placing on one line. Edited by author 05.10.2017 17:14 Edited by author 05.10.2017 17:14 |
| Python Что не так в коде? | FY0u11 | 1001. Обратный корень | 4 окт 2017 22:17 | 4 |
from re import * from math import sqrt result = findall('[0-9]+', input()) result.reverse() for i in result: print('{:.4f}'.format(sqrt(int(i)))) Edited by author 14.03.2017 01:20 For the most tasks WA1 means your program can't even solve sample. Have you tried to run it locally? It's clearly visible it doesn't work. Here's my run: http://ideone.com/T9g8rU There is only 2 numbers in output so your program processed first input line only. Edited by author 17.03.2017 14:35Hey admins! His code works well as my, but it doesn't pass on your side. As the prove look bellow: " with open('/tmp/123.txt', 'r') as f: string = f.read()
from re import * from math import sqrt result = findall('[0-9]+', string) result.reverse() for i in result: print('{:.4f}'.format(sqrt(int(i)))) " Answer " runfile('/home/ant/.config/spyder-py3/temp.py', wdir='/home/ant/.config/spyder-py3') 2297.0716 936297014.1164 0.0000 37.7757 " You have mistakes in comparation analysis on your side. Hi, master8282 please, take a look at rules: В решениях задач запрещается: работа с любыми файлами; ... (Source: http://acm.timus.ru/help.aspx?topic=judge) here is the problem, since your code based on file reading. |
| Who had a Wrong Answer in 5 th test ? What mistake may be there ? | Escarabajo | 1369. Тараканьи бега | 4 окт 2017 14:14 | 3 |
Who had a Wrong Answer in 5 th test ? What mistake may be there ? Locally you can make straitforward solution M * N and check what line is wrong. as far as I remember test 5 is the case N==0, just output empty line.. |
| WA11 - please help | Mescalito | 1577. Электронная почта | 4 окт 2017 12:17 | 1 |
Could someone provide tests for me? Thank you |
| If you have WA13 | shardex | 1145. Нить в лабиринте | 2 окт 2017 22:07 | 1 |
Try this test: 4 3 #### #..# #### Answer is 1 :) |
| It is very easy to get confused where you should use 'n' and where you should use 'm' | Mahilewets Nikita [BSUIR] | 2108. Олег и маленькие пони | 30 сен 2017 20:02 | 1 |
|
| WA42? | shota | 1635. Мнемоника и палиндромы | 30 сен 2017 16:48 | 2 |
WA42? shota 30 сен 2017 12:39 Re: WA42? Mahilewets Nikita [BSUIR] 30 сен 2017 16:48 It is something unique I have had WA20, WA23, TLE32, MLE56 But never WA42 |
| wrong answer #8 - solved | Moustafa Shahin | 1785. Трудности локализации | 30 сен 2017 06:57 | 1 |
#include <bits/stdc++.h> using namespace std; int main() {int x; vector <string> myvector (2001); fill (myvector.begin(),myvector.begin()+5,"few"); fill (myvector.begin()+6,myvector.begin()+10,"several"); fill (myvector.begin()+11,myvector.begin()+20,"pack"); fill (myvector.begin()+21,myvector.begin()+50,"lots"); fill (myvector.begin()+51,myvector.begin()+100,"horde"); fill (myvector.begin()+101,myvector.begin()+250,"throng"); fill (myvector.begin()+251,myvector.begin()+500,"swarm"); fill (myvector.begin()+501,myvector.begin()+1000,"zounds"); fill (myvector.begin()+1001,myvector.end(),"legion"); cin>>x; cout<<myvector[x]; return 0; } correct solution: #include <bits/stdc++.h> using namespace std; int main() {int x; vector <string> myvector (2001); fill (myvector.begin(),myvector.begin()+5,"few"); fill (myvector.begin()+5,myvector.begin()+10,"several"); fill (myvector.begin()+10,myvector.begin()+20,"pack"); fill (myvector.begin()+20,myvector.begin()+50,"lots"); fill (myvector.begin()+50,myvector.begin()+100,"horde"); fill (myvector.begin()+100,myvector.begin()+250,"throng"); fill (myvector.begin()+250,myvector.begin()+500,"swarm"); fill (myvector.begin()+500,myvector.begin()+1000,"zounds"); fill (myvector.begin()+1000,myvector.end(),"legion"); cin>>x; cout<<myvector[x]<<endl;; return 0; } Edited by author 30.09.2017 07:20 |
| Approach? | Saurav Kumar | 2018. Дебютный альбом | 30 сен 2017 02:31 | 5 |
I want to know how to approach this question in what direction to think so that i can solve it on my own. Thank you. Problem is tagged with dynamic programming First, think about each possible configuration of the current state when you add next song Second, think about techniques of DP - compression well let x[n] be the number of sequences that finish with 1 and y[n] be the number of sequences that finish with 2 of the length n, x[0] = y[0] = 1, x[1] = y[1] = 1, the recurent formula for this is x[n] = y[n - 1] + y[n - 2] + y[n - 3] + .. + y[n - b] and y[n] = x[n - 1] + x[n - 2] + x[n - 3] + .. + x[n - a], basicly for a sequance of n + 1 you must think of the number of ways that the sequance will finish with 1 or with 2 Edited by author 11.08.2017 04:09 I am sorry but I still didn't understand, why x is dependent on y. Won't Y[] include cases having consecutive A times 1 and moreover won't Y[] Include duplicate cases ? I am sorry but I am new to this so that's why I am asking. well let's approuch one case where your array is finishing with 1 but no more than "a" times in a row, because the 1 array is dependent from array of 2 and array 2 is alwais finishing with 2 it will look like this 12.... that is y[n] = x[n - 1], than 112... that is y[n] = x[n - 1] + x[n - 2], than 111...112.... which is y[n] = x[n] + x[n - 1] + x[n - 2] + ... + x[n - a] and is the same in the second case |
| GOOD HINT | Felix_Mate | 1151. Радиомаяки | 29 сен 2017 21:30 | 1 |
Маяки могут находится в 1 точке. P.S. Если считать, что маяки не могут быть в одной точке, то тогда нужно решать паросочетанием (как я в начале и решал), что гораздо сложнее по реализации |
| Please help with test #6. | gunfighter | 1348. Пусти козла в огород 2 | 29 сен 2017 09:19 | 3 |
I tried different tasks and always got the right answer. My code is very messy I can't understand it after getting AC some months ago So probably if your code is clean and easy to read your approach is fundamentally wrong I mean, maybe there are some corner cases |
| WA19 | kitxuli | 1780. Код Грея | 28 сен 2017 17:05 | 1 |
WA19 kitxuli 28 сен 2017 17:05 |