Task: | Contest |
Sender: | Proudly div 2 |
Submission time: | 2017-05-27 15:57:12 +0300 |
Language: | C++ |
Status: | READY |
Result: | TIME LIMIT EXCEEDED |
test | verdict | time | |
---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | details |
#2 | TIME LIMIT EXCEEDED | -- | details |
#3 | TIME LIMIT EXCEEDED | -- | details |
#4 | TIME LIMIT EXCEEDED | -- | details |
#5 | TIME LIMIT EXCEEDED | -- | details |
#6 | TIME LIMIT EXCEEDED | -- | details |
#7 | ACCEPTED | 0.06 s | details |
#8 | TIME LIMIT EXCEEDED | -- | details |
#9 | TIME LIMIT EXCEEDED | -- | details |
#10 | ACCEPTED | 0.04 s | details |
#11 | TIME LIMIT EXCEEDED | -- | details |
#12 | TIME LIMIT EXCEEDED | -- | details |
#13 | ACCEPTED | 0.03 s | details |
#14 | TIME LIMIT EXCEEDED | -- | details |
#15 | TIME LIMIT EXCEEDED | -- | details |
#16 | TIME LIMIT EXCEEDED | -- | details |
#17 | TIME LIMIT EXCEEDED | -- | details |
#18 | TIME LIMIT EXCEEDED | -- | details |
#19 | WRONG ANSWER | 0.06 s | details |
#20 | TIME LIMIT EXCEEDED | -- | details |
#21 | TIME LIMIT EXCEEDED | -- | details |
#22 | WRONG ANSWER | 0.06 s | details |
#23 | TIME LIMIT EXCEEDED | -- | details |
#24 | TIME LIMIT EXCEEDED | -- | details |
#25 | WRONG ANSWER | 0.05 s | details |
#26 | TIME LIMIT EXCEEDED | -- | details |
#27 | TIME LIMIT EXCEEDED | -- | details |
#28 | WRONG ANSWER | 0.06 s | details |
#29 | TIME LIMIT EXCEEDED | -- | details |
#30 | TIME LIMIT EXCEEDED | -- | details |
#31 | WRONG ANSWER | 0.05 s | details |
#32 | TIME LIMIT EXCEEDED | -- | details |
#33 | TIME LIMIT EXCEEDED | -- | details |
#34 | TIME LIMIT EXCEEDED | -- | details |
#35 | TIME LIMIT EXCEEDED | -- | details |
#36 | TIME LIMIT EXCEEDED | -- | details |
#37 | TIME LIMIT EXCEEDED | -- | details |
#38 | TIME LIMIT EXCEEDED | -- | details |
#39 | TIME LIMIT EXCEEDED | -- | details |
#40 | TIME LIMIT EXCEEDED | -- | details |
#41 | TIME LIMIT EXCEEDED | -- | details |
#42 | TIME LIMIT EXCEEDED | -- | details |
#43 | TIME LIMIT EXCEEDED | -- | details |
#44 | TIME LIMIT EXCEEDED | -- | details |
#45 | TIME LIMIT EXCEEDED | -- | details |
#46 | TIME LIMIT EXCEEDED | -- | details |
Code
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int n, k; cin >> n >> k; int a1 = 1, a2 = 1, l1 = n, l2 = n, v1, v2; int max1, max2, min1, min2; cout << "1 1" << endl; cin >> max1; cout << "1 " << n << endl; cin >> min1; cout << "2 1" << endl; cin >> max2; cout << "2 " << n << endl; cin >> min2; if(min1 > max2) { if(n > k) { cout << "1 " << k; cin >> k; cout << "3 " << k; return 0; } else { cout << "2 " << k-n; cin >> k; cout << "3 " << k; return 0; } } else if(min2 > max1) { if(n > k) { cout << "2 " << k; cin >> k; cout << "3 " << k; return 0; } else { cout << "1 " << k-n; cin >> k; cout << "3 " << k; return 0; } } while(l1-a1 > 8 || l2-a2 > 8) { int i1 = (a1+l1)/2, i2 = (a2+l2)/2; cout << "1 " << i1 << endl; cin >> v1; cout << "2 " << i2 << endl; cin >> v2; if(i1 + i2 < k) { if(v1 > v2) { l2 = i2; } else { l1 = i1; } } else { if(v1 > v2) { a1 = i1; } else { a2 = i2; } } //if(v1 > v2) { // a1 = i1; // l2 = i2; //} else { // a2 = i2; // l1 = i1; //} } vector<int> v; for(int i=a1; i<=l1; i++) { cout << "1 " << i << endl; cin >> v1; v.push_back(v1); } for(int i=a2; i<=l2; i++) { cout << "2 " << i << endl; cin >> v2; v.push_back(v2); } sort(v.rbegin(), v.rend()); cout << "3 " << v[k - a1 - a2 + 1] << endl; }
Test details
Test 1
Verdict: TIME LIMIT EXCEEDED
input |
---|
1 1 33 18 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
1 1 37 55 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
1 2 80 38 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 4
Verdict: TIME LIMIT EXCEEDED
input |
---|
1 2 29 48 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 5
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 1 98 91 83 14 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 6
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 1 25 23 39 31 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 7
Verdict: ACCEPTED
input |
---|
2 1 73 57 77 32 |
correct output |
---|
(empty) |
user output |
---|
2 1 1 1 73 1 2 57 ... |
Test 8
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 2 77 64 63 2 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 9
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 2 61 28 97 90 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 10
Verdict: ACCEPTED
input |
---|
2 2 87 66 75 38 |
correct output |
---|
(empty) |
user output |
---|
2 2 1 1 87 1 2 66 ... |
Test 11
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 4 70 39 33 12 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 12
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 4 47 20 67 52 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 13
Verdict: ACCEPTED
input |
---|
2 4 54 20 90 1 |
correct output |
---|
(empty) |
user output |
---|
2 4 1 1 54 1 2 20 ... |
Test 14
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 4 68 66 64 61 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 15
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 4 35 27 68 66 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 16
Verdict: TIME LIMIT EXCEEDED
input |
---|
2 4 51 32 25 18 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 17
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 1 100 78 74 72 71 70 64 57 43 39 29 26 22 21 15 13 11 9 4 3 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 18
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 1 56 52 49 48 17 14 13 12 9 3 99 98 84 80 78 75 69 67 66 62 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 19
Verdict: WRONG ANSWER
input |
---|
10 1 91 86 73 65 53 42 28 14 13 6 100 77 70 58 52 41 35 33 17 9 |
correct output |
---|
(empty) |
user output |
---|
10 1 1 1 91 1 10 6 ... Truncated |
Test 20
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 2 88 87 69 68 64 63 57 55 54 51 50 36 35 31 27 22 15 14 8 1 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 21
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 2 31 28 26 16 13 9 8 6 5 2 95 87 80 78 76 65 59 53 41 40 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 22
Verdict: WRONG ANSWER
input |
---|
10 2 98 93 89 68 61 41 32 30 23 4 96 86 76 75 73 58 35 29 26 7 |
correct output |
---|
(empty) |
user output |
---|
10 2 1 1 98 1 10 4 ... Truncated |
Test 23
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 10 99 86 85 84 82 81 77 74 71 69 45 27 26 24 21 18 15 13 11 4 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 24
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 10 46 41 40 28 24 23 18 14 8 4 100 94 90 85 78 77 75 68 59 54 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 25
Verdict: WRONG ANSWER
input |
---|
10 10 91 80 68 39 38 37 31 30 7 1 100 95 87 71 67 41 33 18 17 11 |
correct output |
---|
(empty) |
user output |
---|
10 10 1 1 91 1 10 1 ... Truncated |
Test 26
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 18 87 86 85 80 79 74 64 60 59 47 43 39 37 34 29 27 26 16 6 5 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 27
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 18 54 48 42 38 28 27 22 19 15 5 100 96 91 84 79 73 72 64 63 60 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 28
Verdict: WRONG ANSWER
input |
---|
10 18 98 87 84 71 62 59 45 38 34 10 89 86 77 73 69 67 46 32 31 6 |
correct output |
---|
(empty) |
user output |
---|
10 18 1 1 98 1 10 10 ... Truncated |
Test 29
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 20 91 90 86 79 73 71 67 65 61 56 46 44 36 25 18 11 6 5 3 1 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 30
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 20 56 48 47 46 35 28 26 18 10 3 95 90 89 85 79 77 67 66 62 59 |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 31
Verdict: WRONG ANSWER
input |
---|
10 20 81 80 79 76 71 63 57 34 29 24 96 70 61 59 52 36 22 5 4 2 |
correct output |
---|
(empty) |
user output |
---|
10 20 1 1 81 1 10 24 ... Truncated |
Test 32
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 1 999998453 999997813 999980598 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 33
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 1 498482877 498480230 498478078 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 34
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 1 999986977 999979153 999972315 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 35
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 20000 999990977 999974610 999971985 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 36
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 20000 501434689 501431546 501422578 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 37
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 20000 999995686 999994228 999993000 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 38
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 100000 999992342 999991618 999988963 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 39
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 100000 500754694 500749114 500734428 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 40
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 100000 999988713 999962210 999939592 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 41
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 180000 999994001 999991970 999991811 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 42
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 180000 499560736 499555703 499549265 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 43
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 180000 999996507 999993660 999990414 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 44
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 200000 999987384 999983480 999981446 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 45
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 200000 500801844 500800718 500792295 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |
Test 46
Verdict: TIME LIMIT EXCEEDED
input |
---|
100000 200000 999984710 999974756 999965175 ... |
correct output |
---|
(empty) |
user output |
---|
(empty) |