message
stringlengths
2
22.8k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
16
109k
cluster
float64
1
1
__index_level_0__
int64
32
217k
Provide tags and a correct Python 3 solution for this coding contest problem. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the road have the same color. She wants to select a lo...
instruction
0
30,993
1
61,986
Tags: implementation Correct Solution: ``` n,k=map(int,input().split()) l=list(map(int,input().split())) ans=1 z=[] if n==1: print(1) exit() for i in range(n-1): if l[i]!=l[i+1]: ans+=1 z.append(ans) else: ans=1 z.append(ans) print(max(z)) ```
output
1
30,993
1
61,987
Provide tags and a correct Python 3 solution for this coding contest problem. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the road have the same color. She wants to select a lo...
instruction
0
30,997
1
61,994
Tags: implementation Correct Solution: ``` n,k = list(map(int,input().split())) houses = list(map(int,input().split())) stack = [] maxi = 0 for h in houses: if stack != []: if h == stack[-1]: maxi = max(maxi,len(stack)) stack = [h] else: stack.append(h) else: stack.append(h) maxi = max(maxi,1) m...
output
1
30,997
1
61,995
Provide tags and a correct Python 3 solution for this coding contest problem. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the road have the same color. She wants to select a lo...
instruction
0
30,998
1
61,996
Tags: implementation Correct Solution: ``` # # Вдоль дороги, на которой живёт Аня, стоят n домов, каждый из которых раскрашен в один из k цветов. # # Аня любит гулять вдоль дороги, но ей не нравится, когда подряд стоят два дома, раскрашенных в один и тот же цвет. Она хочет выбрать такой участок для прогулки, вдоль кото...
output
1
30,998
1
61,997
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,001
1
62,002
Yes
output
1
31,001
1
62,003
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,002
1
62,004
Yes
output
1
31,002
1
62,005
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,003
1
62,006
Yes
output
1
31,003
1
62,007
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,004
1
62,008
Yes
output
1
31,004
1
62,009
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,005
1
62,010
No
output
1
31,005
1
62,011
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,006
1
62,012
No
output
1
31,006
1
62,013
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,007
1
62,014
No
output
1
31,007
1
62,015
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are n houses along the road where Anya lives, each one is painted in one of k possible colors. Anya likes walking along this road, but she doesn't like when two adjacent houses at the roa...
instruction
0
31,008
1
62,016
No
output
1
31,008
1
62,017
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,400
1
62,800
Tags: constructive algorithms, graphs Correct Solution: ``` n,k=map(int,input().split()) a,b,c,d=input().split() if n<5 or k<n+1: print(-1) else: l=list(set(map(str,range(1,n+1)))-{a,b,c,d}) print(' '.join([a,c]+l+[d,b]+['\n']+[c,a]+l+[b,d])) ```
output
1
31,400
1
62,801
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,401
1
62,802
Tags: constructive algorithms, graphs Correct Solution: ``` n, k = map(int, input().split()) a, b, c, d = map(int, input().split()) if k < n + 1 or n == 4: print(-1) else: print(a, c, end=' ') for i in range(1, n + 1): if i != a and i != b and i != c and i != d: print(i, end=' ') pr...
output
1
31,401
1
62,803
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,402
1
62,804
Tags: constructive algorithms, graphs Correct Solution: ``` n, k = map(int, input().split()) a, b, c, d = map(int, input().split()) if (k < n + 1 or n == 4): print(-1) exit() v = [0 for i in range(n + 1)] v[a] = v[b] = v[c] = v[d] = 1 e = f = 0 for i in range(1, n + 1): if not v[i] and not e: e = ...
output
1
31,402
1
62,805
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,403
1
62,806
Tags: constructive algorithms, graphs Correct Solution: ``` n, k = input().split(' ') n = int(n) k = int(k) a,b,c,d = input().split(' ') a,b,c,d = int(a),int(b),int(c),int(d) if k <= n: print(-1) exit() if n == 4: print(-1) exit() city = list(range(1,n+1)) road = [a,c] for i in range(len(city)): if city[i] no...
output
1
31,403
1
62,807
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,404
1
62,808
Tags: constructive algorithms, graphs Correct Solution: ``` n,k = map(int,input().split()) a,b,c,d = map(int,input().split()) notUse = [a,b,c,d] if n >= k or n == 4: print(-1) exit() f = [a,c] cntr = 0 for i in range(n-4): cntr += 1 while cntr in notUse: cntr+=1 f.append(cntr) f+=[d,b] bk ...
output
1
31,404
1
62,809
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,405
1
62,810
Tags: constructive algorithms, graphs Correct Solution: ``` n, k = [int(i) for i in input().split()] a,b,c,d = [int(i) for i in input().split()] if k < n+1 or n == 4: print(-1) else: s = [] for i in range(1, n+1): if i!=a and i!=b and i!=c and i!=d: s.append(i) q = [a]+[c]+s+[d]+[b] w = [c]+[a]+s+[b]+[d] pri...
output
1
31,405
1
62,811
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,406
1
62,812
Tags: constructive algorithms, graphs Correct Solution: ``` # coding: utf-8 from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import math import string import itertools import fractions import heapq import collections im...
output
1
31,406
1
62,813
Provide tags and a correct Python 3 solution for this coding contest problem. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was once in a city a and he wanted to go to a city b...
instruction
0
31,407
1
62,814
Tags: constructive algorithms, graphs Correct Solution: ``` n, k = map(int,input().split()) a, b, c, d = map(int,input().split()) if k - n > 0 and n != 4: print(a,c,end=" ") for i in range(1,n+1): if i != a and i != b and i != d and i != c: print(i,end=" ") print(d,b) print(c,a,end="...
output
1
31,407
1
62,815
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,408
1
62,816
Yes
output
1
31,408
1
62,817
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,409
1
62,818
Yes
output
1
31,409
1
62,819
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,410
1
62,820
Yes
output
1
31,410
1
62,821
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,411
1
62,822
Yes
output
1
31,411
1
62,823
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,412
1
62,824
No
output
1
31,412
1
62,825
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,413
1
62,826
No
output
1
31,413
1
62,827
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,414
1
62,828
No
output
1
31,414
1
62,829
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Bearland has n cities, numbered 1 through n. Cities are connected via bidirectional roads. Each road connects two distinct cities. No two roads connect the same pair of cities. Bear Limak was o...
instruction
0
31,415
1
62,830
No
output
1
31,415
1
62,831
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,464
1
62,928
Tags: implementation, math, sortings Correct Solution: ``` n = int(input()) a = sorted(list(map(int, input().split()))) base = 10**9 + 7 d = [1] for i in range(n): d.append((2*d[-1]) % base) ans = 0 for i in range(1, len(a)): diff = a[i] - a[i-1] add = diff*(d[i]-1)*(d[n - i]-1) % base ans += add an...
output
1
31,464
1
62,929
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,465
1
62,930
Tags: implementation, math, sortings Correct Solution: ``` n = int(input()) ans = 0 MOD = int(10**9 + 7) a = [int(x) for x in input().split()] a.sort() po = [1] for i in range(1,n): po.append(po[i-1]*2%MOD) for i in range(n): ans += a[i]*(po[i] - po[n-i-1] + MOD) ans %= MOD print(ans) ```
output
1
31,465
1
62,931
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,466
1
62,932
Tags: implementation, math, sortings Correct Solution: ``` n = int(input()) inf = 10 ** 9 + 7 a = list(map(int, input().split())) st = [0 for i in range(n)] st[0] = 1 for i in range(1, n): st[i] = (st[i - 1] * 2) % inf a.sort() res = 0 for i in range(n - 1): res += (a[i + 1] - a[i]) * (st[i + 1] - 1) * (st[n - ...
output
1
31,466
1
62,933
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,467
1
62,934
Tags: implementation, math, sortings Correct Solution: ``` #!/usr/bin/env python3 import sys, math, itertools, collections, bisect input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') inf = float('inf') ;mod = 10**9+7 mans = inf ;ans = 0 ;count = 0 ;pro = 1 n=int(input()) A=list(map(int,input().split()...
output
1
31,467
1
62,935
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,468
1
62,936
Tags: implementation, math, sortings Correct Solution: ``` import sys read=lambda:sys.stdin.readline().rstrip() readi=lambda:int(sys.stdin.readline()) writeln=lambda x:sys.stdout.write(str(x)+"\n") write=lambda x:sys.stdout.write(x) MOD = (10**9)+7 N = readi() ns = list(map(int, read().split())) ns.sort() s = 0 powmod ...
output
1
31,468
1
62,937
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,469
1
62,938
Tags: implementation, math, sortings Correct Solution: ``` n = int(input()) coord = [int(x) for x in input().split()] coord = sorted(coord) modul = 1000000007 G = [0] P = [0] D = [0] for i in range(1, n + 1): gi = (G[i - 1] * 2 + coord[i - 1]) % modul pi = (2 * P[i - 1] + 1) % modul G.append(gi) P.appen...
output
1
31,469
1
62,939
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,470
1
62,940
Tags: implementation, math, sortings Correct Solution: ``` import sys import math MOD = int(1e9 + 7) line = lambda: map(int, input().split()) def solve(): n = int(input()) x = [x for x in line()] x.sort() p2 = [] p2.append(1) for i in range(1, n): p2.append(p2[i - 1] * 2 % MOD) ans...
output
1
31,470
1
62,941
Provide tags and a correct Python 3 solution for this coding contest problem. Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha managed to get access to n computers throughout ...
instruction
0
31,471
1
62,942
Tags: implementation, math, sortings Correct Solution: ``` n = int(input()) a = sorted(list(map(int, input().split()))) modu = 10**9 + 7 if n < 2: print(0) else: ans = 0 p2 = [1] for i in range(n): p2.append(2*p2[-1] % modu) for i in range(n - 1): ans += (a[i+1] - a[i]) * (p2[i + 1]...
output
1
31,471
1
62,943
Provide a correct Python 3 solution for this coding contest problem. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,2,\dots,N, find the answer to the following question: R...
instruction
0
31,548
1
63,096
"Correct Solution: ``` import sys, math import io, os #data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline from bisect import bisect_left as bl, bisect_right as br, insort from heapq import heapify, heappush, heappop from collections import defaultdict as dd, deque, Counter # from itertools import permutations,c...
output
1
31,548
1
63,097
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,550
1
63,100
Yes
output
1
31,550
1
63,101
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,552
1
63,104
Yes
output
1
31,552
1
63,105
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,553
1
63,106
No
output
1
31,553
1
63,107
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,554
1
63,108
No
output
1
31,554
1
63,109
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,555
1
63,110
No
output
1
31,555
1
63,111
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. There are N cities on a 2D plane. The coordinate of the i-th city is (x_i, y_i). Here (x_1, x_2, \dots, x_N) and (y_1, y_2, \dots, y_N) are both permuations of (1, 2, \dots, N). For each k = 1,...
instruction
0
31,556
1
63,112
No
output
1
31,556
1
63,113
Provide a correct Python 3 solution for this coding contest problem. The Kingdom of Neva is home to two ethnic groups, the Totata and the Tutete. The biggest feature of the Totata tribe is that they eat sweet and sour pork with pineapple. However, the Tutete tribe eats vinegared pork in pineapple. These two peoples co...
instruction
0
31,744
1
63,488
"Correct Solution: ``` from heapq import heappush, heappop from math import sqrt import sys readline = sys.stdin.buffer.readline write = sys.stdout.write N, M = map(int, readline().split()) PS = [list(map(int, readline().split())) for i in range(N)] QS = [list(map(int, readline().split())) for i in range(M)] def dot3(...
output
1
31,744
1
63,489
Provide a correct Python 3 solution for this coding contest problem. The Kingdom of Neva is home to two ethnic groups, the Totata and the Tutete. The biggest feature of the Totata tribe is that they eat sweet and sour pork with pineapple. However, the Tutete tribe eats vinegared pork in pineapple. These two peoples co...
instruction
0
31,745
1
63,490
"Correct Solution: ``` import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**13 mod = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int...
output
1
31,745
1
63,491
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. The "Road Accident" band is planning an unprecedented tour around Treeland. The RA fans are looking forward to the event and making bets on how many concerts their favorite group will have. Tre...
instruction
0
32,055
1
64,110
No
output
1
32,055
1
64,111
Provide tags and a correct Python 3 solution for this coding contest problem. Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or ve...
instruction
0
32,056
1
64,112
Tags: math Correct Solution: ``` import math a,b,s = (int(i) for i in input().split()) d = int(math.fabs(a)+math.fabs(b)) if (s<d): print('NO') exit(0) s1 = s - d if (s1%2==0): print('YES') else: print('NO') ```
output
1
32,056
1
64,113
Provide tags and a correct Python 3 solution for this coding contest problem. Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or ve...
instruction
0
32,057
1
64,114
Tags: math Correct Solution: ``` a,b,c=map(int,input().split());a,b,c=abs(a),abs(b),abs(c) if a+b==c or ((c-a+b)%2==0 and a+b<=c):print('YES') else:print('NO') ```
output
1
32,057
1
64,115
Provide tags and a correct Python 3 solution for this coding contest problem. Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or ve...
instruction
0
32,058
1
64,116
Tags: math Correct Solution: ``` a,b,s = map(int,input().split()) mi = abs(a)+abs(b) if s >= mi and (s-mi)%2 == 0: print("Yes") else: print("No") ```
output
1
32,058
1
64,117
Provide tags and a correct Python 3 solution for this coding contest problem. Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or ve...
instruction
0
32,059
1
64,118
Tags: math Correct Solution: ``` a,b,s=map(int,input().split()) k=s-abs(a)-abs(b) if k>=0 and k%2==0: print('Yes') else: print('No') ```
output
1
32,059
1
64,119
Provide tags and a correct Python 3 solution for this coding contest problem. Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home is located in point (a, b). In each step, he can move in a unit distance in horizontal or ve...
instruction
0
32,060
1
64,120
Tags: math Correct Solution: ``` a,b,s=map(int,input().split()) s-=abs(a)+abs(b) print(['No','Yes'][s>=0 and s%2==0]) ```
output
1
32,060
1
64,121