solution
stringlengths
11
983k
difficulty
int64
0
21
language
stringclasses
2 values
from sys import * input = stdin.readline output = stdout.write for _ in range(int(input())): n = int(input()) a = list(map(int,input().split())) ind = -1 sn = a[0]+a[1] for i in range(2,n): if(a[i]>=sn): ind = i break if(i...
7
PYTHON3
t=int(input()) while t>0: inp_int=int(input()) inp=list(map(int, input().split())) if inp[0]+inp[1]<=inp[inp_int-1]: print(1,2,inp_int) elif inp[0]<=inp[inp_int-1]-inp[inp_int-2]: print(1,inp_int-1,inp_int) else: print(-1) t-=1
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) a=list(map(int,input().split())) s=a[0]+a[1] sa=a[n-1] if s<=sa : print("{} {} {}".format(1,2,n)) else: print('-1')
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int t, n; cin >> t; for (int i = 0; i < t; i++) { cin >> n; unsigned long long int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } if (arr[0] + arr[1] <=...
7
CPP
a=int(input()) for i in range(a): b=int(input()) l=list(map(int,input().split())) if l[0]+l[1]<=l[-1]: print(1,2,b) else: print(-1)
7
PYTHON3
def test(a, b, c): if a+b <= c or b+c <= a or a+c <= b: return False return True n = int(input()) ans = [] for i in range(n): key = True n = int(input()) a, b, c = 0, 1, n-1 m = [int(j) for j in input().split()] for j in range(1, n-1): b = j if not test(m[a], m[b], ...
7
PYTHON3
if __name__ == "__main__": # Happens num times num_cases = int(input()) for i in range(num_cases): # Do loop calling length and integers, num times length = int(input()) integers = list(map(int, input().split())) if integers[0] + integers[1] > integers[-1]: prin...
7
PYTHON3
import sys input = sys.stdin.readline for _ in range(int(input())): n = int(input()) lst = list(map(int, input().split())) a, b, c = [1, 2, -1] end = False for i in range(2, n): if lst[a-1] + lst[b-1] <= lst[i] or lst[a-1] + lst[i] <= lst[b-1] or lst[b-1] + lst[i] <= lst[a-1]: end = True print(a, b, i+1)...
7
PYTHON3
# ---------------------------iye ha aam zindegi--------------------------------------------- import math import heapq, bisect import sys from collections import deque, defaultdict from fractions import Fraction import sys mod = 10 ** 9 + 7 mod1 = 998244353 #setrecursionlimit(300000) # ------------------------------warm...
7
PYTHON3
import sys input = sys.stdin.readline for kek 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
from bisect import bisect_left for _ in range(int(input())): N = int(input()) X = list(map(int, input().split())) Index = bisect_left(X, X[0] + X[1]) print(-1 if Index == N else "1 2 " + str(Index+1)) # New Start
7
PYTHON3
t=int(input()) while(t): n=int(input()) l=list(map(int,input().split())) a=l[0]+l[1] b=l[-1] if(a<=b): print(1,2,n) else: print(-1) t-=1
7
PYTHON3
for _ in range(int(input())): n,a = int(input()),list(map(int,input().split())) print(1,2,n) if a[0]+a[1] <= a[-1] else print(-1)
7
PYTHON3
import sys;input=sys.stdin.readline T, = map(int, input().split()) for _ in range(T): N, = map(int, input().split()) X = list(map(int, input().split())) if X[0]+X[1]<=X[-1]: print(1, 2, N) else: print(-1)
7
PYTHON3
def ans(n,A): if A[0]+A[1]>A[-1]: return [-1] else: return [1,2,n] t=int(input()) L=[] for i in range(t): n=int(input()) A=[int(x) for x in input().split()] L.append(ans(n,A)) for l in L: for w in l: print(w,end=' ') print()
7
PYTHON3
for _ in range(int(input())): n = int(input()) a = list(map(int, input().split())) flag = True temp = a[0] + a[1] x = 1 y = 2 for i in range(2, n): if temp <= a[i]: print(x, y, i+1) flag = False break if flag: print(-1)
7
PYTHON3
import sys #another one inp=sys.stdin.buffer.readline read=lambda typ=int: [typ(x) for x in inp().split()] input=lambda : inp().decode().strip() _T_,=read() for _t_ in range(_T_): n,=read() a=read() if a[0]+a[1]>a[n-1]: print(-1) else: print(1,2,n)
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) f=0 a,b=l[0],l[1] for i in range(2,n): if a+b<=l[i]: f=1 break if f==1: print(1,2,i+1) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=[int(o) for o 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()) alst = list(map(int, input().split())) if alst[0] + alst[1] > alst[-1]: print(-1) else: print(1, 2, n)
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 2 " << n << "\n"; } else { cout << "-1" << ...
7
CPP
#include <bits/stdc++.h> const long long MOD = 1e9 + 7; using namespace std; int main() { int t; cin >> t; while (t--) { int n; 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 << endl; else ...
7
CPP
# Anuneet Anand T = int(input()) while T: n = int(input()) A = list(map(int,input().split())) a = A[0] b = -1 c = A[n-1] k = -1 for i in range(1,n-1): if a+A[i]<=c: b = A[i] k = i+1 break if b>0: print(1,k,n) else: print(-1) T = T - 1
7
PYTHON3
import io import os import sys from collections import deque, defaultdict from itertools import accumulate inf = (1 << 65) def _input(): x = sys.stdin.readline() x = x.replace('\r', '') x = x.replace('\n', '') return x if 'STDINPUT' not in os.environ: input = _input else: print('Standard in...
7
PYTHON3
#https://codeforces.com/contest/1398/problem/A 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 " + str(n)) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const long long int modu = 1e9 + 7; int noofdig(int N) { return floor(log10(N)) + 1; } int bits_count(unsigned int u) { unsigned int uCount; uCount = u - ((u >> 1) & 033333333333) - ((u >> 2) & 011111111111); return ((uCount + (uCount >> 3)) & 030707070707) % 63; } lo...
7
CPP
case = int(input()) for caseNum in range(0, case): n = int(input()) numberList = [int(x) for x in input().split()] if numberList[0] + numberList[1] > numberList[n-1]: print(-1) else: print(1, 2, n)
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=list(int(num) for num in input().split()) ans=[1,2,n] if a[0]+a[1]>a[n-1]: print("-1") else: print(*ans)
7
PYTHON3
import math t = input() t = int(t) while t > 0: n = input() n = int(n) s = input() s = [int(x) for x in s.split()] if s[0] + s[1] > s[-1]: print(-1) else: print(1, 2, n) t -= 1
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) x=list(map(int,input().split())) if x[0]+x[1]<=x[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
cases = int(input()) for t in range(cases): n = int(input()) a = list(map(int,input().split())) p = a[0]+a[1] pos = -1 for i in range(2,n): if a[i]>=p: pos = i break if pos == -1: print(-1) else: print(1,2,pos+1)
7
PYTHON3
""" Perfection is achieved not when there is nothing more to add, but rather when there is nothing more to take away. """ import sys input = sys.stdin.readline # from bisect import bisect_left as lower_bound; # from bisect import bisect_right as upper_bound; # from math import ceil, factorial; def ceil(x): if x ...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const int MAXN = 5e4 + 5; int a[MAXN]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int sum = a[0] + a[1]; int c = -1; ...
7
CPP
#include <bits/stdc++.h> using namespace std; int v[500005]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); long long n, m, d, i, j, t; cin >> t; while (t--) { cin >> n; for (i = 1; i <= n; ++i) cin >> v[i]; if (v[1] + v[2] > v[n]) cout << -1 << '\n'; else cout << "1 2 ...
7
CPP
#!/usr/bin/python3 import sys input = lambda: sys.stdin.readline().strip() 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, 2, len(a)) else: print(-1)
7
PYTHON3
t = int(input()) for i in range(t): s = int(input()) l=list(map(int,input().split())) if l[0]+l[1]>l[-1]: ans=[] for j in range(0,s-2): if l[j]+l[j+1]<=l[j+2]: ans=[j+1,j+2,j+3] break if ans==[]: print(-1) else: ...
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) li=list(map(int,input().split())) val=False for i in range(2,n): if li[0]+li[1]<=li[i]: print(f'1 2 {i+1}') val=True break if not val: print(-1)
7
PYTHON3
t=int(input()) while t>0: n=int(input()) a=[int(x) for x in input().split()] flag=0 if a[0]+a[1]<=a[n-1]: flag=1 print(1,2,n) if flag==0: print("-1") t-=1
7
PYTHON3
for i in range(int(input())): n = int(input()) l = list(map(int,input().split())) t = l[0]+l[1] if l[-1] >= t: print(1,2,n) else: print(-1)
7
PYTHON3
num = int(input()) for n in range(num): num2 = int(input()) lis = list(map(int,input().split())) lis2 = lis[:] a = lis.index(min(lis)) numa = lis.pop(a) b = lis.index(min(lis)) numb = lis.pop(b) ch = True for i in lis2: if numa + numb <= i: print(1,2,lis2.index(i)...
7
PYTHON3
t = int(input()) while t: t-= 1 n = int(input()) ls = list(map(int, input().split())) flag = 0 for i in range(len(ls)-2): if ls[i]+ls[i+1]<=ls[n-1]: print(i+1, i+2, n) flag = 1 break if flag == 0: print(-1)
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) if (l[0]+l[1])<=l[n-1]: print(1,2,n) else: print(-1)
7
PYTHON3
import sys def rs(): return sys.stdin.readline().rstrip() def ri(): return int(sys.stdin.readline()) def ria(): return list(map(int, sys.stdin.readline().split())) def ws(s): sys.stdout.write(s + '\n') def wi(n): sys.stdout.write(str(n) + '\n') def wia(a): sys.stdout.write(' '.join([str(x) for x in a]) + '\n') import m...
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) l=list(map(int,input().split())) f=0 for j in range(2,n): if l[0]+l[1]<=l[j]: print(1,2,j+1,sep=' ') f=1 break if f==0: print(-1)
7
PYTHON3
def function(n, nums): if nums[0]+nums[1]<=nums[-1]: return f'{1} {2} {len(nums)}' else: return -1 if __name__=="__main__": t=int(input()) for k in range(t): n=int(input()) nums=list(map(int, input().rstrip().split())) print(function(n, nums))
7
PYTHON3
def check(a,b,c): l=[a,b,c] l.sort() if (l[0]+l[1])>l[2]: return False return True T=int(input()) for _ in range(T): n=int(input()) arr=list(map(int,input().split())) if n<=2: print(-1) continue if check(arr[0],arr[1],arr[-1]): print("%d %d %d"%(1,2,n)...
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) l=list(map(int,input().split())) maxx = max(l) minn = min(l) minn_ind = l.index(minn) minn2 = maxx for i in range(n): if i==minn_ind: continue if l[i]==minn: minn2 = minn minn2_ind = ...
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) elif a[0]+a[-2]<=a[-1]: print(1,n-1,n) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n=int(input()) a=list(map(int,input().split()))[:n] for i in range(n-2): if(a[0]+a[1]<=a[i+2]): print(1,2,i+3) d=0 break else: d=1 if(d==1): print('-1')
7
PYTHON3
from sys import* input= stdin.readline t=int(input()) for _ in range(t): n=int(input()) l=list(map(int,input().split())) c=0 a=l[0]+l[1] b=l[-1] if(a<=b): print(1,2,n) else: print(-1)
7
PYTHON3
for __ in range(int(input())): n=int(input()) l=list(map(int,input().split())) n=len(l) if (l[0]+l[1])<=l[-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) A = [int(a) for a in input().split()] i, j, k = 1, 2, n flag = True if A[0] + A[1] > A[n - 1]: flag = False if flag: print(i, j, k) else: print(-1)
7
PYTHON3
import io,os inp=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline inin=lambda typ=int: typ(inp()) inar=lambda typ=int: list(map(typ,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
t = int(input()) for aaa in range(t): m = int(input()) a = [int(aaa) for aaa in input().split()] if a[0] + a[1] <= a[-1]: print(1,2,m) else: print(-1)
7
PYTHON3
import math import sys #####sorting a dictionary by the values##### def dict_sort(ans): ans=sorted(ans.items(),reverse=True,key=lambda kv:(kv[1])) ##### naive method for testing prime or not##### def is_prime(n): if n==1: return 0 for i in range(2,int(math.sqrt(n))+1): if n%i==0: ...
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) i=0 a=list(map(int,input().split())) if a[i]+a[i+1] <= a[-1]: print(i+1,i+2,n) else: print("-1")
7
PYTHON3
T=int(input()) for _ in range(T): N=int(input()) A=list(map(int,input().split())) last=A[-1] if A[0]+A[1]<=last: print(1,2,N) else: print(-1)
7
PYTHON3
from itertools import combinations def f(lst): if lst[0] + lst[1] <= lst[-1]: return ' '.join(map(str,(1, 2, len(lst)))) return -1 for _ in range(int(input())): input() print(f(list(map(int, input().split()))))
7
PYTHON3
from functools import reduce from collections import Counter import time import datetime def time_t(): print("Current date and time: " , datetime.datetime.now()) print("Current year: ", datetime.date.today().strftime("%Y")) print("Month of year: ", datetime.date.today().strftime("%B")) print("Week numb...
7
PYTHON3
t=int(input()) for t in range(t): n=int(input()) l=list(map(int,input().split())) flag=0 ans=l[0]+l[1] for i in range(2,n): if ans<=l[i]: print(1,2,i+1) flag=1 break if flag==0: print(-1)
7
PYTHON3
q=int(input()) while q>0: q=q-1; n=int(input()) lst=[None]*n lst=list(map(int,input().split())) if lst[0]+lst[1]<=lst[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
import sys input = sys.stdin.readline def prog(): for _ in range(int(input())): n = int(input()) a = list(map(int,input().split())) worked = False ans = [] if a[0] + a[1] <= a[n-1]: print(1,2,n) else: print(-1) prog()
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[-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) else: print(1,2,n)
7
PYTHON3
import os import sys from io import BytesIO, IOBase def main(): pass # 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 s...
7
PYTHON3
q = int(input()) for _ in range(q): n = int(input()) l = list(map(int,input().split())) if l[0] + l[1] <= l[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
f = lambda: map(int, input().split()) for _ in range(int(input())): n = input() a = list(f()) print(-1 if a[0]+a[1]>a[-1] else '1 2 '+str(n))
7
PYTHON3
t=int(input()) while(t): n=int(input()) l=[] l=list(map(int,input().split())) f=0 for i in range(len(l)-2): if l[i]+l[i+1]<=l[n-1]: f=1 break else: f=0 if f==0: print(-1) else: print(i+1,i+2,n) t-=1
7
PYTHON3
T = int(input()) res = list() for _ in range(T): n = int(input()) x = list(map(int, input().split())) if len(x) <= 2: res.append([-1]) continue a, b = x[0], x[1] ok = False for i in range(2, len(x)): if a + b <= x[i]: res.append([1, 2, i + 1]) o...
7
PYTHON3
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 self.write = self.buffer.writ...
7
PYTHON3
k = lambda: map(int, input().split()) for _ in range(int(input())): n = input() a = list(k()) print(-1 if a[0]+a[1]>a[-1] else '1 2 '+str(n))
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=list(map(int,input().split())) l=[0]+l a=l[1] b=l[2] for i in range(2,n+1): c=l[i] if a+b<=c: print(1,2,i) break else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) l = list(map(int,input().split())) l.sort() if l[0] + l[1] > l[-1] and l[0] + l[-1] > l[1] and l[1] + l[-1] > l[0] : print(-1) else: print(1,2,n)
7
PYTHON3
t = int(input()) for _ in range(t): n = int(input()) a = [int(i) for i in input().split()] b = [] for i, val in enumerate(a): b.append((val, i)) b.sort() i = b[0][1] j = b[1][1] k = b[n-1][1] if a[k] < a[i] + a[j] and a[j] - a[i] < a[k]: print(-1) else: pr...
7
PYTHON3
for _ in range(int(input())): n = int(input()) arr = list(map(int,input().split())) flag = True for index in range(n-2): if arr[index] + arr[index+1] <= arr[-1]: print(index+1,index+2,n) flag= False break if flag: print("-1")
7
PYTHON3
t = int(input()) for _ in range(t): n = int(input()) a = list(map(int,input().strip().split()))[:n] if a[0]+a[1]>a[n-1]: print(-1) else: print(1,2,n)
7
PYTHON3
s=int(input()) for i in range(s): 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
n = int(input()) for i in range(n): a = int(input()) l = list(map(int,input().split())) if l[0]+l[1]>l[-1]:print(-1) else:print(1,2,a)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; template <typename Arg1> void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 << "\n"; } template <typename Arg1, typename... Args> void __f(const char* names, Arg1&& arg1, Args&&... args) { const char* comma = strchr(names + 1, ','); cerr.write(nam...
7
CPP
#872 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,2,n) else: print(-1)
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) arr=[int(x) for x in input().split()] total=arr[0]+arr[1] j=0 for i in range(2,n): if arr[i] >= total: j=i+1 break if j == 0: print("-1") else: print('1 2',j)
7
PYTHON3
for i in " "*int(input()): n=int(input()) a=list(map(int,input().split()))[:n] print(*([1,2,n],[-1])[a[0]+a[1]>a[-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]: print(1,2,n) else: print(-1)
7
PYTHON3
if __name__ == '__main__': T=int(input()) for t in range(T): n=int(input()) L=list(map(int,input().split())) b=0 d=L[n-1]-L[0] for i in range(1,n): if(L[i]<=d): print(str(1)+" "+str(i+1)+" "+str(n)) b=1 break ...
7
PYTHON3
def ques1(n,a): if a[0] + a[1] <= a[-1]: print(1,2,n) else: print(-1) t = int(input()) for i in range(t): n = int(input()) a = [int(i) for i in input().split()] ans = ques1(n,a) ans
7
PYTHON3
import sys input=sys.stdin.readline T=int(input()) for _ in range(T): N=int(input()) A=list(map(int,input().split())) a=A[0] b=A[1] c=A[N-1] if (a + b <= c) or (a + c <= b) or (b + c <= a) : print(1,2,N) else: print(-1)
7
PYTHON3
t=int(input()) while t>0: t-=1 n=int(input()) l=list(map(int,input().split())) k=0 if l[0]+l[1]<=l[n-1]: print(1,2,n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int t = 0; cin >> t; while (t--) { int n; cin >> n; 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 << "\n"; } else cout << -1 << "\n"; ...
7
CPP
#include <bits/stdc++.h> using namespace std; int dirx[] = {-1, -1, -1, 0, 0, 1, 1, 1}; int diry[] = {-1, 0, 1, -1, 1, -1, 0, 1}; vector<string> vec_splitter(string s) { s += ','; vector<string> res; while (!s.empty()) { res.push_back(s.substr(0, s.find(','))); s = s.substr(s.find(',') + 1); } return ...
7
CPP
#include <bits/stdc++.h> #pragma GCC optimize("O2") #pragma GCC optimize("tree-vectorize") #pragma GCC target("sse4") using namespace std; using lint = long long; using pii = pair<int, int>; using pll = pair<lint, lint>; template <typename T> using vc = vector<T>; template <typename T> using vvc = vector<vector<T>>; te...
7
CPP
import io import os from collections import Counter, defaultdict, deque def solve(N, A): a = A[0] b = A[1] c = A[-1] if a + b > c and a + c > b and b + c > a: return -1 return str(1) + ' ' + str(2) + ' ' + str(N) if __name__ == "__main__": input = io.BytesIO(os.read(0, os.fstat(0).s...
7
PYTHON3
#dt = {} for i in x: dt[i] = dt.get(i,0)+1 import sys;input = sys.stdin.readline inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()] for _ in range(inp()): n = inp() x = ip() if x[0]+x[1] <= x[-1]: print(1,2,n) else: print(-1)
7
PYTHON3
n = int(input()) rez = [] for i in range(n): tmp = input() tmp = list(map(int, input().split())) if tmp[0] + tmp[1] <= tmp[-1]: rez.append(str(1) + " " + str(2) + " " +str(len(tmp))) else: rez.append(-1) for i in range(n): print(rez[i])
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
def main(): t=int(input ()) for tt in range (t): n=int(input ()) a=list(map(int,input().split())) if(a[0]+a[1]<=a[len(a)-1]): print (1,2,len(a)) else: print (-1) main()
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; long long int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long long int i = 0; int flag = 0; while (i < n - 2) { long long int x, y, z; x = a[i]; ...
7
CPP
for u in range(int(input())): n=int(input()) l=list(map(int,input().split())) s=l[0]+l[1] f=0 for i in range(2,n): if(l[n-1]>=s): f=1 print(1,2,n) break if(f==0): print(-1)
7
PYTHON3
#!/usr/bin/pypy3 # import sys # sys.stdin = open("/home/vaibhav/python/input.txt", "r") # sys.stdout = open("/home/vaibhav/python/output.txt", "w") 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
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 2",(n)) else: print(-1)
7
PYTHON3
t = int(input()) for p 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