| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| For people who have WA 6 | Komron | 1012. K-ичные числа. Версия 2 | 23 фев 2024 17:43 | 4 |
First i tried to solve this problem using int64 (long long) , i got WA6. Then i used long number theory to solve this problem and i got AC!) Good luck! what's that "long number theory" ? i think we need to switch to python. Yeah! Just use Python and it will be accepted! I think it's time to start to learn Java, just some simple things(like input and output) and BigInt. It could probably help me in those long arithmetics case. |
| hint | So Sui Ming | 1692. Флаги провинций | 23 фев 2024 08:03 | 1 |
hint So Sui Ming 23 фев 2024 08:03 Problem can be reduced to edges in complete graph: Given no. of edges, what is the max no. of vertices in a complete graph? |
| WA on test 1, am I misunderstanding the output format? | sweepea | 1110. Степень | 20 фев 2024 17:27 | 1 |
del Edited by author 20.02.2024 17:47 |
| Самая тупая задача | andreyDagger`~ | 1824. Ифрит-бомбардировки | 20 фев 2024 03:20 | 1 |
Я просто накидал кучу каких-то непонятных оптимизаций, и оно почему-то зашло |
| problem 1001 c++ | Vasilisa | 1001. Обратный корень | 18 фев 2024 11:36 | 1 |
//please tell me what's wrong, cause i cant understand... #include <bits/stdc++.h> #include<fstream> #define all(a) (a).begin(), (a).end() #define ll long long #define sz size #define dbl double #define vll vector <ll> #define INF LLONG_MAX #define uniq(x) x.resize(unique(begin(x),end(x))-begin(x)) #define forik(i,m,n) for(ll i=m;i<n;++i) #define re return using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(); vll numbers; ll num; while (cin >> num) { numbers.push_back(num); } for (ll i = numbers.size() - 1; i >= 0; i--) { dbl nek = sqrt(numbers[i]); cout << fixed << setprecision(4) << nek << endl; } re 0; } |
| I don't know what is wrong with my code, could I use stack here? | JK Love | 1001. Обратный корень | 16 фев 2024 11:59 | 2 |
#include <iostream> #include <stack> #include <cmath> using namespace std; int main() { stack<double> root; double input;
while(cin >> input) { root.push(sqrt(input)); }
while(!root.empty()) { cout << root.top() << endl; root.pop(); }
return 0; } Here your first input while is going infinnity. You have to stop it. |
| Tests | Kairom `Ekexity 💻 | 1348. Пусти козла в огород 2 | 16 фев 2024 02:29 | 2 |
Tests Kairom `Ekexity 💻 24 май 2016 22:57 435 981 301 -384 -1 345 0 Correct answer: 371.78 789.08 thanks for the test found a mistake ( ˘ ³˘)♥︎ |
| Yes Accepted 0.078s | Shen Yang | 1999. Секретный модуль | 14 фев 2024 16:16 | 10 |
worked at least two months.... I think it is a hard problem,harder than some rating>1e4 problems... How did you get the skill to solve such a hard problems? I know generic patterns to effective skill training Interested in particular case Edited by author 08.11.2017 21:17 Just stop solving easy problems,and trying harder one.. I start solving hard problems since year 2010 practicing at http://poj.org solving AC<100 problems and at year 2013 I start solving topcoder Div I 1000pts.. later I found codeforces and start solve fewest AC problems.. There are also some Chinese oj hardest problems is very hard such like http://www.lydsy.com/JudgeOnline/ http://uoj.ac/ Yeah, solving hard is very helpful, I felt it At some point I noticed that I am just not able to solve some harder problem Because it takes very much time to solve So even if trying whole day then cannot solve Maybe whole week is enough But very rarely have an opportunity to solve a problem the whole week Typical have only three hours per day But it's at cost of sacrificing important things So I feel like I cannot improve further Yeah, solving hard is very helpful, I felt it At some point I noticed that I am just not able to solve some harder problem Because it takes very much time to solve So even if trying whole day then cannot solve Maybe whole week is enough But very rarely have an opportunity to solve a problem the whole week Typical have only three hours per day But it's at cost of sacrificing important things So I feel like I cannot improve further you can choose some easier than hardest problems but harder than medium problems if you don't have enough time to practice On spoj.com I have lot of tasks in my TODO list... Why do you consider it a hard problem? It felt quite straightforward to me Timus has very few constructive problems (at least with difficulty >= 2000), so this problem may seem hard compared to others if constructive problems are not your strong point |
| How to test | Yury_Semenov | 1999. Секретный модуль | 14 фев 2024 16:13 | 1 |
Bruteforce all short numbers (i. e. length <= 3) and feed them to both input and output automata, then compare. Here are some useful tests: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 0 1 0 1 3 3 3 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 8 3 0 1 0 1 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 |
| How to get AC on C++ | LeTim | 1306. Медиана последовательности | 13 фев 2024 14:44 | 1 |
1. Use scanf/printf instead of cin/cout 2. Use make_heap, push_heap and pop_heap instead of priority_queue 3. Use C-style array instead of vector 4. Do not allocate n elements for an array |
| its working in codeblocks so whats wrong?? | afia | 1068. Сумма | 1 фев 2024 21:33 | 1 |
#include<stdio.h> int main() { int i,n,sum; scanf("%d",&n); if(n>0) { for (i=1;i<=n;i++) { sum=sum+i; } printf("%d",sum); } if(n<0) { for (i=n;i<=1;i++) { sum=sum+i;} printf("%d",sum);} else if(n==0){ printf("not applicable");} } |
| Test #5 / Тест 5 ошибка - решение | Danil Morozov | 1192. Мячик во сне | 31 янв 2024 16:52 | 1 |
If you are getting an error on test 5 then use double instead of float. Если у вас ошибка при 5ом тесте, используйте переменные double вместо float. |
| WA 3 | Raphael Osipov | 1127. Кубики | 31 янв 2024 14:45 | 1 |
WA 3 Raphael Osipov 31 янв 2024 14:45 |
| WA 7 | Catalin Cocis | 1232. Посадка на астероид | 27 янв 2024 15:52 | 2 |
WA 7 Catalin Cocis 23 апр 2010 23:34 I had WA7 when I computed maximal rotation angle incorrectly. |
| WA2 | Yury_Semenov | 1473. Ферма 2 | 25 янв 2024 12:48 | 1 |
WA2 Yury_Semenov 25 янв 2024 12:48 |
| What is test#3 | bilibilitdasc | 1655. Сомалийские пираты | 24 янв 2024 13:13 | 2 |
I kept getting wrong answer in test#3. What should I do? |
| I think this problem really needs a clearer statement and an explanation of the sample | 337446ZX | 1267. Екатеринбургское метро | 24 янв 2024 09:01 | 3 |
I will post one if I solve it. There are n subway stations on a subway line, numbered from 1 to n. The distance between the ith station and the i+1th station is s_i, which means the train need s_i minutes to drive from the ith station to the i+1th. There are trains driving from 1 to n and trains driving from station n to station 1. The trains driving from station 1 to station n departs every d minutes at station 1 and the first one of that departs at d1 minutes. Similarly, The trains driving from station n to station 1 departs every d minutes too at station n and the first one of that departs at dn minutes. However, in this problem the trains are considered not to stay at any station, just drive past A vistor is going to visit every station. He starts from station t. To visit a station, he has to take a train and get off at that station. It takes him 1 minutes to visit a staion, so that he cannot take the train he get off just now. The station t is considered visited. After all visits he need to return to station t. You are going to make a plan for him so that the time cost is minimized. The time cost is calculated as (the time he has visited all stations and gets off a train to station t - the time he departs--getting on a train at station t (can be any train)). Output such time in minutes. Input n s_1 s_2 ... s_(n-1) t d d1 dn Edited by author 24.01.2024 09:02 Explanation of the sample: One possible solution. Take the train to n at 5 and get of to station 3 at 12. Then take the train to 1 at 13 and get of to station 1 at 25. Then take the train to n at 28 and get of to station 2 at 33. It costs 33-5=28 Edited by author 24.01.2024 09:05 |
| WA4 | andreyDagger`~ | 2173. Мета-условие 3 | 24 янв 2024 08:03 | 2 |
WA4 andreyDagger`~ 28 июл 2023 21:08 Pay attention to: "wants to see the name of their company in the exactly s_i DIFFERENT problem statements" |
| WA25 | anotherworld | 1286. Космолёт марки ВАЗ | 15 янв 2024 14:03 | 1 |
WA25 anotherworld 15 янв 2024 14:03 |
| WA10 | andreyDagger`~ | 2079. Утечки памяти | 15 янв 2024 00:50 | 1 |
WA10 andreyDagger`~ 15 янв 2024 00:50 |