| Task: | Entrepreneur |
| Sender: | aalto26aw_005 |
| Submission time: | 2026-09-02 17:17:58 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | details |
| #2 | WRONG ANSWER | 0.00 s | details |
| #3 | ACCEPTED | 0.00 s | details |
| #4 | WRONG ANSWER | 0.00 s | details |
| #5 | WRONG ANSWER | 0.00 s | details |
| #6 | WRONG ANSWER | 0.01 s | details |
| #7 | WRONG ANSWER | 0.01 s | details |
| #8 | ACCEPTED | 0.25 s | details |
| #9 | WRONG ANSWER | 0.26 s | details |
| #10 | WRONG ANSWER | 0.26 s | details |
| #11 | WRONG ANSWER | 0.00 s | details |
| #12 | WRONG ANSWER | 0.00 s | details |
| #13 | WRONG ANSWER | 0.00 s | details |
| #14 | WRONG ANSWER | 0.00 s | details |
Code
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define die(x) return cout << x << endl, 0
#define all(o) o.begin(), o.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define FILE freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define SZ(x) ((int)(x).size())
typedef long double ld;
typedef long long ll;
int gcd(int x,int y){ return (!y ? x : gcd(y, x%y)); }
int to_int(string sconvert){stringstream geek(sconvert);int xconvert = 0; geek >> xconvert; return xconvert;}
const int MAXN=200000+30,MAX_LOG=40,INF=1e15,MOD=1e9+7;
const double PI = acos(-1);
int mod(int x) { return (x % MOD + MOD) % MOD; }
int power(int x,int y){
if(y==0)return 1;
int c=power(x,y/2);
c=(c*c)%MOD;
if(y%2)c=(c*x)%MOD;
return c;
}
bool checkIthBit(int number, int i) {
return (number >> i) & 1;
}
int n, t;
int a[MAXN];
int MAIN(){
cin>>n>>t;
for (int i = 0; i < n; i++){
cin>>a[i];
}
int high = t * a[0];
int low = 0;
for (int i = 0; i < 100; i++){
int mid = (high + low) / 2;
int total_cars = 0;
for (int j = 0; j < n; j++){
total_cars += (mid / a[j]);
}
if(total_cars<= t)low = mid;
else high=mid;
}
cout<<low;
return 0;
}
int32_t main(){
IOS;
int t=1;
// cin>>t;
while(t--)MAIN();
return 0;
}Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 6 5 1 2 1 5 10 4 6 6 |
| correct output |
|---|
| 4 |
| user output |
|---|
| 3 |
Feedback: Incorrect character on line 1 col 1: expected "4", got "3"
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 6 6 4 3 4 9 3 2 6 10 |
| correct output |
|---|
| 6 |
| user output |
|---|
| 5 |
Feedback: Incorrect character on line 1 col 1: expected "6", got "5"
Test 3
Verdict: ACCEPTED
| input |
|---|
| 10 10 5 4 10 7 8 4 1 8 9 2 |
| correct output |
|---|
| 5 |
| user output |
|---|
| 5 |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 1 1000000000 1 |
| correct output |
|---|
| 1000000000 |
| user output |
|---|
| 999999999 |
Feedback: Incorrect character on line 1 col 1: expected "1000000000", got "999999999"
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 1 1000000000 1000000000 |
| correct output |
|---|
| 1000000000000000000 |
| user output |
|---|
| 999999999999999999 |
Feedback: Incorrect character on line 1 col 1: expected "100000000000...", got "999999999999..."
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1000 271 687 392 992 11 410 702 870... |
| correct output |
|---|
| 223 |
| user output |
|---|
| 222 |
Feedback: Incorrect character on line 1 col 3: expected "223", got "222"
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1000 598 523 703 794 737 689 724 26... |
| correct output |
|---|
| 282 |
| user output |
|---|
| 281 |
Feedback: Incorrect character on line 1 col 3: expected "282", got "281"
Test 8
Verdict: ACCEPTED
| input |
|---|
| 200000 1000000000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| 5000 |
| user output |
|---|
| 5000 |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 200000 1 760045594 599341056 300698860 ... |
| correct output |
|---|
| 8214 |
| user output |
|---|
| 9261 |
Feedback: Incorrect character on line 1 col 1: expected "8214", got "9261"
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 200000 1000000000 33941840 210038922 596070148 7... |
| correct output |
|---|
| 371045814100 |
| user output |
|---|
| 371045814119 |
Feedback: Incorrect character on line 1 col 11: expected "371045814100", got "371045814119"
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 25 1000000000 1000000000 1 1 1 1 1 1 1 1 1 1... |
| correct output |
|---|
| 41666667 |
| user output |
|---|
| 768614336414205720 |
Feedback: Incorrect character on line 1 col 1: expected "41666667", got "768614336414..."
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 12 1000000000 1 1 1 1 1 1 1 1 1 1 1 10000000... |
| correct output |
|---|
| 90909091 |
| user output |
|---|
| 90909090 |
Feedback: Incorrect character on line 1 col 8: expected "90909091", got "90909090"
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 23 1000000000 1000000000 1000000000 10000000... |
| correct output |
|---|
| 43478261000000000 |
| user output |
|---|
| 43478260999999999 |
Feedback: Incorrect character on line 1 col 8: expected "434782610000...", got "434782609999..."
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 3 3 10 11 12 |
| correct output |
|---|
| 12 |
| user output |
|---|
| 19 |
Feedback: Incorrect character on line 1 col 2: expected "12", got "19"
