Submission #43582669
Source Code Expand
import std;
void read(T...)(string S, ref T args) {
auto buf = S.split;
foreach (i, ref arg; args) {
arg = buf[i].to!(typeof(arg));
}
}
void main () {
int N, P, Q; readln.read(N, P, Q);
int[] D = readln.split.to!(int[]);
solve(N, P, Q, D);
}
void solve (int N, int P, int Q, int[] D) {
int minD = int.max;
foreach (d; D) {
minD = min(minD, d);
}
writeln(min(P, Q+minD));
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Order Something Else |
| User | InTheBloom |
| Language | D (DMD 2.091.0) |
| Score | 100 |
| Code Size | 456 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3720 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 4 ms | 3640 KiB |
| 001.txt | AC | 2 ms | 3468 KiB |
| 002.txt | AC | 6 ms | 3576 KiB |
| 003.txt | AC | 2 ms | 3720 KiB |
| 004.txt | AC | 2 ms | 3580 KiB |
| 005.txt | AC | 2 ms | 3560 KiB |
| 006.txt | AC | 2 ms | 3628 KiB |
| 007.txt | AC | 3 ms | 3528 KiB |
| 008.txt | AC | 7 ms | 3616 KiB |
| 009.txt | AC | 2 ms | 3504 KiB |
| 010.txt | AC | 2 ms | 3632 KiB |
| 011.txt | AC | 2 ms | 3584 KiB |
| 012.txt | AC | 2 ms | 3624 KiB |
| example0.txt | AC | 2 ms | 3676 KiB |
| example1.txt | AC | 3 ms | 3560 KiB |