| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Some Test Cases | Aditya Singh | 1998. Старый падаван | 17 сен 2018 12:24 | 1 |
1 4 1 1 1 2 3 4 Ans 5 6 5 50 1 4 6 6 2 5 2 5 10 14 15 Ans 21 6 5 4 1 4 6 6 2 5 2 5 10 14 15 Ans 13 9 5 4 2 4 2 5 3 1 7 2 3 5 6 9 10 14 Ans 22 |
| this problem is too easy | \guiwnv`~ | 2076. Васиана | 17 сен 2018 11:02 | 1 |
just use dijkstra and that's all |
| unable to go below 1sec and 10MB | Irakli Khomeriki | 1198. Коррупция | 16 сен 2018 17:31 | 1 |
can anyone please share solution that works under 1 sec and under 10MB, I would really appreaciate it. my email is: ikhomeriki@gmail.com |
| wa 17 | index | 1748. Самое сложное число | 14 сен 2018 22:06 | 1 |
wa 17 index 14 сен 2018 22:06 had wa on test 17, changed long long to long double and calculated everything until 1e20 and got accepted. |
| Wr.Answ 3 | dickbooster | 1787. Поворот на МЕГУ | 14 сен 2018 20:33 | 3 |
wtf? what`s wrong? program asd; var n,k,i:byte; r:word; a:array[1..100] of byte; BEGIN r:=0; ReadLn(k,n); for i:=1 to n do begin Read(a[i]); if (r+a[i]-k)>=0 then r:=r+a[i]-k else r:=0; end; WriteLn(r); END. Hi array must be [1..101] because you need to put the latest integer into this cell |
| Test 3 WRONG | Fspace | 1787. Поворот на МЕГУ | 14 сен 2018 20:33 | 8 |
#include <iostream> using namespace std; int main() { int k,n,l=1; int r=0; int* a = new int[1]; cin >> k >> n; cin >> a[0]; for(int i=1;cin >> a[i];i++) l+=1; for(int i=0;i<n;i++){ if(i<l) r+=a[i]; r-=k; if(r<0) r=0; } cout << r << endl; system("pause"); return 0; } Что не так? Edited by author 06.11.2013 23:12 int* a = new int[1]; LOLWUT? This is a dynamic array. The number in [] has no importance. An array is okay Edited by author 06.11.2013 23:14 All right. Thanks for the information. But I find it hard to understand how I should use it in the program. Please correct my code .. In this case, just don't use pointers. You can declare an array using following syntax: Typename variableName[ arraySize ]; Exapmle: int array[ 100 ]; In this example, an array of 100 int elements will be created. I suppose, that most of problems from archive can be solved without using dynamic memory allocation. Edited by author 07.11.2013 12:30 |
| Why wrong answer? Test #3. | anar | 1787. Поворот на МЕГУ | 14 сен 2018 20:32 | 3 |
#include <iostream> using namespace std; int main() { int k,n,s,i,g,r; cin>>k; s=0; cin>>n; int *a=new int[n]; for (i=0;i<n;i++){ cin>>a[i]; s=a[i]+s; }; g=s-(n*k); cout<<g; return 0; } consider this situation: when the number of the remaining cars until the current moment is less than k. for example 5 3 3 6 5 the result is 1 not 0 |
| What problem? Test 3 | Garfield | 1787. Поворот на МЕГУ | 14 сен 2018 20:31 | 2 |
#include<iostream> using namespace std; int main() { int k, n, a[1010], A, sklad; cin >> k >> n; if ((1 <= k && k <= 100) && (1 <= n && n <= 100)) { for (int b = 0; b < n; b++) { cin >> a[b]; } sklad = 0; for (int c = 0; c < n; c++) { A = k - (a[c] + sklad); if (A < 0) { sklad = -A; } else sklad = 0; } if (A < 0) { cout << -A; } else cout << A; } return 0; } |
| If you get WA #5 (and hints for the question | Myrcella | 1040. Авиакомпания | 13 сен 2018 17:33 | 1 |
I think of "N<=50" as "N,M<=50". Actually M<=N*(N-1)/2. It's a stupid mistake but it took me so much time to check out TAT (btw, the point to solve the question is GCD(x,x+1)=1, it can be proved that the answer is always "YES". |
| WA12 | fuadbinakhter | 2001. Математики и ягоды | 12 сен 2018 23:08 | 1 |
WA12 fuadbinakhter 12 сен 2018 23:08 What's in Test case 12? Edited by author 12.09.2018 23:08 |
| Test 4 Wrong answer | Groote | 1258. Бильярд | 12 сен 2018 10:00 | 1 |
Please Help. Is it possible to know the contents of test 4 Fyodor Menshiko, what means "Contains empty sequence."? Edited by author 12.09.2018 10:02 |
| Nice prob. Some tests here :) | BdE | 1380. Остаповские шахматы | 12 сен 2018 00:22 | 2 |
In: 0 0 0 4 0 0 -4 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 6 1 0 0 0 0 0 0 Passing all this tests will probably gives you AC, of course, if you don't make any dumb mistakes like i did :) GL. nwm BdE 12 сен 2018 00:22 Edited by author 13.09.2018 14:03 Edited by author 13.09.2018 14:03 |
| Wrong Answer on test #4, C | Regret | 1020. Ниточка | 11 сен 2018 16:28 | 2 |
#include <stdio.h> #include <math.h> #define M_PI 3.14159 int main() { int N; float R, result = 0; scanf("%d", &N); scanf("%f", &R); if (N == 1) { result = 2 * R * M_PI; } else { float nails[N][2];
for (int i = 0; i < N; i++) { for (int j = 0; j < 2; j++) { scanf("%f", &nails[i][j]); } }
for (int i = 1; i <= N; i++) { result += sqrt((nails[i][0] - nails[i - 1][0]) * (nails[i][0] - nails[i - 1][0]) + (nails[i][1] - nails[i - 1][1]) * (nails[i][1] - nails[i - 1][1])); }
result += (M_PI * 2 * R);
} printf("%.2f", result); return 0; } Edited by author 11.09.2018 16:32 |
| TEST 3 | Prodip Datta | 1542. Автодополнение | 11 сен 2018 15:52 | 1 |
TEST 3 Prodip Datta 11 сен 2018 15:52 WA On TEST#3 .. any help plz ??? Edited by author 11.09.2018 15:53 Edited by author 11.09.2018 15:53 |
| this problem should really have lower complexity | imaginary friend | 2091. Естественный отбор | 11 сен 2018 05:11 | 1 |
it's just about implementation, the complexity is too high for these problem, imho |
| Some hint | Adilbek_ | 1671. Паутина Ананси | 11 сен 2018 04:16 | 2 |
|
| What can it be on the 4-th test? | Soul Reaver | 1203. Научная конференция | 9 сен 2018 17:28 | 5 |
5 1 8 2 3 4 5 6 7 9 10 Answer: 4. I have answer 4 on this test! Why WA? Try this: 3 1 5 2 5 3 5 Answer: 1 Check when completion time is equal,then sort it in increasing order of arrival time |
| Accepted using incorrect Ford-Bellman with queue | adamant | 1871. Сейсмические волны | 9 сен 2018 01:04 | 1 |
In submission #8011723 I allocate queue of size only n, while for correct Ford-Bellman with a queue it should be up top m. Please, take a look into issue. |
| C++ Help!!! | Владимир | 1785. Трудности локализации | 8 сен 2018 20:15 | 2 |
Я не понимаю, что здесь не правильного??? #include <iostream> #include <string> using namespace std; int main() { string name[] = { "few", "several", "pack", "lots", "horde", "throng", "swarm", "zounds", "legion" }; int input; cin >> input; if (input >=1 && input <= 4) cout << name[0]; if (input > 4 && input <= 9) cout << name[1]; if (input > 9 && input <= 19) cout << name[2]; if (input > 19 && input <= 49) cout << name[3]; if (input > 49 && input <= 99) cout << name[4]; if (input > 99 && input <= 249) cout << name[5]; if (input > 249 && input <= 499) cout << name[6]; if (input > 499 && input <= 999) cout << name[7]; if (input > 1000) cout << name[8]; return 0; } Подскажите, пожалуйста! у тебя случай n=1000 никуда не включен. you forgot n=1000 case. |
| Some facts about the test | Myrcella | 1034. Ферзи в мирной позиции | 6 сен 2018 19:57 | 1 |
All the X of the input are difference. (Maybe Y are different too. I haven't tried That means, the following test won't exist: ----- 4 1 1 2 3 2 2 4 4 ----- This may be important for you to solve this question more easily (at least for me, my code won't work that situation and get AC in 0.031s though) Good luck! |