11016 | 2024-06-04 19:33:48 | zsombor | Kutyák és macskák | cpp17 | Partially correct 77.48/100 | 1.659s | 632 KiB |
#include "KutyakMacskak.h"
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int c, d;
bool r(int a, int b) {
return ask(d, a, b) == a;
}
vector <int> find_order(int n, int m) {
c = 1;
for (int i = 2; i <= m; i++) if (ask(1, c, i) == c) c = i;
d = 1;
for (int i = 1; i <= m; i++) {
if (i == c || ask(d, c, i) == c) continue;
d++;
i--;
}
vector <int> ans;
for (int i = 1; i <= m; i++) ans.push_back(i);
sort(ans.begin(), ans.end(), r);
return ans;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 612 KiB | ||||
2 | Accepted | 1.363s | 508 KiB | ||||
subtask2 | 6/6 | ||||||
3 | Accepted | 1.417s | 620 KiB | ||||
4 | Accepted | 1.391s | 528 KiB | ||||
5 | Accepted | 1.381s | 424 KiB | ||||
6 | Accepted | 1.384s | 440 KiB | ||||
7 | Accepted | 1.314s | 484 KiB | ||||
subtask3 | 7/7 | ||||||
8 | Accepted | 3ms | 380 KiB | ||||
9 | Accepted | 4ms | 228 KiB | ||||
10 | Accepted | 3ms | 256 KiB | ||||
11 | Accepted | 4ms | 344 KiB | ||||
12 | Accepted | 4ms | 228 KiB | ||||
13 | Accepted | 41ms | 256 KiB | ||||
14 | Accepted | 52ms | 356 KiB | ||||
subtask4 | 10/10 | ||||||
15 | Accepted | 17ms | 584 KiB | ||||
16 | Accepted | 16ms | 352 KiB | ||||
17 | Accepted | 14ms | 628 KiB | ||||
18 | Accepted | 14ms | 528 KiB | ||||
19 | Accepted | 16ms | 356 KiB | ||||
20 | Accepted | 14ms | 392 KiB | ||||
21 | Accepted | 14ms | 384 KiB | ||||
22 | Accepted | 18ms | 324 KiB | ||||
23 | Accepted | 14ms | 380 KiB | ||||
24 | Accepted | 16ms | 288 KiB | ||||
25 | Accepted | 14ms | 228 KiB | ||||
26 | Accepted | 12ms | 504 KiB | ||||
27 | Accepted | 17ms | 356 KiB | ||||
28 | Accepted | 17ms | 356 KiB | ||||
29 | Accepted | 17ms | 360 KiB | ||||
subtask5 | 12/12 | ||||||
30 | Accepted | 17ms | 584 KiB | ||||
31 | Accepted | 16ms | 352 KiB | ||||
32 | Accepted | 14ms | 628 KiB | ||||
33 | Accepted | 14ms | 528 KiB | ||||
34 | Accepted | 16ms | 356 KiB | ||||
35 | Accepted | 14ms | 392 KiB | ||||
36 | Accepted | 14ms | 384 KiB | ||||
37 | Accepted | 18ms | 324 KiB | ||||
38 | Accepted | 14ms | 380 KiB | ||||
39 | Accepted | 16ms | 288 KiB | ||||
40 | Accepted | 14ms | 228 KiB | ||||
41 | Accepted | 12ms | 504 KiB | ||||
42 | Accepted | 17ms | 356 KiB | ||||
43 | Accepted | 17ms | 356 KiB | ||||
44 | Accepted | 17ms | 360 KiB | ||||
45 | Accepted | 74ms | 236 KiB | ||||
46 | Accepted | 78ms | 256 KiB | ||||
47 | Accepted | 75ms | 356 KiB | ||||
48 | Accepted | 82ms | 520 KiB | ||||
49 | Accepted | 78ms | 384 KiB | ||||
50 | Accepted | 74ms | 544 KiB | ||||
51 | Accepted | 78ms | 420 KiB | ||||
52 | Accepted | 75ms | 504 KiB | ||||
53 | Accepted | 79ms | 356 KiB | ||||
54 | Accepted | 79ms | 392 KiB | ||||
55 | Accepted | 78ms | 304 KiB | ||||
56 | Accepted | 79ms | 356 KiB | ||||
57 | Accepted | 74ms | 484 KiB | ||||
58 | Accepted | 76ms | 484 KiB | ||||
59 | Accepted | 81ms | 420 KiB | ||||
subtask6 | 42.48/65 | ||||||
60 | Accepted | 3ms | 336 KiB | ||||
61 | Accepted | 1.611s | 416 KiB | ||||
62 | Accepted | 1.417s | 620 KiB | ||||
63 | Accepted | 1.391s | 528 KiB | ||||
64 | Accepted | 1.381s | 424 KiB | ||||
65 | Accepted | 1.384s | 440 KiB | ||||
66 | Accepted | 1.314s | 484 KiB | ||||
67 | Accepted | 3ms | 380 KiB | ||||
68 | Accepted | 4ms | 228 KiB | ||||
69 | Accepted | 3ms | 256 KiB | ||||
70 | Accepted | 4ms | 344 KiB | ||||
71 | Accepted | 4ms | 228 KiB | ||||
72 | Accepted | 41ms | 256 KiB | ||||
73 | Accepted | 52ms | 356 KiB | ||||
74 | Accepted | 17ms | 584 KiB | ||||
75 | Accepted | 16ms | 352 KiB | ||||
76 | Accepted | 14ms | 628 KiB | ||||
77 | Accepted | 14ms | 528 KiB | ||||
78 | Accepted | 16ms | 356 KiB | ||||
79 | Accepted | 14ms | 392 KiB | ||||
80 | Accepted | 14ms | 384 KiB | ||||
81 | Accepted | 18ms | 324 KiB | ||||
82 | Accepted | 14ms | 380 KiB | ||||
83 | Accepted | 16ms | 288 KiB | ||||
84 | Accepted | 14ms | 228 KiB | ||||
85 | Accepted | 12ms | 504 KiB | ||||
86 | Accepted | 17ms | 356 KiB | ||||
87 | Accepted | 17ms | 356 KiB | ||||
88 | Accepted | 17ms | 360 KiB | ||||
89 | Accepted | 74ms | 236 KiB | ||||
90 | Accepted | 78ms | 256 KiB | ||||
91 | Accepted | 75ms | 356 KiB | ||||
92 | Accepted | 82ms | 520 KiB | ||||
93 | Accepted | 78ms | 384 KiB | ||||
94 | Accepted | 74ms | 544 KiB | ||||
95 | Accepted | 78ms | 420 KiB | ||||
96 | Accepted | 75ms | 504 KiB | ||||
97 | Accepted | 79ms | 356 KiB | ||||
98 | Accepted | 79ms | 392 KiB | ||||
99 | Accepted | 78ms | 304 KiB | ||||
100 | Accepted | 79ms | 356 KiB | ||||
101 | Accepted | 74ms | 484 KiB | ||||
102 | Accepted | 76ms | 484 KiB | ||||
103 | Accepted | 81ms | 420 KiB | ||||
104 | Partially correct | 1.633s | 544 KiB | ||||
105 | Partially correct | 1.402s | 420 KiB | ||||
106 | Partially correct | 1.511s | 488 KiB | ||||
107 | Partially correct | 1.491s | 612 KiB | ||||
108 | Partially correct | 1.468s | 436 KiB | ||||
109 | Partially correct | 1.46s | 488 KiB | ||||
110 | Partially correct | 1.427s | 520 KiB | ||||
111 | Accepted | 1.483s | 484 KiB | ||||
112 | Accepted | 1.475s | 504 KiB | ||||
113 | Accepted | 1.493s | 484 KiB | ||||
114 | Partially correct | 1.463s | 420 KiB | ||||
115 | Partially correct | 1.483s | 484 KiB | ||||
116 | Partially correct | 1.46s | 428 KiB | ||||
117 | Partially correct | 1.468s | 524 KiB | ||||
118 | Partially correct | 1.455s | 420 KiB | ||||
119 | Partially correct | 1.475s | 484 KiB | ||||
120 | Partially correct | 1.485s | 484 KiB | ||||
121 | Partially correct | 1.455s | 632 KiB | ||||
122 | Partially correct | 1.5s | 520 KiB | ||||
123 | Partially correct | 1.432s | 632 KiB | ||||
124 | Partially correct | 1.659s | 420 KiB | ||||
125 | Partially correct | 1.656s | 400 KiB | ||||
126 | Partially correct | 1.498s | 620 KiB | ||||
127 | Partially correct | 1.472s | 484 KiB | ||||
128 | Partially correct | 1.483s | 548 KiB | ||||
129 | Partially correct | 1.491s | 484 KiB | ||||
130 | Partially correct | 1.46s | 632 KiB | ||||
131 | Partially correct | 1.416s | 528 KiB | ||||
132 | Partially correct | 1.531s | 504 KiB |