Submission #11310513


Source Code Expand

Copy
void main() {
	auto ip = readAs!(long[]), X = ip[0], Y = ip[1], A = ip[2], B = ip[3], C = ip[4];
	auto p = readAs!(long[]);
	auto q = readAs!(long[]);
	auto r = readAs!(long[]);
	p.sort!"a > b"(); q.sort!"a > b"(); r.sort!"a > b"();
	p = p[0..X]; q = q[0..Y];
	long[] arr = r ~ p ~ q;
	arr.sort!"a > b"();
	arr[0..X+Y].sum.writeln;
}

// ===================================

import std.stdio;
import std.string;
import std.functional;
import std.algorithm;
import std.range;
import std.traits;
import std.math;
import std.container;
import std.bigint;
import std.numeric;
import std.conv;
import std.typecons;
import std.uni;
import std.ascii;
import std.bitmanip;
import core.bitop;

T readAs(T)() if (isBasicType!T) {
	return readln.chomp.to!T;
}
T readAs(T)() if (isArray!T) {
	return readln.split.to!T;
}

T[][] readMatrix(T)(uint height, uint width) if (!isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		res[i] = readAs!(T[]);
	}
	return res;
}

T[][] readMatrix(T)(uint height, uint width) if (isSomeChar!T) {
	auto res = new T[][](height, width);
	foreach(i; 0..height) {
		auto s = rs;
		foreach(j; 0..width) res[i][j] = s[j].to!T;
	}
	return res;
}

int ri() {
	return readAs!int;
}

double rd() {
	return readAs!double;
}

string rs() {
	return readln.chomp;
}

Submission Info

Submission Time
Task E - Red and Green Apples
User private_yusuke
Language D (DMD64 v2.070.1)
Score 500
Code Size 1367 Byte
Status AC
Exec Time 121 ms
Memory 16240 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 3
AC × 25
Set Name Test Cases
Sample Sample_01.txt, Sample_02.txt, Sample_03.txt
All Sample_01.txt, Sample_02.txt, Sample_03.txt, case_01.txt, case_03.txt, case_05.txt, case_07.txt, case_09.txt, case_10.txt, case_11.txt, case_12.txt, case_13.txt, case_15.txt, case_16.txt, case_17.txt, case_18.txt, case_19.txt, case_20.txt, case_21.txt, case_22.txt, case_23.txt, case_24.txt, case_25.txt, case_26.txt, case_27.txt
Case Name Status Exec Time Memory
Sample_01.txt AC 1 ms 256 KB
Sample_02.txt AC 1 ms 256 KB
Sample_03.txt AC 1 ms 256 KB
case_01.txt AC 115 ms 14708 KB
case_03.txt AC 117 ms 14580 KB
case_05.txt AC 116 ms 14964 KB
case_07.txt AC 109 ms 11376 KB
case_09.txt AC 109 ms 11376 KB
case_10.txt AC 110 ms 11376 KB
case_11.txt AC 118 ms 14804 KB
case_12.txt AC 120 ms 15316 KB
case_13.txt AC 121 ms 16240 KB
case_15.txt AC 121 ms 15444 KB
case_16.txt AC 113 ms 10964 KB
case_17.txt AC 113 ms 10964 KB
case_18.txt AC 1 ms 256 KB
case_19.txt AC 1 ms 256 KB
case_20.txt AC 86 ms 13000 KB
case_21.txt AC 69 ms 8744 KB
case_22.txt AC 84 ms 9820 KB
case_23.txt AC 41 ms 4392 KB
case_24.txt AC 72 ms 10004 KB
case_25.txt AC 85 ms 9372 KB
case_26.txt AC 60 ms 9232 KB
case_27.txt AC 76 ms 8664 KB