Contest Duration: - (local time) (100 minutes) Back to Home

Submission #9448365

Source Code Expand

Copy
```#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧＿∧
∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
（ ´_ゝ`）　/　 ⌒i     @hamayanhamayan0
／　　　＼　 　  |　|
/　　 /￣￣￣￣/　　|
＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/

int N, K, M;
int A[101];
//---------------------------------------------------------------------------------------------------
void _main() {
cin >> N >> K >> M;
rep(i, 0, N - 1) cin >> A[i];

int tot = 0;
rep(i, 0, N - 1) tot += A[i];

rep(lst, 0, K + 1) {
if (M * N <= lst + tot) {
cout << lst << endl;
return;
}
}

cout << -1 << endl;
}

```

#### Submission Info

Submission Time 2020-01-12 21:08:58+0900 B - Achieve the Goal hamayanhamayan C++14 (GCC 5.4.1) 200 1663 Byte AC 1 ms 256 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
 AC × 3
 AC × 26
Set Name Test Cases
Sample sample_01, sample_02, sample_03
All hand_01, hand_02, hand_03, hand_04, max_01, max_02, max_03, min_01, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, random_11, random_12, random_13, random_14, random_15, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
hand_01 AC 1 ms 256 KB
hand_02 AC 1 ms 256 KB
hand_03 AC 1 ms 256 KB
hand_04 AC 1 ms 256 KB
max_01 AC 1 ms 256 KB
max_02 AC 1 ms 256 KB
max_03 AC 1 ms 256 KB
min_01 AC 1 ms 256 KB
random_01 AC 1 ms 256 KB
random_02 AC 1 ms 256 KB
random_03 AC 1 ms 256 KB
random_04 AC 1 ms 256 KB
random_05 AC 1 ms 256 KB
random_06 AC 1 ms 256 KB
random_07 AC 1 ms 256 KB
random_08 AC 1 ms 256 KB
random_09 AC 1 ms 256 KB
random_10 AC 1 ms 256 KB
random_11 AC 1 ms 256 KB
random_12 AC 1 ms 256 KB
random_13 AC 1 ms 256 KB
random_14 AC 1 ms 256 KB
random_15 AC 1 ms 256 KB
sample_01 AC 1 ms 256 KB
sample_02 AC 1 ms 256 KB
sample_03 AC 1 ms 256 KB