QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#312076#7123. Robot ContestYeahPotato#Compile Error//C++141020b2024-01-23 12:40:222024-01-23 12:40:23

Judging History

你现在查看的是测评时间为 2024-01-23 12:40:23 的历史记录

  • [2024-04-28 08:33:30]
  • 管理员手动重测本题所有提交记录
  • [2024-04-21 00:28:34]
  • 管理员手动重测本题所有提交记录
  • [2024-01-23 12:40:23]
  • 评测
  • [2024-01-23 12:40:22]
  • 提交

answer

#include "overtaking.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector <int> vi;
typedef vector <ll> vl;
#define pb push_back
const int N = 2005;
int n, m, vn, p[N][N]; vi s; ll f[N][N];
void init(int L, int n, vl t, vi v, int vn, int m, vi s) {
	for (int i=0; i<n; i++)
		f[0][i] = t[i];
	for (int i=1; i<m; i++) {
		for (int j=0; j<n; j++)
			f[i][j] = f[i-1][j] + 1ll * (s[i] - s[i-1]) * v[j], p[i-1][j] = j;
		sort (p[i-1], p[i-1]+n, [=] (const int &j, const int &k) {
			return f[i-1][j] < f[i-1][k] || f[i-1][j] == f[i-1][k] && f[i][j] < f[i][k];
		});
		for (int j=1; j<n; j++)
			f[i][p[i-1][j]] = max(f[i][p[i-1][j]], f[i][p[i-1][j-1]]);
	}
	:: n = n, :: m = m, :: vn = vn, :: s = s;
}

ll arrival_time(ll tn) {
	for (int i=0; i<m-1; i++) {
		int j = lower_bound (p[i], p[i]+n, tn, [=] (const int &x, const int &y) { return f[i][x] < y; }) - p[i] - 1;
		tn += 1ll * (s[i+1] - s[i]) * vn;
		if (~ j) tn = max(tn, f[i+1][p[i][j]]);
	} return tn;
}

详细

answer.code:1:10: fatal error: overtaking.h: No such file or directory
    1 | #include "overtaking.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.