| Task: | Entrepreneur |
| Sender: | aalto26aw_005 |
| Submission time: | 2026-09-02 17:45:26 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.00 s | details |
| #2 | RUNTIME ERROR | 0.00 s | details |
| #3 | RUNTIME ERROR | 0.00 s | details |
| #4 | RUNTIME ERROR | 0.00 s | details |
| #5 | RUNTIME ERROR | 0.00 s | details |
| #6 | RUNTIME ERROR | 0.00 s | details |
| #7 | RUNTIME ERROR | 0.00 s | details |
| #8 | RUNTIME ERROR | 0.02 s | details |
| #9 | RUNTIME ERROR | 0.03 s | details |
| #10 | RUNTIME ERROR | 0.03 s | details |
| #11 | RUNTIME ERROR | 0.00 s | details |
| #12 | RUNTIME ERROR | 0.00 s | details |
| #13 | RUNTIME ERROR | 0.00 s | details |
| #14 | RUNTIME ERROR | 0.00 s | details |
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
int n, t;
const int MAXN=200000+30,MAX_LOG=40,INF=1e18+10,MOD=1e9+7;
int a[MAXN];
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, t;
cin>>n>>t;
for (int i = 0; i < n; i++){
cin>>a[i];
}
int low = 0;
int high = a[0] * t;
while (low < high) {
int mid = low + (high - low) / 2;
int cars = 0;
for(int x : a) {
cars += mid / x;
if(cars >= t) {
cars = t;
break;
}
}
if(cars >= t) {
high = mid;
}
else{
low = mid + 1;
}
}
cout<<low<<endl;
}Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 6 5 1 2 1 5 10 4 6 6 |
| correct output |
|---|
| 4 |
| user output |
|---|
| (empty) |
Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 6 6 4 3 4 9 3 2 6 10 |
| correct output |
|---|
| 6 |
| user output |
|---|
| (empty) |
Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 5 4 10 7 8 4 1 8 9 2 |
| correct output |
|---|
| 5 |
| user output |
|---|
| (empty) |
Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| 1 1000000000 1 |
| correct output |
|---|
| 1000000000 |
| user output |
|---|
| (empty) |
Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 1 1000000000 1000000000 |
| correct output |
|---|
| 1000000000000000000 |
| user output |
|---|
| (empty) |
Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 1000 271 687 392 992 11 410 702 870... |
| correct output |
|---|
| 223 |
| user output |
|---|
| (empty) |
Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 1000 598 523 703 794 737 689 724 26... |
| correct output |
|---|
| 282 |
| user output |
|---|
| (empty) |
Test 8
Verdict: RUNTIME ERROR
| input |
|---|
| 200000 1000000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| 5000 |
| user output |
|---|
| (empty) |
Test 9
Verdict: RUNTIME ERROR
| input |
|---|
| 200000 1 760045594 599341056 300698860 ... |
| correct output |
|---|
| 8214 |
| user output |
|---|
| (empty) |
Test 10
Verdict: RUNTIME ERROR
| input |
|---|
| 200000 1000000000 33941840 210038922 596070148 7... |
| correct output |
|---|
| 371045814100 |
| user output |
|---|
| (empty) |
Test 11
Verdict: RUNTIME ERROR
| input |
|---|
| 25 1000000000 1000000000 1 1 1 1 1 1 1 1 1 1... |
| correct output |
|---|
| 41666667 |
| user output |
|---|
| (empty) |
Test 12
Verdict: RUNTIME ERROR
| input |
|---|
| 12 1000000000 1 1 1 1 1 1 1 1 1 1 1 10000000... |
| correct output |
|---|
| 90909091 |
| user output |
|---|
| (empty) |
Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| 23 1000000000 1000000000 1000000000 10000000... |
| correct output |
|---|
| 43478261000000000 |
| user output |
|---|
| (empty) |
Test 14
Verdict: RUNTIME ERROR
| input |
|---|
| 3 3 10 11 12 |
| correct output |
|---|
| 12 |
| user output |
|---|
| (empty) |
