| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367939 | Almonther | 나일강 (IOI24_nile) | C++20 | 2094 ms | 6256 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
std::vector<long long> calculate_costs(std::vector<int> W, std::vector<int> A,std::vector<int> B, std::vector<int> E){
ll n=W.size();
vector<ll>anss;
array<ll,3>arr[n+5];
for(int i=0;i<n;i++) arr[i]={W[i],A[i],B[i]};
sort(arr,arr+n);
for(auto d:E){
ll num=1;
ll ans=0;
for(int i=1;i<n;i++){
if(arr[i][0]-arr[i-1][0]<=d) num++;
else ans+=num+num%2,num=1;
}
ans+=num+num%2;
anss.push_back(ans);
}
return anss;
}
// int main(){
// calculate_costs({15, 12, 2, 10, 21},
// {5, 4, 5, 6, 3},
// {1, 2, 2, 3, 2},
// {5, 9, 1})
// }| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
