Submission #917483

# Submission time Handle Problem Language Result Execution time Memory
917483 2024-01-28T10:10:05 Z manishjha91 Team Contest (JOI22_team) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using lld = long double;

#ifndef ONLINE_JUDGE
#include "D:\cpp_codes\debugalgo.h"
#else
#define debug(x)
#endif

void solve()
{
	int n;
	cin >> n;

	vector<array<int,3>> a(n);
	for (int i = 0; i < n; i++)
	{
		cin >> a[i][0]>>a[i][1]>>a[i][2];
	}
	
	sort(a.begin(),a.end());
	
	int ans = -1;
	for(int i=0; i<n; i++)
	{
		for(int j=i+1; j<n; j++)
		{
			for(int k=j+1; k<n; k++)
			{
				if(a[k][1]>=max(a[i][1],a[j][1])) continue;
				if(a[k][2]>=max(a[i][2],a[j][2])) continue;
				
				if(a[i][1]>a[j][1] && a[i][2]<a[j][2])
				{
					ans = max(ans, a[k][0] + a[i][1] + a[j][2]);
				}
				else if(a[i][1]<a[j][1] && a[i][2]>a[j][2])
				{
					ans = max(ans, a[k][0] + a[j][1] + a[i][2]);
				}
				
			}
		}
	}
	
	cout<<ans<<"\n";
	
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

// #ifndef ONLINE_JUDGE
// 	freopen("error.txt", "w", stderr);
// #endif

	int tt = 1;
	// cin >> tt;
	while (tt--)
	{
		solve();
	}
}

Compilation message

team.cpp:9:10: fatal error: D:\cpp_codes\debugalgo.h: No such file or directory
    9 | #include "D:\cpp_codes\debugalgo.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.