Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Ac Pythoh !!! | eremeev.me.2012@gmail.com | 2142. Магия | 8 мар 2024 18:56 | 1 |
a , b , c = list(map(int , input().split())) A , B , C = list(map(int , input().split())) if a+c >= A: if a >= A: c =c a-=A else: c=A-a a-=A-c if b+c >= B: if b >= B: c =c b-=B else: c=B-b a-=A-c if a + b + c >= C: print('It is a kind of magic') else: print('There are no miracles in life') else: print('There are no miracles in life') else: print('There are no miracles in life') |
wa 24 | Raphael Osipov | 2142. Магия | 29 июн 2023 02:05 | 1 |
wa 24 Raphael Osipov 29 июн 2023 02:05 1000000000 1000000000 1000000000 0 0 0 answer: It is a kind of magic |
Problem description is terrible. | silverfox | 2142. Магия | 8 май 2022 10:03 | 1 |
clarification if you are stuck. RedBlue Mana can be made from red or blue i.e C can use (remA + remB) after using A and B through X and Y respectively. Do count what you use from C when required. |
why difficulty is 121? | Anton | 2142. Магия | 13 янв 2022 00:08 | 2 |
I dont understand why difficulty is 121, i think it's easy problem Not everyone is as super smart as you are, Anton. Us plebeians can barely walk upright, much less understand Western Arabic numerals. Congrats on your good fortune! |
wa 3 | Simen | 2142. Магия | 20 июл 2021 13:56 | 3 |
wa 3 Simen 30 ноя 2019 23:25 whats problem on test 3?? что за проблема на 3 тесте?? Yep Why my code get WA3? #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <cstring> #include <set> #include <map> #include <cmath> #include <algorithm> using namespace std; #define ll long long const ll nmax = 100005; const ll inf = 1234567890123; ll A, B, C; ll X, Y, Z; int main() { cin>>A>>B>>C; cin>>X>>Y>>Z;
if(Z > C) cout<<"There are no miracles in life"; else { ll ess = (ll)0; if(X > A) ess += X - A; if(Y > B) ess += Y - B; if(C - Z >= ess) cout<<"It is a kind of magic"; else cout<<"There are no miracles in life"; }
return 0; } or more simple #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <cstring> #include <set> #include <map> #include <cmath> #include <algorithm> using namespace std; #define ll long long const ll nmax = 100005; const ll inf = 1234567890123; ll A, B, C; ll X, Y, Z; int main() { cin>>A>>B>>C; cin>>X>>Y>>Z;
if(X > A) C -= (X - A); if(Y > B) C -= (Y - B); if(Z <= C) cout<<"It is a kind of magic"; else cout<<"There are no miracles in life";
return 0; } |
Wrong Answer at Test Case #12 | Zhang Fei | 2142. Магия | 11 сен 2020 20:41 | 1 |
It's never endless fixing |
Wrong Answer at Test Case #10 | Zhang Fei | 2142. Магия | 11 сен 2020 19:32 | 1 |
Ok I understand now...It means in blue-red land you can either grab mana from blue or red. Edited by author 11.09.2020 20:18 Edited by author 12.09.2020 17:07 Edited by author 12.09.2020 17:08 |
Weak tests | SendThemToHell | 2142. Магия | 21 авг 2020 00:48 | 1 |
My AC code gives "No" on the following testcase due to the overflow 1000000000 1000000000 1000000000 0 0 0 |
getting wa 5. Please suggest some test cases | anupam ghosh | 2142. Магия | 9 янв 2020 13:15 | 3 |
5 6 0 6 5 0 There are no miracles in life 6 5 0 5 6 0 There are no miracles in life 3 6 2 6 5 1 There are no miracles in life 4 6 2 6 5 1 It is a kind of magic |
I don't understand the problem | __Andrewy__ | 2142. Магия | 4 дек 2019 17:16 | 1 |
I this problem you can choice X+Z, Y or X, Y+Z if you have A, B, C Edited by author 05.12.2019 20:58 |