QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#473413 | #7119. Longest Trip | ivan_alexeev | 15 | 6ms | 4048kb | C++23 | 4.2kb | 2024-07-12 03:14:30 | 2024-07-12 03:14:31 |
Judging History
answer
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include "longesttrip.h"
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag,tree_order_statistics_node_update>
#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,bmi2,fma")
#ifdef lisie_bimbi
#define debug(x) cout << #x << " : " << x << endl;
#else
#define debug(x) ;
#define endl '\n'
#endif
//#define int long long
#define inf 1000000000000000000
#define double long double
typedef long long ll;
vector<vector<int>> mas;
vector<vector<int>> v;
vector<int> per;
bool get(int a, int b){
return v[a][b];
}
void dfs(int u, vector<int> &used, int x, int &cnt){
used[u] = 1;
cnt++;
for(int i = 0; i <= x; i++){
if(!used[i] && get(u, i)){
dfs(i, used, x, cnt);
}
}
}
deque<int> solve(int n){
if(n == 2) {
return {0, 1};
}
vector<int> used(n);
int cnt = 0;
dfs(0, used, n - 2, cnt);
if(cnt == n - 1){
deque<int> ans = solve(n - 1);
if(get(n - 1, ans[0])){
ans.push_front(n - 1);
return ans;
}else if(get(n - 1, ans.back())){
ans.push_back(n - 1);
return ans;
}else{
deque<int> ans1;
int ind = -1;
for(int i = 0; i < n - 1; i++){
if(get(ans[i], n - 1)){
ind = i;
break;
}
}
ans1.push_back(n - 1);
for(int i = ind; i < n - 1; i++){
ans1.push_back(ans[i]);
}
for(int i = 0; i < ind; i++){
ans1.push_back(ans[i]);
}
return ans1;
}
}else{
deque<int> ans;
int a, b;
for(int i = 0; i < n - 1; i++){
if(used[i]) {
if (get(i, n - 1)){
a = i;
}
}else {
if (get(i, n - 1)) {
b = i;
}
}
}
for(int i = 0; i < n - 1; i++){
if(used[i] && (i != a)){
ans.push_back(i);
}
}
ans.push_back(a);
ans.push_back(n - 1);
ans.push_back(b);
for(int i = 0; i < n - 1; i++){
if(!used[i] && (i != b)){
ans.push_back(i);
}
}
return ans;
}
}
mt19937 rnd(239);
vector<int> longest_trip(int n, int d){
per.resize(n);
for(int i = 0; i < n; i++){
per[i] = i;
}
//std::shuffle(per.begin(), per.end(), rnd);
if(d == 3){
vector<int> ans(n);
for(int i = 0; i < n; i++){
ans[i] = i;
}
return ans;
}else if(d == 2){
deque<int> ans;
int x;
if(are_connected({0}, {1})){
x = 1;
ans = {0, 1};
}else{
ans = {0, 2};
x = 2;
}
for(int i = 1; i < n; i++){
if(i == x){
continue;
}
if(are_connected({i}, {ans.back()})){
ans.push_back(i);
}else{
ans.push_front(i);
}
}
vector<int> ans1;
for(auto i : ans){
ans1.push_back(i);
}
return ans1;
}
v.resize(n, vector<int>(n, -1));
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
v[i][j] = are_connected({i}, {j});
}
}
vector<int> used(n, 0);
int cnt = 0;
dfs(0, used, n - 1, cnt);
if(cnt != n){
if(cnt * 2 >= n){
vector<int> ans;
for(int i = 0; i < n; i++){
if(used[i]){
ans.push_back(i);
}
}
return ans;
}else{
vector<int> ans;
for(int i = 0; i < n; i++){
if(!used[i]){
ans.push_back(i);
}
}
return ans;
}
}
auto ans = solve(n);
vector<int> ans1;
for(auto i : ans){
ans1.push_back(i);
}
return ans1;
}
詳細信息
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 2ms
memory: 3824kb
input:
341 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2...
result:
ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3816kb
input:
103 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10 3 1 10...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 10 0 1 2 3 4 5 6 7 8 9 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 10 0 1 2 3 4 5 6 7 8 9 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 10 0 1 2 3 4 5 6 7 8 9 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 10 0 1 2 3 4 5 6 7 8 9 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 10 0 1 2 3 4 5 6 7 8 9 3kC2Ia2048...
result:
ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 4044kb
input:
22 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 50 3 1 12 3 1 12 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 3...
result:
ok
Test #4:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
8 128 3 1 128 3 1 128 3 1 128 3 1 128 3 1 128 3 1 128 3 1 128 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 128 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 9...
result:
ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
4 256 3 1 256 3 1 256 3 1 256 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 256 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 9...
result:
ok
Subtask #2:
score: 10
Accepted
Test #6:
score: 10
Accepted
time: 0ms
memory: 3884kb
input:
341 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1...
result:
ok
Test #7:
score: 0
Accepted
time: 2ms
memory: 3776kb
input:
103 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #8:
score: 0
Accepted
time: 6ms
memory: 4020kb
input:
22 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
8 128 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 128 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
4 256 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #11:
score: 0
Accepted
time: 6ms
memory: 3816kb
input:
341 3 2 1 0 1 3 2 1 1 1 3 2 1 1 1 3 2 1 1 1 3 2 1 0 1 3 2 1 1 1 3 2 1 1 1 3 2 0 1 1 3 2 0 1 1 3 2 1 1 1 3 2 0 1 1 3 2 1 1 1 3 2 1 0 1 3 2 0 1 1 3 2 1 1 1 3 2 1 1 1 3 2 0 1 1 3 2 1 1 1 3 2 0 1 1 3 2 1 1 1 3 2 0 1 1 3 2 1 1 1 3 2 1 0 1 3 2 0 1 1 3 2 1 0 1 3 2 1 0 1 3 2 0 1 1 3 2 0 1 1 3 2 1 1 1 3 2 0 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 2 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1...
result:
ok
Test #12:
score: 0
Accepted
time: 3ms
memory: 3820kb
input:
103 10 2 0 1 1 0 1 1 0 1 1 1 10 2 1 1 0 1 1 0 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 0 1 1 1 10 2 1 1 1 1 1 1 0 1 1 1 10 2 0 1 1 1 1 0 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 0 1 1 1 1 0 1 1 10 2 1 1 1 1 1 1 1 1 1 1 10 2 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 1 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 4048kb
input:
22 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #14:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
11 101 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 101 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
4 256 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #16:
score: 0
Accepted
time: 0ms
memory: 4020kb
input:
4 256 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #17:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
4 256 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
4 256 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 2 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 3 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 4 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 5 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 6 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 7 6...
result:
ok
Subtask #3:
score: 0
Wrong Answer
Test #19:
score: 0
Wrong Answer
time: 0ms
memory: 4016kb
input:
341 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 0
result:
wrong answer non-disjoint arrays
Subtask #4:
score: 0
Wrong Answer
Test #83:
score: 0
Wrong Answer
time: 0ms
memory: 4044kb
input:
341 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 0
result:
wrong answer non-disjoint arrays