Submission #955704

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9557042024-03-31 10:49:16vjudge1Pinball (JOI14_pinball)C++17
29 / 100
1047 ms15520 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll m, n, i, j, k, a, b, w = 0, r = (1LL << 50);
cin >> m >> n;
vector<vector<ll> > v, vv(m), dp, ndp;
vector<ll> d(m), s(3 * m);
for (i = 0; i < m; i++)
{
cin >> j;
v.push_back({j - 1, i, -1});
cin >> j;
v.push_back({j - 1, i, 1});
cin >> j;
v.push_back({j - 1, i, 0});
cin >> d[i];
}
sort(v.begin(), v.end());
if (v[0][0] || v[3 * m - 1][0] != n - 1)
{
cout << -1;
return 0;
}
for (i = 0; i < 3 * m; i++)
{
if (!i)
s[i] = 0;
else if (v[i][0] > v[i - 1][0])
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...