Skip to content

Commit

Permalink
keteki quick Match
Browse files Browse the repository at this point in the history
  • Loading branch information
harrypotter0 committed Jan 21, 2018
1 parent 49da372 commit ed5563e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Empty file.
4 changes: 4 additions & 0 deletions CP/Keteki Quick Match-6/prob1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
for kohli in range(input()):
#x = map(int,raw_input().split())
x = int(input())
print((2*pow(x,3)+x)/3)
7 changes: 7 additions & 0 deletions CP/Keteki Quick Match-6/prob2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
for kohli in range(int(input())):
n,k = map(int,raw_input().split())
a = list(map(int,raw_input().split()))
t = 1e10
for i in range(len(a)-k+1):
t = min(t, max(a[i:i+k]))
print(t)

0 comments on commit ed5563e

Please sign in to comment.