|
|
Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | Test4 | Stepan Vakhrushev'` | 1884. Путь к универу | 16 дек 2023 22:40 | 2 | Test4 Stepan Vakhrushev'` 19 окт 2017 22:08 | What a test 3? | SamGTU7_MASHENTSEVA_ELENA_ALEKSEEVNA | 1884. Путь к универу | 7 окт 2015 17:35 | 2 | | wa# 4 | SubZero | 1884. Путь к универу | 25 июл 2014 15:05 | 1 | wa# 4 SubZero 25 июл 2014 15:05 Please, give me test if anybody have it | WA25, help me please | Artyom Averin [Psych Up club] | 1884. Путь к универу | 4 авг 2012 00:41 | 1 | Please help me, guys, I don't know what's the problem:( #include <iostream> using namespace std; int lft[320], rght[320]; double timeleft[320], timeright[320]; double const eps = 0.0000001; int main(){ int n,m; cin >> n; for(int i = 1; i <= n; i++){ cin >> lft[i]; timeleft[i] = (lft[i] + 5.000)*9/50; } cin >> m; for(int i = 1; i <= m; i++){ cin >> rght[i]; timeright[i] = (rght[i]+5.000)*9/50 - 36.000/25; } double ans = 1000000000; if(lft[1] >= 8 && (rght[1] >= 16 || (rght[1] <= 3 && (rght[2] >= 16 || m == 1)))){ cout << 0; return 0; } for(int i = 1; i <= n; i++){ double cur = timeleft[i]; bool b = 0; if(lft[i+1] - lft[i] >= 13 || lft[i+1] == 0){ for(int j = 1; j <= n; j++){ double temp = rght[j] - (cur + 36.000/25)*200.000/36; if(temp > -5 + eps && temp + eps < 8) b = 1; } } else b = 1; if(!b && cur + eps < ans) ans = cur; } for(int i = 1; i <= m; i++){ double cur = timeright[i]; bool b = 0; if(rght[i+1] - rght[i] >= 13 || rght[i+1] == 0){ for(int j = 1; j <= n; j++){ double temp = lft[j] - cur*200.000/36; if(temp - eps > -5 && temp + eps < 8) b = 1; } } else b = 1; if(!b && cur + eps < ans) ans = cur; } printf("%.9f",ans); return 0; } | когда Егор считается сбитым? | Ripatti [Ufa] | 1884. Путь к универу | 18 ноя 2011 10:07 | 4 | когда Егор считается сбитым? когда он имеет хотя бы одну точку с автомобилем или же когда он находится строго внутри? другими словами - может ли Егор касаться автомобилей в процессе перемещения? Yes, he may touch the car Did you try to touch moving car, Erop? :) But touching cars we make set of times finite and can use brute force in this set. | Wa#7 | RAU66 | 1884. Путь к универу | 25 окт 2011 08:43 | 3 | Wa#7 RAU66 23 окт 2011 22:16 I can't understand why wa7, can somebody give me test, please? Re: Wa#7 IgorKoval(from Pskov) 25 окт 2011 03:27 Maybe precision or bad algo? =) I have solved this problem in fractional arithmetic. Edited by author 25.10.2011 03:28 Edited by author 25.10.2011 03:29 Would better to have all time intervals having int left and right points. For it we may use another length units shorter then 1m by 50 times. Edited by author 25.10.2011 08:44 | Wa#7 | RAU66 | 1884. Путь к универу | 23 окт 2011 22:16 | 1 | Wa#7 RAU66 23 окт 2011 22:16 I can't understand why wa7, can somebody give me test, please? | write the correct answer for the test please | newquercitron | 1884. Путь к универу | 23 окт 2011 22:13 | 3 | 0.000000 another test case : 1 1 1 10 ans: 1.260000 Choker Edited by author 23.10.2011 22:23 |
|
|
|