Show all threads Hide all threads Show all messages Hide all messages |
Пример не поддается никакой логике! И описание задачи! | Альфия | 2001. Mathematicians and Berries | 22 Sep 2024 01:18 | 1 |
если второй пересыпает первому, то у первого должно быть больше, а не наоборот! А если это a1 и b1, соответственно, то это и есть ответ! Потому что a1 и b1 это изначальные мерки, до пересыпаний, в задаче так описано Edited by author 22.09.2024 01:35 Edited by author 22.09.2024 01:36 Edited by author 22.09.2024 01:36 Edited by author 22.09.2024 01:37 |
.No subject | Bucur Cosmin | 2001. Mathematicians and Berries | 17 Oct 2022 09:47 | 1 |
Edited by author 17.10.2022 09:55 Edited by author 17.10.2022 09:55 |
c# RuntimeError | Karol | 2001. Mathematicians and Berries | 10 Jan 2022 07:33 | 1 |
Why i get RuntimeError? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Diagnostics; using System.Globalization; namespace AlgorytmyInternetowe { public class Program { public static void Main(string[] args) { //string[] tmp = Console.In.ReadToEnd().Split(new char[] { ' ' }); string[] tmp = Console.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Console.Write(int.Parse(tmp[0])-int.Parse(tmp[4])+" "+ (int.Parse(tmp[1]) - int.Parse(tmp[3]))); } } } |
С++ solution | VlasovNikita | 2001. Mathematicians and Berries | 8 Oct 2021 21:42 | 2 |
#include <iostream> using namespace std; main() { int a, b ; int a1 , b1; int a2 , b2; cin >> a >> b; cin >> a1 >> b1; cin >> a2 >> b2;
int c = b - b1; int c1 = a - a2; cout << c1 << " " << c; return 0; } ____________________________________ Держите) Не правильно #include <iostream> using namespace std; main() { int a, b ; int a1 , b1; int a2 , b2; cin >> a >> b; cin >> a1 >> b1; cin >> a2 >> b2;
int c = b - b1; int c1 = a - a2; cout << c1 << " " << c; return 0; } ____________________________________ Держите) |
Java runtime error - SOLVED | IFrank | 2001. Mathematicians and Berries | 7 Dec 2018 13:58 | 3 |
In Idea my code works, but here is a runtime error: import java.util.Scanner; public class MathematiciansAndBerries { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); byte a1 = scanner.nextByte(); byte b1 = scanner.nextByte(); byte a2 = scanner.nextByte(); byte b2 = scanner.nextByte(); byte a3 = scanner.nextByte(); byte b3 = scanner.nextByte(); System.out.println((a1 - a3) + " " + (b1 - b2)); } } Help pls, why runtime error occurs? Edited by author 06.12.2018 21:47 Changed byte to int and now it works ok here. Idiotic. I don't think a mathematician can bring more than 127 kg)) "0 <= ai, bi <= 10,000" Sure, do not read condition is idiotic. |
пример | ChemezovSlava | 2001. Mathematicians and Berries | 17 Oct 2018 21:24 | 2 |
пример ChemezovSlava 17 Oct 2018 20:39 тест в примере верный? если нет можно правильный? Why do you think example is wrong? Person A has 1kg of berries in 0kg basket. Person B has 1kg of berries in 1kg basket. |
WA12 | fuadbinakhter | 2001. Mathematicians and Berries | 12 Sep 2018 23:08 | 1 |
WA12 fuadbinakhter 12 Sep 2018 23:08 What's in Test case 12? Edited by author 12.09.2018 23:08 |
AC in 0.015 sec | cosmicray001 | 2001. Mathematicians and Berries | 5 Oct 2017 19:54 | 1 |
#include <bits/stdc++.h> using namespace std; int main() { int a, a2, a3; int b, b2, b3; scanf("%d %d %d %d %d %d", &a, &b, &a2, &b2, &a3, &b3); int bb1 = a - a3; int bb2 = b - b2; printf("%d %d\n", bb1, bb2); return 0; } |
В чем, собственно, условие, если нет логики? | Riot | 2001. Mathematicians and Berries | 20 Oct 2016 00:17 | 2 |
В примере, в результате написано "1 1", однако в вычислениях мы видим "1 2 - 2 1 - 0 3". Откуда, спрашивается, взялась еще одна единица? Каждый собрал по 1 кг, при пересыпаниях туда-сюда получаем 0кг и 2кг и наоборот. Объясните нормально условие Baskets weight something. Weight isn't fixed, isn't the same and should be found to receive program solution. In the example first basket weights 0 kg (plastic packet?). Second basket weights 1 kg. Edited by author 20.10.2016 14:58 |
Где логика? Как может быть вес корзины равнятся нулю. Все имеет вес... | IlushaMax | 2001. Mathematicians and Berries | 13 Jun 2016 21:59 | 2 |
См. пример. Лично меня это сбило Edited by author 07.03.2016 21:36 Не обращай внимания и все |
C++ What's wrong with my code? | zimozi | 2001. Mathematicians and Berries | 14 Jan 2016 00:40 | 4 |
#include <iostream> using namespace std; int main() { int a[3],b[3]; for (int i = 0;i<3;i++) {cin>>a[i]>>b[i]; } cout<<a[0]-a[2]<<b[0]-b[1]; return 0; } Where am I must write the space? Only in output? between ans1 << " " << ans2; |
PASCAL | fangcun | 2001. Mathematicians and Berries | 19 Nov 2014 15:27 | 1 |
PASCAL fangcun 19 Nov 2014 15:27 var a:integer; b:integer; va:integer; vb:integer; ea:integer; eb:integer; ra:integer; rb:integer; boxa:integer; boxb:integer; begin readln(a,b); readln(va,vb);
boxb:=b-(va-a); rb:=b-boxb; readln(ea,eb); boxa:=va-(eb-vb);
writeln(a-boxa,' ',b-boxb);
end. |
Python - the hard way [from the series of exotic solutions] | ძამაანთ [Tbilisi SU] | 2001. Mathematicians and Berries | 5 Aug 2014 19:27 | 2 |
parsing in just one line XD from string import * from functools import * [[a1,b1],[a2,b2],[a3,b3]] = map(partial(map,int),map(split,map(raw_input, [""]*3))) & in py3k: from functools import * [[a1,b1],[a2,b2],[a3,b3]] = map(partial(map,int),map(lambda x:x.split(),map(input, [""]*3))) Edited by author 05.04.2014 04:37 a1, b1 = [int(num) for num in input().split()] a2, b2 = [int(num) for num in input().split()] a3, b3 = [int(num) for num in input().split()] print(a1 - a3, b1 - b2) |
a solution | sotamawhat | 2001. Mathematicians and Berries | 5 Mar 2014 19:40 | 1 |
#include <iostream> using namespace std; int main() { int a[3]; int b[3]; int sum,m1,m2; cin>>a[0]>>b[0]; if(a[0]<0||b[0]<0||a[0]>10000||b[0]>10000) exit(1); sum=a[0]+b[0]; cin>>a[1]>>b[1]; if(a[1]<0||b[1]<0||a[1]>10000||b[1]>10000) exit(1); if(b[1]>b[0]||(a[1]+b[1]!=sum))exit(1); cin>>a[2]>>b[2]; if(a[2]<0||b[2]<0||a[2]>10000||b[2]>10000) exit(1); if(a[2]>a[0]||(a[2]+b[2]!=sum))exit(1); m1=a[0]-a[2]; m2=b[0]-b[1]; cout<<m1<<' '<<m2; return 0; } Edited by author 05.03.2014 20:47 |
WA4 | d3m0n1c | 2001. Mathematicians and Berries | 12 Dec 2013 00:26 | 3 |
WA4 d3m0n1c 11 Dec 2013 18:58 please give me a test for WA4. According to my current logic result should be (filled bucket weight - empty bucket weight) for each mathematician. Edited by author 11.12.2013 19:12 Re: WA4 Anton Malyuta 12 Dec 2013 00:01 Try this test: 7 5 9 3 4 8 Answer: 3 2 |
Sonmeone post the solution please :d | Mr.Ionutzu | 2001. Mathematicians and Berries | 7 Dec 2013 01:14 | 3 |
|