solution
stringlengths
11
983k
difficulty
int64
0
21
language
stringclasses
2 values
t=int(input()) while(t): t=t-1 n=int(input()) a=list(map(int,input().split())) if(a[0]+a[1]<=a[-1]): print(1,2,n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; if (arr[0] + arr[1] > arr[n - 1]) cout << -1 << endl; else cout << "1" << " " << "2" ...
7
CPP
#include <bits/stdc++.h> using namespace std; long long n, a[100005], T, c; int main() { cin >> T; for (long long j = 1; j <= T; j++) { cin >> n; long long op; for (long long i = 1; i <= n; i++) { cin >> a[i]; } if (a[n] >= a[1] + a[2]) cout << "1 2 " << n << endl; else cou...
7
CPP
t = int(input()) myList = [] for _ in range(t): n = int(input()) a = list(map(int, input().split())) if a[0] + a[1] > a[-1]: myList.append([-1]) else: elem = [1, 2, n] myList.append(elem) for thing in myList: print(*thing)
7
PYTHON3
try: for i1 in range(int(input())): n=int(input()) a=list(map(int,input().split())) t=0 if a[0]+a[1]<=a[-1] : print(1,2,n) else: print(-1) except: pass
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) lista=list(map(int,input().split())) if(lista[0]+lista[1]>lista[-1]): print(-1) else: print(1,2,n)
7
PYTHON3
t=int(input()) while(t): n=int(input()) l=list(map(int,input().split())) l.sort() if(l[0]+l[1]<=l[-1]): print(1,2,n) else: print(-1) t=t-1
7
PYTHON3
import sys import math import bisect from sys import stdin, stdout from math import gcd, floor, sqrt, log from collections import defaultdict as dd from bisect import bisect_left as bl, bisect_right as br from collections import Counter #sys.setrecursionlimit(100000000) inp = lambda: int(input()) strng = lambda: inpu...
7
PYTHON3
t = int(input()) for i in range(t): n = int(input()) a = list(map(int, input().split())) found = False for j in range(2, n): if a[0] + a[1] <= a[j]: print(1, 2, j + 1) found = True break if not found: print(-1)
7
PYTHON3
n = int(input()) a = [] b = [] for i in range(n): s = input() a.append(list(map(int, input().split()))) a[-1].sort() if a[-1][0] + a[-1][1] > a[-1][-1]: print(-1) else: print(1, 2, len(a[i]))
7
PYTHON3
import sys inp=sys.stdin.buffer.readline inin=lambda typ=int: typ(inp()) inar=lambda typ=int: [typ(x) for x in inp().split()] inst=lambda : inp().decode().strip() _T_=inin() for _t_ in range(_T_): n=inin() a=inar() if a[0]+a[1]>a[n-1]: print(-1) else: print(1,2,n)
7
PYTHON3
def calc(n,A): f=A[0] l=A[1] bool=False for i in range(2,n): if A[i]>=f+l: print(1,2,i+1) bool =True break if bool is False: print(-1) for _ in range(int(input())): n=int(input()) A=list(int(i)for i in input().split()) calc(n,A)
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) arr=[int(item) for item in input().split()] if(arr[0]+arr[1]<=arr[-1]): print(1,2,n) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) a = list(map(int,input().split())) s = a[0]+a[1] t = a[-1] if s <= t: print(1,2,n) else: print(-1)
7
PYTHON3
import sys import math import itertools import functools import collections import operator import fileinput import copy ORDA = 97 # a def ii(): return int(input()) def mi(): return map(int, input().split()) def li(): return [int(i) for i in input().split()] def lcm(a, b): return abs(a * b) // math.gcd(a, b) def revn...
7
PYTHON3
t = int(input()) while(t>0): t -= 1 n = int(input()) line = input().split(" ") numbers = [] for i in line: numbers.append(int(i)) found = False # print(numbers) aa = -1 bb = -1 cc = -1 i = 0 j = 1 k = n - 1 a = numbers[i] b = numbers[j] c = numbers[k] if a+b>c and a+c>b and b+c>a: found = True el...
7
PYTHON3
for i in range(int(input())): n = int(input()) L = list(map(int, input().split())) if L[n - 1] >= L[0] + L[1]: print(1, 2, n) else: print(-1)
7
PYTHON3
t = int(input()) answer = [0]*t for i in range(t): s = int(input()) a = [int(i) for i in input().split()] if a[0] + a[1] <= a[-1]: answer[i] = '1 2 '+str(s) else: answer[i] = -1 for i in range(t): print(answer[i])
7
PYTHON3
T=int(input()) for t in range(T): n=int(input()) A=list(map(int,input().split())) if A[0]+A[1]<=A[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) a=list(map(int,input().split())) if a[-1]>=a[0]+a[1]: print(1,2,n) else: print(-1)
7
PYTHON3
for t in range(int(input())): n=int(input()) arr=[int(k) for k in input().split()] if arr[0]+arr[1]<=arr[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
import sys,math try:sys.stdin,sys.stdout=open('input.txt','r'),open('out.txt','w') except:pass from sys import stdin,stdout;mod=int(1e9 + 7);from statistics import mode from collections import *;from math import ceil,floor,inf,factorial,gcd,log2,sqrt,log ii1=lambda:int(stdin.readline().strip()) is1=lambda:stdin.readlin...
7
PYTHON3
for _ in range(int(input())): input() arr=[int(x) for x in input().split()] print(*([1,2,len(arr)],[-1])[arr[0]+arr[1]>arr[-1]])
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; if ((long long)a[0] + a[1] > (long long)a[n - 1]) cout << -1 << '\n'; else { ...
7
CPP
def main(): t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) x, y = a[0], a[1] z = x + y ans = 0 for i in range(2, n): if a[i] >= z: ans = i+1 break if ans == 0: print(-1) else: print(1, 2, ans) main()
7
PYTHON3
t = int(input()) while (t): n = int(input()) a = input().split() a = list(map(int,a)) if (a[0]+a[1] <= a[-1]): print(1,2,n) else: print(-1) t -= 1
7
PYTHON3
for _ in range((int(input()))): n=int(input()) a=list(map(int,input().split())) ok=False for i in range(n-1): #print(a[i]+a[i+1]-a[n-1-i]) if a[i]+a[i+1]<=a[n-1-i]: ok=True print(i+1,i+2,n-i) break if not ok: print(-1)
7
PYTHON3
for _ in " "*int(input()): n=int(input()) a=list(map(int,input().split())) if a[0] + a[1] > a[-1]: print(-1) else: print(1,2,n)
7
PYTHON3
for s in[*open(0)][2::2]:x,y,*a,z=map(int,s.split());print(*([1,2,len(a)+3],[-1])[x+y>z])
7
PYTHON3
# for s in[*open(0)][2::2]:a=s;print(s) for s in[*open(0)][2::2]:x,y,*a,z=map(int,s.split());print(*([1,2,len(a)+3],[-1])[x+y>z])
7
PYTHON3
for _ in range (int(input())): n = int(input()) a = [int(i) for i in input().split()] if a[0]+a[1]<=a[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) if a[0]+a[1] <= a[-1]: print("1 2",n) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split()))[:n] if l[0]+l[1]<=l[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
for T in range(int(input())): n = int(input()) l= list(map(int,input().split())) a1 = l[0] a2 = l[1] a3 = l[-1] if(a1+a2 <= a3): print(str(1)+" "+str(2)+" "+str(n)) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) s = list(map(int,input().split())) k = s[0] + s[1] if k <= s[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
t = int(input()) for _ in range(t): n = int(input()) a = list(map(int,input().split())) if a[0] + a[1] <= a[n - 1]: print(1, 2, n) else: print(-1)
7
PYTHON3
n1=int(input()) for test in range (n1): n = int(input()) set1=[int(y) for y in input().split()] m=set1[0]+set1[1] booli = False track=0 for i in range(2,n): if(set1[i]>=m): track=i+1 break if(track!=0): print("1 "+"2 "+str(track)) else: p...
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) a=list(map(int,input().split())) if a[0]+a[1]<=a[n-1]: print(1,2,n) else: print(-1)
7
PYTHON3
t= int(input()) ans=[] for i in range(t): n= int(input()) d=[int(i) for i in input().split()] q=1 x,y=d[0],d[1] for j in range(2,n): if (x+y)<=d[j]: ans.append((1,2,j+1)) q=0 break if q!=0: ans.append(-1) for i in ans: if i!=-1: pr...
7
PYTHON3
import sys,math from collections import deque,defaultdict import operator as op from functools import reduce sys.setrecursionlimit(10**6) I=sys.stdin.readline def ii(): return int(I().strip()) def li(): return list(map(int,I().strip().split())) def mi(): return map(int,I().strip().split()) def ncr(n, r): r =...
7
PYTHON3
t = int(input()) for i in range(t): n = int(input()) arr = list(map(int, input().split())) if (arr[0] + arr[1] > arr[-1]): print(-1) else: print(1, 2, n)
7
PYTHON3
#include <bits/stdc++.h> long long int a[50004]; int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &a[i]); if (a[1] + a[2] <= a[n]) { printf("%d %d %d\n", 1, 2, n); } else printf("-1\n"); } }
7
CPP
for _ in range(int(input())): n=int(input()) arr=list(map(int,input().split())) if(arr[0]+arr[1]<=arr[-1]): print(1,2,n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; int cas = 0; while (t--) { int n; cin >> n; int a[n], a1 = 0, a2 = 0, a3 = 0; for (int i = 0; i < n; i++) cin >> a[i]; if (a[0] + a[1] <= a[n - 1]) cout << 1 << " " << 2 << " " << n << endl; else cout...
7
CPP
import sys import math from collections import defaultdict,Counter # input=sys.stdin.readline # def print(x): # sys.stdout.write(str(x)+"\n") # sys.stdout=open("CP1/output.txt",'w') # sys.stdin=open("CP1/input.txt",'r') # m=pow(10,9)+7 t=int(input()) for i in range(t): n=int(input()) a=list(map(int,input...
7
PYTHON3
for i in range(int(input())): n = int(input()) A = list(map(int,input().split())) ans = [] if (abs(A[0]-A[n-1])>=A[1]): ans.append(1) ans.append(2) ans.append(n) elif A[0] >= A[n-1]+A[n-2]: ans.append(1) ans.append(n-1) ans.append(n) else:ans.appe...
7
PYTHON3
def process(): n=int(input()) li=list(map(int,input().split())) li.sort() hashi={} c0=1 for i in li: if i in hashi: hashi[i].append(c0) else: hashi[i]=[c0] c0+=1 a,b,c=li[0],li[1],li[-1] if(a+b>c): print("-1") else: ans=...
7
PYTHON3
from collections import defaultdict import copy def ii():return int(input()) def si():return input() def li():return list(map(int,input().split())) def mi():return map(int,input().split()) t=ii() for _ in range(t): n=ii() arr=li() flag=False a=arr[0] b=arr[1] for i in range(n-1,1,-1): i...
7
PYTHON3
def non_degenerate(t, N): for k in range(2, N): if t[0]+t[1] <= t[k]: return str(1)+" "+ str(2)+" "+str(k+1) return -1 I=input for _ in range(int(I())): I() t= list(map(int,I().split())) print(non_degenerate(t, len(t)))
7
PYTHON3
res = '' for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) if a[n-1] >= a[0] + a[1]: res += f'1 2 {n}\n' else: res += '-1\n' print(res)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int t; scanf("%d", &t); for (int i = 0; i < t; i++) { int n; scanf("%d", &n); vector<int> a(n); for (int j = 0; j < n; j++) scanf("%d", &a[j]); if (a[0] + a[1] <= a[n - 1]) printf("%d %d %d\n", 1, 2, n); else printf("-1...
7
CPP
# for #!/usr/bin/env python import os import sys from io import BytesIO, IOBase # region fastio BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode ...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, a, c, d; cin >> n; while (n--) { int i, j, k, w, q; cin >> a; long g, h, e[a], m = 0; for (i = 1; i <= a; i++) cin >> e[i]; for (i = 2; i <= a - 1; i++) { if (e[i] + e[i - 1] <= e[a - i + 2]) { m++; g = i -...
7
CPP
# cook your dish here from sys import stdin,stdout from collections import Counter from itertools import permutations import bisect import math I=lambda: map(int,stdin.readline().split()) I1=lambda: stdin.readline() for _ in range(int(I1())): n=int(I1()) l=list(I()) x,y,z=l[0],l[1],l[n-1] if(x+y>z): pr...
7
PYTHON3
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) if a[n-1] >= a[0] + a[1]: print("1 2 " + str(n)) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { long long int t; cin >> t; while (t--) { long long int n; cin >> n; long long int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } if (a[0] + a[1] <= a[n - 1]) { cout << 1 << " " << 2 << " " << n << endl; } else {...
7
CPP
t = int(input()) while t > 0: n = int(input()) arr = list(map(int, input().split())) if arr[0]+arr[1] <= arr[-1]: print(1,2,n) else: print(-1) t -= 1
7
PYTHON3
for i in range(int(input())): n=int(input()) a=[int(x) for x in input().split()] k=True if (a[0]+a[1])<=a[-1]: print(1,2,n) k=False if k: print(-1)
7
PYTHON3
def find(a): result = [] i = a[0] j = a[1] if(i+j<= a[-1]): result = [1,2,len(a)] return result return -1 t = int(input()) for i in range(t): n = int(input()) a = list(map(int,input().split())) answer = find(a) if(answer!=-1): print(*...
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=list(map(int, input().split())) a=l[0]+l[1] f=1 for i in range(2,n): if(a<=l[i]): f=0 break if(f): print(-1) else: print(1,2,i+1)
7
PYTHON3
from collections import deque from math import * import heapq from random import * import sys from copy import deepcopy t=int(input()) for i in range(t): n=int(input()) l=list(map(int,input().split())) a=l[0] b=l[1] c=l[-1] if a==0 and b==0 and c==0: print(1,2,n) else: if a+b>c: print(-1) else: p...
7
PYTHON3
#!/usr/bin/env python import os import sys from io import BytesIO, IOBase def main(): for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) # flag = 0 # for i in range(n): # for j in range(i+1, n): # for k in range(j+1, n): ...
7
PYTHON3
import os inp=os.read(0,os.fstat(0).st_size).split(b"\n");_ii=-1 def rdln(): global _ii _ii+=1 return inp[_ii] inin=lambda: int(rdln()) inar=lambda: [int(x) for x in rdln().split()] inst=lambda: rdln().decode() _T_=inin() for _t_ in range(_T_): n=inin() a=inar() if a[0]+a[1]>a[n-1]: prin...
7
PYTHON3
[(lambda N,n:print('1 2 %d'%N if n[0]+n[1]<=n[N-1]else-1))(int(input()),list(map(int,input().split())))for t in range(int(input()))]
7
PYTHON3
#include <bits/stdc++.h> using namespace std; template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; int main() { int t; cin >> t; while (t--) { int n; cin >> n; V<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } if (a[0] + a[1] <= a[n - 1]) { cou...
7
CPP
#include <bits/stdc++.h> using namespace std; const double pi = acos(-1); int main() { ios_base::sync_with_stdio(0); cin.tie(0); long long tc; cin >> tc; while (tc--) { long long n, x, a, b, y; cin >> y >> a >> b; n = y - 2; while (n--) cin >> x; if (a + b > x) cout << "-1\n"; el...
7
CPP
t=int(input()) while(t>0): t=t-1 n=int(input()) a=input().split() x=int(a[0]) y=int(a[1]) z=int(a[n-1]) if(x+y<=z): print(1,2,n) else: print(-1)
7
PYTHON3
t=int(input()); for i in range(t): n=int(input()); s=list(map(int,input().split())); c=0; for i in range(n-2): j=i+1; for k in range(j+1,n): if(s[i]+s[j]>s[-1]): c=-1; break; elif(s[i]+s[j]<=s[k]): c=1; ...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const double pi = 3.14159265358979323846; void fast() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } long long n, m; int32_t main() { fast(); long long T, t; cin >> T; for (t = 1; t <= T; t++) { long long n; cin >> n; long long a[n]; ...
7
CPP
for _ in range(int(input())): n = int(input()) a = [int(x) for x in input().split()] print('1 2', n) if a[n-1] >= a[0] + a[1] else print('-1')
7
PYTHON3
for _ in range(int(input())): n = int(input()) a = [int(x) for x in input().split()] flag = 0 if a[0]+a[1]<=a[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
''' Name : Jaymeet Mehta codeforces id :mj_13 Problem : ''' from sys import stdin,stdout from bisect import bisect test=int(stdin.readline()) for _ in range(test): n=int(stdin.readline()) a = [int(x) for x in stdin.readline().split()] ok=False for i in range(n-1): if a[i]+a[i+1]<=a[-1]: ...
7
PYTHON3
for i in range(int(input())): n = int(input()) a = list(map(int, input().split())) if a[0] + a[1] <= a[-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
import sys,math input=sys.stdin.readline t=int(input()) for r in range(t): n = int(input()) l = list(map(int,input().split())) a = l[0] b = l[1] c = l[n-1] if a+b > c and b+c>a and a+c>b: print(-1) else: print(1,2,n)
7
PYTHON3
import math from collections import Counter for test in range(int(input())): n=int(input()) A=list(map(int,input('').split())) ans=[1,2,n] if A[0]+A[1]<=A[-1]: print(*ans) else: print(-1)
7
PYTHON3
def checkTriangle(arr): if len(arr) < 3: return -1 a, b, c = arr[0], arr[1], arr[-1] if a + b <= c: return 1, 2, len(arr) else: return -1 if __name__ == "__main__": n_list = [] array_list = [] cases = int(input()) for i in range(cases): n_list.append(input()) array = list(map(int, input().split())) ...
7
PYTHON3
from sys import stdin input = stdin.readline for _ in range(int(input())): n = int(input()) a = [int(x) for x in input().split()] if a[0] + a[1] > a[-1]: print(-1) else: print(1, 2, n)
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=[*map(int,input().split())] if (a[0]+a[1]>a[n-1]): print(-1) else: print(1,2,n)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int t, n; int main() { cin >> t; for (int i = 0; i < t; i++) { cin >> n; long long arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } if (arr[0] + arr[1] <= arr[n - 1]) { cout << "1 2 " << n << '\n'; } else { cout << -1 << '...
7
CPP
def nik(n,rud): print(1,2,n)if (rud[0]+rud[1] <= rud[-1]) else print(-1) for _ in range(int(input())): n = int(input()) rud = list(map(int,input().split())) nik(n,rud)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const int mxN = 5e4; int n, chu[mxN]; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { cin >> n; for (int i = 0; i < n; i++) cin >> chu[i]; if (chu[0] + chu[1] <= chu[n - 1]) cout << 1 << " " << 2 << " " << n << "\...
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { long long t; cin >> t; while (t--) { long long n; long long i; cin >> n; long long a[n]; for (i = 0; i < n; i++) { cin >> a[i]; } if (a[0] + a[1] <= a[n - 1]) cout << 1 << " " << 2 << " " << n << "\n"; else ...
7
CPP
for i in range(int(input())): n = int(input()) arr = [int(i) for i in input().split()] if(arr[0]+arr[1]<=arr[-1]): print(1,2,n) else: print("-1")
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=list(map(int,input().split())) if (a[0]+a[1])<=a[n-1]: x=[1,2,n] print(*x) else: print(-1)
7
PYTHON3
T=int(input()) for i in range(T): N=int(input()) lst=list(map(int,input().split())) lst.sort() if N<3: print(-1) else: x=lst[0] y=lst[1] z=lst[-1] if x+y>z: print(-1) else: print(1,2,N,sep=" ")
7
PYTHON3
t = int(input()) for i in range(t): n = int(input()) arr = list(map(int,input().split())) if (arr[0] + arr[1]) > arr[-1]: print('-1') else: print(1,2,n)
7
PYTHON3
import time from collections import deque def inpt(): return int(input()) def inpl(): return list(map(int,input().split())) def inpm(): return map(int,input().split()) def solve(): n = inpt() l = inpl() if(l[0]+l[1]<=l[-1]): print(1,2,n) return else: print(-1) ...
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=list(map(int,input().split())) a.sort() if a[0]+a[1]<=a[-1]: print(f"1 2 {n}") else: print("-1")
7
PYTHON3
t=int(input("")) for i in range(t): la=int(input("")) a=[int(x) for x in input("").split()] if a[0]+a[1]>a[-1]: print(-1) else: for i in range(2,la): if a[0]+a[1]<=a[i]: print(1,2,i+1) break
7
PYTHON3
def check(u, v, w): x = u + v - w y = u - v + w z = -u + v + w return x <= 0 or y <= 0 or z <= 0 def solve(): n = int(input()) a = list(map(int, input().split())) if check(a[0], a[1], a[-1]): print(1, 2, n) return if check(a[0], a[-1], a[-2]): print(1, n - 1, n) ...
7
PYTHON3
import sys #another one inp=sys.stdin.buffer.readline inin=lambda : int(inp()) inar=lambda : [int(x) for x in inp().split()] inst=lambda : inp().decode().strip() _T_=inin() for _t_ in range(_T_): n=inin() a=inar() if a[0]+a[1]>a[n-1]: print(-1) else: print(1,2,n)
7
PYTHON3
import sys def input(): return sys.stdin.readline().rstrip() def input_split(): return [int(i) for i in input().split()] testCases = int(input()) answers = [] for _ in range(testCases): #take input n = int(input()) arr = input_split() x,y,z = arr[0], arr[1], arr[-1] if x +y > z: ans = -1 else: ans = "1...
7
PYTHON3
import sys input = sys.stdin.readline t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) if a[0] + a[1] <= a[-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
# ========= /\ /| |====/| # | / \ | | / | # | /____\ | | / | # | / \ | | / | # ========= / \ ===== |/====| # code def main(): t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, in...
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) ar=list(map(int,input().split())) a=ar[0] b=ar[1] c=ar[-1] if c>=a+b: print(1,2,n) else: print(-1)
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) L=list(map(int, input().split())) if L[0]+L[1]>L[n-1]: print(-1) else: print(1, 2, n)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const long long inf = 1e9 + 7; const long long INF = 1LL << 60; const long long mod = 1e9 + 7; const long double eps = 1e-8; const long double pi = acos(-1.0); template <class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } templa...
7
CPP
MOD = 1000000007 from collections import defaultdict as dd,Counter,deque def si(): return input() def ii(): return int(input()) def li(): return list(map(int,input().split())) def mi(): return map(int,input().split()) def out(v): print(v) def spout(): print(v,end=" ") def d2b(n): return bin(n).replace("0b","") def two...
7
PYTHON3
for _ in range(int(input())): n = int(input()) arr = list(map(int,input().split())) if arr[-1]>=arr[0]+arr[1]: print(1,2,n) else: print(-1)
7
PYTHON3
test = int(input()) for t in range(test): n = int(input()) lst = list(map(int, input().split())) maxm = max(lst) minm = lst[0] final =list() for i in range(n): if lst[i] == maxm: c = i+1 break Ase = False for i in range(1, len(lst)): if minm + lst[...
7
PYTHON3