| Show all threads Hide all threads Show all messages Hide all messages |
| Test Cases Here :-) | Varun Sharma | 1049. Brave Balloonists | 22 Feb 2023 12:09 | 8 |
10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 Ans:- 1681 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 Ans:- 1271 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Ans:- 12870 You are very stupid!!! 0<ans<9 Don't repeat my mistake and remember that you must calculate prime numbers up to 10000 (not to 100!). Maybe this test will help you: 9797 1 1 1 1 1 1 1 1 1 Answer = 4 (9797 = 97 * 101) Sorry for my English :) Edited by author 04.04.2010 19:55 oh!!! thank you very much, i just calculate to sqrt(10000)... if you have WA in test4, you can try this. oh!!! thank you very much, i just calculate to sqrt(10000)... if you have WA in test4, you can try this. I just got accepted. It is enough to calc prime nums up to Num div 2. Because if Num not divided on any prime <= than Num div 2 then Num itself is a prime num. Edited by author 22.02.2023 12:10ilyas: Please don't call people stupid. Everyone makes mistakes; the author simply forgot to calculate modulo 10. Thanks for tests, I join. Input: 1 1 1 1 1 1 1 1 1 1 Output: 1 Input: 43 5 49 2 3 5 3 4 5 5 Output: 0 Input: 10000 10000 12 10000 10000 10000 13 10000 10000 29 Output: 2 Input: 99 101 102 103 104 105 106 107 108 109 Output: 6 My program passes all these test cases... Still I am getting wrong answer at 6th test. |
| This problem is pretty easy. Here is the test which helped me with WA 4 | Конобейцев Иван Олегович | 1904. The Lessons of the Past | 21 Feb 2023 17:13 | 1 |
|
| Give me some tests, please | Oshchepkov Dmitriy | 1135. Recruits | 21 Feb 2023 01:47 | 1 |
I have WA in test 13 Edited by author 21.02.2023 01:48 |
| WA27 | Ade [FDU] | 1340. Cucaracha | 19 Feb 2023 16:08 | 3 |
WA27 Ade [FDU] 6 Dec 2014 21:54 Anybody else? I guess it's the epsilon. But I failed all trial. test 27: x==kx &&y==ky good luck... After so many years, I tried my WA#27 code again. with G++ 9.2 x64 or Visual C++ 2019 x64, the same code got AC. Compilers!!! |
| What's the loser's purpose? | Ade | 1397. Points Game | 19 Feb 2023 13:59 | 1 |
I got a question about the problem description. In other games, the losers hope to last the game longer for as many turns/rounds/moves as possible. In this game, is the losers' optimal move to (1) to minimize the difference, (2) to maximize theirselves' scores, or (3) to minimize the opponents' scores? Or are the 3 goals lead to the same move? Thanks. |
| Statement | Igor Parfenov | 1268. Little Chu | 18 Feb 2023 01:48 | 1 |
"Your task is to make the largest number of the Great Discoveries and maximally to delay the doomsday." Notice, that we are not only maximazing the period, but also the k^period. So we have to find strictly maximal "generator"/"primitive"/"первообразная"/"образующая". There can be problem with understanding the way of minimizing these values. But as period it divisor of (mod - 1), and there are many generator, and they are quite uniformly distributed, probably k^(mod - 1) will always be better, than some p^((mod - 1) / q), where p > k. |
| PLS, WHAT DID I DO WRONG, WA #8 | Steffie | 2056. Scholarship | 16 Feb 2023 21:10 | 1 |
#include<iostream> #include<iomanip> #include<bits/stdc++.h> #include<string> using namespace std; int main(){ float n, k; int mark, a; a=0; k=0; cin >> n; for(int i=0; i<n; i++){ cin >> mark; a+=mark; } cout << fixed; cout << setprecision(1); k+=a/n; if(a%5==0 && mark>=5){ cout <<"Named" << endl; } else if(mark>3 && k>=4.5){ cout <<"High"<<endl; } else if(mark<=3){ cout <<"None" << endl; } else{ cout << "Common" << endl; } return 0; } |
| WA 7 | 107th | 1365. Testing Calculator | 14 Feb 2023 12:18 | 1 |
WA 7 107th 14 Feb 2023 12:18 For those who have WA on test 7, please try following one: 4/2*3+ |
| About a custom test case. | Meraj al Maksud | 1083. Factorials!!! | 12 Feb 2023 19:37 | 3 |
For n = 10 and k = 20, what should be the output? Well, obviously it's not 0! For this test case (n=10, k=20) answer is equal to 10. why? Can you please explain? |
| Solution | Apkawa | 1220. Stacks | 8 Feb 2023 08:01 | 2 |
I created every stack using pointers, but nodes in this stack saved data of ten last pushed elements, not of one last. So this is a stack of arrays and not the stack of single elements. Also I had an additional array of int[1000], that showed how many positions in last node of each stack is already used. Conclusion: you need to do such a struct of that has an array of ten elements and a pointer to previous node. On every push-call you should create another node(if previous is full) and add an element on the first open space of node, then increase the number of used positions. On every pop-call you should go to previous node and delete current node(if current node is empty) and print the last element of node, then decrease the number of used positions. Hope it'll help you. And I apologize for my poor english) Thank you!, now I got AC. =) |
| WA 1, :( | klimvetoshkin | 1493. One Step from Happiness | 5 Feb 2023 10:22 | 1 |
a = input() row = [] for i in a: row.append(i) for i in range(len(row)): row[i] = int(row[i]) suml = row[0] * 100 + row[1] * 10 + row[2] sumr = row[3] * 100 + row[4] * 10 + row[5] if suml - sumr == 1 or sumr - suml == 1: print('yes') else: print('no') |
| WA 4, why not? (python 3.8) | klimvetoshkin | 1925. British Scientists Save the World | 4 Feb 2023 11:30 | 1 |
n,k = map(int, input().split()) kol = 0 u = 1 for i in range(n): a, b = map(int, input().split()) if a - b == 2: kol += u else: u = 0 if kol == 0: print('Big Bang!') else: print(kol) |
| Increase the stack size in rust at runtime: | ixiolirion | 2132. Graph Decomposition. Version 2 | 4 Feb 2023 11:17 | 1 |
const STACK_SIZE: usize = 128 * 1024 * 1024; fn run() { //... } fn main() { let child = std::thread::Builder::new() .stack_size(STACK_SIZE) .spawn(run) .unwrap(); child.join().unwrap(); } |
| Data type | Igor Parfenov | 1276. Train | 2 Feb 2023 04:16 | 1 |
There were mentioned, that it is required 64-bit integer type. I also add, that it has to be unsigned, otherwise you get WA 8. |
| WA 39 | Steven | 1774. Barber of the Army of Mages | 1 Feb 2023 19:37 | 8 |
WA 39 Steven 5 Apr 2011 15:49 Can somebody give me anti-greedy tests so that a greedy solution will not give correct answer? A test like #39? I'm sure that greedy is the right solution, i cannot find counter-test for my solution. Re: WA 39 Milanka Halilovich 8 Apr 2011 15:50 I have same problem... Try: 3 1 1 6 3 2 2 4 Re: WA 39 Milanka Halilovich 8 Apr 2011 17:17 ..or.. 3 1 2 4 3 2 0 4 Edited by author 08.04.2011 17:18 I have same problem and my program works for this input (both R possible, correct me if I'm wrong) and I would appreciate if someone would suggest why program is not working and/or give me more tests like #39. Edited by author 24.04.2011 02:46 Same problem... Can somebody give us some tests? Try this: 5 2 0 3 3 2 3 2 0 2 0 5 This one is also nice: 4 2 0 3 1 2 2 2 1 4 Great thanks to @BSoD Edited by author 01.02.2023 19:37 Edited by author 01.02.2023 19:37 |
| Test 6 format | Igor Parfenov | 1248. Sequence Sum | 31 Jan 2023 04:38 | 1 |
Guess, why I had wasted 18 attempts? The exponent can have + sign: 1.3e+32 All bad wished to author. |
| wa5. Why? | Kutnyakov | 1005. Stone Pile | 28 Jan 2023 12:25 | 2 |
#include <iostream> #include<vector> #include<algorithm> using namespace std; int main() { int n, a, razn, k1 = 0, k2 = 0; cin >> n; vector<int>num; for (int i = 0; i < n; i++) { cin >> a; num.push_back(a); } sort(num.begin(), num.end()); int kol = 0; for (int i = 0; i < n - 1; i++) {//все камни кроме максимума kol += num[i]; } if (kol < num.back()) {//если все камни меньше самого максимального cout << num.back() - kol; } else if (kol == num.back()) {//если все камни pавны максимальному cout << 0; } else if (kol > num.back()) {//если все камни больше максимального k2 = num.back(); for(int i =n-2;i>=0;i--){ if (k1 < k2) { k1 += num[i]; } else if (k1 > k2) { k2 += num[i]; } else if (k1 == k2) { k1 = num[i]; k2 = 0; } } cout << abs(k1 - k2); } } //my program is fine solves any of my values. what is in test 5? здесь надо делать перебор битовыми масками Edited by author 28.01.2023 12:25 |
| WA 6, python 3.8, plz help me | klimvetoshkin | 1263. Elections | 28 Jan 2023 11:58 | 1 |
n, m = map(int, input().split()) a = [] b = [1] c = [] for i in range(m): f = int(input()) a.append(f) a = sorted(a) f = 0 for i in range(1, len(a)): if a[i] == a[i - 1]: b[f] += 1 elif a[i] != a[i - 1]: b.append(1) f += 1 for i in range(len(b)): b[i] = float(b[i] / m * 100) for i in range(len(b)): c.append('%.2f' % b[i] + '%') for i in range(n): try: print(c[i]) except: print('0.00%') |
| Post the answer in java plz | Shemakin | 1209. 1, 10, 100, 1000... | 25 Jan 2023 13:16 | 1 |
If my teacher is watching this post, sorry. |
| Advice for bruteforce | andreyDagger`~ | 1234. Bricks | 25 Jan 2023 01:47 | 1 |
Bruteforcing length gives WA, bruteforcing angle gives AC |