Submission #1175138
Source Code Expand
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <functional>
#include <set>
#include <ctime>
#include <random>
#include <chrono>
#include <cassert>
#include <tuple>
#include <utility>
using namespace std;
namespace {
using Integer = long long; //__int128;
template<class T, class S> istream& operator >> (istream& is, pair<T,S>& p){return is >> p.first >> p.second;}
template<class T> istream& operator >> (istream& is, vector<T>& vec){for(T& val: vec) is >> val; return is;}
template<class T> istream& operator , (istream& is, T& val){ return is >> val;}
template<class T, class S> ostream& operator << (ostream& os, const pair<T,S>& p){return os << p.first << " " << p.second;}
template<class T> ostream& operator << (ostream& os, const vector<T>& vec){for(size_t i=0; i<vec.size(); i++) os << vec[i] << (i==vec.size()-1?"":" "); return os;}
template<class T> ostream& operator , (ostream& os, const T& val){ return os << " " << val;}
template<class H> void print(const H& head){ cout << head; }
template<class H, class ... T> void print(const H& head, const T& ... tail){ cout << head << " "; print(tail...); }
template<class ... T> void println(const T& ... values){ print(values...); cout << endl; }
template<class H> void eprint(const H& head){ cerr << head; }
template<class H, class ... T> void eprint(const H& head, const T& ... tail){ cerr << head << " "; eprint(tail...); }
template<class ... T> void eprintln(const T& ... values){ eprint(values...); cerr << endl; }
class range{ Integer start_, end_, step_; public: struct range_iterator{ Integer val, step_; range_iterator(Integer v, Integer step) : val(v), step_(step) {} Integer operator * (){return val;} void operator ++ (){val += step_;} bool operator != (range_iterator& x){return step_ > 0 ? val < x.val : val > x.val;} }; range(Integer len) : start_(0), end_(len), step_(1) {} range(Integer start, Integer end) : start_(start), end_(end), step_(1) {} range(Integer start, Integer end, Integer step) : start_(start), end_(end), step_(step) {} range_iterator begin(){ return range_iterator(start_, step_); } range_iterator end(){ return range_iterator( end_, step_); } };
inline string operator "" _s (const char* str, size_t size){ return move(string(str)); }
constexpr Integer my_pow(Integer x, Integer k, Integer z=1){return k==0 ? z : k==1 ? z*x : (k&1) ? my_pow(x*x,k>>1,z*x) : my_pow(x*x,k>>1,z);}
constexpr Integer my_pow_mod(Integer x, Integer k, Integer M, Integer z=1){return k==0 ? z%M : k==1 ? z*x%M : (k&1) ? my_pow_mod(x*x%M,k>>1,M,z*x%M) : my_pow_mod(x*x%M,k>>1,M,z);}
constexpr unsigned long long operator "" _ten (unsigned long long value){ return my_pow(10,value); }
inline int k_bit(Integer x, int k){return (x>>k)&1;} //0-indexed
template<class T> string join(const vector<T>& v, const string& sep){ stringstream ss; for(size_t i=0; i<v.size(); i++){ if(i>0) ss << sep; ss << v[i]; } return ss.str(); }
inline string operator * (string s, int k){ string ret; while(k){ if(k&1) ret += s; s += s; k >>= 1; } return ret; }
}
constexpr long long mod = 9_ten + 7;
class XorShift{
public:
uint32_t x;
uint32_t y;
uint32_t z;
uint32_t w;
XorShift(){
x = 123456789;
y = 362436069;
z = 521288629;
w = 88675123;
}
XorShift(uint32_t seed){
x = 123456789;
y = 362436069;
z = 521288629;
w = seed;
for(int i=0; i<100; i++){
(*this)();
}
}
uint32_t operator () () {
uint32_t t = x ^ (x << 11);
x = y; y = z; z = w;
return w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
}
};
template<class T>
class Min_Cost_Flow{
public:
struct edge{
int to;
int cap;
T cost;
int rev;
bool is_rev;
};
const T INF;
vector<vector<edge>> G;
Min_Cost_Flow(int n, T inf) : G(n), INF(inf){
}
void add_edge(int from, int to, int cap, T cost){
G[from].push_back((edge){to, cap, cost, (int)G[to].size(), false});
G[to].push_back((edge){from, 0, -cost, (int)G[from].size()-1, true});
}
//min cost : s->t (flow:f)
T min_cost_flow(int s, int t, int f){
T cost = 0;
vector<int> prev_v(G.size(),-1);
vector<int> prev_e(G.size(),-1);
vector<T> potantial(G.size(), 0);
vector<T> dist(G.size(), INF);
dist[s] = 0;
/*bellman_ford*/{
bool update = true;
for(int cnt = 0; update; cnt++){
update = false;
for(int i=0; i<G.size(); i++){
if(dist[i] >= INF) continue;
for(int j=0; j<G[i].size(); j++){
if(G[i][j].cap > 0 && dist[G[i][j].to] > dist[i] + G[i][j].cost){
dist[G[i][j].to] = dist[i] + G[i][j].cost;
update = true;
}
}
}
if(update && cnt >= G.size()){
cerr << " there is a negative cycle " << endl;
return -1;
}
cnt++;
}
for(int i=0; i<G.size(); i++){
potantial[i] = dist[i];
}
}
while(f>0){
fill(dist.begin(), dist.end(), INF);
dist[s] = 0;
prev_v[s] = s;
/*dijkstra*/{
priority_queue<pair<T,int>, vector<pair<T,int>>, greater<pair<T,int>>> pq;
pq.push({0, s});
while(pq.size()){
pair<T, int> p = pq.top(); pq.pop();
if(dist[p.second] < p.first) continue;
dist[p.second] = p.first;
for(int i=0; i<G[p.second].size(); i++){
edge& e = G[p.second][i];
T new_dist = dist[p.second] + e.cost + potantial[p.second] - potantial[e.to];
if(e.cap > 0 && dist[e.to] > new_dist){
dist[e.to] = new_dist;
prev_v[e.to] = p.second;
prev_e[e.to] = i;
pq.push({dist[e.to], e.to});
}
}
}
}
if(potantial[t] + dist[t] == INF){
cerr << "couldn't insert flow f : " << f << endl;
return -1;
}
for(int i=0; i<G.size(); i++){
potantial[i] += dist[i];
}
int d = f;
int pos = t;
while(pos != s){
int v = prev_v[pos];
int e = prev_e[pos];
d = min(d, G[v][e].cap);
pos = prev_v[pos];
}
pos = t;
while(pos != s){
int v = prev_v[pos];
int e = prev_e[pos];
G[v][e].cap -= d;
G[G[v][e].to][G[v][e].rev].cap += d;
pos = v;
}
cost += d * potantial[t]; //potential is new_dist
f -= d;
//f==0 then end
}
return cost;
}
};
constexpr int H = 30, W = 30;
constexpr int K = 450;
//constexpr int T=50;
/**
* パラメータ
*/
constexpr int T = 200;
constexpr int BeamWidth = 10;
constexpr int BeamNext = 2;
constexpr unsigned long long seed_mt = 1145148931919ll;
constexpr unsigned int seed_xor = 1919893;
mt19937_64 mt(seed_mt);
XorShift xrand(seed_xor);
constexpr int mask = 1<<20;
constexpr int threshold_move_good = mask * 0.95;
constexpr int threshold_move_bad = mask * 0.05;
long long calc_score( vector<pair<int,int>>& pos, vector<pair<int,int>>& target ){
long long ret = 0;
for(int i=0; i<pos.size(); i++){
ret += abs( pos[i].first - target[i].first ) + abs( pos[i].second - target[i].second );
}
return ret;
}
struct state{
vector<pair<int,int>> p;
long long score;
string move;
};
int dx[] = {0, 0, 1,-1};
int dy[] = {1,-1, 0, 0};
char dc[] = {'D','U','R','L'};
vector<string> gen_next_state(vector<pair<int,int>>& now, vector<pair<int,int>>& target){
vector<string> res(2, string(now.size(), '-'));
vector<pair<int,int>> s = now;
vector<vector<int>> cell(H, vector<int>(W, -1));
for(int i=0; i<s.size(); i++){
int r,c;
tie(r,c) = s[i];
cell[r][c] = i;
}
vector<vector<bool>> used_cell(H, vector<bool>(W, false));
vector<bool> used(now.size(), false);
vector<int> order(now.size());
iota(order.begin(), order.end(), 0);
shuffle(order.begin(), order.end(), mt);
// sort(order.begin(), order.end(), [&](int l, int r){
// return abs(target[l].first - 15) + abs(target[l].second - 15)
// > abs(target[r].first - 15) + abs(target[r].second - 15);
// });
for(int i : order){
if(used[i]) continue;
int dy = target[i].first - now[i].first;
int dx = target[i].second - now[i].second;
int r = now[i].first;
int c = now[i].second;
vector<int> rr = {-1,-1,-1, 0,0,0, 1,1,1};
for(auto& y:rr) y+=r;
vector<int> cc = {-1,0,1, -1,0,1, -1,0,1,};
for(auto& x:cc) x+=c;
if(abs(dx) > abs(dy)){
if(dx < 0){ // left
if( rr[0] >= 0 && !used_cell[rr[1]][cc[1]] && !used_cell[rr[3]][cc[3]] && !used[cell[rr[0]][cc[0]]] ){
//01 34
int a = cell[rr[0]][cc[0]];
used[a] = true;
used[i] = true;
used_cell[ rr[1] ][ cc[1] ] = used_cell[ rr[3] ][ cc[3] ] = true;
res[0][i] = 'U';
res[1][i] = 'L';
res[0][a] = 'D';
res[1][a] = 'R';
swap( s[a], s[i] );
}else if( rr[6] < H && !used_cell[rr[3]][cc[3]] && !used_cell[rr[7]][cc[7]] && !used[cell[rr[6]][cc[6]]] ){
//34 67
int a = cell[rr[6]][cc[6]];
used[a] = true;
used[i] = true;
used_cell[ rr[7] ][ cc[7] ] = used_cell[ rr[3] ][ cc[3] ] = true;
res[0][i] = 'L';
res[1][i] = 'D';
res[0][a] = 'R';
res[1][a] = 'U';
swap( s[a], s[i] );
}
}else if(dx > 0){
if( rr[0] >= 0 && !used_cell[rr[1]][cc[1]] && !used_cell[rr[5]][cc[5]] && !used[cell[rr[2]][cc[2]]] ){
//12 45
int a = cell[rr[2]][cc[2]];
used[a] = true;
used[i] = true;
used_cell[ rr[1] ][ cc[1] ] = used_cell[ rr[5] ][ cc[5] ] = true;
res[0][i] = 'R';
res[1][i] = 'U';
res[0][a] = 'L';
res[1][a] = 'D';
swap( s[a], s[i] );
}else if( rr[6] < H && !used_cell[rr[5]][cc[5]] && !used_cell[rr[7]][cc[7]] && !used[cell[rr[8]][cc[8]]] ){
//45 78
int a = cell[rr[8]][cc[8]];
used[a] = true;
used[i] = true;
used_cell[ rr[5] ][ cc[5] ] = used_cell[ rr[7] ][ cc[7] ] = true;
res[0][i] = 'D';
res[1][i] = 'R';
res[0][a] = 'U';
res[1][a] = 'L';
swap( s[a], s[i] );
}
}
}else{
if(dy < 0){ // up
if( cc[0] >= 0 && !used_cell[rr[1]][cc[1]] && !used_cell[rr[3]][cc[3]] && !used[cell[rr[0]][cc[0]]] ){
//01 34
int a = cell[rr[0]][cc[0]];
used[a] = true;
used[i] = true;
used_cell[ rr[1] ][ cc[1] ] = used_cell[ rr[3] ][ cc[3] ] = true;
res[0][i] = 'U';
res[1][i] = 'L';
res[0][a] = 'D';
res[1][a] = 'R';
swap( s[a], s[i] );
}else if( cc[2] < W && !used_cell[rr[1]][cc[1]] && !used_cell[rr[5]][cc[5]] && !used[cell[rr[2]][cc[2]]] ){
//12 45
int a = cell[rr[2]][cc[2]];
used[a] = true;
used[i] = true;
used_cell[ rr[1] ][ cc[1] ] = used_cell[ rr[5] ][ cc[5] ] = true;
res[0][i] = 'R';
res[1][i] = 'U';
res[0][a] = 'L';
res[1][a] = 'D';
swap( s[a], s[i] );
}
}else if(dy > 0){
if( cc[6] >= 0 && !used_cell[rr[3]][cc[3]] && !used_cell[rr[7]][cc[7]] && !used[cell[rr[6]][cc[6]]] ){
//34 67
int a = cell[rr[6]][cc[6]];
used[a] = true;
used[i] = true;
used_cell[ rr[7] ][ cc[7] ] = used_cell[ rr[3] ][ cc[3] ] = true;
res[0][i] = 'L';
res[1][i] = 'D';
res[0][a] = 'R';
res[1][a] = 'U';
swap( s[a], s[i] );
}
else if( cc[8] < W && !used_cell[rr[5]][cc[5]] && !used_cell[rr[7]][cc[7]] && !used[cell[rr[8]][cc[8]]] ){
//45 78
int a = cell[rr[8]][cc[8]];
used[a] = true;
used[i] = true;
used_cell[ rr[5] ][ cc[5] ] = used_cell[ rr[7] ][ cc[7] ] = true;
res[0][i] = 'D';
res[1][i] = 'R';
res[0][a] = 'U';
res[1][a] = 'L';
swap( s[a], s[i] );
}
}
}
}
now = s;
return res;
}
long long calc_actual_score(int L, state& s){
long long pd = 20 + s.score;
double pt = 10 + L * 0.01;
return ceil( 1e7 / (pd*pt) );
}
vector<string> adjust_state(vector<pair<int,int>>& p, vector<pair<int,int>>& target){
vector<string> res;
int k = p.size();
for(int t : range(2)){
int source = H*W + 0;
int sink = H*W + 1;
Min_Cost_Flow<int> f(H*W + 2, 1e8);
vector<vector<int>> cell(H, vector<int>(W, -1));
for(int i=0; i<k; i++){
int r,c;
tie(r,c) = p[i];
cell[r][c] = i;
f.add_edge( source, r*W+c, 1, 0 );
}
for(int r=0; r<H; r++){
for(int c=0; c<W; c++){
if(cell[r][c] != -1){
for(int j=0; j<4; j++){
int rr = r + dy[j];
int cc = c + dx[j];
if( rr<0 || rr>=H || cc<0 || cc>=W ) continue;
int i = cell[r][c];
int score_prev = abs( r - target[i].first ) + abs( c - target[i].second );
int score_next = abs( rr - target[i].first ) + abs( cc - target[i].second );
f.add_edge( r*W + c, rr*W + cc, 1000, score_next - score_prev);
}
}else{
f.add_edge(r*W+c, sink, 1, 0);
}
}
}
int cost = f.min_cost_flow(source, sink, k);
if(cost == 0) break;
string moving_(k, '-');
auto next_cell = cell;
for(int r=0; r<H; r++){
for(int c=0; c<W; c++){
int pos = r*W+c;
if(cell[r][c] < 0) continue;
for(auto e : f.G[pos] ){
if( e.to == source || e.to == sink) continue;
if( e.is_rev ) continue;
if( e.cap == 1000 ) continue;
int rr = e.to/W;
int cc = e.to%W;
if(cell[rr][cc] != -1) continue;
cell[rr][cc] = -2;
char m = '-';
if(rr<r) m = 'U';
if(rr>r) m = 'D';
if(cc<c) m = 'L';
if(cc>c) m = 'R';
moving_[ cell[r][c] ] = m;
p[ cell[r][c] ] = {rr,cc};
break;
}
}
}
res.push_back( moving_ );
}
return res;
}
tuple<vector<pair<int,int>>, vector<string>> move_to_ichimatsu(vector<pair<int,int>> p){
vector<string> res;
int k = p.size();
while(true){
int source = H*W + 0;
int sink = H*W + 1;
Min_Cost_Flow<int> f(H*W + 2, 1e8);
vector<vector<int>> cell(H, vector<int>(W, -1));
for(int i=0; i<k; i++){
int r,c;
tie(r,c) = p[i];
cell[r][c] = i;
f.add_edge( source, r*W+c, 1, 0 );
}
for(int r=0; r<H; r++){
for(int c=0; c<W; c++){
for(int j=0; j<4; j++){
int rr = r + dy[j];
int cc = c + dx[j];
if( rr<0 || rr>=H || cc<0 || cc>=W ) continue;
f.add_edge( r*W + c, rr*W + cc, 1000, 1);
}
if( ((r+c)&1) == 0 ){
f.add_edge(r*W+c, sink, 1, 0);
}
}
}
int cost = f.min_cost_flow(source, sink, k);
if(cost == 0) break;
string moving_(k, '-');
auto next_cell = cell;
for(int r=0; r<H; r++){
for(int c=0; c<W; c++){
int pos = r*W+c;
if(cell[r][c] < 0) continue;
for(auto e : f.G[pos] ){
if( e.to == source || e.to == sink) continue;
if( e.is_rev ) continue;
if( e.cap == 1000 ) continue;
int rr = e.to/W;
int cc = e.to%W;
if(cell[rr][cc] != -1) continue;
cell[rr][cc] = -2;
char m = '-';
if(rr<r) m = 'U';
if(rr>r) m = 'D';
if(cc<c) m = 'L';
if(cc>c) m = 'R';
moving_[ cell[r][c] ] = m;
p[ cell[r][c] ] = {rr,cc};
break;
}
}
}
res.push_back( moving_ );
}
return make_tuple(p, res);
}
#include <unordered_set>
int main(){
int h,w,k,t;
cin >> h,w,k,t;
vector<vector<unsigned long long>> zobrist_hash(k, vector<unsigned long long>(h*w, 0));
for(int i=0; i<k; i++){
for(int r=0; r<H; r++){
for(int c=0; c<W; c++){
zobrist_hash[i][r*W+c] = mt();
}
}
}
vector<pair<int,int>> a(k),target(k);
for(auto i : range(k) ){
int ra, ca;
cin >> ra, ca;
a[i] = {ra-1,ca-1};
int rt, ct;
cin >> rt, ct;
target[i] = {rt-1, ct-1};
}
//set initial position
auto state_initial = move_to_ichimatsu(a);
auto state_after = move_to_ichimatsu(target);
auto a_ = get<0>(state_initial);
auto target_ = get<0>(state_after);
vector<string> res = get<1>(state_initial);
unordered_set<unsigned long long> memo;
auto get_hash = [&](vector<pair<int,int>>& s){
unsigned long long h = 0;
for(int i=0; i<k; i++){
h ^= zobrist_hash[ i ][ s[i].first*W + s[i].second ];
}
return h;
};
memo.insert( get_hash(a_) );
for(int step=0; step<4000; step++){
auto prev_a = a_;
vector<string> nx;
if(step > 100 && step % 23 == 0){
nx = adjust_state( a_, target_ );
}else{
nx = gen_next_state( a_, target_ );
}
auto h = get_hash( a_ );
if(memo.count(h)){
a_ = prev_a;
continue;
}
memo.insert(h);
for(auto s : nx){
res.push_back( s );
}
if(a_ == target_) break;
}
if(a_ == target_){
vector<string> tmp = get<1>(state_after);
reverse(tmp.begin(), tmp.end());
for(auto& moving : tmp){
for(auto& c : moving){
if(c == 'U') c = 'D';
else if(c == 'D') c = 'U';
else if(c == 'L') c = 'R';
else if(c == 'R') c = 'L';
}
res.push_back(moving);
}
}
println( res.size() );
println( join(res, "\n") );
return 0;
}
Submission Info
Submission Time |
|
Task |
B - 日本橋大渋滞 |
User |
koyumeishi |
Language |
C++14 (GCC 5.4.1) |
Score |
825299 |
Code Size |
18522 Byte |
Status |
AC |
Exec Time |
2701 ms |
Memory |
5888 KB |
Judge Result
Set Name |
test_01 |
test_02 |
test_03 |
test_04 |
test_05 |
test_06 |
test_07 |
test_08 |
test_09 |
test_10 |
test_11 |
test_12 |
test_13 |
test_14 |
test_15 |
test_16 |
test_17 |
test_18 |
test_19 |
test_20 |
test_21 |
test_22 |
test_23 |
test_24 |
test_25 |
test_26 |
test_27 |
test_28 |
test_29 |
test_30 |
Score / Max Score |
25948 / 50000 |
27887 / 50000 |
25961 / 50000 |
28426 / 50000 |
28059 / 50000 |
27825 / 50000 |
26512 / 50000 |
30176 / 50000 |
27933 / 50000 |
24367 / 50000 |
28361 / 50000 |
29138 / 50000 |
27887 / 50000 |
26767 / 50000 |
27918 / 50000 |
29482 / 50000 |
25747 / 50000 |
26969 / 50000 |
27871 / 50000 |
26015 / 50000 |
28122 / 50000 |
27458 / 50000 |
25151 / 50000 |
27368 / 50000 |
28637 / 50000 |
26955 / 50000 |
28572 / 50000 |
28090 / 50000 |
26610 / 50000 |
29087 / 50000 |
Status |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set Name |
Test Cases |
test_01 |
subtask_01_01.txt |
test_02 |
subtask_01_02.txt |
test_03 |
subtask_01_03.txt |
test_04 |
subtask_01_04.txt |
test_05 |
subtask_01_05.txt |
test_06 |
subtask_01_06.txt |
test_07 |
subtask_01_07.txt |
test_08 |
subtask_01_08.txt |
test_09 |
subtask_01_09.txt |
test_10 |
subtask_01_10.txt |
test_11 |
subtask_01_11.txt |
test_12 |
subtask_01_12.txt |
test_13 |
subtask_01_13.txt |
test_14 |
subtask_01_14.txt |
test_15 |
subtask_01_15.txt |
test_16 |
subtask_01_16.txt |
test_17 |
subtask_01_17.txt |
test_18 |
subtask_01_18.txt |
test_19 |
subtask_01_19.txt |
test_20 |
subtask_01_20.txt |
test_21 |
subtask_01_21.txt |
test_22 |
subtask_01_22.txt |
test_23 |
subtask_01_23.txt |
test_24 |
subtask_01_24.txt |
test_25 |
subtask_01_25.txt |
test_26 |
subtask_01_26.txt |
test_27 |
subtask_01_27.txt |
test_28 |
subtask_01_28.txt |
test_29 |
subtask_01_29.txt |
test_30 |
subtask_01_30.txt |
Case Name |
Status |
Exec Time |
Memory |
subtask_01_01.txt |
AC |
2360 ms |
5512 KB |
subtask_01_02.txt |
AC |
2158 ms |
4904 KB |
subtask_01_03.txt |
AC |
2496 ms |
5760 KB |
subtask_01_04.txt |
AC |
1972 ms |
4860 KB |
subtask_01_05.txt |
AC |
2103 ms |
4780 KB |
subtask_01_06.txt |
AC |
2156 ms |
4820 KB |
subtask_01_07.txt |
AC |
2330 ms |
5008 KB |
subtask_01_08.txt |
AC |
1859 ms |
4624 KB |
subtask_01_09.txt |
AC |
2198 ms |
4900 KB |
subtask_01_10.txt |
AC |
2701 ms |
5144 KB |
subtask_01_11.txt |
AC |
1954 ms |
4728 KB |
subtask_01_12.txt |
AC |
1917 ms |
4788 KB |
subtask_01_13.txt |
AC |
2087 ms |
4744 KB |
subtask_01_14.txt |
AC |
2258 ms |
5888 KB |
subtask_01_15.txt |
AC |
2385 ms |
4772 KB |
subtask_01_16.txt |
AC |
1908 ms |
4740 KB |
subtask_01_17.txt |
AC |
2471 ms |
4960 KB |
subtask_01_18.txt |
AC |
2234 ms |
4900 KB |
subtask_01_19.txt |
AC |
2231 ms |
4932 KB |
subtask_01_20.txt |
AC |
2580 ms |
4896 KB |
subtask_01_21.txt |
AC |
2215 ms |
4744 KB |
subtask_01_22.txt |
AC |
2252 ms |
4848 KB |
subtask_01_23.txt |
AC |
2458 ms |
5044 KB |
subtask_01_24.txt |
AC |
2405 ms |
4776 KB |
subtask_01_25.txt |
AC |
2132 ms |
5760 KB |
subtask_01_26.txt |
AC |
2342 ms |
4920 KB |
subtask_01_27.txt |
AC |
2003 ms |
4732 KB |
subtask_01_28.txt |
AC |
2281 ms |
4784 KB |
subtask_01_29.txt |
AC |
2444 ms |
4964 KB |
subtask_01_30.txt |
AC |
2054 ms |
4712 KB |