// Author: Kajetan Ramsza
#include "deliveries.h"
#include "bits/stdc++.h"
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)x.size()
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int,int> pii;
#ifdef DEBUG
auto& operator<<(auto &os, const pair<auto, auto> &p) {
return os<<"("<<p.first<<", "<<p.second<<")";
}
auto& operator<<(auto &os, const auto &v) {
os<<"{";
for(auto it=begin(v);it!=end(v);++it) {
if(it!=begin(v)) os<<", ";
os<<(*it);
}
return os<<"}";
}
void dbg_out(auto... x) {
((cerr<<' '<<x), ...) << endl;
}
#define dbg(x...) cerr<<"("<<#x<<"):", dbg_out(x);
#else
#define dbg(...)
#endif
int n;
ll dist;
vi w;
void init(int N, vi U, vi V, vi T, vi W) {
n = N;
dist = T[0];
w = W;
}
ll max_time(int S, int X) {
w[S] = X;
return (ll)min(w[0]+1, w[1]) * dist * 2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
7760 KB |
Output is correct |
2 |
Correct |
57 ms |
10064 KB |
Output is correct |
3 |
Correct |
55 ms |
10320 KB |
Output is correct |
4 |
Correct |
54 ms |
10324 KB |
Output is correct |
5 |
Correct |
57 ms |
10316 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '1627540', found: '204' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
7760 KB |
Output is correct |
2 |
Correct |
57 ms |
10064 KB |
Output is correct |
3 |
Correct |
55 ms |
10320 KB |
Output is correct |
4 |
Correct |
54 ms |
10324 KB |
Output is correct |
5 |
Correct |
57 ms |
10316 KB |
Output is correct |
6 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '45306', found: '144' |
7 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
7760 KB |
Output is correct |
2 |
Correct |
57 ms |
10064 KB |
Output is correct |
3 |
Correct |
55 ms |
10320 KB |
Output is correct |
4 |
Correct |
54 ms |
10324 KB |
Output is correct |
5 |
Correct |
57 ms |
10316 KB |
Output is correct |
6 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '129238', found: '176' |
7 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
7760 KB |
Output is correct |
2 |
Correct |
57 ms |
10064 KB |
Output is correct |
3 |
Correct |
55 ms |
10320 KB |
Output is correct |
4 |
Correct |
54 ms |
10324 KB |
Output is correct |
5 |
Correct |
57 ms |
10316 KB |
Output is correct |
6 |
Incorrect |
1 ms |
348 KB |
3rd lines differ - on the 1st token, expected: '1627540', found: '204' |
7 |
Halted |
0 ms |
0 KB |
- |