Task: | Evacuation |
Sender: | AVL-tiimi |
Submission time: | 2017-09-12 17:20:49 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.31 s | details |
#2 | WRONG ANSWER | 0.17 s | details |
#3 | WRONG ANSWER | 0.15 s | details |
#4 | WRONG ANSWER | 0.24 s | details |
#5 | WRONG ANSWER | 0.11 s | details |
#6 | WRONG ANSWER | 0.12 s | details |
#7 | WRONG ANSWER | 0.05 s | details |
#8 | WRONG ANSWER | 0.05 s | details |
#9 | WRONG ANSWER | 0.05 s | details |
#10 | WRONG ANSWER | 0.04 s | details |
#11 | WRONG ANSWER | 0.05 s | details |
#12 | WRONG ANSWER | 0.04 s | details |
#13 | WRONG ANSWER | 0.04 s | details |
#14 | WRONG ANSWER | 0.04 s | details |
#15 | WRONG ANSWER | 0.03 s | details |
#16 | WRONG ANSWER | 0.04 s | details |
#17 | WRONG ANSWER | 0.04 s | details |
#18 | WRONG ANSWER | 0.04 s | details |
#19 | WRONG ANSWER | 0.03 s | details |
#20 | WRONG ANSWER | 0.04 s | details |
#21 | WRONG ANSWER | 0.04 s | details |
#22 | WRONG ANSWER | 0.04 s | details |
#23 | WRONG ANSWER | 0.05 s | details |
#24 | WRONG ANSWER | 0.04 s | details |
#25 | WRONG ANSWER | 0.04 s | details |
#26 | WRONG ANSWER | 0.04 s | details |
#27 | WRONG ANSWER | 0.03 s | details |
#28 | WRONG ANSWER | 0.05 s | details |
#29 | WRONG ANSWER | 0.05 s | details |
#30 | WRONG ANSWER | 0.03 s | details |
#31 | WRONG ANSWER | 0.04 s | details |
#32 | WRONG ANSWER | 0.03 s | details |
#33 | WRONG ANSWER | 0.04 s | details |
#34 | WRONG ANSWER | 0.03 s | details |
#35 | WRONG ANSWER | 0.05 s | details |
#36 | WRONG ANSWER | 0.05 s | details |
#37 | WRONG ANSWER | 0.03 s | details |
#38 | WRONG ANSWER | 0.05 s | details |
#39 | WRONG ANSWER | 0.04 s | details |
#40 | WRONG ANSWER | 0.04 s | details |
#41 | WRONG ANSWER | 0.04 s | details |
#42 | WRONG ANSWER | 0.06 s | details |
#43 | WRONG ANSWER | 0.04 s | details |
#44 | WRONG ANSWER | 0.04 s | details |
#45 | WRONG ANSWER | 0.04 s | details |
#46 | WRONG ANSWER | 0.05 s | details |
#47 | WRONG ANSWER | 0.04 s | details |
#48 | WRONG ANSWER | 0.04 s | details |
#49 | WRONG ANSWER | 0.05 s | details |
#50 | WRONG ANSWER | 0.05 s | details |
#51 | WRONG ANSWER | 0.38 s | details |
#52 | WRONG ANSWER | 0.62 s | details |
#53 | WRONG ANSWER | 0.61 s | details |
Code
#include <iostream> #include <algorithm> #include <vector> #include <map> using namespace std; #define F first #define S second int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; map<int, vector<pair<int, int>>> l; map<int, map<int, int>> lf; for (int i = 0; i < n; ++i) { int t, x, r; cin >> t >> x >> r; l[t].push_back({x-r+1, x+r-1}); } for (pair<const int, vector<pair<int, int>>> &p : l) { sort(p.S.begin(), p.S.end()); int t = p.F; for (pair<int, int> &pj : p.S) { if (!lf[t].size()) lf[t][pj.F] = pj.S; else { if ((--lf[t].end())->S >= pj.F) { auto it = --lf[t].end(); it->S = max(it->S, pj.S); } else lf[t][pj.F] = pj.S; } } } int m; cin >> m; for (int i = 0; i < m; ++i) { int e, y; cin >> e >> y; if (lf[e].size()) { auto it = lf[e].upper_bound(y); if (it == lf[e].begin()) cout << "@"; else { it--; if (it->S >= y) cout << "*"; else cout << "@"; } } else cout << "@"; } cout << endl; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
40000 103463246 -141864454 26289 400364460 610226101 2798 372074921 -198366857 9770 455300963 10139032 440 ... |
correct output |
---|
@@@**@**@@@*@*@**@***@*@***@**... |
user output |
---|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
Test 2
Verdict: WRONG ANSWER
input |
---|
39400 334 -88 2 148 -142 1 220 58 2 126 -120 2 ... |
correct output |
---|
@****@***@**@*@@**@*@*@*@@****... |
user output |
---|
@***@@***@**@*@@**@*@*@*@@****... |
Test 3
Verdict: WRONG ANSWER
input |
---|
39400 642 172 2 526 176 2 526 -120 2 56 -54 2 ... |
correct output |
---|
@*******@****@**@****@**@*@***... |
user output |
---|
@*******@****@**@****@**@*@*@*... |
Test 4
Verdict: WRONG ANSWER
input |
---|
80008 11021917 43648 611 7971207 57751 142 29320129 43987 146 2165415 -1181 298 ... |
correct output |
---|
@*@@***@@@@@@*@@@@*@@**@***@@@... |
user output |
---|
@*@@@**@@@@@@*@@@@*@@**@**@@@@... |
Test 5
Verdict: WRONG ANSWER
input |
---|
3940 1660 -240 20 1400 140 20 400 700 20 480 -340 20 ... |
correct output |
---|
******@***********************... |
user output |
---|
******@***********************... |
Test 6
Verdict: WRONG ANSWER
input |
---|
3940 1500 -200 20 1560 -620 16 480 -340 14 1160 180 20 ... |
correct output |
---|
**@***@@@@***@*@**@@*@****@@**... |
user output |
---|
**@***@@@@@*@@*@*@@@*@****@@**... |
Test 7
Verdict: WRONG ANSWER
input |
---|
6727 1210101 -15564 267 1075205 -10459 166 313388 -9943 179 1805862 -23623 253 ... |
correct output |
---|
*@@@@@@@@**@@*@***@@@*@@@*@***... |
user output |
---|
@@@@@@@@@**@@*@@**@@@*@@@@@@**... |
Test 8
Verdict: WRONG ANSWER
input |
---|
6714 377971 728 589 3432270 54599 103 2427212 27539 483 1201529 6090 493 ... |
correct output |
---|
@*@@@***@**@@@**@@@@@**@@@**@@... |
user output |
---|
@*@@@*@*@@*@@@**@@@@@*@@@@**@@... |
Test 9
Verdict: WRONG ANSWER
input |
---|
6745 341217 -5114 315 791102 -240 92 1119566 -1755 75 1201486 -584 18 ... |
correct output |
---|
*@@@**@@**@@@*@@@*@@@@@@@*@@@@... |
user output |
---|
*@@@@*@@**@@@*@@@*@@@@@@@@@@@@... |
Test 10
Verdict: WRONG ANSWER
input |
---|
6709 2529591 44866 237 2924365 29731 662 970844 26104 588 1627200 60475 47 ... |
correct output |
---|
@@@***@@@@@*@@*@@@@@*@@@@@@@*@... |
user output |
---|
@@@@*@@@@@@*@@@@@@@@@@@@@@@@@@... |
Test 11
Verdict: WRONG ANSWER
input |
---|
6689 1334590 -10356 742 974219 12983 108 3354325 -46823 38 1181441 10535 34 ... |
correct output |
---|
@@@**@@***@*@@@@@@*@@@@@@@@@@@... |
user output |
---|
@@@**@@@*@@*@@@@@@@@@@@@@@@@@@... |
Test 12
Verdict: WRONG ANSWER
input |
---|
25 0 -3 1 9 12 2 12 -3 3 9 -12 1 ... |
correct output |
---|
@****@********@@***@****@*****... |
user output |
---|
@****@@@**@*@@@@**@@@@@*@****@... |
Test 13
Verdict: WRONG ANSWER
input |
---|
25 12 -15 3 6 9 3 12 9 3 6 -15 3 ... |
correct output |
---|
@*************@**************@... |
user output |
---|
@*************@*******@******@... |
Test 14
Verdict: WRONG ANSWER
input |
---|
20 12 9 3 3 0 1 12 3 2 6 3 1 ... |
correct output |
---|
*******@*@@@********@**@*@*@*@... |
user output |
---|
***@@@@@*@@@@****@**@**@*@*@*@... |
Test 15
Verdict: WRONG ANSWER
input |
---|
20 0 -3 3 3 -12 3 3 6 3 12 9 3 ... |
correct output |
---|
********@*****@*************@*... |
user output |
---|
********@***@@@*************@*... |
Test 16
Verdict: WRONG ANSWER
input |
---|
20 9 -6 3 6 -3 3 0 9 3 3 -12 3 ... |
correct output |
---|
****************@*@***@*******... |
user output |
---|
***@**@*****@***@*@***@*@*@***... |
Test 17
Verdict: WRONG ANSWER
input |
---|
20 6 -3 3 0 3 2 0 -15 2 3 12 2 ... |
correct output |
---|
***@*@@@*****@******@***@**@@*... |
user output |
---|
***@*@@@@@*@*@*@@@*@@@**@*@@@*... |
Test 18
Verdict: WRONG ANSWER
input |
---|
25 4 -10 2 8 6 2 6 4 1 6 0 1 ... |
correct output |
---|
@****@*@@***********@@********... |
user output |
---|
@@@**@@@@@@**@*@@@*@@@*@***@**... |
Test 19
Verdict: WRONG ANSWER
input |
---|
25 6 -4 2 6 8 2 4 6 2 8 -6 2 ... |
correct output |
---|
@************@@@**************... |
user output |
---|
@@*******@*@*@@@@@***@********... |
Test 20
Verdict: WRONG ANSWER
input |
---|
16 9 6 3 3 -6 3 3 6 3 9 0 3 ... |
correct output |
---|
*********************@********... |
user output |
---|
*******@*********@@**@**@*@***... |
Test 21
Verdict: WRONG ANSWER
input |
---|
16 0 3 3 6 3 1 6 -9 3 0 -9 2 ... |
correct output |
---|
***@******@***@@***@***@@@*@@*... |
user output |
---|
@**@*@*@**@@**@@***@@@@@@@*@@*... |
Test 22
Verdict: WRONG ANSWER
input |
---|
15 12 3 3 0 -9 3 3 6 3 9 6 3 ... |
correct output |
---|
******@*****@********@**@*****... |
user output |
---|
******@*****@*******@@@@@*****... |
Test 23
Verdict: WRONG ANSWER
input |
---|
15 0 -3 2 6 -9 1 12 3 2 3 -6 2 ... |
correct output |
---|
**@**@****@*@@*@**@@*********@... |
user output |
---|
@*@**@@**@@@@@@@@*@@**@@***@*@... |
Test 24
Verdict: WRONG ANSWER
input |
---|
15 6 -9 3 6 3 3 6 -3 3 0 -3 3 ... |
correct output |
---|
*************@****************... |
user output |
---|
**@*@********@*@********@*@***... |
Test 25
Verdict: WRONG ANSWER
input |
---|
15 0 -9 3 0 3 2 0 9 3 3 -6 2 ... |
correct output |
---|
**@******@@***************@***... |
user output |
---|
**@@@*@*@@@*@*@*****@*@**@@***... |
Test 26
Verdict: WRONG ANSWER
input |
---|
20 0 -6 2 8 2 2 0 2 2 8 6 2 ... |
correct output |
---|
*****@*@*@*****@@@****@@*****@... |
user output |
---|
*****@*@*@****@@@@*@**@@***@@@... |
Test 27
Verdict: WRONG ANSWER
input |
---|
20 2 -4 1 4 -2 2 2 4 2 0 6 2 ... |
correct output |
---|
**@*@*@*****@**@**@**@********... |
user output |
---|
**@@@*@*****@**@**@*@@*@@*@*@@... |
Test 28
Verdict: WRONG ANSWER
input |
---|
20 0 -2 2 4 2 1 6 -4 1 4 -6 2 ... |
correct output |
---|
**@*@***@**************@**@@**... |
user output |
---|
*@@*@@*@@*****@***@@@@*@@@@@@@... |
Test 29
Verdict: WRONG ANSWER
input |
---|
20 2 -8 2 4 -10 2 2 8 2 0 -2 2 ... |
correct output |
---|
****@******************@******... |
user output |
---|
****@*@@***@****@@*****@@*****... |
Test 30
Verdict: WRONG ANSWER
input |
---|
12 6 -9 1 0 3 3 6 3 2 6 -3 3 ... |
correct output |
---|
***@*@*@@@**@***@*@@**@***@@@*... |
user output |
---|
@*@@*@*@@@@*@***@@@@@*@*@@@@@*... |
Test 31
Verdict: WRONG ANSWER
input |
---|
12 3 0 3 6 -3 3 6 3 3 3 6 3 ... |
correct output |
---|
***@**********@***************... |
user output |
---|
***@******@***@@*************@... |
Test 32
Verdict: WRONG ANSWER
input |
---|
12 6 9 1 0 -3 2 3 -12 1 3 6 2 ... |
correct output |
---|
*****@*@**@*****@*************... |
user output |
---|
@*@@@@@@*@@*@***@@@@**@@@*@***... |
Test 33
Verdict: WRONG ANSWER
input |
---|
12 6 3 3 3 6 3 0 -9 3 0 9 3 ... |
correct output |
---|
@*****@***************@*******... |
user output |
---|
@****@@*********@**@**@******@... |
Test 34
Verdict: WRONG ANSWER
input |
---|
16 6 4 2 6 -8 2 2 -8 2 2 4 1 ... |
correct output |
---|
******@**@**********@****@****... |
user output |
---|
*@*@**@@*@@**@*****@@@***@@*@*... |
Test 35
Verdict: WRONG ANSWER
input |
---|
16 4 2 2 6 0 2 2 4 2 2 -4 2 ... |
correct output |
---|
***@*@***@****@@**@***@*******... |
user output |
---|
**@@*@***@@**@@@**@*@@@*@*****... |
Test 36
Verdict: WRONG ANSWER
input |
---|
15 2 4 2 0 -2 2 8 2 2 2 0 2 ... |
correct output |
---|
*****@****@********@**@@*@**@*... |
user output |
---|
*@***@@***@*@******@**@@*@*@@*... |
Test 37
Verdict: WRONG ANSWER
input |
---|
25 0 -3 1 4 -1 1 1 -4 1 4 -5 1 ... |
correct output |
---|
****@*****@@@*@@*****@********... |
user output |
---|
*@@@@*@***@@@*@@@*@*@@***@*@*@... |
Test 38
Verdict: WRONG ANSWER
input |
---|
15 0 -2 2 4 -6 1 4 2 1 2 0 1 ... |
correct output |
---|
*@@@*@*@**@**@***@*********@*@... |
user output |
---|
@@@@@@@@**@*@@@**@@****@***@@@... |
Test 39
Verdict: WRONG ANSWER
input |
---|
25 3 2 1 2 1 1 2 -5 1 1 -4 1 ... |
correct output |
---|
********@*****@@***@*****@@@**... |
user output |
---|
*@**@**@@***@@@@***@@***@@@@*@... |
Test 40
Verdict: WRONG ANSWER
input |
---|
15 2 -8 1 4 6 1 2 8 1 4 -10 2 ... |
correct output |
---|
@**************@*****@******@*... |
user output |
---|
@@@@@@*@*@@****@@@@@@@*@@**@@@... |
Test 41
Verdict: WRONG ANSWER
input |
---|
15 0 6 2 4 -2 2 0 -6 2 2 8 2 ... |
correct output |
---|
*@********@*****@**********@**... |
user output |
---|
*@********@*@***@****@*@***@@@... |
Test 42
Verdict: WRONG ANSWER
input |
---|
10 6 3 3 9 -6 3 0 3 3 0 -3 3 ... |
correct output |
---|
***@@**@***@***********@******... |
user output |
---|
***@@*@@***@******@****@******... |
Test 43
Verdict: WRONG ANSWER
input |
---|
10 9 -6 1 0 3 1 6 3 1 3 0 3 ... |
correct output |
---|
@*@***@*@@@@*@@*@@**@@@***@*@@... |
user output |
---|
@*@***@*@@@@*@@@@@*@@@@@*@@@@@... |
Test 44
Verdict: WRONG ANSWER
input |
---|
10 3 6 2 0 -15 1 3 12 1 0 -9 2 ... |
correct output |
---|
******************************... |
user output |
---|
@**@@********@@*@*@@@@@@@@@@*@... |
Test 45
Verdict: WRONG ANSWER
input |
---|
10 0 9 3 3 6 3 3 0 3 3 12 3 ... |
correct output |
---|
*****************************@... |
user output |
---|
********@**@*@*@********@****@... |
Test 46
Verdict: WRONG ANSWER
input |
---|
20 2 -3 1 4 -1 1 3 -4 1 1 2 1 ... |
correct output |
---|
@***@**@***********@*@*****@*@... |
user output |
---|
@*@@@@*@**@**@@***@@@@****@@*@... |
Test 47
Verdict: WRONG ANSWER
input |
---|
20 1 -2 1 1 0 1 2 -1 1 2 1 1 ... |
correct output |
---|
***@***@**@*@**@*****@*@@@*@**... |
user output |
---|
**@@***@*@@@@**@@@*@*@*@@@@@@*... |
Test 48
Verdict: WRONG ANSWER
input |
---|
9 6 -3 3 0 3 3 0 -9 3 0 -3 3 ... |
correct output |
---|
***************@@*************... |
user output |
---|
@*@@***********@@@****@*@@****... |
Test 49
Verdict: WRONG ANSWER
input |
---|
9 6 -3 3 3 -6 2 6 -9 2 0 -9 2 ... |
correct output |
---|
***@*@*********@**@*@*********... |
user output |
---|
*@@@*@***@@**@*@*@@*@******@@*... |
Test 50
Verdict: WRONG ANSWER
input |
---|
12 4 -2 2 2 -4 2 0 -2 2 2 4 2 ... |
correct output |
---|
**@*@**************@*****@****... |
user output |
---|
**@@@**@@*********@@*****@*@**... |
Test 51
Verdict: WRONG ANSWER
input |
---|
200000 6 -153069114 2 4 957747793 2 3 649760492 1 7 25202362 2 ... |
correct output |
---|
*@@@*@@*@@@*@@*@*@**@@@@@@@@*@... |
user output |
---|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
Test 52
Verdict: WRONG ANSWER
input |
---|
200000 187172 -153069114 2 36921 957747793 2 114661 649760492 1 185526 25202362 2 ... |
correct output |
---|
******************************... |
user output |
---|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
Test 53
Verdict: WRONG ANSWER
input |
---|
200000 999710767 -2720510 1230 999894078 -5196572 2343 999960423 1742266 2686 999907359 588714 3637 ... |
correct output |
---|
@@@@*@@@@@@@*@@****@@@@@@@*@@@... |
user output |
---|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |