Created
August 16, 2020 09:55
-
-
Save yooniversal/ec7986bf10ea58ea95cf59e4de21219a to your computer and use it in GitHub Desktop.
A. Bad Triangle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdio> | |
#include <vector> | |
using namespace std; | |
#define INF 987654321 | |
typedef long long ll; | |
int main() { | |
cin.tie(nullptr); | |
cout.tie(NULL); | |
ios_base::sync_with_stdio(false); | |
int t; cin >> t; | |
while (t--) { | |
int n; cin >> n; | |
vector<int> a(n); | |
for (int i = 0; i < n; i++) cin >> a[i]; | |
bool ans = false; | |
if (a[0] + a[1] <= a[n - 1]) { | |
cout << "1 2 " << n << '\n'; | |
} | |
else { | |
cout << "-1\n"; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment