solution
stringlengths
11
983k
difficulty
int64
0
21
language
stringclasses
2 values
T=int(input()) for _ in range(T): n=int(input()) arr=list(map(int,input().split())) if n==3: if arr[0]+arr[1]>arr[2]: print(-1) else: print(1,2,3) else: f1=1 for i in range(n-1): f=1 if arr[i]+arr[i+1]<=arr[-1]: ...
7
PYTHON3
mod = 10**9 + 7 def solve(): n = int(input()) a = list(map(int, input().split())) if a[0] + a[1] <= a[n - 1]: print(1, 2, n) else: print(-1) t = 1 t = int(input()) for _ in range(t): solve()
7
PYTHON3
t=int(input()) for i in range(t): n=int(input()) a=list(map(int,input().strip().split(" "))) p=a[0];q=a[1];r=a[n-1] if p+q>r and p+r>q and q+r>p: print(-1) else: print(1,2,n)
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,sep = ' ') else: print(-1)
7
PYTHON3
t = int(input()) for i in range(t): n = int(input()) a = list(map(int, input().split())) c = a[0] + a[1] ans = False for i in range(2, n): if c <= a[i]: print(1, 2, i+1) ans = True break if not ans: print(-1)
7
PYTHON3
t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) # print(a) x = a[0] y = a[1] res = 0 for i in range(n-1, 1, -1): if x + y <= a[i]: res = i+1 break if res == 0: print(-1) else: print('1 2', re...
7
PYTHON3
for _ in range(int(input())): n=int(input()) ar=list(map(int,input().split())) flg=1 for i in range(n-2): if ar[i]+ar[i+1]<=ar[n-1]: flg=0 print(i+1,i+2,n) break if flg: print(-1)
7
PYTHON3
def solve(a, n): for i in range(n - 2): j = i + 1 k = n - 1 if a[i] + a[j] <= a[k]: print(f"{i+1} {j+1} {k+1}") return print(-1) t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) solve(a, n)
7
PYTHON3
for i in range (int(input())): n=int(input()) a=list(map(int,input().split())) k=-1 for i in range (n): if a[i]>=a[0]+a[1]: k=i+1 break if k==-1: print(k) else: print('1 2 '+str(k))
7
PYTHON3
t = int(input()) for i in range(t): n = int(input()) arr = [int(x) for x in input().split()] if (arr[0] + arr[1] > arr[n - 1]): print("-1") else: print(1,2,n)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int t; int n; vector<int> Arr; cin >> t; while (t--) { cin >> n; Arr.resize(n); for (int i = 0; i < n; i++) cin >> Arr[i]; if (Arr[n - 1] >= Arr[0] + Arr[1]) { cout << 1 << " " << 2 << " " << n << endl...
7
CPP
T = int(input()) for _ in range(T): n = int(input()) arr = list(map(int, input().split())) if arr[0]+arr[1] <= arr[n-1]: print(f"{1} {2} {n}") else: print(-1)
7
PYTHON3
def fun(): n = int(input()) a = list(map(int, input().split())) if a[n-1] < (a[0] + a[1]): print('-1') else: print('1 2 '+ str(n)) for i in range(int(input())): fun()
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,end=" ") print(2,end=" ") print(n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0}; const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1}; const int MAX = 2 * 1000 * 1000 + 10; const long long INF = 1e18; const int MOD = 1e9 + 7; void sol() { int n; cin >> n; vector<int> v(n); for (int &i : v) cin >> i; int ...
7
CPP
#include <bits/stdc++.h> using namespace std; int main(void) { long long int test, n, i; cin >> test; while (test--) { cin >> n; long long int arr[n]; for (i = 0; i < n; i++) { cin >> arr[i]; } if (arr[0] + arr[1] > arr[n - 1]) cout << -1 << endl; else cout << 1 << " " <<...
7
CPP
t=int(input()) for p in range(t): n=int(input()) x=[int(x) for x in input().split()] i,j,k=0,1,n-1 a,b,c=x[i],x[j],x[k] if (a+b)>c: print(-1) else: print(i+1,j+1,k+1)
7
PYTHON3
"""T=int(input()) for _ in range(0,T): n=int(input()) a,b=map(int,input().split()) s=input() s=[int(x) for x in input().split()] for i in range(0,len(s)): a,b=map(int,input().split())""" T=int(input()) for _ in range(0,T): n=int(input()) s=[int(x) for x in input().split()] if((...
7
PYTHON3
def findTr(n,a): apb = a[0]+a[1] c = a[-1] if apb<=c: print(1,2,n) else: print(-1) return t = int(input()) for i in range(t): n = int(input()) a = list(map(int, input().split())) findTr(n,a)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; bool check(long long a, long long b, long long c) { int f = 0; if ((a + b) > c) f = 1; if ((b + c) > a) f++; if ((c + a) > b) f++; if (f == 3) return false; else return true; } void solve() { int n; cin >> n; int i; long long arr[n]; for (i = 0...
7
CPP
import bisect def solve(arr,n,ans): for j in range(1,n): total = arr[j]+arr[0] k = bisect.bisect(arr,total-1) if k != len(arr): ans.append('1'+' '+str(j+1)+' '+str(k+1)) return ans.append('-1') def main(): t = int(input()) ans = [] for i in range(t)...
7
PYTHON3
for _ in 'T' * int(input()): n = int(input()) *k, = [int(x) for x in input().split()] if k[0] + k[1] <= k[-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const int N = 2005; const long long M = 1e9 + 7; const long long inf = 1e18 + 5; int main() { int T; scanf("%d", &T); while (T--) { int n; scanf("%d", &n); int a[n]; for (int i = 0; i < n; i++) scanf("%d", &a[i]); if (a[0] + a[1] <= a[n - 1]) { ...
7
CPP
import sys input=sys.stdin.readline 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
from functools import lru_cache from sys import stdin, stdout import sys from math import * # from collections import deque # sys.setrecursionlimit(int(2e5)) input = stdin.readline # print = stdout.write # dp=[-1]*100000 for __ in range(int(input())): n=int(input()) ar=list(map(int,input().split())) x=0 y=n-1 an...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int a[50005]; int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &a[i]); if (a[0] + a[1] <= a[n - 1]) printf("%d %d %d\n", 1, 2, n); else printf("-1\n"); } return 0; }
7
CPP
#!/usr/bin/env python # coding: utf-8 # In[15]: t = int(input()) for i in range(t): n = int(input()) a = list(map(int , input().split())) if sum(a[:2]) > a[-1]: print(-1) else: print(1 , 2 , len(a)) # In[ ]:
7
PYTHON3
#include <bits/stdc++.h> using namespace std; signed main() { long long t; cin >> t; for (long long test = 0; test < t; test++) { long long n; cin >> n; vector<long long> lst(n); for (long long i = 0; i < n; i++) cin >> lst[i]; bool ok = false; for (long long i = 0; i < n - 2; i++) { ...
7
CPP
t=int(input()) for _ in range(t): n = int(input()) nums = list(map(int, input().split())) flag=0 for i in range(len(nums)-2): x = nums[i] + nums[i+1] if nums[-1] >= x: print(i+1, i+2, len(nums)) flag=1 break if (flag==0): print(-1) ...
7
PYTHON3
for _ in range(int(input())): n=int(input()) num=[int(x) for x in input().split()] s=num[0]+num[1] #print(s) for i in range(2,n): #print(num[i]) if s<=num[i]: print(1,2,i+1) break else: print(-1)
7
PYTHON3
t=int(input()) for _ in range(t): n=int(input()) list1=list(int(n) for n in input().split()) if(list1[0]+list1[1]<=list1[-1]): print(1,2,n) else: print(-1)
7
PYTHON3
import sys #another one inp=sys.stdin.buffer.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
for _ in range(int(input())): n, *l = input(), *map(int, input().split()) print(' '.join(['1', '2', n]) if l[0]+l[1]<=l[-1] else -1)
7
PYTHON3
def main(): test=int(input()) for _ in range(test): l=int(input()) arr=list(map(int,input().split())) sum=arr[0]+arr[1] if arr[-1]>=sum: print(1,2,l) else: print(-1) main()
7
PYTHON3
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
t = int(input()) for i in range(t): 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
n = int(input()) for i in range(n): m = int(input()) s = input().split(' ') a = [] for c in s: a.append(int(c)) a.sort() if a[len(a) - 1] >= (a[0] + a[1]): print(1, 2, len(a)) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n=int(input()) # flag=0 a=list(map(int,input().split())) x=a[0] s1=1 # a.remove(x) y=a[1] s2=2 # a.remove(y) z=a[-1] s3=n # a.remove(z) #print(x,y,z) if len(set(a))!=1 and x+y<=z or y+z<=x or x+z<=y: print(s1,s2,s3) else:...
7
PYTHON3
for _ in range(int(input())): n=int(input()) alist=list(map(int,input().split())) flag=0 a=alist[0]+alist[1] c=0 for i in range(2,n): if(a<=alist[i]): c=i+1 flag=1 break if(flag==1): print("1","2",c) else: print("-1...
7
PYTHON3
import sys from os import path if(path.exists('input.txt')): sys.stdin = open("input.txt","r") sys.stdout = open("output.txt","w") def solve(): n = int(input().strip()) a = [int(i) for i in input().rstrip().split()] if(a[-1] - a[0] - a[1]) >= 0 : print(f"1 2 {n}" ) else: ...
7
PYTHON3
for _ in range(int(input())): n=int(input()) lis=list(map(int,input().split())) if lis[0]+lis[1]>lis[-1]: print(-1) else: print(1,2,n)
7
PYTHON3
import sys inp=sys.stdin.readline inin=lambda typ=int: typ(inp()) inar=lambda typ=int: list(map(typ,inp().split())) inst=lambda : inp().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 # sys.stdin = open('CF_E93_D2/input.txt', 'r') # sys.stdout = open('CF_E93_D2/output.txt', 'w') #---------------------------------------------------------------- for _ in range(int(input())) : n = int(input()) l = list(map(int,input().split())) i = 1 if not (l[i-1]+l[i]>l[-1] and l[i]+l[-...
7
PYTHON3
for t 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
for _ in range(int(input())): n, l = int(input()), 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 i in range(t): n = int(input()) nums = list(map(lambda x: int(x),input().split())) if nums[0] + nums[1] <= nums[n-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
""" Code of Ayush Tiwari Codeforces: servermonk Codechef: ayush572000 """ import sys input = sys.stdin.buffer.readline def solution(): # This is the main code n=int(input()) l=list(map(int,input().split())) i=0 k=n-1 j=1 if(l[i]+l[j]<=l[k]): print(i+1,j+1,k+1) else: ...
7
PYTHON3
import math import sys import re n = int(input()) for x in range(n): l = int(input()) a = list(map(int , input().rstrip().split())) if a[0] + a[1] > a[-1]: print(-1) else: print(1,2,l)
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[n-1]): print(1,2,n) else: print(-1)
7
PYTHON3
n = input() for i in range(int(n)): a = int(input()) li = [] li = input().split() if int(li[0]) + int(li[1]) <= int(li[a-1]): print(str(1) + " " + str(2) + " " + str(a)) else: print("-1")
7
PYTHON3
T = int(input()) for i in range(T): N = int(input()) A = list(map(int, input().split())) z = A[0] + A[1] flag = 0 for j in range(2,N): if A[j]>=z: flag = 1 break if flag==1: print(1, 2, j+1) else: print(-1)
7
PYTHON3
# Design_by_JOKER from math import * from cmath import * from itertools import * from decimal import * # su dung voi so thuc from fractions import * # su dung voi phan so from sys import * # getcontext().prec = x # lay x-1 chu so sau giay phay ( thuoc decimal) # Decimal('12.3') la 12.3 nhung Decimal(12.3) la 12.300...
7
PYTHON3
t = int(input()) for _ in range(t): 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
t=int(input()) while(t): n=int(input()) a=list(map(int,input().split())) if n>2: flag=0 for i in range(len(a)-2): if(a[i]+a[i+1]>a[n-1]): continue else: flag=1 print(i+1,end=" ") print(i+2,end=" ") ...
7
PYTHON3
for _ in range(int(input())): rets = [-1] lens = int(input()) arrs = sorted([int(x) for x in input().split()]) if arrs[0] + arrs[1] <= arrs[-1]: rets = [1, 2, lens] print(*rets)
7
PYTHON3
n=int(input()) for i in range(n): m=int(input()) a=[int(i) for i in input().split()] a=sorted(a) if((a[0]+a[1])>a[len(a)-1] and (a[len(a)-1]-a[1])<a[0]): print(-1) else: print(1,2,len(a))
7
PYTHON3
for i in range(int(input())): n=int(input()) l=list(map(int,input().split())) sum1=l[0]+l[1] zero=0 for j in range(2,n): if l[j]>=sum1: print(1,2,j+1) zero=1 break if zero==0: print('-1')
7
PYTHON3
def bins(lo, hi, a, val): while lo < hi: mid = (lo+hi) // 2 if val <= a[mid]: return mid else: lo = mid + 1 return lo t = int(input()) for i in range(t): n = int(input()) arr = list(map(int, input().split())) chk = 1 s = arr[0] + arr[1] idx ...
7
PYTHON3
for i in range(int(input())): n = int(input()) m = list(map(int, input().split())) if n < 3: rez = (-1) elif m[0]+m[1] > m[-1]: rez = (-1) else: rez = 1, 2, len(m) if rez == -1: print(rez) else: print(*rez)
7
PYTHON3
# import sys # sys.stdin = open('input.txt', 'r') # sys.stdout = open('output.txt', 'w') t = 1 t = int(input()) while t: t -= 1 n = int(input()) a = list(map(int, input().split())) # s = input() if a[0] + a[1] > a[-1]: print(-1) else: print(1,2,n)
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
#: Author - Soumya Saurav import sys,io,os,time from collections import defaultdict from collections import OrderedDict from collections import deque from itertools import combinations from itertools import permutations import bisect,math,heapq alphabet = "abcdefghijklmnopqrstuvwxyz" input = sys.stdin.readline ######...
7
PYTHON3
import sys def minp(): return sys.stdin.readline().strip() def mint(): return int(minp()) def mints(): return map(int, minp().split()) def solve(): n = mint() d = [None]*n i = 0 for v in mints(): d[i] = (v, i+1) i += 1 d.sort() a, b, c = d[0],d[1],d[-1] if a[0]+b[0] <= c[0]: print(*sorted([a[1],b[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
n = int(input()) for i in range(n): k = int(input()) a = [int(x) for x in input().split()] if a[0] + a[1] > a[-1]: print(-1) else: print(1, 2, k)
7
PYTHON3
def main(): n = int(input()) arr = list(map(int, input().split())) if arr[0] + arr[1] <= arr[n-1]: print("1 2 {}".format(n)) else: print("-1") for _ in range(int(input())): main()
7
PYTHON3
t = int(input()) while t: n = int(input()) a = [int(i) for i in input().split()] val1 = a[0]+a[1] if val1<=a[-1]: print(1,2,n) else: print(-1) t-=1
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[-1]): print("1 2 "+str(n)) else: print(-1)
7
PYTHON3
for _ in range(int(input())): n = int(input()) arr = list(map(int, input().split())) present = dict() # for ind, a in enumerate(arr): # if not present.get(a): # present[a] = ind # arr = list(present.keys()) if arr[0] + arr[1] <= arr[-1]: print(1, 2, len(arr)) else...
7
PYTHON3
# ------------------- fast io -------------------- import os import sys from io import BytesIO, IOBase 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
for _ in range(int(input())): n=int(input()) a=list(map(int,input().split()[:n])) if a[0]+a[1]>a[-1]: print(-1) else: print(1,2,n)
7
PYTHON3
t=int(input()) for you in range(t): n=int(input()) l=input().split() li=[int(i) for i in l] if(li[0]+li[1]<=li[-1]): print(1,2,n) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; const int N = 100010; int n, arr[N]; int main() { int t; cin >> t; while (t--) { scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &arr[i]); } if (arr[0] + arr[1] <= arr[n - 1]) { cout << 1 << " " << 2 << " " << n << endl; } el...
7
CPP
for _ in range(int(input())): n = int(input()) x = list(map(int, input().split())) f = 0 mx = max(x) h = x.index(mx) for i in range(n - 2): if i != h and i + 1 != h and x[i] + x[i + 1] <= mx: print(i + 1, i + 2, h + 1) f = 1 break if not f: ...
7
PYTHON3
import sys sys.setrecursionlimit(10 ** 5) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(ro...
7
PYTHON3
from sys import stdin from collections import deque # https://codeforces.com/contest/1354/status/D mod = 10**9 + 7 import sys import random sys.setrecursionlimit(10**6) from queue import PriorityQueue from collections import Counter as cc # def rl(): # return [int(w) for w in stdin.readline().split()] from bisect 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[-1]: print(-1) else: print(1, 2, n)
7
PYTHON3
for x in range(int(input())): n=int(input()) a=list(map(int,input().split())) i=0 if a[i]+a[i+1]<=a[n-1]: print(i+1,i+2,n) else: print('-1')
7
PYTHON3
def main(case): n = int(input()) lst = list(map(int, input().split())) if lst[0] + lst[1] <= lst[-1]: print(1, 2, n) return print(-1) if __name__ == '__main__': t = int(input()) for i in range(t): main(i + 1)
7
PYTHON3
def solve(n,a): i = 0 j = 1 for idx in range(2, n): c = a[idx] if c+a[i] <= a[j] or c + a[j] <= a[i] or a[i] + a[j] <= c: c = idx print(i+1,j+1,idx+1) return print(-1) t = int(input()) for test in range(t): n = int(input()) a = list(m...
7
PYTHON3
from bisect import bisect_left as bl from bisect import bisect_right as br from heapq import heappush,heappop,heapify import math from collections import * from functools import reduce,cmp_to_key import sys input = sys.stdin.readline from itertools import accumulate from functools import lru_cache M = mod = 998244353...
7
PYTHON3
for _ in range(int(input())): n = int(input()) arr = list(map(int, input().split())) if arr[0] + arr[1] <= arr[-1]: print(1, 2, len(arr)) else: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ; int t; cin >> t; while (t) { int n; cin >> n; vector<int> v(n); for (size_t i = 0; i < n; i++) { cin >> v[i]; } int i1, i2, i3; i1 = 0, i2 = 1, i3 = n - 1; ...
7
CPP
import sys # sys.setrecursionlimit(10**6) input=sys.stdin.readline t=int(input()) for t1 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())): inp = input() y = list(map(int,input().split())) if y[0]+y[1] <= y[-1]: print(1,2,len(y)) else: print(-1)
7
PYTHON3
import sys T = int(sys.stdin.readline().strip()) for t in range (0, T): n = int(sys.stdin.readline().strip()) a = list(map(int, sys.stdin.readline().strip().split())) b = [[a[i], i+1] for i in range (0, n)] if b[0][0] + b[1][0] <= b[-1][0]: print(b[0][1], b[1][1], b[-1][1]) else: pr...
7
PYTHON3
import sys for bruh in range(0,int(sys.stdin.readline())): leng = int(sys.stdin.readline()) vals = list(map(int,sys.stdin.readline().split())) if vals[0] + vals[1] > vals[leng-1]: sys.stdout.write("-1\n") else: sys.stdout.write("1 2 "+str(leng)+"\n")
7
PYTHON3
for t in range(int(input())): n=int(input()) a=list(map(int,input().split())) a.sort() c=a[0]+a[1] d=['1','2'] for i in range(2,len(a)): if a[i]>=c: d.append(str(i+1)) break if len(d)==2: print(-1) else: print(' '.join(d))
7
PYTHON3
for _ in range(int(input())): n=int(input()) l=[int(x) for x in input().split()] f=0 for i in range(n-2): temp=l[i]+l[i+1] if l[n-1]>=temp: print(i+1,i+2,n) f=1 break if f==0: print(-1)
7
PYTHON3
for _ in range(int(input())): ans = 0 n = int(input()) tri = list(map(int, input().split())) if tri[0] + tri[1] <= tri[-1]: print(1, 2, len(tri)) ans += 1 if ans == 0: print(-1)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; for (int i = 0; i < T; i++) { int N; cin >> N; vector<int> vec(N); for (int j = 0; j < N; j++) { cin >> vec.at(j); } if (vec.at(0) + vec.at(1) <= vec.at(N - 1)) { cout << 1 << " " << 2 << " " << N << en...
7
CPP
for i in range(int(input())): n=int(input()) chk=[int(i) for i in input().split()] if(chk[0]+chk[1]>chk[-1]): print(-1) else: print(1,2,n)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; double pi = acos(-1); long long i, j; long long mx = (1ll << 48) - 1, fb[100]; bool ff[100010]; long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; } long long C(long long n, long long m) { if (m < 0 || m > n) return 0; long long ans = 1; for (long...
7
CPP
t=int(input()) for i in range(t): n=int(input()) l=list(map(int,input().split())) if l[-1]<l[0]+l[1]: print(-1) else: print(1,2,n)
7
PYTHON3
t = int(input()) for _ in range(t): n = int(input()) s = list(map(int,input().split())) i=0 j=1 k=-1 z=j+1 while z<n: if s[i]+s[j]<=s[z]: k=z break else: z+=1 if k==-1: print(k) else: print(str(i+1)+" "+...
7
PYTHON3
for _ in range(int(input())): n=int(input()) arr=list(map(int,input().split(' '))) if arr[0]+arr[1]<=arr[n-1]: print(1,2,n) else: print(-1)
7
PYTHON3
# 3 # 7 # 4 6 11 11 15 18 20 # 4 # 10 10 10 11 # 3 # 1 1 1000000000 def subString(test_str): res = [test_str[i: j] for i in range(len(test_str))for j in range(i + 1, len(test_str) + 1)] return res for i in range(int(input())): n = int(input()) l =list(map(int,input().split())) if l[0]+l[1] > l[n-1...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; using namespace chrono; const long long int MOD = 1000000007; const long long int MAXN = 1000005; const long long int INF = 100000000000005; void solve() { long long int n; cin >> n; vector<long long int> a(n); for (long long int i = 0; i < n; ++i) cin >> a[i]; if...
7
CPP
#!/usr/bin/env python3 import sys input = sys.stdin.readline t = int(input()) for _ in range(t): n = int(input()) a = [int(item) for item in input().split()] if a[0] + a[1] <= a[-1]: print(1, 2, n) else: print(-1)
7
PYTHON3
def solve(n,ar): if ar[n-1] >= ar[0]+ar[1]: print(1, 2, n) else: print(-1) if __name__ == '__main__': t = int(input()) for _ in range(t): n = int(input()) ar = list(map(int,input().split())) solve(n,ar)
7
PYTHON3