| Show all threads Hide all threads Show all messages Hide all messages |
| ??? | Search | 1607. Taxi | 12 Mar 2019 23:15 | 13 |
??? Search 2 Mar 2008 01:06 Please help me.I always have WA#4. Give me any tests. THAnk!!!>< Try this: 1) 100 100 150 20 Answer is 150 2) 100 100 50 20 Answer is 100 Now I've WA#14.Please give some new tests.Thank!!! Edited by author 03.03.2008 20:06 denton> Thanks for the first test. It really helped me!!! Re: ??? Plamen_Iliev 5 Apr 2008 19:36 I think the answer is 200!!! wrong Velea Alex 29 Dec 2008 22:57 Posted by denton March 02, 2008 15:11 Try this: 1) 100 100 150 20 Answer is 150 2) 100 100 50 20 Answer is 100 re:::: at test 2 the answer is 50 becouse the taxi driver ofer him 50 and in less then 100 :D Edited by author 29.12.2008 22:58 Edited by author 29.12.2008 22:58 You are wrong, 'cause first turn is Petr and after that the turn of driver, but I think driver wasn't stupid one and he would not offer Petr smoller summ. Re: wrong Bahodir | {TUIT} | 29 Nov 2014 17:24 Accepted Test: 3 3 5 2 5 Edited by author 29.11.2014 20:35 thanks a lot, your tests helped me Hi, I have issue with the case "100 100 50 20"... Because logically the drivers shouldnt ask a price < price offer from Peter.. Re: ??? gunfighter 12 Mar 2019 23:15 thanks for the test, helped to get AC after WA#4 Edited by author 12.03.2019 23:16 Re: ??? Bahodir | {TUIT} | 29 Nov 2014 17:07 Inpt : 1 2 12 3 Output : 5 1 2 12 3 answer 6 Edited by author 12.12.2018 21:22 |
| Who knows what is the test 7? | David Yin | 1005. Stone Pile | 12 Mar 2019 20:15 | 4 |
Who knows what is the test 7? I failed at this test. [code deleted] Edited by moderator 29.01.2022 18:45 6 1 2 3 4 100 100 Will fail this program The solution is not correct |
| AC hint | gdh | 1234. Bricks | 12 Mar 2019 18:47 | 2 |
Problem should have weak tests if you got AC xD |
| Tests and Answers | Felix_Mate | 1984. Dummy Guy | 12 Mar 2019 00:04 | 2 |
for n:=1 to 50 do : 1 2 2.15470053837925 2.41421356237309 2.70130161670408 3 3.30476487096249 3.61312592975275 3.92380440016309 4.23606797749979 4.54946553288422 4.86370330515627 5.17858146886038 5.49395920743493 5.80973434474413 6.12583089548301 6.44219115175181 6.75877048314363 7.07553382097426 7.39245322149966 7.7095061398084 8.02667418333227 8.34394219610391 8.66129757554039 8.97872975555948 9.29622981055875 9.61379014847791 9.93140427038051 10.2490665803026 10.5667722335056 10.8845170143696 11.2022972373783 11.520109666252 11.8379514474594 12.155820055209 12.4737132456699 12.7916290186635 13.109565585441 13.4275213414455 13.7454948431824 14.0634847884921 14.3814899996548 14.6995094088628 15.0175420456841 15.3355870262037 15.6536435435869 15.9717108598527 16.2897882986785 16.6078752390897 16.9259711099087 pi = 3.14159265; alf = (n - 2) * 180 / (2 * n); ans = 1. + 1. / cos((alf * pi) / 180); cout << ans; |
| What is TLE at test 8?? | Iqramul Islam | 1131. Copying | 11 Mar 2019 01:48 | 1 |
|
| c++ code to flowchart | Izzat | | 10 Mar 2019 18:13 | 1 |
как перевести код под с++ в блок схему |
| why wrong answer? Pascal version | pizza_hunter | 1001. Reverse Root | 10 Mar 2019 13:20 | 1 |
This is my code ----------------------------------------- var j,i: longint; a: array[1..100000000] of real; begin i:=1; while not EOF do begin read(a[i]); i:=i+1; end; for j:=i-1 downto 1 do writeln(sqrt(a[j]):0:4); end. ----------------------------------------- Why is it wrong? can anyone please explain? thanks a lot Edited by author 10.03.2019 13:21 |
| why show me wrong answer for this problem of 1001?? My compiler give me a right answer.. | Amit_guha | 1001. Reverse Root | 10 Mar 2019 13:16 | 3 |
#include<bits/stdc++.h> #include<math.h> using namespace std; int main() { long long int i,j,k,s; double a,b,c,d; scanf("%lld %lld %lld %lld",&i,&j,&k,&s); if(s>=0) { d=sqrt(s); printf("%.4f\n",d); } if(k>=0) { c=sqrt(k); printf("%.4f\n",c); } if(j>=0) { b=sqrt(j); printf("%.4f\n",b); } if(i>=0) { a=sqrt(i); printf("%.4f\n",a); } return 0; } Why do you think there are only four numbers in input? Why do you think a number can be negative? If you are new to OJ system... The point is, the system will input any case that satisfies its question, not only the sample input. Therefore, there might not be only 4 numbers for you to consider. It may input 100 numbers, which your code obviously cannot give the correct output. |
| WA Test 15 | arclite | 1182. Team Them Up! | 9 Mar 2019 18:37 | 1 |
can anyone send me a test please? semenanufriev@gmail.com |
| Good problem (there is hint inside) | medegor44 | 1755. Cake | 6 Mar 2019 15:44 | 1 |
Easy to solve with linear programming |
| My Solution is here | vetas | 1407. One-two, One-two | 6 Mar 2019 15:44 | 4 |
## Russian ## ## 1 Идея ## 1) Представим число A в виде 10x+m1, где x - число десятков m1=2 (m1 не может быть равно 1, так как в этом случае искомое число A нечетное и на 2^N не разделится). Разделим число на 2, получим A=5x+1. 2) Пусть x=10y+m2, где y - число сотен. После подстановки получим A=5(10y+m2)+1=50y+5m2+1. Чтобы число A разделилось на 2, надо, чтобы m2 было нечетным. Следовательно выбираем m2=1. После деления на 2 получим: A=(50y+5*1+1)/2=25y+3. 3) Пусть y=10z+m3, где z - число тысяч. После подстановки получим A=25(10z+m3)+3=250z+25m3+3. Чтобы число A разделилось на 2, надо, чтобы m3 было нечетным. Следовательно выбираем m3=1. После деления на 2 получим: A=(250z+25*1+3)/2=125z+14. 4) Пусть z=10t+m4, где t - число десятков тысяч. После подстановки получим A=125(10t+m4)+14=1250t+125m4+14. Чтобы число A разделилось на 2, надо, чтобы m4 было четным. Следовательно выбираем m4=2. После деления на 2 получим: A=(1250t+125*2+14)/2=625t+132. Далее процесс повторяется N раз. Последовательность mN...m4m3m2m1 образует ответ. Алгоритм требует применения длинной арифметики. Общее решение достигается за N шагов. ## 2 Алгоритм ## Пусть m[1]=2; a_[1]=5; b_[1]=1; Цикл i = от 2 до n нц m_[i]=(если b_[i-1] нечетное, то 1, иначе 2) b_[i]=(если b_[i-1] нечетное, то (a_[i-1]+b_[i-1])/2, иначе (2*a_[i-1]+b_[i-1])/2) (так как a_[i-1] нечетное всегда по определению) a_[i]=a_[i-1]*5; кц ## English (in short) ## ## 1 The Idea ## 1) Let me A = 10x+m1, where x - number of Tens m1=2 (m1<>1, as A - odd). Division A in 2, let's receive A=5x+1. 2) Let me x=10y+m2, where y - number of Hundreds. Then A=5(10y+m2)+1=50y+5m2+1. if A%2==0, m2 is odd. Then m2=1 and A=(50y+5*1+1)/2=25y+3. 3) Let me y=10z+m3, where z - number of Thousand. Then A=25(10z+m3)+3=250z+25m3+3. if A%2==0, m3 is odd. Then m3=1 and A=(250z+25*1+3)/2=125z+14. 4) Let me z=10t+m4, где t - number of Tens thousand. Then A=125(10t+m4)+14=1250t+125m4+14. if A%2==0, m3 is even. Then m3=1 and A=(1250t+125*2+14)/2=625t+132. Further process repeats N time. Sequence mN... m4m3m2m1 forms the answer. The algorithm demands application of long arithmetics. ## 2 The Algo ## Let me m[1]=2; a_[1]=5; b_[1]=1; for i = 2 to n begin m_[i]=(if b_[i-1] is odd, then 1, else 2) b_[i]=(if b_[i-1] is odd, then (a_[i-1]+b_[i-1])/2, else (2*a_[i-1]+b_[i-1])/2) a_[i]=a_[i-1]*5; end thank you! excellent idea! Можно проще. Индукция: для любого n существует число x(n) из 1 и 2 длиной n, делящееся на 2^n. База: n=1=>x(1)=2. Переход n->n+1: если x(n) делится на 2^(n+1), то в качестве x(n+1) можно взять x(n+1)=2x(n) (т.е. слева приписать 2), иначе x(n+1)=1x(n). Edited by author 10.03.2019 13:22 |
| help test 8 | north | 1931. Excellent Team | 4 Mar 2019 12:31 | 5 |
whats in test 8 ? cant find out :( try to use this one 5 2 3 0 4 5 Hint: when the pirate becomes the current best option, he is also being compared. Thus in the test case above pirate 1 will be compared 2 times, while pirate 3 will be compared 3! GL!!! Try this test 6 2 2 2 1 1 1 ans: 4 |
| What is wrong here?С# | Константин | 1428. Jedi Riddle | 3 Mar 2019 17:44 | 1 |
using System; class Entrypiont { static void Main() { string[] Input = Console.ReadLine().Split(' '); int a = Convert.ToInt32(Input[0]); int b = Convert.ToInt32(Input[1]); int c = Convert.ToInt32(Input[2]); if(((c-1)%a)==((c-1)%b) && ((c - 1) % a) == 0) { int x=1, y=1, z=1; while (true) { if(Math.Pow(x,a)+ Math.Pow(y, b)== Math.Pow(z, c)) { Console.Write(x); Console.Write(y); Console.Write(z); break; } else { if(Math.Pow(x, a) + Math.Pow(y, b) >Math.Pow(z, c)) { z++; } else { if (x >= y) { y++; } else { x++; }
} } } } Console.ReadLine(); } } |
| WA2 | Михаил | 1855. Trade Guilds of Erathia | 3 Mar 2019 00:15 | 1 |
WA2 Михаил 3 Mar 2019 00:15 |
| For those who have WA #17 | RPTREME | 1297. Palindrome | 2 Mar 2019 22:19 | 3 |
It's not that test( I have WA#17 but my prog writes "BB" on this test I had WA on this test. I used manacher algorithm from e-maxx, in realization on site is one mistake, what ruin solution on this test, after correcting i got AC |
| Acceepted | Viktor Krivoshchekov`~ | 1348. Goat in the Garden 2 | 2 Mar 2019 19:20 | 1 |
Acceepted Viktor Krivoshchekov`~ 2 Mar 2019 19:20 #include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <string> #include <iomanip> #include <set> using namespace std; int main() { int x1, x2, y1, y2, x3, y3, l; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> l; // h = 2/s3 в€љp(p-s3)(p-s1)(p-s2), int a = y1 - y2, b = x2 - x1, c = x1 * y2 - x2 * y1; double s1 = sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)), s2 = sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3)), s3 = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); double p = s1 + s2 + s3; p /= 2; double ans = (2 / s3 * sqrt(p * (p - s3) * (p - s1) * (p - s2))); if (max(s1, s2) * max(s1, s2) > min(s1, s2) * min(s1, s2) + s3 * s3) { ans = min(sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)), sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3))); } if (s3 == 0.0) { ans = sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) *(y1 - y3)); } printf("%0.2f\n", max(0.0, ans - l)); printf("%0.2f\n", max(0.0, max(sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3)), sqrt((x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3))) - l)); } |
| Why ans is not 2? | Rustam_SBOne | 1104. Don’t Ask Woman about Her Age | 2 Mar 2019 18:30 | 2 |
k=2 => k-1 = 1. But everything is divisible by 1, what's wrong? Not all numbers could be written in binary number system |
| easy solution in c++ | Yucheng | 1084. Goat in the Garden | 2 Mar 2019 14:50 | 1 |
#include<iostream> #include<cmath> #include<iomanip> #define pi 3.1415926 using namespace std; int main(){ float side,len; cin>>side>>len; if(len>(side/2)*sqrt(2)){ cout<<fixed<<setprecision(3)<<side*side; return 0; } if((side/2)>=len){ cout<<fixed<<setprecision(3)<<len*len*pi; return 0; } float cosx=(side/2)/len; float sinx=sqrt(1-cosx*cosx); float cosA=2*sinx*cosx; float theta=acos(cosA); cout<<fixed<<setprecision(3)<<len*len*0.5*theta*4+sqrt(len*len-(side/2)*(side/2))*(side/2)*4;
return 0; } |
| SIRIUS | Anti Sirius | 2025. Line Fighting | 1 Mar 2019 21:45 | 4 |
SIRIUS Anti Sirius 25 Oct 2014 16:34 Re: SIRIUS Nodir NAZAROV [TUIT-Karshi] 8 Dec 2014 19:14 nima uchun o'zbek tilida gapirasiz? |
| GOOD peoples Please help me :( | Enigma [UB of TUIT] | 1671. Anansi's Cobweb | 28 Feb 2019 16:14 | 6 |
GOOD peoples Please help me! I have got WA#5! I used DSU!! My program gives right answer for all my tests! But again WA#5 and I can not found my mistake! I shall wait advices or tests! Thank you advance!!! What test you used to check it? 4 4 1 2 1 2 2 3 3 4 3 1 2 3 good luck!!! |