| Show all threads Hide all threads Show all messages Hide all messages |
| Can someone explain the example to me? | Quinn Perfetto | 1868. Prediction Contest | 11 Jul 2016 16:53 | 2 |
I don't understand how the answer can be 15. Since the first 2 people got 0 correct predictions and the last person got 1 correct prediction, shouldn't the amount paid only be 5? First two people got more then 0 correct predictions because: "four sets of gold medals, four sets of silver medals, and four sets of bronze medals are awarded" |
| Dp | Kirino | 1017. Staircases | 11 Jul 2016 03:57 | 2 |
Dp Kirino 21 Feb 2016 20:47 dp[i][j] - represents number of staircases with i cubes and with the height of last block j. Answer is dp[n][1] + dp[n][2] + dp[n][3] ... dp[n][n]. Re: Dp Saurav Kumar 11 Jul 2016 03:57 can u help me with some algorithm better than dp(which works in O(n^2)) Edited by author 11.07.2016 03:57 |
| If you need good tests see it: | IlushaMax | 2010. Sasha the Young Grandmaster | 10 Jul 2016 14:09 | 1 |
At first check all tests with n<=4. If all of them cheked already then try to check all cells for n=8 (1/1; 1/2; 1/3; 1/4; 2/2; 2/3....)and for n=9. Don't be afraid you'll find your mistake on first tests)) Edited by author 10.07.2016 14:33 |
| wa #8 | aabbyy | 1739. Faryuks | 10 Jul 2016 00:34 | 2 |
wa #8 aabbyy 2 Nov 2013 12:05 can someone give me some tips or tests? You can only use both modifiers once during whole process; you can't restock between "take" operations. For example, answer for test 4 208 100 208 100 is IMPOSSIBLE (at least according to my AC program): you can take 208, 100 by using deodorant on 208, but you can't do it twice. |
| Что не так ? | nikich_306 | 1001. Reverse Root | 9 Jul 2016 20:20 | 2 |
#include <iostream> #include <math.h> #include <iomanip> using namespace std; int main() { double a[100000]; int i, n; cin >>n; for (i=1; i<=n; ++i) { cin>>a[i]; } for (i=1; i<=n; ++i) { a[i] = sqrt(a[i]); } for (i=n; i>=1; --i) { cout << fixed << setprecision(4) << (a[i]) << endl; } } Прочитай внимательно графу исходные данные, у тебя первое число задаёт количество чисел которое ты будешь вводить, а там такого нету |
| Conditions of the problem | Vitaly | 2091. Natural Selection | 9 Jul 2016 18:11 | 3 |
What is the criterion of optimality of the partition ? Minimum of maximum of 4 numbers, read problem Also, instead of «The i-th number in the j-th row» there should be «The j-th number in the i-th row» (unless, judging by the title, this is intended, haha) |
| будет ли разбор задач? | dimaa | 2098. Lada Priora | 9 Jul 2016 15:36 | 1 |
|
| What is format of input? | Felix_Mate | 1941. Scary Martian Word | 8 Jul 2016 22:43 | 2 |
По условию может быть так(.-пробел):.........aaa.bbb.ссс. .....xxx.aaa.bbb.ccc. или .........aaa.bbb.ссс........ .....xxx.aaa.bbb.ccc........??????? И вообще,как в ЭТОЙ задаче считывать данные(на Паскале)? Edited by author 08.07.2016 21:27 Не может. В начале пробелов нет, между каждой группой ровно один пробел. Я делаю так: readln(s); i:=1; while i <= length(s) do begin //process [i], [i + 1], [i + 2] inc(i, 4); end; |
| WA1! Who can give some tests? | Felix_Mate | 1941. Scary Martian Word | 7 Jul 2016 23:35 | 2 |
I tested my prog but I not found mistake Did you receive my email from a month ago? |
| в чем проблема??? Java | Nikita | 1000. A+B Problem | 7 Jul 2016 19:48 | 4 |
public class AB { public static void main(String [] args) { int a = 1; int b = 5; System.out.println((a+b)); } } В общем она требует ввод данных, а не определение переменных Edited by author 15.03.2016 20:58 Edited by author 15.03.2016 20:58 Тогда в чем проблема?))) public class Math{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int a = scanner.nextByte(); int b = scanner.nextByte(); System.out.print(a + b); } } import java.util.*; делал??? |
| why wa1 | IlushaMax | 1731. Dill | 7 Jul 2016 16:49 | 1 |
var m,n:word; i:word; begin readln(m,n); for i:=1 to n do begin write(i,' '); end; writeln; for i:=1 to m do begin write(i*n+1,' '); end; end. What test is wrong with it? Edited by author 07.07.2016 17:05 |
| WA2 with re | Alexandr Vasilyev | 1074. Very Short Problem | 7 Jul 2016 16:25 | 1 |
import re fl = re.compile('[+-]?[1234567890]*\.[1234567890]*([Ee][+-]?[1234567890]+)?') lf = re.compile('[+-]?[1234567890]+([Ee][+-]?[1234567890]+)?') nums = [] while True: first = input() if first == '#': break nums.append((first, int(input()))) for num in nums: num0 = num[0] if not (re.fullmatch(fl, num0) or re.fullmatch(lf, num0)): print('Not a floating point number') continue try: e_pos = num0.index('e') exp = int(num0[e_pos + 1:]) num0 = num0[:e_pos] except: try: e_pos = num0.index('E') exp = int(num0[e_pos + 1:]) num0 = num0[:e_pos] except: exp = 0 pm = num0[0] if pm in ['+', '-']: num0 = num0[1:] else: pm = '+' if pm == '+': pm = '' if exp > 0: num0 += '0' * exp elif exp < 0: num0 = '0' * (-exp) + num0 try: dot_pos = num0.index('.') except: dot_pos = len(num) num0 += '.' new_dot_pos = dot_pos + exp num0 = num0[:dot_pos] + num0[dot_pos + 1:] num0 = num0[:new_dot_pos] + '.' + num0[new_dot_pos:] while num0.startswith('0'): num0 = num0[1:] if num0.startswith('.'): num0 = '0' + num0 num0 += '0' * num[1] num0 = num0[:num0.index('.') + num[1] + 1] if num0.endswith('.'): num0 = num0[:-1] print(num0) |
| AC | Alexandr Vasilyev | 1038. Spell Checker | 6 Jul 2016 16:44 | 1 |
AC Alexandr Vasilyev 6 Jul 2016 16:44 My program (with error, I know where it is, but I will not write about it): import sys text = sys.stdin.readlines() text = ''.join(text) for symbol in ',;:-\n': text = text.replace(symbol, ' ') text = text.replace('!', '.').replace('?', '.') import re text = ' '.join(text.split()) text = text.replace('. ', '.') text = '.'.join(text.split('.')) text = text.replace(' .', '.') count = 0 for sentence in text.split('.'): if sentence != '': if sentence[0].islower(): count += 1 for word in sentence.split(): for letter in word[1:]: if letter.isupper(): count += 1 print(count) Edited by author 06.07.2016 19:17 |
| WA#1 | Paradise | 1012. K-based Numbers. Version 2 | 5 Jul 2016 22:08 | 2 |
WA#1 Paradise 9 Nov 2011 02:24 I wrote 1009 and had AC, then I added long arifmetics, changing nothing and now I have WA#1. All test from 1009 are simmilar to 1012. What is test 1. Is it possible because of using stringstream out; out << k-1; mas[1] = out.str(); ? I did the same as you. Help us! |
| No subject | dimaa | 1083. Factorials!!! | 5 Jul 2016 21:04 | 1 |
Edited by author 05.07.2016 21:07 |
| wa8 give me some examples | IlushaMax | 2033. Devices | 5 Jul 2016 17:16 | 1 |
just need examples. I have no idea where is my mistake |
| Question on subject | Semm | 1498. Stroke at Full Speed | 5 Jul 2016 17:04 | 2 |
Can the knight run back and forward on the segment? Does it count as run up? Example: The monster is at (1,3), the knight is at (1,1) If the knight does (1,1) -> (1,2) -> (1,1) -> (1,2) -> Strike the strike force is 4 or 2? Thanks in advance |
| If you WA#1 | SerailHydra | 1018. Binary Apple Tree | 5 Jul 2016 13:09 | 5 |
If your algo is correct, then maybe the problem is the way you build the tree. Try this test: 5 2 3 1 1 4 1 10 2 3 20 3 5 20 Hope this test can help you. |
| test 6, rejudge, C# | kasarino | 1249. Ancient Necropolis | 5 Jul 2016 09:20 | 1 |
GC.Collect(); on each iteration has helped |
| No subject | Arseniy | 1249. Ancient Necropolis | 5 Jul 2016 08:15 | 2 |
why my O(N * M) solution works for 2.65 seconds? I think 9 * 10^6 operstions should be done faster... Because reading 3000 x 3000 integers takes a lot of time. |