| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| bad tests? | Vit Demidenko | 2107. Oppa Funcan Style | 12 фев 2019 23:28 | 1 |
i have ac in 0.187 s, but on this test my program runs at least 0.9: 35 123 2 3 4 5 6 0 8 9 10 11 0 13 14 15 0 17 18 0 20 21 0 23 0 25 0 27 0 0 0 0 0 0 0 0 0 |
| WA#4 | Kot | 1881. Длинное условие задачи | 12 фев 2019 21:51 | 2 |
WA#4 Kot 30 янв 2016 21:12 I've got accepted after adding the condition of end of file in creating new line. May be, it will be useful. Edited by author 31.01.2016 15:50 Edited by author 31.01.2016 15:50 Re: WA#4 simpleCalculus 12 фев 2019 21:51 2 5 11 as fg asdf asdfr a qwer as s s qwer e Correct answer is 5 |
| AC in c++ | Yucheng | 1048. Сверхдлинные суммы | 12 фев 2019 20:34 | 1 |
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int k; cin>>k; vector<int> line1; vector<int> line2; vector<int> sum; while(k--){ int m,n; cin>>m>>n; line1.push_back(m); line2.push_back(n); } bool plus_1=false; for(int i=line1.size()-1;i>=0;i--){ int temp=line1[i]+line2[i]; if(plus_1){ temp++; } if(temp>=10){ plus_1=true; temp-=10; }else{ plus_1=false; } sum.push_back(temp);
} for(vector<int>::reverse_iterator iter=sum.rbegin();iter!=sum.rend();++iter){ cout<<*iter; } return 0; } |
| Maybe this will help you! | LmhQ_C | 1354. Палиндром. Он же палиндром | 12 фев 2019 19:14 | 5 |
I've been wa on this case for a long time: abaabaaba The right answer is abaabaabaaba Can anyone please suggest the test case which might give me WA35... I have used string , also tried with character array... and KMP algorithm ..... please do reply Edited by author 27.08.2018 13:31 Aren't 'abaabaaba' a palindrome? |
| WA2? | Sherxon | 1982. План электрификации | 12 фев 2019 17:57 | 2 |
WA2? Sherxon 26 ноя 2016 03:19 Can anybody please give me cases for Test2 ? Re: WA2? Manole Victor 12 фев 2019 17:57 If you only go through the matrix and saved the minimum value, it is not the solution for that problem. |
| TEST FOR WA4 | Dmitry Vaskin`~ | 1786. Биография Сандро | 12 фев 2019 14:54 | 1 |
|
| Transitive closure using std::bitset | Gilles Deleuze | 1487. Китайский футбол | 10 фев 2019 20:10 | 1 |
Really fast. for (int k = 0; k < n; ++k) { for (int i = graph[k]._Find_first(); i < n; i = graph[k]._Find_next(i)) { graph[k] |= graph[i]; } } |
| Why my algo is right? | __Andrewy__ | 1769. Старая уральская легенда | 9 фев 2019 17:21 | 2 |
I created array p[1..10000000] of boolean; p[i]=true when exist i in input. But i can t prove that if length of input <=100000 then absent numb <=10000000 because if you will write all numbers from 1 to 10000000. string length will be more than 10^5 |
| No subject | Sanchir | 1787. Поворот на МЕГУ | 8 фев 2019 11:03 | 1 |
Edited by author 11.02.2019 20:58 |
| Runtime error (access violation) #8 | Andor Vari-Kakas | 1042. Центральное отопление | 5 фев 2019 02:27 | 1 |
|
| It's interesting.. | John Doe | 1001. Обратный корень | 5 фев 2019 01:03 | 1 |
All compilers are succeed with this code. What's wrong? #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double buffer[128*1024]; unsigned long long number, n=0; while(cin >> number) { buffer[n]=pow(number,1.0/2.0); n++; } for (int i=n-1;i>=0;i--) { cout << fixed << setprecision(4) << buffer[i] << endl; } return 0; } |
| Not a word about input precision | Sirko | 1340. О друзьях человека | 1 фев 2019 23:07 | 1 |
So for this test: 0 0 90 5 0 -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 correct answer is 31.4159, right? Edited by author 01.02.2019 23:40 |
| VERY FUNNY STORY! | Shogal [Kaliningrad] | 1293. Эния | 31 янв 2019 17:20 | 12 |
It's very funny to read how I tried to solve: 1-st time I forgot to multiply answer by 2 :) 2-nd time I retyped code by forgot to set 'Pascal' (and it was compile error) 3-rd time I forgot 'begin' :) 4-th time I typed task correctly and it was accepted !!! So, programmers, DO NOT HURRY if you don't want to repeat my funny story :) Edited by author 10.09.2004 00:28 In Poland there is a proverb - "Pospiech jest zlym doradca" - "Hurry is a bad adviser" ;) In Russia we say: "Pospeshish - ludey nasmeshish" - "Making it harry you make people laugh at you". It happens simetimes with everyone. Specially, when current cotest is quite durty-solvable... Don't WORRY :).We forgot READLN in another problem... Do you have solution to problem#1407 Did you show a results of input? N=5; A=2; B=3; Answer should be 30 nanokg; i have read 60 kg. What is it?
the panels need processing of both sides. In Thailand, we say : "Slower, a better knife" Problem Election, my submission are 3 times because of the same story as you !! [ 1st - I forgot to print '%' after floating point ] [ 2nd - I put '%' but forgot to print '\n' ] [ 3rd - It was ACCEPTED !! ] In Persian we say "Ajale kare sheytoone" it means that "hurrying is the way of devil" Edited by author 31.10.2009 01:26 In bulgarian it is "Бързата работа срам за майстора" wicch means "Тhe fast work is a shame for the Master". In Vietnamese we say "Muốn nhanh thì phải từ từ" (which means "if you want to be fast, you must be slower") In russian we say "тише едешь, дальше будешь" (which means "if you go slower, you'll be further) same here.. Edited by author 11.12.2017 21:05 |
| WHY this sht has difficulty 81?!!! | mmd18cury | 1194. Рукопожатия | 31 янв 2019 04:21 | 1 |
the difficulty rangering here is absolutely uncorrect and unjust Edited by author 31.01.2019 04:21 |
| "Compiler failed" verdict with G++? | mouse_wireless2 | 1470. НЛО | 31 янв 2019 00:19 | 1 |
I used template programming to write 3D Fenwick tree and I get "Compiler failed" verdict when compiling with G++ (not "Compilation Error", but "Compiler failed"; no error message). The solution works fine and gets Accepted with Visual Studio and Clang. I assume it is because of the recursive template operations, but it works when I compile it locally with G++ (using the flags provided on help.aspx?topic=cpp). It also work on other online judges, such as codeforces, which also use mingw g++. Could I get some insight on this? I'm curious why this happens. |
| C++ AC | mmd18cury | 2035. Очередной пробный тур | 30 янв 2019 03:03 | 3 |
C++ AC mmd18cury 2 янв 2019 08:00 #include <iostream> using namespace std; int main() { long x, y, c, a, b, MIN, MAX; cin >> x >> y >> c; if (x + y < c) { cout << "Impossible"; return 0; } if (x >= c) cout << c << " " << 0; else if (y >= c) cout << 0 << " " << c; else{ if (x < y) cout << x << " " << c - x; else cout << c - y << " " << y ; } } Re: C++ AC Smilodon_am [Obninsk INPE] 2 янв 2019 12:33 Please, do not publish your accepted solution code on forum. You disable other people to put their mind on the task in such a manner. Please respect other possibility to solve a task on their own. I think that if people don't need an answer they will not watch it. But if they need to see it, an answer is very useful to them, they can find their mistakes and to learn one more variant of programming. Also I watched answers of other people but it absolutely doesn't mean I answered the same on that problems and haven't put my own mind on the tasks. Please, do not publish your accepted solution code on forum. You disable other people to put their mind on the task in such a manner. Please respect other possibility to solve a task on their own. Edited by author 30.01.2019 03:06 |
| what is my problem on c++? | nick nikuradze | 1910. Руины титанов: сокрытый вход | 29 янв 2019 02:16 | 2 |
This is my code. #include <iostream> #include <vector> using namespace std; int main() { int n,a,k=0; cin>>n; vector <int> v; vector <int> sum; vector <int> index; for(int i=0; i<n; i++) { cin>>a; v.push_back(a); } for(int i=1; i<n-1; i++) { sum.push_back(v[i-1]+v[i]+v[i+1]); index.push_back(i); } int max=sum[0]; for(int i=1; i<n; i++) { if(sum[i]>max) {max=sum[i]; k=i;} } cout<<max<<" "<<index[k]+1; system("pause"); return 0; } If you look carefully, you don't get n sums and indexes, but actually n-2 sums and indexes. |
| HINT | Michael Jordan | 1353. Миллиардная Функция Васи | 28 янв 2019 14:43 | 1 |
HINT Michael Jordan 28 янв 2019 14:43 just be patient while making precalculation :) |
| Я и Балл | SpamBot | 1639. Шоколад 2 | 28 янв 2019 02:47 | 1 |
Жеванный крот, одна халтура! Мало того что английский перевод кривой как рог барана, так ещё и проверяющая система хромает! Отправляем на проверку: Var s, s1: ansistring; a, b: byte; Begin readln(s, s1); val(s[length(s)], b); End. Получаем вполне обоснованный WA1. Теперь дополним: Var s, s1: ansistring; a, b: byte; Begin readln(s, s1); val(s[length(s)], b); val(s1[length(s1)], a); End. Всё, вселенная дрогнула: "Access violation"... *facepalm* И всё бы ничего, но подобное происходит уже где-то раз пятый (в разных задачах). И да, прочитать string целиком, а затем разрезать - выдаёт ту же ошибку AV: Var s, s1: ansistring; i, a, b: byte; Begin readln(s); for i:=1 to length(s) do if s[i]:=' ' then begin val(s[i-1], b); val(s[length(s)], a); break; end; End. Сделайте уже нормальный ввод!!!!1 |
| No subject | dgdfgfdg | | 27 янв 2019 16:11 | 1 |
Edited by author 01.02.2020 21:32 |