| Show all threads Hide all threads Show all messages Hide all messages |
| Suggestion: this problem should be removed from the problem set due to its extremely poor statements. | So Sui Ming | 1194. Handshakes | 9 Jan 2024 10:22 | 1 |
|
| How can the program recognize when there aren´t more inputs (python3)? | HUC_EDDIE | 1001. Reverse Root | 9 Jan 2024 02:50 | 2 |
How can the program recognize when there aren´t more inputs if use python3 ? my program: nums = [int(x) for x in input().split()] nums.reverse() for num in nums: print('{:.4f}'.format(num ** 0.5)) What's wrong? anyone can tell me ,pls Edited by author 29.11.2023 07:42 Edited by author 29.11.2023 07:43 The answer to your question is in the FAQ, page How to write Python solutions. |
| Hint | So Sui Ming | 1820. Ural Steaks | 8 Jan 2024 19:29 | 1 |
Hint So Sui Ming 8 Jan 2024 19:29 Consider 2 cases: (1) K >= N (2) K < N and fry one side of each steak first. Try cases like: N=7,K=1; N=7,K=2; up to N=7,K=6 and find the pattern. |
| WA5 | andreyDagger`~ | 1357. Teakettle 1.0 for Dummies | 5 Jan 2024 22:54 | 1 |
WA5 andreyDagger`~ 5 Jan 2024 22:54 This is invalid test, but anyway 10 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 Answer: 00:13:58 00:13:58 00:13:58 00:13:58 00:13:58 00:27:56 00:27:56 00:27:56 00:27:56 00:27:56 |
| WHY WA#2 | MrFazer | 1086. Cryptography | 5 Jan 2024 12:00 | 2 |
#include "bits/stdc++.h" #define int long long using namespace std; vector<int> eratosfen() { int n = 168841; vector<bool> res(n + 1, false); for (int i = 2; i <= n; ++i) { if (!res[i]) { for (int j = i * i; j < n; j += i) { res[j] = true; } } } vector<int> res2; for (int i = 2; i < res.size(); ++i) { if (!res[i]) { res2.push_back(i); } } return res2; } signed main() { int t; cin >> t; vector<int> a = eratosfen(); while (t--) { int n; cin >> n; if (n == 1) { cout << 2; continue; } cout << a[n - 1] << endl; } } you should count the eratosphen for a larger n in your function |
| hint | So Sui Ming | 1917. Titan Ruins: Deadly Accuracy | 5 Jan 2024 09:38 | 1 |
hint So Sui Ming 5 Jan 2024 09:38 Use cumulative count of sorted values. int64_t is not needed (e.g.WA3). |
| Any plan to support c++ 20? | HUECTRUM | | 3 Jan 2024 20:45 | 1 |
|
| What is test 4 ? | So Sui Ming | 1980. Road to Investor | 31 Dec 2023 19:21 | 1 |
I have done bs on overspeeding with upper bound of 1e12 and EPS of 1e-9. Any idea? Regards So Sui Ming |
| WA #8 | Maxim | 1379. Cups Transportation | 30 Dec 2023 20:03 | 1 |
WA #8 Maxim 30 Dec 2023 20:03 Can you send to me some test????????)) |
| What is T3, Im only WA3 | coder | 1857. Alice and Bandersnatch | 30 Dec 2023 14:02 | 4 |
my idea: sum( (-1)^m * a^(n/(p[k1]*p[k2]*..*p[km] ) ) ), where p[i] - is prime number and n % p[i] == 0. also WA(4) why? 1. Q[k]-number for which k- minimal period 2 Q[k]=a^k-sum(Q[i],i<k k%i==0) 3. answer =Q[n]/n AC has. Big numbers rules from Test4. Learhed Python and taken Ac quickly Much more comfortable than java Edited by author 12.02.2018 11:13 There are __int128 and libquadmath with __float128 in GCC/clang. I sure there are problems, where these are sufficient to get AC. What do you think? [svr] solution (double for by K and I) with optimized long arithmetic by 10^9 base (9 digits packed in one int) in C++ can pass only by compiler choosing (got TLE 49 on Visual Studio and only g++ got AC), but solution uses 0.375 time and 63 Mb of memory - i.e. it is almost NOT a solution :)) So I can't imagine how to pass this on Python, which MUST be too slower than C++. Edited by author 30.12.2023 14:03 |
| WA31 | andreyDagger`~ | 1835. Swamp Doctor | 26 Dec 2023 15:13 | 1 |
WA31 andreyDagger`~ 26 Dec 2023 15:13 Domain and name must consist only of LOWERCASE letters and dots |
| Hint for WA2 | Yury_Semenov | 1858. Magic Cube | 26 Dec 2023 15:10 | 1 |
The length of each crystal's side is L, not one. |
| 274 байт))) | kostan3 | 1785. Lost in Localization | 26 Dec 2023 12:03 | 2 |
4 строки 274 байта кто короче? |
| There is a solution in one line! | Alex_m_ | 1785. Lost in Localization | 25 Dec 2023 21:40 | 1 |
Unfortunately, I can't write the Python solution due to the rules, but it exists! Try to find it! |
| Some tests | Yury_Semenov | 1733. Forgotten Technology | 23 Dec 2023 21:00 | 1 |
input: -2 -2 2 -2 2 2 -2 2 0 2 1 0 -3 output: 7.236067977 input: 1 0 0 1 -1 0 0 -1 0 0 1 2 -1 output: 1.236067977 |
| clarifying problem | So Sui Ming | 1885. Passenger Comfort | 18 Dec 2023 09:55 | 1 |
... airplane must climb to an altitude of h meters during the first t seconds of the flight ... Can time be less than t when height h is attained ? Edited by author 18.12.2023 11:15 Edited by author 18.12.2023 11:15 |
| Test4 | Stepan Vakhrushev | 1884. Way to the University | 16 Dec 2023 22:40 | 2 |
Test4 Stepan Vakhrushev 19 Oct 2017 22:08 |
| hint: prefix sum | So Sui Ming | 1869. New Year Cruise | 16 Dec 2023 18:54 | 1 |
1 2 3 1->2:180 180 -180 1->3:180 180 -180 2->3:180 180 -180 overall: 360 0 -360 prefix sum: 360 360 0 hence max from 1 to 3 is 360 do this similarly from 3 to 1 |
| explanation of given test | So Sui Ming | 1457. Heating Main | 12 Dec 2023 12:09 | 1 |
f(x) = (x-7)^2 + (x-4)^2 + (x-5)^2 Find x such that f(x) (cost function) is a minimum. df/dx = 2(x-7) + 2(x-4) + 2(x-5) = 0 3x = 7+4+5 x = (7+4+5)/3 The biggest hurdle is the problem statement itself! |
| WA46 | __Andrewy__ | 2171. Two Progressions 2 | 11 Dec 2023 23:29 | 1 |
WA46 __Andrewy__ 11 Dec 2023 23:29 i think my algo is right but i have problem with overflow in C++. who can give me good test? PS: on Pypy i have TL50 using the same algo( And it's very strange because on test 1000000000 18 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 my algo works <300ms PS: AC in C++ after many hacking with overflow. I hate this problem because spent a lot of time to fix problem with arighmetic (not algo) Edited by author 12.12.2023 00:41 |