QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#155726 | #7119. Longest Trip | HossamHero7 | 15 | 347ms | 4112kb | C++14 | 1.3kb | 2023-09-02 02:54:50 | 2023-09-02 02:54:50 |
Judging History
answer
#include <bits/stdc++.h>
#include "longesttrip.h"
//#include "grader.cpp"
using namespace std;
typedef long long ll;
vector<vector<int>> adj;
vector<bool> vis;
vector<int> p;
void dfs(int node,bool b){
if(b) p.push_back(node);
vis[node] = 1;
for(auto ch : adj[node]){
if(vis[ch]) continue;
dfs(ch,!b);
break;
}
}
vector<int> longest_trip(int n, int d)
{
if(d == 3) {
vector<int> ans(n);
iota(ans.begin(),ans.end(),0);
return ans;
}
if(d == 2){
vector<int> a;
vector<int> b;
vector<bool> rem(n,1);
vector<int> ans;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(!are_connected({i},{j})) {
a.push_back(i);
b.push_back(j);
rem[i] = 0;
rem[j] = 0;
}
}
}
for(auto i : a) ans.push_back(i);
for(int i=0;i<n;i++) if(rem[i]) ans.push_back(i);
for(auto i : b) ans.push_back(i);
return ans;
}
adj.clear();
adj.resize(n);
vis.clear();
vis.resize(n);
p.clear();
for(int i=0;i<n;i++){
if(vis[i]) continue;
dfs(i,1);
}
return p;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 0ms
memory: 3808kb
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: 3ms
memory: 3760kb
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: 3812kb
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: 0ms
memory: 3808kb
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: 3812kb
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: 5ms
memory: 3808kb
input:
341 3 2 1 1 1 1 3 2 1 1 1 1 3 2 1 1 1 1 3 2 1 1 1 1 3 2 1 1 1 1 3 2 1 1 1 1 3 2 1 1 1 1 3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 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #8:
score: 0
Accepted
time: 61ms
memory: 3808kb
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #9:
score: 0
Accepted
time: 156ms
memory: 3844kb
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 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 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #10:
score: 0
Accepted
time: 347ms
memory: 3740kb
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 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #11:
score: 0
Accepted
time: 6ms
memory: 3820kb
input:
341 3 2 1 1 0 1 3 2 1 0 1 1 3 2 1 0 1 1 3 2 1 0 1 1 3 2 1 1 0 1 3 2 1 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UKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #13:
score: 0
Accepted
time: 57ms
memory: 3872kb
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 0 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 1 1 1 1 1 1 1 1 1 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 ...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #14:
score: 0
Accepted
time: 100ms
memory: 4100kb
input:
11 101 2 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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...
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 1 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #15:
score: 0
Accepted
time: 322ms
memory: 3896kb
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 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #16:
score: 0
Accepted
time: 286ms
memory: 3812kb
input:
4 256 2 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1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0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Test #18:
score: 0
Accepted
time: 310ms
memory: 4112kb
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 0 2 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 3 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 4 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 5 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 6 3kC2Ia2048BfyJVGojMUKKtilctlZKcB 0 1 1 0 7...
result:
ok
Subtask #3:
score: 0
Wrong Answer
Test #19:
score: 25
Accepted
time: 4ms
memory: 3812kb
input:
341 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 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 #20:
score: 0
Accepted
time: 4ms
memory: 3736kb
input:
103 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 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 #21:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
22 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 12 1 1 12 1 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 #22:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
8 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 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 #23:
score: 0
Accepted
time: 1ms
memory: 3816kb
input:
4 256 1 1 256 1 1 256 1 1 256 1 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
Test #24:
score: -25
Wrong Answer
time: 1ms
memory: 3824kb
input:
341 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2
result:
wrong answer
Subtask #4:
score: 0
Wrong Answer
Test #83:
score: 60
Accepted
time: 9ms
memory: 3808kb
input:
341 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 1 3 1 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 #84:
score: 60
Accepted
time: 4ms
memory: 3812kb
input:
103 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 1 10 1 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 #85:
score: 60
Accepted
time: 1ms
memory: 3812kb
input:
22 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 50 1 1 12 1 1 12 1 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 #86:
score: 60
Accepted
time: 1ms
memory: 4072kb
input:
8 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 1 128 1 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 #87:
score: 60
Accepted
time: 1ms
memory: 3856kb
input:
4 256 1 1 256 1 1 256 1 1 256 1 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
Test #88:
score: 0
Wrong Answer
time: 1ms
memory: 3824kb
input:
341 3 1
output:
3kC2Ia2048BfyJVGojMUKKtilctlZKcB 1 3 0 1 2
result:
wrong answer