problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02678 | from queue import Queue
N, M = map(int, input().split())
root = [[] for _ in range(N)]
#print(root)
for i in range(M):
A, B = map(int, input().split())
root[A-1].insert(len(root[A-1]), B)
root[B-1].insert(len(root[B-1]), A)
room = [0]*N
q = Queue()
for k in root[0]:
room[k-1] = 1
q.put(k)
while no... | from queue import Queue
N, M = map(int, input().split())
root = [[] for _ in range(N)]
#print(root)
for i in range(M):
A, B = map(int, input().split())
root[A-1].insert(len(root[A-1]), B)
root[B-1].insert(len(root[B-1]), A)
room = [0]*N
q = Queue()
for k in root[0]:
room[k-1] = 1
q.put(k)
while no... | [
"call.add"
] | 401,672 | 401,673 | u547608423 | python |
p02678 | from collections import deque
n,m = map(int,input().split())
visited = [-1 for _ in range(n)]
g = [[] for _ in range(m)]
for _ in range(m):
a,b = map(int,input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
pos = 0
que = deque([])
if g[0]:
visited[0] = 0
for nx in g[0]:
que.a... | from collections import deque
n,m = map(int,input().split())
visited = [-1 for _ in range(n)]
g = [[] for _ in range(n)]
for _ in range(m):
a,b = map(int,input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
pos = 0
que = deque([])
if g[0]:
visited[0] = 0
for nx in g[0]:
que.a... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,686 | 401,687 | u672475305 | python |
p02678 | # # -*- coding: utf-8 -*-
#
N, M = map(int, input().split(' '))
graph = [[] for _ in range(N)]
for _ in range(M):
a, b = map(int, input().split(' '))
a -= 1
b -= 1
graph[a].append(b)
graph[b].append(a)
#
import collections
buf = collections.deque()
parents = [-1 for _ in range(N)]
parents[0] = 0
... | # # -*- coding: utf-8 -*-
#
N, M = map(int, input().split(' '))
graph = [[] for _ in range(N)]
for _ in range(M):
a, b = map(int, input().split(' '))
a -= 1
b -= 1
graph[a].append(b)
graph[b].append(a)
#
import collections
buf = collections.deque()
parents = [-1 for _ in range(N)]
parents[0] = 0
... | [
"literal.number.integer.change",
"call.arguments.change"
] | 401,705 | 401,706 | u556799364 | python |
p02678 | def main():
import sys
from collections import deque
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
G = [deque([]) for _ in range(M)]
for m in range(M):
a, b = [int(x) for x in input().strip().split()]
G[a-1].append(b)... | def main():
import sys
from collections import deque
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
N, M = [int(x) for x in input().strip().split()]
G = [deque([]) for _ in range(N)]
for m in range(M):
a, b = [int(x) for x in input().strip().split()]
G[a-1].append(b)... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.remove"
] | 401,713 | 401,714 | u408620326 | python |
p02678 | N, M = map(int, input().split())
to = [[] for _ in range(N)]
ans = [-1] * N
for _ in range(M):
a, b = map(int, input().split())
a -= 1
b -= 1
to[a].append(b)
to[b].append(a)
from collections import deque
Q = deque([0])
ans[0] = -2
while Q:
v = Q.popleft()
for s in to[v]:
if ans[s]... | N, M = map(int, input().split())
to = [[] for _ in range(N)]
ans = [-1] * N
for _ in range(M):
a, b = map(int, input().split())
a -= 1
b -= 1
to[a].append(b)
to[b].append(a)
from collections import deque
Q = deque([0])
ans[0] = -2
while Q:
v = Q.popleft()
for s in to[v]:
if ans[s]... | [
"call.add"
] | 401,719 | 401,720 | u839188633 | python |
p02678 | from collections import deque
n, m = map(int, input().split())
g = [[] for i in range(m)]
for i in range(m):
a, b = map(int, input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
dist = [-1] * n
prev = [-1] * n
que = deque([0])
dist[0] = 0
while que:
v = que.popleft()
d = dist[v]
... | from collections import deque
n, m = map(int, input().split())
g = [[] for i in range(n)]
for i in range(m):
a, b = map(int, input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
dist = [-1] * n
prev = [-1] * n
que = deque([0])
dist[0] = 0
while que:
v = que.popleft()
d = dist[v]
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,735 | 401,736 | u761989513 | python |
p02678 | from collections import deque
n, m = list(map(int, input().split()))
al = [0] * n
bl = [0] * n
G = [[] for _ in range(n)]
for i in range(n):
a, b = map(int, input().split())
G[a-1].append(b-1)
G[b-1].append(a-1)
N = n
# G[v]: 頂点vに隣接する頂点list
# N: 頂点数
dist = [-1]*N
tag = [-1]*N
que = deque([0])
dist[0] = 0
p... | from collections import deque
n, m = list(map(int, input().split()))
al = [0] * n
bl = [0] * n
G = [[] for _ in range(n)]
for i in range(m):
a, b = map(int, input().split())
G[a-1].append(b-1)
G[b-1].append(a-1)
N = n
# G[v]: 頂点vに隣接する頂点list
# N: 頂点数
dist = [-1]*N
tag = [-1]*N
que = deque([0])
dist[0] = 0
p... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,737 | 401,738 | u540877546 | python |
p02678 | from collections import deque
N, M = map(int, input().split())
Gs = [[] for _ in range(N+1)]
for _ in range(M):
a, b = map(int, input().split())
Gs[a].append(b)
Gs[b].append(a)
ms = [0] * (N+1)
def bfs(c):
queue = deque()
ns = Gs[c]
for n in ns:
queue.append((n, c))
while queue:
... | from collections import deque
N, M = map(int, input().split())
Gs = [[] for _ in range(N+1)]
for _ in range(M):
a, b = map(int, input().split())
Gs[a].append(b)
Gs[b].append(a)
ms = [0] * (N+1)
def bfs(c):
queue = deque()
ns = Gs[c]
for n in ns:
queue.append((n, c))
while queue:
... | [
"call.remove"
] | 401,747 | 401,748 | u029785897 | python |
p02678 | import itertools
from collections import defaultdict
import collections
import math
import sys
import queue
sys.setrecursionlimit(200000)
mod = 1000000007
n, m = map(int, input().split())
graph = {i: [] for i in range(1, m + 1)}
for _ in range(m):
u, v = map(int, input().split())
graph[u].append(v)
graph[... | import itertools
from collections import defaultdict
import collections
import math
import sys
import queue
sys.setrecursionlimit(200000)
mod = 1000000007
n, m = map(int, input().split())
graph = {i: [] for i in range(1, n + 1)}
for _ in range(m):
u, v = map(int, input().split())
graph[u].append(v)
graph[... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,759 | 401,760 | u202826462 | python |
p02678 | # -*- coding: utf-8 -*-
from collections import Counter, defaultdict, deque
import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2**62-1
def read_int():
return int(buff_readline())
def read_int_n():
r... | # -*- coding: utf-8 -*-
from collections import Counter, defaultdict, deque
import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2**62-1
def read_int():
return int(buff_readline())
def read_int_n():
r... | [
"call.arguments.change"
] | 401,763 | 401,764 | u334712262 | python |
p02678 | # -*- coding: utf-8 -*-
from collections import Counter, defaultdict, deque
import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2**62-1
def read_int():
return int(buff_readline())
def read_int_n():
r... | # -*- coding: utf-8 -*-
from collections import Counter, defaultdict, deque
import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2**62-1
def read_int():
return int(buff_readline())
def read_int_n():
r... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 401,765 | 401,764 | u334712262 | python |
p02678 | from collections import deque
N, M = map(int, input().split())
path = [[] for i in range(N)]
indicator = [None] * N
indicator[0] = (0, 0)
for i in range(M):
a, b = map(int, input().split())
a-=1
b-=1
path[a].append(b)
path[b].append(a)
def solve(N, path, indicator):
visit = [False]*N
visit... | from collections import deque
N, M = map(int, input().split())
path = [[] for i in range(N)]
indicator = [None] * N
indicator[0] = (0, 0)
for i in range(M):
a, b = map(int, input().split())
a-=1
b-=1
path[a].append(b)
path[b].append(a)
def solve(N, path, indicator):
visit = [False]*N
visit... | [
"assignment.value.change",
"identifier.change"
] | 401,772 | 401,773 | u736729525 | python |
p02678 | from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(N)]
for i in range(N):
a,b=map(int,input().split())
road[a-1].append(b-1)
road[b-1].append(a-1)
visit=[0]*N
q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
while(q):
v=q.poplef... | from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(N)]
for i in range(M):
a,b=map(int,input().split())
road[a-1].append(b-1)
road[b-1].append(a-1)
visit=[0]*N
q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
while(q):
v=q.poplef... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,776 | 401,777 | u471539833 | python |
p02678 | from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(M)]
for i in range(M):
a,b=map(int,input().split())
road[a-1].append(b-1)
road[b-1].append(a-1)
visit=[0]*N
q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
while(q):
v=q.poplef... | from collections import deque
import sys
sys.setrecursionlimit(10**7)
N,M=map(int,input().split())
A=[]
B=[]
road=[[] for i in range(N)]
for i in range(M):
a,b=map(int,input().split())
road[a-1].append(b-1)
road[b-1].append(a-1)
visit=[0]*N
q=deque([0])
ans=[0]*N
visit[0]=1
def bfs(q):
while(q):
v=q.poplef... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,778 | 401,777 | u471539833 | python |
p02678 | from collections import deque
N, M = map(int, input().split())
graph = {i+1:[] for i in range(N)}
for i in range(M):
a, b = map(int, input().split())
graph[a].append(b)
graph[b].append(a)
num = [0 for _ in range(N)]
num[0] = 1
dist = [10**15 for _ in range(N)]
dist[0] = 0
queue = deque([1])
visited = [... | from collections import deque
N, M = map(int, input().split())
graph = {i+1:[] for i in range(N)}
for i in range(M):
a, b = map(int, input().split())
graph[a].append(b)
graph[b].append(a)
num = [0 for _ in range(N)]
num[0] = 1
dist = [10**15 for _ in range(N)]
dist[0] = 0
queue = deque([1])
visited = [... | [
"assignment.value.change",
"identifier.change"
] | 401,783 | 401,784 | u995062424 | python |
p02678 | n,edge = map(int,input().split())
l = [0]*n
stack = [1]
dic = {}
for i in range (edge) :
x = [int(x) for x in input().split()]
if x[0] not in dic :
dic[x[0]] = []
if x[1] not in dic :
dic[x[1]] = []
dic[x[0]].append(x[1])
dic[x[1]].append(x[0])
x = 1
while len(stack) != 0 :
ch... | n,edge = map(int,input().split())
l = [0]*n
stack = [1]
dic = {}
for i in range (edge) :
x = [int(x) for x in input().split()]
if x[0] not in dic :
dic[x[0]] = []
if x[1] not in dic :
dic[x[1]] = []
dic[x[0]].append(x[1])
dic[x[1]].append(x[0])
x = 1
while len(stack) != 0 :
ch... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 401,795 | 401,796 | u736227279 | python |
p02678 | #import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
from collections import deque
#import math
def main():
n, m = map(int, input().split())
AL = [[] for i in range(n+1)]
check = [0 for i in range(n+1)]
for i in range(m):
s, e = map(int, input().split())
AL[s].a... | #import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
from collections import deque
#import math
def main():
n, m = map(int, input().split())
AL = [[] for i in range(n+1)]
check = [0 for i in range(n+1)]
for i in range(m):
s, e = map(int, input().split())
AL[s].a... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 401,801 | 401,802 | u639380385 | python |
p02678 | #import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
from collections import deque
#import math
def main():
n, m = map(int, input().split())
AL = [[] for i in range(n+1)]
check = [0 for i in range(n+1)]
for i in range(m):
s, e = map(int, input().split())
AL[s].a... | #import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
from collections import deque
#import math
def main():
n, m = map(int, input().split())
AL = [[] for i in range(n+1)]
check = [0 for i in range(n+1)]
for i in range(m):
s, e = map(int, input().split())
AL[s].a... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 401,803 | 401,802 | u639380385 | python |
p02678 | n,m=map(int,input().split())
r=list()
for i in range(m):
a=list()
r.append(a)
a=list()
for i in range(n):
a.append(-1)
for i in range(m):
x=0;y=0
x,y=map(int,input().split())
x-=1
y-=1
r[x].append(y)
r[y].append(x)
a[0]=0
now=[0]
while len(now)!=0:
nex=list()
for i i... | n,m=map(int,input().split())
r=list()
for i in range(n):
a=list()
r.append(a)
a=list()
for i in range(n):
a.append(-1)
for i in range(m):
x=0;y=0
x,y=map(int,input().split())
x-=1
y-=1
r[x].append(y)
r[y].append(x)
a[0]=0
now=[0]
while len(now)!=0:
nex=list()
for i i... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,806 | 401,807 | u447899880 | python |
p02678 | import collections
def get_input():
return list(map(lambda x:int(x), input().split()))
def main():
inp = get_input()
n, m = inp[0], inp[1]
adj_list = [[] for i in range(n)]
for i in range(m):
inpu = get_input()
a, b = inpu[0], inpu[1]
adj_list[a - 1].append(b - 1)
a... | import collections
def get_input():
return list(map(lambda x:int(x), input().split()))
def main():
inp = get_input()
n, m = inp[0], inp[1]
adj_list = [[] for i in range(n)]
for i in range(m):
inpu = get_input()
a, b = inpu[0], inpu[1]
adj_list[a - 1].append(b - 1)
a... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 401,824 | 401,825 | u425068548 | python |
p02678 | import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy
sys.setrecursionlimit(10**7)
inf=10**20
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(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys... | import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy
sys.setrecursionlimit(10**7)
inf=10**20
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(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys... | [
"call.remove"
] | 401,835 | 401,836 | u941753895 | python |
p02678 | # -*- coding: utf-8 -*-
"""
Created on Sun May 17 20:56:20 2020
@author: Kanaru Sato
"""
import collections
n,m = list(map(int,input().split()))
connected = [[]for i in range(n+1)]
for i in range(m):
a,b = list(map(int,input().split()))
connected[a].append(b)
connected[b].append(a)
distance = [-1,0]
for ... | # -*- coding: utf-8 -*-
"""
Created on Sun May 17 20:56:20 2020
@author: Kanaru Sato
"""
import collections
n,m = list(map(int,input().split()))
connected = [[]for i in range(n+1)]
for i in range(m):
a,b = list(map(int,input().split()))
connected[a].append(b)
connected[b].append(a)
distance = [-1,0]
for ... | [
"call.remove"
] | 401,839 | 401,840 | u674052742 | python |
p02678 | N, M = [int(i) for i in input().split()]
Mark = [0 for _ in range(N+1)]
path = {k: [] for k in range(1, N+1)}
for i in range(M):
A, B = [int(i) for i in input().split()]
path[A].append(B)
path[B].append(A)
next = [1]
while True:
n = next.pop()
for x in path[n]:
# n -> x
if Mark[x] =... | N, M = [int(i) for i in input().split()]
Mark = [0 for _ in range(N+1)]
path = {k: [] for k in range(1, N+1)}
for i in range(M):
A, B = [int(i) for i in input().split()]
path[A].append(B)
path[B].append(A)
next = [1]
while True:
n = next.pop(0)
for x in path[n]:
# n -> x
if Mark[x] ... | [
"call.arguments.change"
] | 401,853 | 401,854 | u363825867 | python |
p02678 | n,m,*ab=map(int,open(0).read().split())
path={}
for i in range(n):
path[i]=[]
for i in range(m):
a,b=ab[i*2]-1,ab[i*2+1]-1
path[a].append(b)
path[b].append(a)
direction=[i for i in range(n)]
fin=[False for i in range(n)]
fin[0]=True
i=0
queue=[0]
while i<n:
i+=1
queue2=queue.copy()
queue.clear()
if len(... | n,m,*ab=map(int,open(0).read().split())
path={}
for i in range(n):
path[i]=[]
for i in range(m):
a,b=ab[i*2]-1,ab[i*2+1]-1
path[a].append(b)
path[b].append(a)
direction=[i for i in range(n)]
fin=[False for i in range(n)]
fin[0]=True
i=0
queue=[0]
while i<n:
i+=1
queue2=queue.copy()
queue.clear()
if len(... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 401,867 | 401,868 | u131638468 | python |
p02678 | # D - .. (Double Dots)
from collections import deque
N, M = map(int, input().split())
tree = [[] for _ in range(M)]
for i in range(M):
A, B = map(int, input().split())
A -= 1
B -= 1
tree[A].append(B)
tree[B].append(A)
ans_arr = [-1] * (N)
q = deque()
ans_arr[0] = 0
q.append(0)
while len(q)>0:
... | # D - .. (Double Dots)
from collections import deque
N, M = map(int, input().split())
tree = [[] for _ in range(N)]
for i in range(M):
A, B = map(int, input().split())
A -= 1
B -= 1
tree[A].append(B)
tree[B].append(A)
ans_arr = [-1] * (N)
q = deque()
ans_arr[0] = 0
q.append(0)
while len(q)>0:
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 401,875 | 401,876 | u141786930 | python |
p02678 | from collections import defaultdict, deque
N, M = map(int, input().split())
X = defaultdict(list)
for i in range(M):
Ai, Bi = map(lambda s: int(s) - 1, input().split())
X[Ai].append(Bi)
X[Bi].append(Ai)
V = [False] * N
P = [0] * N
A = [0] * N
Q = deque([0])
V[0] = True
while len(Q) > 0:
r = Q.popleft(... | from collections import defaultdict, deque
N, M = map(int, input().split())
X = defaultdict(list)
for i in range(M):
Ai, Bi = map(lambda s: int(s) - 1, input().split())
X[Ai].append(Bi)
X[Bi].append(Ai)
V = [False] * N
P = [0] * N
A = [0] * N
Q = deque([0])
V[0] = True
while len(Q) > 0:
r = Q.popleft(... | [
"call.add"
] | 401,901 | 401,902 | u374531474 | python |
p02678 | from collections import deque
n, m = [int(x) for x in input().strip().split()]
graph = {}
for i in range(m):
u, v = [int(x) for x in input().strip().split()]
if u not in graph:
graph[u] = []
if v not in graph:
graph[v] = []
graph[u].append(v)
graph[v].append(u)
dp = [None for i in... | from collections import deque
n, m = [int(x) for x in input().strip().split()]
graph = {}
for i in range(m):
u, v = [int(x) for x in input().strip().split()]
if u not in graph:
graph[u] = []
if v not in graph:
graph[v] = []
graph[u].append(v)
graph[v].append(u)
dp = [None for i in... | [
"call.remove"
] | 401,912 | 401,913 | u393253746 | python |
p02678 | # -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *
class Scanner():
@staticmethod
... | # -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *
class Scanner():
@staticmethod
... | [
"call.remove"
] | 401,914 | 401,915 | u303039933 | python |
p02678 | def mp(): return map(int, input().split())
def lmp(): return list(map(int, input().split()))
from collections import deque
n,m = mp()
path = []
for i in range(n+1):
path.append([])
for i in range(m):
a,b = mp()
path[a].append(b)
path[b].append(a)
ans = [0]*(n+1)
q = deque([1])
used = set()
used.add(1... | def mp(): return map(int, input().split())
def lmp(): return list(map(int, input().split()))
from collections import deque
n,m = mp()
path = []
for i in range(n+1):
path.append([])
for i in range(m):
a,b = mp()
path[a].append(b)
path[b].append(a)
ans = [0]*(n+1)
q = deque([1])
used = set()
used.add(1... | [
"expression.operation.binary.remove"
] | 401,916 | 401,917 | u599114793 | python |
p02678 | from collections import deque
N,M = map(int,input().split())
ans = [-1]*(N+1)
E = [[] for i in range(N+1)]
for i in range(M):
a,b = map(int,input().split())
E[a].append(b)
E[b].append(a)
q = deque([1])
while(q):
v = q.popleft()
for s in E[v]:
if(ans[s] == -1):
ans[s] = v
... | from collections import deque
N,M = map(int,input().split())
ans = [-1]*(N+1)
E = [[] for i in range(N+1)]
for i in range(M):
a,b = map(int,input().split())
E[a].append(b)
E[b].append(a)
q = deque([1])
while(q):
v = q.popleft()
for s in E[v]:
if(ans[s] == -1):
ans[s] = v
... | [] | 401,934 | 401,935 | u557282438 | python |
p02678 | n, m = map(int, input().split())
visited = set()
my_dict = dict()
for i in range(m):
a, b = map(int, input().split())
if a in my_dict:
my_dict[a].append(b)
else:
my_dict[a] = [b]
if b in my_dict:
my_dict[b].append(a)
else:
my_dict[b] = [a]
ret_dict = dict()
queue =... | n, m = map(int, input().split())
visited = set()
my_dict = dict()
for i in range(m):
a, b = map(int, input().split())
if a in my_dict:
my_dict[a].append(b)
else:
my_dict[a] = [b]
if b in my_dict:
my_dict[b].append(a)
else:
my_dict[b] = [a]
ret_dict = dict()
queue =... | [
"call.arguments.change"
] | 401,949 | 401,950 | u550294762 | python |
p02678 | import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readlin... | import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readlin... | [
"call.remove"
] | 401,951 | 401,952 | u380995377 | python |
p02678 | import sys
from collections import deque
def input(): return sys.stdin.readline().rstrip()
def main():
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(M)]
root = [[] for _ in range(M + 1)]
for a, b in AB:
root[a].append(b)
root[b].append(a)
qu... | import sys
from collections import deque
def input(): return sys.stdin.readline().rstrip()
def main():
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(M)]
root = [[] for _ in range(N + 1)]
for a, b in AB:
root[a].append(b)
root[b].append(a)
qu... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change",
"literal.number.integer.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 401,975 | 401,976 | u250583425 | python |
p02678 | import copy
n,m = map(int,input().split())
graph = [[] for _ in range(m)]
for i in range(m):
a,b = map(int,input().split())
graph[a-1].append(b-1)
graph[b-1].append(a-1)
memo = [0]*n
now = [[0,0]]
nxt = []
done = [False]*n
done[0] = True
while now:
for l in now:
for j in graph[l[1]]:
... | import copy
n,m = map(int,input().split())
graph = [[] for _ in range(n)]
for i in range(m):
a,b = map(int,input().split())
graph[a-1].append(b-1)
graph[b-1].append(a-1)
memo = [0]*n
now = [[0,0]]
nxt = []
done = [False]*n
done[0] = True
while now:
for l in now:
for j in graph[l[1]]:
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.remove"
] | 402,002 | 402,001 | u948911484 | python |
p02678 | n, m = map(int, input().split())
graf = [[] for _ in range(n)]
for i in range(n):
a, b = map(int, input().split())
graf[a-1].append(b-1)
graf[b-1].append(a-1)
out = [0 for _ in range(n)]
out[0] = -1
import queue
next_visit = queue.Queue()
next_visit.put(0)
while not next_visit.empty():
i = next_visit.g... | n, m = map(int, input().split())
graf = [[] for _ in range(n)]
for i in range(m):
a, b = map(int, input().split())
graf[a-1].append(b-1)
graf[b-1].append(a-1)
out = [0 for _ in range(n)]
out[0] = -1
import queue
next_visit = queue.Queue()
next_visit.put(0)
while not next_visit.empty():
i = next_visi... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 402,003 | 402,004 | u102126195 | python |
p02678 | N,M = map(int,input().split())
path_list = []
for i in range(M):
z = []
path_list.append(z)
for i in range(M):
A,B = map(int,input().split())
path_list[A-1].append(B)
path_list[B-1].append(A)
chk = [0] * N
def bfs(a,chk,path):
queue = [a]
while queue:
b = queue.pop(0)
for i ... | N,M = map(int,input().split())
path_list = []
for i in range(N):
z = []
path_list.append(z)
for i in range(M):
A,B = map(int,input().split())
path_list[A-1].append(B)
path_list[B-1].append(A)
chk = [0] * N
def bfs(a,chk,path):
queue = [a]
while queue:
b = queue.pop(0)
for i ... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 402,021 | 402,022 | u513900925 | python |
p02678 | from collections import deque
n, m = map(int, input().split())
g = [[] for _ in range(n)]
for _ in range(m):
a, b = map(int, input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
ans = [-1]*n
used = [0]*n
used[0] = 1
que = deque()
que.appendleft(0)
while que:
v = que.pop()
# print(v)... | from collections import deque
n, m = map(int, input().split())
g = [[] for _ in range(n)]
for _ in range(m):
a, b = map(int, input().split())
a -= 1
b -= 1
g[a].append(b)
g[b].append(a)
ans = [-1]*n
used = [0]*n
used[0] = 1
que = deque()
que.appendleft(0)
while que:
v = que.pop()
# print(v)... | [
"call.add"
] | 402,029 | 402,030 | u309141201 | python |
p02678 | import sys
import collections
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
d... | import sys
import collections
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
d... | [
"call.add"
] | 402,031 | 402,032 | u895515293 | python |
p02678 | import sys
from collections import Counter
from collections import deque
import math
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n,m=mp()
step=[-1]*(n+1)
ans=[-1]*(n+1)
edge=[[i] for i in range(n+1)]
for i in range(m):
... | import sys
from collections import Counter
from collections import deque
import math
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n,m=mp()
step=[-1]*(n+1)
ans=[-1]*(n+1)
edge=[[i] for i in range(n+1)]
for i in range(m):
... | [
"call.remove"
] | 402,037 | 402,038 | u024782094 | python |
p02678 | from collections import deque
N, M = map(int, input().split())
A = [[] for _ in range(M)]
for i in range(M):
Am, Bm = map(int, input().split())
Am -= 1
Bm -= 1
A[Am].append(Bm)
A[Bm].append(Am)
is_visited = [False for _ in range(N)]
ans = [0 for _ in range(N)]
def bfs():
queue = deque()
... | from collections import deque
N, M = map(int, input().split())
A = [[] for _ in range(N)]
for i in range(M):
Am, Bm = map(int, input().split())
Am -= 1
Bm -= 1
A[Am].append(Bm)
A[Bm].append(Am)
is_visited = [False for _ in range(N)]
ans = [0 for _ in range(N)]
def bfs():
queue = deque()
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 402,039 | 402,040 | u312695001 | python |
p02678 | n, m = map(int, input().split())
graph = [[] for _ in range(n+1)]
for i in range(m):
a, b = map(int, input().split())
graph[a].append(b)
graph[b].append(a)
# bfs
milestone = [0] * (n+1)
q = []
q.append(1)
while len(q) != 0:
for i in graph[q[0]]:
if milestone[i] == 0:
milestone[i] ... | n, m = map(int, input().split())
graph = [[] for _ in range(n+1)]
for i in range(m):
a, b = map(int, input().split())
graph[a].append(b)
graph[b].append(a)
# bfs
milestone = [0] * (n+1)
q = []
q.append(1)
while len(q) != 0:
for i in graph[q[0]]:
if milestone[i] == 0:
milestone[i] ... | [
"call.add"
] | 402,042 | 402,043 | u111473084 | python |
p02678 | N,M = map(int,input().split())
A = []
B = []
for m in range(M):
a,b = map(int,input().split())
A.append(a)
B.append(b)
from collections import defaultdict as ddict
route = ddict(list)
for i in range(M):
route[A[i]].append(B[i])
route[B[i]].append(A[i])
for i in range(1,N+1):
if route[i] == []:
... | N,M = map(int,input().split())
A = []
B = []
for m in range(M):
a,b = map(int,input().split())
A.append(a)
B.append(b)
from collections import defaultdict as ddict
route = ddict(list)
for i in range(M):
route[A[i]].append(B[i])
route[B[i]].append(A[i])
for i in range(1,N+1):
if route[i] == []:
... | [
"call.add"
] | 402,065 | 402,066 | u255943004 | python |
p02678 |
import sys
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 7)
# ----------
INF = float("inf")
MOD = 10 ** 9 + 7
# ----------
N, M = map(int, input().split())
G = defaultdict(list)
for i in range(M):
a, b = map(int, input().split())
a -= 1
b -= 1
G[a].append(b)
G[b].append... |
import sys
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 7)
# ----------
INF = float("inf")
MOD = 10 ** 9 + 7
# ----------
N, M = map(int, input().split())
G = defaultdict(list)
for i in range(M):
a, b = map(int, input().split())
a -= 1
b -= 1
G[a].append(b)
G[b].append... | [
"call.add"
] | 402,071 | 402,072 | u970308980 | python |
p02678 | N,M=map(int,input().split())
P=[[] for i in range(N+1)]
for i in range(M):
a,b=map(int,input().split())
P[a].append(b)
P[b].append(a)
#AB=[list(map(int,input().split())) for i in range(M)]
ans=[0]*N
con=set()
now=[1]
while now!=[]:
_now=[]
for n in now:
for p in P[n]:
if p in con:
continue
... | N,M=map(int,input().split())
P=[[] for i in range(N+1)]
for i in range(M):
a,b=map(int,input().split())
P[a].append(b)
P[b].append(a)
#AB=[list(map(int,input().split())) for i in range(M)]
ans=[0]*N
con=set()
now=[1]
while now!=[]:
_now=[]
for n in now:
for p in P[n]:
if p in con:
continue
... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 402,075 | 402,076 | u204616996 | python |
p02678 | from collections import deque
N,M=map(int,input().split())
tr=[[] for _ in range(N)]
for _ in range(M):
a,b=map(int,input().split())
tr[a-1].append(b-1)
tr[b-1].append(a-1)
print(tr)
ans=[-1]*N
q=deque([0])
v=[True]*N
x=[True]*N
while q:
t=q.popleft()
if v[t]:
v[t]=False
for j in tr[... | from collections import deque
N,M=map(int,input().split())
tr=[[] for _ in range(N)]
for _ in range(M):
a,b=map(int,input().split())
tr[a-1].append(b-1)
tr[b-1].append(a-1)
ans=[-1]*N
q=deque([0])
v=[True]*N
x=[True]*N
while q:
t=q.popleft()
if v[t]:
v[t]=False
for j in tr[t]:
... | [
"call.remove"
] | 402,077 | 402,078 | u970449052 | python |
p02678 | n,m = map(int, input().split())
G = [[]for i in range(n)]
for i in range(m):
a,b = map(int, input().split())
a,b = a-1,b-1
G[a].append(b)
G[b].append(a)
from collections import deque
def bfs():
heap = deque()
road = [0]*n
heap.append((0, -1))
used = set()
while heap:
cur, p... | n,m = map(int, input().split())
G = [[]for i in range(n)]
for i in range(m):
a,b = map(int, input().split())
a,b = a-1,b-1
G[a].append(b)
G[b].append(a)
from collections import deque
def bfs():
heap = deque()
road = [0]*n
heap.append((0, -1))
used = set()
while heap:
cur, p... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 402,087 | 402,088 | u803848678 | python |
p02678 | from collections import deque
N , M =[int(hoge) for hoge in input().split()]
route = [[] for i in range(N)]
for i in range(M):
A,B = [int(hoge)-1 for hoge in input().split()]
route[A].append(B)
route[B].append(A)
#全域部分木をほどよく作れるかどうか
#BFS
queue = deque()#append,popleft
went = [-1] * N
went[0] = True
queue.ap... | from collections import deque
N , M =[int(hoge) for hoge in input().split()]
route = [[] for i in range(N)]
for i in range(M):
A,B = [int(hoge)-1 for hoge in input().split()]
route[A].append(B)
route[B].append(A)
#全域部分木をほどよく作れるかどうか
#BFS
queue = deque()#append,popleft
went = [-1] * N
went[0] = True
queue.ap... | [
"call.add"
] | 402,105 | 402,106 | u268516119 | python |
p02678 | class queue:
listQ = []
def push(self, x):
self.listQ.append(x)
def pop(self):
a = self.listQ[0]
del self.listQ[0]
return a
def length(self):
return len(self.listQ)
n, m = map(int, input().split())
nodeMap = {}
doneL = [0]*(n+1)
doneL[1] = -1
for i in range(m):
... | class queue:
listQ = []
def push(self, x):
self.listQ.append(x)
def pop(self):
a = self.listQ[0]
del self.listQ[0]
return a
def length(self):
return len(self.listQ)
n, m = map(int, input().split())
nodeMap = {}
doneL = [0]*(n+1)
doneL[1] = -1
for i in range(m):
... | [
"call.remove"
] | 402,109 | 402,110 | u711295009 | python |
p02678 | import sys
from collections import deque
readline = sys.stdin.readline
N, M = map(int, readline().split())
AB = [list(map(int, readline().split())) for i in range(M)]
AB = [(a-1, b-1) for a,b in AB]
adj = [[] for i in range(N)]
for a,b in AB:
adj[a].append(b)
adj[b].append(a)
ans = [-1] * N
q = deque()
q.ap... | import sys
from collections import deque
readline = sys.stdin.readline
N, M = map(int, readline().split())
AB = [list(map(int, readline().split())) for i in range(M)]
AB = [(a-1, b-1) for a,b in AB]
adj = [[] for i in range(N)]
for a,b in AB:
adj[a].append(b)
adj[b].append(a)
ans = [-1] * N
q = deque()
q.ap... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 402,125 | 402,126 | u780465569 | python |
p02678 | N, M = map(int, input().split())
E = [[] for _ in range(N)]
for _ in range(M):
A, B = map(int, input().split())
E[A-1] += [B-1]
E[B-1] += [A-1]
ans = [-1]*N
T = [0]
while len(T)>0:
P = T
T = []
for x in P:
for e in E[x]:
if ans[e]==-1:
T += [e]
ans[e] = x
for a in ans[1:]:
print... | N, M = map(int, input().split())
E = [[] for _ in range(N)]
for _ in range(M):
A, B = map(int, input().split())
E[A-1] += [B-1]
E[B-1] += [A-1]
ans = [-1]*N
T = [0]
while len(T)>0:
P = T
T = []
for x in P:
for e in E[x]:
if ans[e]==-1:
T += [e]
ans[e] = x
print("Yes")
for a in an... | [
"call.add"
] | 402,135 | 402,134 | u374099594 | python |
p02678 | from sys import stdin, setrecursionlimit
input = stdin.buffer.readline
setrecursionlimit(10 ** 7)
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict
from itertools import combinations, permutations, combinations_with_replacement
from itertools im... | from sys import stdin, setrecursionlimit
input = stdin.buffer.readline
setrecursionlimit(10 ** 7)
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict
from itertools import combinations, permutations, combinations_with_replacement
from itertools im... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 402,136 | 402,137 | u296518383 | python |
p02679 | from math import gcd
from collections import defaultdict
N = int(input())
MOD = 10 ** 9 + 7
zero_zero_num = 0
fishes = defaultdict(int)
for i in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0:
zero_zero_num += 1
elif a == 0:
fishes[(0, -1)] += 1
elif b == 0:
fis... | from math import gcd
from collections import defaultdict
N = int(input())
MOD = 10 ** 9 + 7
zero_zero_num = 0
fishes = defaultdict(int)
for i in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0:
zero_zero_num += 1
elif a == 0:
fishes[(0, -1)] += 1
elif b == 0:
fis... | [
"call.add",
"call.arguments.change"
] | 402,150 | 402,151 | u075012704 | python |
p02679 | import sys
input = sys.stdin.readline
input = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**9)
#from functools import lru_cache
def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,in... | import sys
input = sys.stdin.readline
input = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**9)
#from functools import lru_cache
def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,in... | [
"expression.operation.unary.add"
] | 402,154 | 402,155 | u477977638 | python |
p02679 | import sys
input = sys.stdin.readline
from collections import *
from math import gcd
N = int(input())
cnt = defaultdict(int)
abzero = 0
azero = 0
bzero = 0
for _ in range(N):
A, B = map(int, input().split())
if A==0 and B==0:
abzero += 1
elif A==0:
azero += 1
elif B==0:
bz... | import sys
input = sys.stdin.readline
from collections import *
from math import gcd
N = int(input())
cnt = defaultdict(int)
abzero = 0
azero = 0
bzero = 0
for _ in range(N):
A, B = map(int, input().split())
if A==0 and B==0:
abzero += 1
continue
elif A==0:
azero += 1
... | [
"control_flow.continue.add"
] | 402,163 | 402,164 | u047796752 | python |
p02679 | import math
def heikatu(A,B):
c = math.gcd(A,B)
return (A//c,B//c)
def pow_r(x, n,mod=10**9+7):
"""
O(log n)
"""
if n == 0: # exit case
return 1
if n % 2 == 0: # standard case ① n is even
return pow_r((x ** 2)%1000000007 , n // 2) % mod
else: # standard cas... | import math
def heikatu(A,B):
c = math.gcd(A,B)
return (A//c,B//c)
def pow_r(x, n,mod=10**9+7):
"""
O(log n)
"""
if n == 0: # exit case
return 1
if n % 2 == 0: # standard case ① n is even
return pow_r((x ** 2)%1000000007 , n // 2) % mod
else: # standard cas... | [
"expression.operation.unary.add"
] | 402,205 | 402,206 | u307592354 | python |
p02679 | import math
from collections import Counter
MOD = 10**9 + 7
N = int(input())
I = []
zz = 0
sz = 0
tz = 0
for _ in range(N):
a,b = map(int, input().split())
# (a, b) = (0, 0)
if a == 0 and b == 0:
zero += 1
continue
# (a, b) = (0, #)
if a == 0:
sz += 1
continue
... | import math
from collections import Counter
MOD = 10**9 + 7
N = int(input())
I = []
zz = 0
sz = 0
tz = 0
for _ in range(N):
a,b = map(int, input().split())
# (a, b) = (0, 0)
if a == 0 and b == 0:
zz += 1
continue
# (a, b) = (0, #)
if a == 0:
sz += 1
continue
# ... | [
"identifier.change"
] | 402,241 | 402,242 | u726285999 | python |
p02679 | # 約分して、互いに素な(1,3) (3,1)のようなペアを作りカウントする
# 正のグループと負のグループを別々に管理
# 正のグループの相手が負のグループに存在した場合、
# どちらかのグループから好きなだけ選ぶか、どちらも選ばないかしかない
# 誰ともペアにならなかったグループの個数を全て足してP個だとして、2^P通りを掛ける
# (0,0)については、その中から1つ選ぶか、選ばないかしかない
import sys
readline = sys.stdin.readline
N = int(readline())
import math
zeropair = 0
zeroa = 0
zerob = 0
from coll... | # 約分して、互いに素な(1,3) (3,1)のようなペアを作りカウントする
# 正のグループと負のグループを別々に管理
# 正のグループの相手が負のグループに存在した場合、
# どちらかのグループから好きなだけ選ぶか、どちらも選ばないかしかない
# 誰ともペアにならなかったグループの個数を全て足してP個だとして、2^P通りを掛ける
# (0,0)については、その中から1つ選ぶか、選ばないかしかない
import sys
readline = sys.stdin.readline
N = int(readline())
import math
zeropair = 0
zeroa = 0
zerob = 0
from coll... | [
"identifier.replace.add",
"literal.replace.remove"
] | 402,273 | 402,274 | u936985471 | python |
p02679 | # 約分して、互いに素な(1,3) (3,1)のようなペアを作りカウントする
# 正のグループと負のグループを別々に管理
# 正のグループの相手が負のグループに存在した場合、
# どちらかのグループから好きなだけ選ぶか、どちらも選ばないかしかない
# 誰ともペアにならなかったグループの個数を全て足してP個だとして、2^P通りを掛ける
# (0,0)については、その中から1つ選ぶか、選ばないかしかない
import sys
readline = sys.stdin.readline
N = int(readline())
import math
zeropair = 0
zeroa = 0
zerob = 0
from coll... | # 約分して、互いに素な(1,3) (3,1)のようなペアを作りカウントする
# 正のグループと負のグループを別々に管理
# 正のグループの相手が負のグループに存在した場合、
# どちらかのグループから好きなだけ選ぶか、どちらも選ばないかしかない
# 誰ともペアにならなかったグループの個数を全て足してP個だとして、2^P通りを掛ける
# (0,0)については、その中から1つ選ぶか、選ばないかしかない
import sys
readline = sys.stdin.readline
N = int(readline())
import math
zeropair = 0
zeroa = 0
zerob = 0
from coll... | [
"identifier.replace.add",
"literal.replace.remove"
] | 402,275 | 402,274 | u936985471 | python |
p02679 | n=int(input())
ab=[list(map(int,input().split())) for _ in range(n)]
from collections import defaultdict
from math import gcd
d=defaultdict(int)
for a,b in ab:
if a==0 and b==0:
d[(0,0)]+=1
elif a==0:
d[(1,0)]+=1
elif b==0:
d[(0,1)]+=1
else:
if a<0:
a*=-1
b*=-1
g=gcd(a,b)
d[(... | n=int(input())
ab=[list(map(int,input().split())) for _ in range(n)]
from collections import defaultdict
from math import gcd
d=defaultdict(int)
for a,b in ab:
if a==0 and b==0:
d[(0,0)]+=1
elif a==0:
d[(1,0)]+=1
elif b==0:
d[(0,1)]+=1
else:
if a<0:
a*=-1
b*=-1
g=gcd(a,b)
d[(... | [
"variable_access.subscript.index.change"
] | 402,324 | 402,325 | u707124227 | python |
p02679 | from math import gcd
n = int(input())
p = 10**9 + 7
iwashi = {}
bad = 0
ans = 1
for i in range(n):
x, y = map(int, input().split())
if(x == 0 and y == 0):
bad += 1
continue
elif(x == 0):
try:
iwashi[(0, 1)] += 1
except KeyError:
iwashi[(0, 1)] = 1
... | from math import gcd
n = int(input())
p = 10**9 + 7
iwashi = {}
bad = 0
ans = 1
for i in range(n):
x, y = map(int, input().split())
if(x == 0 and y == 0):
bad += 1
continue
elif(x == 0):
try:
iwashi[(0, 1)] += 1
except KeyError:
iwashi[(0, 1)] = 1
... | [
"expression.operation.unary.add",
"expression.operation.unary.arithmetic.remove"
] | 402,332 | 402,333 | u153302617 | python |
p02679 | from math import gcd
n = int(input())
p = 10**9 + 7
iwashi = {}
bad = 0
ans = 1
for i in range(n):
x, y = map(int, input().split())
if(x == 0 and y == 0):
bad += 1
continue
elif(x == 0):
try:
iwashi[(0, -1)] += 1
except KeyError:
iwashi[(0, -1)] = 1
... | from math import gcd
n = int(input())
p = 10**9 + 7
iwashi = {}
bad = 0
ans = 1
for i in range(n):
x, y = map(int, input().split())
if(x == 0 and y == 0):
bad += 1
continue
elif(x == 0):
try:
iwashi[(0, 1)] += 1
except KeyError:
iwashi[(0, 1)] = 1
... | [
"expression.operation.unary.arithmetic.remove",
"expression.operation.unary.add"
] | 402,334 | 402,333 | u153302617 | python |
p02679 | import math
def main():
N = int(input())
d = {}
zb = 0
za = 0
zab = 0
r = 0
mod = 10**9 + 7
for i in range(N):
a, b = map(int, input().split())
if a== 0 and b == 0:
zab += 1
elif b == 0:
zb += 1
elif a == 0:
za += 1
... | import math
def main():
N = int(input())
d = {}
zb = 0
za = 0
zab = 0
r = 0
mod = 10**9 + 7
for i in range(N):
a, b = map(int, input().split())
if a== 0 and b == 0:
zab += 1
elif b == 0:
zb += 1
elif a == 0:
za += 1
... | [
"call.arguments.change"
] | 402,348 | 402,349 | u316464887 | python |
p02679 | from collections import defaultdict
from math import gcd
def GCD(a,b):
gc = gcd(a,b)
a//=gc
b//=gc
return a,b
zero = 0
First_quadrant = defaultdict(int)
Second_quadrant = defaultdict(int)
n = int(input())
for i in range(n):
a,b = map(int, input().split())
if a == 0 and b == 0:
zero +=1
... | from collections import defaultdict
from math import gcd
def GCD(a,b):
gc = gcd(a,b)
a//=gc
b//=gc
return a,b
zero = 0
First_quadrant = defaultdict(int)
Second_quadrant = defaultdict(int)
n = int(input())
for i in range(n):
a,b = map(int, input().split())
if a == 0 and b == 0:
zero +=1
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,350 | 402,351 | u137912513 | python |
p02679 | import sys
import math
from collections import defaultdict
input = sys.stdin.buffer.readline
MOD = 1000000007
N = int(input())
dd = defaultdict(int)
count = 1
iwashi = [list(map(int, input().split())) for _ in range(N)]
checked = defaultdict(bool)
zeros = 0
for i in range(N):
if iwashi[i][0] == iwashi[i][1] == ... | import sys
import math
from collections import defaultdict
input = sys.stdin.buffer.readline
MOD = 1000000007
N = int(input())
dd = defaultdict(int)
count = 1
iwashi = [list(map(int, input().split())) for _ in range(N)]
checked = defaultdict(bool)
zeros = 0
for i in range(N):
if iwashi[i][0] == iwashi[i][1] == ... | [
"expression.operator.compare.change",
"assignment.value.change"
] | 402,354 | 402,355 | u331327289 | python |
p02679 | #!/usr/bin/env python3
import math
n = int(input())
mod = 10**9+7
data = {}
zero_zero = 0
for i in range(n):
a, b = list(map(int, input().split()))
# # print(a, b)
if a == 0 and b == 0:
zero_zero += 1
continue
gcd = math.gcd(a, b)
a, b = a//gcd, b//gcd
if a < 0:
a, b ... | #!/usr/bin/env python3
import math
n = int(input())
mod = 10**9+7
data = {}
zero_zero = 0
for i in range(n):
a, b = list(map(int, input().split()))
# # print(a, b)
if a == 0 and b == 0:
zero_zero += 1
continue
gcd = math.gcd(a, b)
a, b = a//gcd, b//gcd
if a < 0:
a, b ... | [] | 402,368 | 402,369 | u239528020 | python |
p02679 | #!python3
import sys
from collections import defaultdict
from math import gcd
iim = lambda: map(int, input().rstrip().split())
def resolve():
N = input()
it = map(int, sys.stdin.read().split())
mod = 10**9 + 7
d1 = [defaultdict(int), defaultdict(int)]
z0 = 0
for ai, bi in zip(it, it):
... | #!python3
import sys
from collections import defaultdict
from math import gcd
iim = lambda: map(int, input().rstrip().split())
def resolve():
N = input()
it = map(int, sys.stdin.read().split())
mod = 10**9 + 7
d1 = [defaultdict(int), defaultdict(int)]
z0 = 0
for ai, bi in zip(it, it):
... | [
"control_flow.loop.for.condition.change"
] | 402,399 | 402,400 | u348805958 | python |
p02679 | from math import gcd
MOD = 10**9+7
N = int(input())
d = {}
zero = 0
for _ in range(N):
a, b = map(int, input().split())
if a == b == 0:
zero += 1
continue
# 正規化する
if b < 0:
b = -b
a = -a
g = gcd(a, b)
b //= g
a //= g
# 入力のbが0の時はaの値を正の1に統一する
if b == 0 a... | from math import gcd
MOD = 10**9+7
N = int(input())
d = {}
zero = 0
for _ in range(N):
a, b = map(int, input().split())
if a == b == 0:
zero += 1
continue
# 正規化する
if b < 0:
b = -b
a = -a
g = gcd(a, b)
b //= g
a //= g
# 入力のbが0の時はaの値を正の1に統一する
if b == 0 a... | [] | 402,420 | 402,421 | u708255304 | python |
p02679 | from sys import stdin
from collections import defaultdict
from math import gcd
def main():
MOD = 1000000007
N, *AB = map(int, stdin.buffer.read().split())
d = defaultdict(int)
n_zeros = 0
for a, b in zip(AB[::2], AB[1::2]):
if a == 0 and b == 0:
n_zeros += 1
cont... | from sys import stdin
from collections import defaultdict
from math import gcd
def main():
MOD = 1000000007
N, *AB = map(int, stdin.buffer.read().split())
d = defaultdict(int)
n_zeros = 0
for a, b in zip(AB[::2], AB[1::2]):
if a == 0 and b == 0:
n_zeros += 1
cont... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 402,431 | 402,432 | u764956288 | python |
p02679 | from sys import stdin
from collections import defaultdict
from math import gcd
def main():
MOD = 1000000007
N, *AB = map(int, stdin.buffer.read().split())
d = defaultdict(int)
n_zeros = 0
for a, b in zip(AB[::2], AB[1::2]):
if a == 0 and b == 0:
n_zeros += 1
cont... | from sys import stdin
from collections import defaultdict
from math import gcd
def main():
MOD = 1000000007
N, *AB = map(int, stdin.buffer.read().split())
d = defaultdict(int)
n_zeros = 0
for a, b in zip(AB[::2], AB[1::2]):
if a == 0 and b == 0:
n_zeros += 1
cont... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 402,433 | 402,432 | u764956288 | python |
p02679 | import math
n=int(input())
D={}
for _ in range(n):
a,b=(map(int, input().split()))
if a==0 and b==0:
key=(0,0)
elif a==0:
key=(0,1)
elif b==0:
key=(1,0)
else:
if a<=0:
a=-a
b=-b
g=math.gcd(a,abs(b))
key=(a//g, b//g)
if key ... | import math
n=int(input())
D={}
for _ in range(n):
a,b=map(int, input().split())
if a==0 and b==0:
key=(0,0)
elif a==0:
key=(0,1)
elif b==0:
key=(1,0)
else:
if a<0:
a=-a
b=-b
g=math.gcd(a, abs(b))
key=(a//g, b//g)
if key no... | [
"call.arguments.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.replace.add",
"literal.replace.remove"
] | 402,442 | 402,441 | u405660020 | python |
p02679 | import math
n=int(input())
D={}
for _ in range(n):
a,b=(map(int, input().split()))
if a==0 and b==0:
key=(0,0)
elif a==0:
key=(0,1)
elif b==0:
key=(1,0)
else:
if a<=0:
a=-a
b=-b
g=math.gcd(a,abs(b))
key=(a/g, b/g)
if key no... | import math
n=int(input())
D={}
for _ in range(n):
a,b=map(int, input().split())
if a==0 and b==0:
key=(0,0)
elif a==0:
key=(0,1)
elif b==0:
key=(1,0)
else:
if a<0:
a=-a
b=-b
g=math.gcd(a, abs(b))
key=(a//g, b//g)
if key no... | [
"call.arguments.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"identifier.replace.add",
"literal.replace.remove"
] | 402,443 | 402,441 | u405660020 | python |
p02679 | # 解説と 13355391 を参考に実装予定
import math
def solve():
N = int(input())
ABs = [[int(i) for i in input().split()] for _ in range(N)]
mod = 10 ** 9 + 7
lonlieness = 0
pairs = {}
for AB in ABs:
a, b = AB
if a == 0 and b == 0:
lonlieness += 1
continue
e... | # 解説と 13355391 を参考に実装予定
import math
def solve():
N = int(input())
ABs = [[int(i) for i in input().split()] for _ in range(N)]
mod = 10 ** 9 + 7
lonlieness = 0
pairs = {}
for AB in ABs:
a, b = AB
if a == 0 and b == 0:
lonlieness += 1
continue
e... | [
"expression.operation.unary.add"
] | 402,460 | 402,461 | u945228737 | python |
p02679 | # 解説と 13355391 を参考に実装予定
import math
def solve():
N = int(input())
ABs = [[int(i) for i in input().split()] for _ in range(N)]
mod = 10 ** 9 + 7
lonlieness = 0
pairs = {}
for AB in ABs:
a, b = AB
if a == 0 and b == 0:
lonlieness += 1
continue
e... | # 解説と 13355391 を参考に実装予定
import math
def solve():
N = int(input())
ABs = [[int(i) for i in input().split()] for _ in range(N)]
mod = 10 ** 9 + 7
lonlieness = 0
pairs = {}
for AB in ABs:
a, b = AB
if a == 0 and b == 0:
lonlieness += 1
continue
e... | [
"expression.operation.unary.add"
] | 402,460 | 402,462 | u945228737 | python |
p02679 | import functools
MOD=10**9+7
def euclid(a, b):
if b == 0:
return a
else:
return euclid(b, a%b)
def gcd(nums):
return functools.reduce(euclid, nums)
n=int(input())
t=[]
for i in range(n):
a,b=map(int,input().split())
t.append((a,b))
z=0
y={}
for i in range(n):
if t[i][0]==0 and t[i][1]==0:
... | import functools
MOD=10**9+7
def euclid(a, b):
if b == 0:
return a
else:
return euclid(b, a%b)
def gcd(nums):
return functools.reduce(euclid, nums)
n=int(input())
t=[]
for i in range(n):
a,b=map(int,input().split())
t.append((a,b))
z=0
y={}
for i in range(n):
if t[i][0]==0 and t[i][1]==0:
... | [
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"call.arguments.add"
] | 402,484 | 402,485 | u674959776 | python |
p02679 | import functools
MOD=10**9+7
def euclid(a, b):
if b == 0:
return a
else:
return euclid(b, a%b)
def gcd(nums):
return functools.reduce(euclid, nums)
n=int(input())
t=[]
for i in range(n):
a,b=map(int,input().split())
t.append((a,b))
z=0
y={}
for i in range(n):
if t[i][0]==0 and t[i][1]==0:
... | import functools
MOD=10**9+7
def euclid(a, b):
if b == 0:
return a
else:
return euclid(b, a%b)
def gcd(nums):
return functools.reduce(euclid, nums)
n=int(input())
t=[]
for i in range(n):
a,b=map(int,input().split())
t.append((a,b))
z=0
y={}
for i in range(n):
if t[i][0]==0 and t[i][1]==0:
... | [
"call.arguments.change"
] | 402,486 | 402,485 | u674959776 | python |
p02679 | n = int(input())
zeros = 0
ab = {}
for _ in range(n):
a, b = [int(i) for i in input().split()]
if a == b == 0:
zeros += 1
elif a == 0 or b == 0:
if None not in ab:
ab[None] = [0, 0]
if a == 0:
ab[None][0] += 1
else:
ab[None][1] += 1
els... | n = int(input())
zeros = 0
ab = {}
for _ in range(n):
a, b = [int(i) for i in input().split()]
if a == b == 0:
zeros += 1
elif a == 0 or b == 0:
if None not in ab:
ab[None] = [0, 0]
if a == 0:
ab[None][0] += 1
else:
ab[None][1] += 1
els... | [
"expression.operation.unary.arithmetic.remove",
"call.arguments.change"
] | 402,489 | 402,490 | u571969099 | python |
p02679 | import sys
sys.setrecursionlimit(10**6) #再帰関数の上限
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), pople... | import sys
sys.setrecursionlimit(10**6) #再帰関数の上限
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), pople... | [
"control_flow.branch.if.condition.change",
"call.remove"
] | 402,517 | 402,518 | u424768586 | python |
p02679 | # E - ∙ (Bullet)
import sys
from collections import defaultdict
readline = sys.stdin.readline
MOD = 1000000007
N = int(readline())
# イワシの傾きをA/Bとする。
# A/Bは予めgcdで割って約分し、同じ傾きのものを揃えておく。
# このとき、仲の悪い組合せは(A, B)に対して(B, -A)となるもの。
# 前者をS、後者をTとして考える。
d_S = defaultdict(int)
d_T = defaultdict(int)
def gcd(x, y):
if x == 0:
... | # E - ∙ (Bullet)
import sys
from collections import defaultdict
readline = sys.stdin.readline
MOD = 1000000007
N = int(readline())
# イワシの傾きをA/Bとする。
# A/Bは予めgcdで割って約分し、同じ傾きのものを揃えておく。
# このとき、仲の悪い組合せは(A, B)に対して(B, -A)となるもの。
# 前者をS、後者をTとして考える。
d_S = defaultdict(int)
d_T = defaultdict(int)
def gcd(x, y):
if x == 0:
... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 402,543 | 402,544 | u141786930 | python |
p02679 | import sys
input = sys.stdin.readline
mod = 10**9 + 7
n = int(input())
ab = [[int(x) for x in input().split()] for _ in range(n)]
from collections import defaultdict, Counter
import math
double_zero_cnt = 0 # [0, 0]の個数
a_b = [] # a/bを、約分した形で保持(a/gcd(a, b), b/gcd(a, b), 符号)
for a, b in ab:
if a == 0 and b == 0:
... | import sys
input = sys.stdin.readline
mod = 10**9 + 7
n = int(input())
ab = [[int(x) for x in input().split()] for _ in range(n)]
from collections import defaultdict, Counter
import math
double_zero_cnt = 0 # [0, 0]の個数
a_b = [] # a/bを、約分した形で保持(a/gcd(a, b), b/gcd(a, b), 符号)
for a, b in ab:
if a == 0 and b == 0:
... | [
"assignment.value.change",
"expression.operation.binary.remove"
] | 402,561 | 402,562 | u609061751 | python |
p02679 | import sys
input = sys.stdin.readline
mod = 10**9 + 7
n = int(input())
ab = [[int(x) for x in input().split()] for _ in range(n)]
from collections import defaultdict, Counter
import math
double_zero_cnt = 0 # [0, 0]の個数
a_b = [] # a/bを、約分した形で保持(a/gcd(a, b), b/gcd(a, b), 符号)
for a, b in ab:
if a == 0 and b == 0:
... | import sys
input = sys.stdin.readline
mod = 10**9 + 7
n = int(input())
ab = [[int(x) for x in input().split()] for _ in range(n)]
from collections import defaultdict, Counter
import math
double_zero_cnt = 0 # [0, 0]の個数
a_b = [] # a/bを、約分した形で保持(a/gcd(a, b), b/gcd(a, b), 符号)
for a, b in ab:
if a == 0 and b == 0:
... | [
"assignment.value.change",
"expression.operation.binary.remove"
] | 402,561 | 402,564 | u609061751 | python |
p02679 | from collections import defaultdict
import sys
input = sys.stdin.readline
from math import gcd
MOD = 1000000007
dic1 = defaultdict(int)
All_zero = 0
S = set()
N = int(input())
ans = 0 #仲が悪い数を数える
for i in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0: #なんでもOK
All_zero += 1
elif... | from collections import defaultdict
import sys
input = sys.stdin.readline
from math import gcd
MOD = 1000000007
dic1 = defaultdict(int)
All_zero = 0
S = set()
N = int(input())
ans = 0 #仲が悪い数を数える
for i in range(N):
a, b = map(int, input().split())
if a == 0 and b == 0: #なんでもOK
All_zero += 1
elif... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,588 | 402,589 | u263830634 | python |
p02679 | # coding: utf-8
import sys,pprint, math
from fractions import Fraction
from collections import defaultdict
MOD = 1000000007
N = int(input())
params =[]
hatemasks = []
tilts = defaultdict(lambda: [0,0])
zerozero = 0
zerodiv = 0
for i in range(N):
(ai, bi) = map(int,input().split())
if ai == 0 and bi == 0:
... | # coding: utf-8
import sys,pprint, math
from fractions import Fraction
from collections import defaultdict
MOD = 1000000007
N = int(input())
params =[]
hatemasks = []
tilts = defaultdict(lambda: [0,0])
zerozero = 0
zerodiv = 0
for i in range(N):
(ai, bi) = map(int,input().split())
if ai == 0 and bi == 0:
... | [
"control_flow.branch.if.replace.add",
"control_flow.branch.else_if.replace.remove",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,602 | 402,603 | u565791439 | python |
p02679 | from collections import defaultdict
from math import gcd
n = int(input())
zeros = 0
d = defaultdict(lambda: [0, 0])
for _ in range(n):
a, b = map(int, input().split())
if a == 0 and b == 0:
zeros += 1
continue
g = gcd(a, b)
a, b = a // g, b // g
if a == 0:
b = 1
if b ==... | from collections import defaultdict
from math import gcd
n = int(input())
zeros = 0
d = defaultdict(lambda: [0, 0])
for _ in range(n):
a, b = map(int, input().split())
if a == 0 and b == 0:
zeros += 1
continue
g = gcd(a, b)
a, b = a // g, b // g
if a == 0:
b = 1
if b ==... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,629 | 402,628 | u221301671 | python |
p02679 | import sys
input = sys.stdin.readline
import math
MOD = 10**9+7
N = int(input())
F = []
zero_v = 0
inf = 0
zero = 0
for _ in range(N):
x,y = map(int,input().split())
if x==0 and y==0:
zero_v += 1
elif x==0:
inf += 1
elif y==0:
zero += 1
else:
G = math.gcd(abs(x),abs(y))
F.append((x,y))
a... | import sys
input = sys.stdin.readline
import math
MOD = 10**9+7
N = int(input())
F = []
zero_v = 0
inf = 0
zero = 0
for _ in range(N):
x,y = map(int,input().split())
if x==0 and y==0:
zero_v += 1
elif x==0:
inf += 1
elif y==0:
zero += 1
else:
G = math.gcd(abs(x),abs(y))
F.append((x//G,y//... | [
"expression.operation.binary.add"
] | 402,648 | 402,649 | u493130708 | python |
p02678 | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
import bisect
from collections import deque
from math import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions... | # -*- coding: utf-8 -*-
#############
# Libraries #
#############
import sys
input = sys.stdin.readline
import math
import bisect
from collections import deque
from math import gcd
from functools import lru_cache
#############
# Constants #
#############
MOD = 10**9+7
INF = float('inf')
#############
# Functions... | [
"call.add"
] | 402,652 | 402,653 | u493130708 | python |
p02678 | import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
N,M=MI()
adj=[[]for _ in range(N)]
for i in range(M):
a,b=MI()
a-=1
b-=1
adj[a].ap... | import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
N,M=MI()
adj=[[]for _ in range(N)]
for i in range(M):
a,b=MI()
a-=1
b-=1
adj[a].ap... | [
"call.add"
] | 402,656 | 402,657 | u498487134 | python |
p02679 | from math import gcd
import math
import numpy as np
import decimal
import collections
import itertools
import sys
import random
#Union-Find
class UnionFind():
def __init__(self, n):
self.n = n
self.par = [-1 for i in range(self.n)]
def find(self, x):
if self.par[x] < 0:
retur... | from math import gcd
import math
import numpy as np
import decimal
import collections
import itertools
import sys
import random
#Union-Find
class UnionFind():
def __init__(self, n):
self.n = n
self.par = [-1 for i in range(self.n)]
def find(self, x):
if self.par[x] < 0:
retur... | [
"control_flow.branch.if.condition.change"
] | 402,705 | 402,706 | u923270446 | python |
p02679 | MOD = 10 ** 9 + 7
from math import gcd
from collections import defaultdict
n = int(input())
plus = defaultdict(int)
minus = defaultdict(int)
zero = [0, 0, 0]
for _ in range(n):
a, b = map(int, input().split())
if a * b == 0:
if a == b == 0:
zero[0] += 1
elif a == 0:
zero... | MOD = 10 ** 9 + 7
from math import gcd
from collections import defaultdict
n = int(input())
plus = defaultdict(int)
minus = defaultdict(int)
zero = [0, 0, 0]
for _ in range(n):
a, b = map(int, input().split())
if a * b == 0:
if a == b == 0:
zero[0] += 1
elif a == 0:
zero... | [
"expression.operator.change"
] | 402,720 | 402,721 | u745514010 | python |
p02679 | from collections import defaultdict
from math import gcd as g
n = int(input())
mod = 10**9+7
sardines = set()
Ddic = defaultdict(int)
ans = 1
zcount = 0
for i in range(n):
a,b = map(int,input().split())
if a == 0 and b == 0:
zcount += 1
continue
if a == 0:
Ddic[(0,1)] += 1
sardines.add((0,1))
... | from collections import defaultdict
from math import gcd as g
n = int(input())
mod = 10**9+7
sardines = set()
Ddic = defaultdict(int)
ans = 1
zcount = 0
for i in range(n):
a,b = map(int,input().split())
if a == 0 and b == 0:
zcount += 1
continue
if a == 0:
Ddic[(0,1)] += 1
sardines.add((0,1))
... | [
"call.remove"
] | 402,724 | 402,725 | u623687794 | python |
p02679 | import sys
import math
from collections import defaultdict
from collections import deque
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
# 有理数クラス
class MyFrac... | import sys
import math
from collections import defaultdict
from collections import deque
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
# 有理数クラス
class MyFrac... | [
"call.remove"
] | 402,773 | 402,774 | u607075479 | python |
p02679 | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,798 | 402,799 | u057109575 | python |
p02679 | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 402,800 | 402,799 | u057109575 | python |
p02679 | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | from collections import defaultdict
from math import gcd
N = int(input())
X = [list(map(int, input().split())) for _ in range(N)]
d = {}
for a, b in X:
if a == b == 0:
pass
elif a == 0:
if b > 0:
b = 1
else:
b = -1
elif b == 0:
if a > 0:
... | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 402,801 | 402,802 | u057109575 | python |
p02679 | # ベクトルを既約分数にしてなおかつ方向を第一象限か第二象限に集める
from collections import defaultdict
from math import gcd
N = int(input())
MOD = 10**9 + 7
d = defaultdict(lambda: [0, 0])
zeros = 0
for _ in range(N):
x, y = map(int, input().split())
if x == 0 and y == 0:
zeros += 1
elif x == 0:
d[(0, 0)][0] += 1
elif... | # ベクトルを既約分数にしてなおかつ方向を第一象限か第二象限に集める
from collections import defaultdict
from math import gcd
N = int(input())
MOD = 10**9 + 7
d = defaultdict(lambda: [0, 0])
zeros = 0
for _ in range(N):
x, y = map(int, input().split())
if x == 0 and y == 0:
zeros += 1
elif x == 0:
d[(0, 0)][0] += 1
elif... | [
"call.remove"
] | 402,828 | 402,829 | u503228842 | python |
p02679 | MOD = 10**9 + 7
P = 7 ** 21 + 52
def F(a, b):
return (a * pow(b, P-2, P)) % P
def main():
from collections import Counter
import sys
input = sys.stdin.buffer.readline
N = int(input())
T = [[int(i) for i in input().split()] for j in range(N)]
cnt_zero = [0, 0] # 片方が0のとき
p = 0 # 両方0
... | MOD = 10**9 + 7
P = 7 ** 21 + 52
def F(a, b):
return (a * pow(b, P-2, P)) % P
def main():
from collections import Counter
import sys
input = sys.stdin.buffer.readline
N = int(input())
T = [[int(i) for i in input().split()] for j in range(N)]
cnt_zero = [0, 0] # 片方が0のとき
p = 0 # 両方0
... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 402,842 | 402,843 | u312025627 | python |
p02679 | n=int(input())
mod=10**9+7
#初期値が0の辞書
from collections import defaultdict
pp = defaultdict(lambda: 0)
pm = defaultdict(lambda: 0)
def seiki(x,y):
tmp=gcd(x,y)
return (x//tmp,y//tmp)
from math import gcd
zero=0
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
zero+=1
el... | n=int(input())
mod=10**9+7
#初期値が0の辞書
from collections import defaultdict
pp = defaultdict(lambda: 0)
pm = defaultdict(lambda: 0)
def seiki(x,y):
tmp=gcd(x,y)
return (x//tmp,y//tmp)
from math import gcd
zero=0
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
zero+=1
el... | [
"literal.number.integer.change",
"call.arguments.add"
] | 402,869 | 402,870 | u588794534 | python |
p02679 | n=int(input())
mod=10**9+7
#初期値が0の辞書
from collections import defaultdict
pp = defaultdict(lambda: 0)
pm = defaultdict(lambda: 0)
def seiki(x,y):
tmp=gcd(x,y)
return (x//tmp,y//tmp)
from math import gcd
zero=0
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
zero+=1
el... | n=int(input())
mod=10**9+7
#初期値が0の辞書
from collections import defaultdict
pp = defaultdict(lambda: 0)
pm = defaultdict(lambda: 0)
def seiki(x,y):
tmp=gcd(x,y)
return (x//tmp,y//tmp)
from math import gcd
zero=0
for _ in range(n):
a,b=map(int,input().split())
if a==0 and b==0:
zero+=1
el... | [
"literal.number.integer.change"
] | 402,871 | 402,870 | u588794534 | python |
p02679 | def e_bullet(MOD=10**9 + 7):
from math import gcd
from collections import defaultdict
N = int(input())
zero_all = 0
pair = defaultdict(int)
for _ in range(N):
a, b = [int(i) for i in input().split()]
if a == 0 and b == 0:
zero_all += 1
continue
#... | def e_bullet(MOD=10**9 + 7):
from math import gcd
from collections import defaultdict
N = int(input())
zero_all = 0
pair = defaultdict(int)
for _ in range(N):
a, b = [int(i) for i in input().split()]
if a == 0 and b == 0:
zero_all += 1
continue
#... | [
"control_flow.return.add"
] | 402,908 | 402,909 | u952708174 | python |
p02679 | def e_bullet(MOD=10**9 + 7):
from math import gcd
from collections import defaultdict
N = int(input())
zero_all = 0
pair = defaultdict(int)
for _ in range(N):
a, b = [int(i) for i in input().split()]
if a == 0 and b == 0:
zero_all += 1
continue
#... | def e_bullet(MOD=10**9 + 7):
from math import gcd
from collections import defaultdict
N = int(input())
zero_all = 0
pair = defaultdict(int)
for _ in range(N):
a, b = [int(i) for i in input().split()]
if a == 0 and b == 0:
zero_all += 1
continue
#... | [
"assignment.value.change",
"identifier.change"
] | 402,910 | 402,909 | u952708174 | python |
p02679 | from math import gcd
mod = 1000000007
n = int(input())
counter = {}
zeros = 0
for i in range(n):
a, b = map(int, input().split())
if (a == 0 and b == 0):
zeros += 1
continue
g = gcd(a, b)
a //= g
b //= g
if (b < 0):
a = -a
b = -b
if (b == 0 and a < 0):
... | from math import gcd
mod = 1000000007
n = int(input())
counter = {}
zeros = 0
for i in range(n):
a, b = map(int, input().split())
if (a == 0 and b == 0):
zeros += 1
continue
g = gcd(a, b)
a //= g
b //= g
if (b < 0):
a = -a
b = -b
if (b == 0 and a < 0):
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 402,911 | 402,912 | u479719434 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.