| Show all threads Hide all threads Show all messages Hide all messages |
| WA4 C# | Varun Sharma | 1457. Heating Main | 24 May 2022 15:38 | 1 |
WA4 C# Varun Sharma 24 May 2022 15:38 Those who are getting WA4 when using C#, please use the following format to print out the output. The type of variable sum is double and individual numbers read in the second line are also converted to double first before adding them together. Console.WriteLine("{0:F6}", sum / cases); |
| How to solve this problem? | whoiam | 1845. Integer-valued Complex Determinant | 23 May 2022 20:59 | 1 |
Hello women and men! I haven't been able to solve this problem for a long time. Please, help me that. |
| WA9 | severin | 1517. Freedom of Choice | 23 May 2022 17:51 | 2 |
WA9 severin 1 Jun 2012 20:53 Does anyone see what goes wrong with my program for the input of test #9? or test inputs maybe? EDIT: Test Case found! Edited by author 01.06.2012 22:08 Re: WA9 Tran Le Hoang Lam 23 May 2022 17:51 Can you tell me how to fix WA 9, plz |
| WA3 | andreyDagger | 1773. Metro to Every Home | 22 May 2022 23:23 | 1 |
WA3 andreyDagger 22 May 2022 23:23 |
| Right answer for first sample | sergovoy | 1659. Regular Triangles | 22 May 2022 18:34 | 2 |
0 30 -25.9807621135 -15 25.9807621135 -15 3.711537444785714 10.714285714285715 -11.134612334357143 -2.142857142857144 7.423074889571431 -8.571428571428571 18.557687223928568 23.57142857142857 -29.69229955828571 4.285714285714285 11.134612334357145 -27.857142857142854 As the matter of fact this problem can have multiple solutions: This one is also correct solution for the first sample test case -14.998661880355732 -4.018465371022687 4.019237844660736 14.998454896701402 10.979424035716015 -10.979989525657688 -29.99999996018567 0.00154508598054 15.001338063819592 25.979989536091384 14.99866189635838 -25.981534622043206 |
| Here is my, well commented, O(n^3) solution for reference | Abhishek Gupta | 1167. Bicolored Horses | 22 May 2022 10:19 | 1 |
deleted Edited by moderator 23.07.2022 20:36 |
| Почему в случае 1 10 ответ 9 если 0 тоже число в котором не идут два подряд ноля? | Stolyarov Artyom | 1009. K-based Numbers | 21 May 2022 13:17 | 5 |
Почему в случае 1 10 ответ 9 если 0 тоже число в котором не идут два подряд ноля? Просто 2 раза получил ВА, поменял на 9 и АС. N ≥ 2. Test "1 10" is incorrect; there is no such test in the test set. You are wrong. In case 1 10 you have exactly nine 1-digit numbers without two or more subsequent zeros. They are: 1,2,3,4,5,6,7,8 and 9. What do you mean? '0' is *also* a 1-digit number without two or more subsequent zeroes, no? Also, yay for necroposting! |
| Solution with probability | andreyDagger | 1507. Difficult Decision | 18 May 2022 17:24 | 1 |
Calculate matrix with modulo 10^9 + 7 |
| Why WA on test case 7? please help | farid | 1207. Median on the Plane | 17 May 2022 23:27 | 2 |
#include <bits/stdc++.h> using namespace std;
int const N = 123456; #define pi acos(-1.0) typedef long long ll;
int ar[N],xar[N],uses[N];
struct points { double x, y; int id; points() {} points(double x, double y) : x(x), y(y) {} } ;
double ang(const points &p){ double res = atan2(p.y, p.x); if(res < 0) res += 2.0 * pi; return res; }
struct cmp{ inline bool operator () (const points &p1, const points &p2){ double ang1 = ang(p1)*(180/pi), ang2 = ang(p2)*(180/pi); if(fabs(ang1 - ang2) < 1e-9){ ll d1 = (ll)p1.x * (ll)p1.x + (ll)p1.y * (ll)p1.y; ll d2 = (ll)p2.x * (ll)p2.x + (ll)p2.y * (ll)p2.y;
return d1 < d2; } return ang1 < ang2; } };
points pt[N];
int main() { int n; cin >> n; for(int i = 0; i < n; i++){ cin >> pt[i].x >> pt[i].y; pt[i].id = i+1; } sort(pt, pt+n, cmp()); cout<<pt[0].id<<" "<<pt[(n/2)].id<<endl;
return 0; } I know this is an old post. but for others' reference, we should use long long to avoid integer overflow. |
| Good problem. | silverfox | 1987. Nested Segments | 17 May 2022 11:31 | 1 |
Sort the intervals by length. and from i=0 to no_of_intervals, mark the query numbers. Make sure that each query number is marked by only one interval. Edited by author 17.05.2022 11:32 |
| I've WA#9 | † SiriuS † [TWYT Union] | 1202. Rectangles Travel | 16 May 2022 02:01 | 3 |
I've WA#9 † SiriuS † [TWYT Union] 5 Mar 2014 14:16 What's the test for WA#9? Try 3 0 0 10 10 10 0 20 10 20 0 30 10 Answer 36 try a rectangle in the negative area |
| On which platform tests runs? | hdwt | | 15 May 2022 22:10 | 1 |
Windows, linux, maxOS? Why I can't include <windows.h>? (Compilation error: No such file or directory) |
| AC program test cases | lakerka | 1029. Ministry | 14 May 2022 14:37 | 3 |
3 4 1 100 1000 0 1 1 1000 0 100 0 1000 100 //answer 1 1 2 2 1 1 1000000000 //answer 1 5 6 525 0 171 0 872 673 0 843 0 0 0 0 0 277 0 202 0 0 0 0 733 957 65 96 637 566 0 0 0 441 //answer: 4 4 5 5 5 5 10 1 10 10 10 1 1 10 10 10 1 10 1 1 1 1 1 1 10 1 10 10 10 10 1 //answer: 2 2 1 1 1 1 1 10 100 90 80 70 60 50 40 30 20 10 //answer: 10 5 6 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 //answer: 2 2 3 3 3 2 2 3 2 3 1 1 1 1 3 //answer: 2 2 1 1 3 1 1 1 1 //answer: 1 1 1 You 3rd and 6th test cases are wrong. The fee should be positive. |
| Problem description is terrible. | silverfox | 2142. Magic | 8 May 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. |
| WA # 7 help me,plz! | Arthur | 1525. Path | 6 May 2022 01:08 | 14 |
anybody, who knows where can be error! help! I'm also getting WA#7... and don't know why :'( if you will find you mistake, please, write it here! ok? and if i'll find my, i'll write it here too. size of ansver is greatest longint. Use int64. Thanks! After your post I managed to solve it. But, actually I was using int64, but... I've found out that if you write like this: ans:=x*y*z; where ans is int64 and x,y,z are integer you get WA After I wrote: ans:=x; ans:=ans*y; ans:=ans*z; I got Accepted. I think it happens because of calculation x*y*z is performed in integer and then converted to int64. Interesting... :-| Should have written in C. I guess I wouldn't have faced this if written in C. Edited by author 19.02.2007 00:56 Should have written in C. I guess I wouldn't have faced this if written in C. It's common feature of all compilers I know. I guess, C would not help you also :) Can anyone pls explain to me the sample output on test 3 I had wa7 too. be carefull printf("%lld\n",ans) IS WRONG! printf("%I64d\n",ans) is OK for MSVS2005 it's no matter, but not for Timus compiler In test #7 the second line (instructions' string) is empty! the problem could be reading the line with 10^5 characters. How can we read a line of 10^5 chars in python and not get a runtime error? use sys.stdin instead of input() |
| What wrong? Solution or syntax output ? | isVios | 1002. Phone Numbers | 6 May 2022 01:00 | 1 |
module Main where -------------------------------------------------------------------------------- toCandetat :: Char -> [Char] toCandetat '0' = "oqz" toCandetat '1' = "ij" toCandetat '2' = "abc" toCandetat '3' = "def" toCandetat '4' = "gh" toCandetat '5' = "kl" toCandetat '6' = "mn" toCandetat '7' = "prs" toCandetat '8' = "tuv" toCandetat '9' = "wxy" toCandetat n = error "unkown numb" -------------------------------------------------------------------------------- convertToCandedat :: String -> [String] convertToCandedat = map toCandetat -------------------------------------------------------------------------------- testWord :: String -> [String] -> Bool testWord str can = and $ zipWith elem str can -------------------------------------------------------------------------------- loop :: [String] -> String -> String loop [] acc = tail acc loop ["-1"] acc = tail acc loop in_str acc = loop next (acc ++ "\n" ++ fixPart) where fixPart = if part == "" then "No soluton." else part part = partSolve test cand [] (numb:count:xs) = in_str cand = convertToCandedat numb int_count = read count (test, next) = splitAt int_count xs -------------------------------------------------------------------------------- partSolve :: [String] -> [String] -> String -> String partSolve [] [] acc = tail acc partSolve (x:xs) can acc | testWord x can = skipX ++ nextXs | otherwise = partSolve xs can acc where lenX = length x skipX = partSolve xs can acc nextXs = partSolve xs (drop lenX can) (acc ++ " " ++ x) partSolve _ _ _ = "" -------------------------------------------------------------------------------- main :: IO () main = do in_str <- getContents putStr $ loop (words in_str) [] -------------------------------------------------------------------------------- |
| WA11(12) Vs MyTests | Chidori-kun | 1195. Ouths and Crosses | 4 May 2022 16:56 | 7 |
Anti WA11 Test: #X# #OX XOO Crosses win Anti WA12 Test: #X# O#O XOX Crosses win I hope these tests will be useful for you....... thanks a lot, i've AC with your test! It turns out that wrong tests are given. In a condition it is told that one player can win party one course. And it turns out what not one. No! "Head Judge observed that one player was able to win the game in one move." But Head Judge could be wrong. :) Is that true? Or i shouldn't implement case when nobody could win in one move? My code answers correct to your test cases, but Online Judge is saying W#11, I cannot find any case my solution fails. Can you provide more test cases, pls? And how people find the test case, do they figure it out or is there any way to know? У меня WA 9 и эти тесты работают |
| WA15 | Yaroslav | 1195. Ouths and Crosses | 4 May 2022 16:53 | 2 |
WA15 Yaroslav 1 Jan 2022 20:34 Try this X## O#X XOO Crosses win But description says that one of teams must win in one move if we imagine that its their turn So I think that this test cant be real |
| How fast could recursion optimised? | 👾_challenger128_[PermSNRU] | 1298. Knight | 2 May 2022 12:12 | 2 |
My AC recursion for n=8 gives about 8250733 calls. What is the minimum recursive calls value? My recursion gives only 64 for n=8. I sort moves by count of free cells that can be reached from them. |
| Stupid problems (spoiler) | andreyDagger | 1755. Cake | 1 May 2022 16:49 | 1 |
There are 3 problems, which can be solved stupidly in two ternary searches: 1755 (this), 1633, 1874 |