s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s096063040 | p03720 | u179169725 | 1599623487 | Python | PyPy3 (7.3.0) | py | Runtime Error | 101 | 74808 | 1716 | mycode = '''
# distutils: language=c++
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: cdivision=True
# False:Cython はCの型に対する除算・剰余演算子に関する仕様を、(被演算子間の符号が異なる場合の振る舞いが異なる)Pythonのintの仕様に合わせ、除算する数が0の場合にZeroDivisionErrorを送出します。この処理を行わせると、速度に 35% ぐらいのペナルティが生じます。 True:チェックを行いません。
ctypedef long long LL
... |
s498952406 | p03720 | u179169725 | 1599623152 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9096 | 1715 | mycode = '''
# distutils: language=c++
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: cdivision=True
# False:Cython はCの型に対する除算・剰余演算子に関する仕様を、(被演算子間の符号が異なる場合の振る舞いが異なる)Pythonのintの仕様に合わせ、除算する数が0の場合にZeroDivisionErrorを送出します。この処理を行わせると、速度に 35% ぐらいのペナルティが生じます。 True:チェックを行いません。
ctypedef long long LL
... |
s266611882 | p03720 | u629540524 | 1599605673 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8964 | 155 | n,m = map(int,input().split())
x =[0]*n
for i in range(m):
a,b = map(int,input().split())
x[a-1]+=1
x[b-1]+=1
for i in range(n):
print(x[i] |
s541313900 | p03720 | u629540524 | 1599605667 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74628 | 155 | n,m = map(int,input().split())
x =[0]*n
for i in range(m):
a,b = map(int,input().split())
x[a-1]+=1
x[b-1]+=1
for i in range(n):
print(x[i] |
s643004210 | p03720 | u074220993 | 1599436859 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9372 | 154 | N, M = open(0).readline().split()
from collections import Counter
cnt = Counter(open(0).read().split())
for i in range(1,int(N)+1):
print(cnt[str(i)]) |
s491010256 | p03720 | u074220993 | 1599436589 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9400 | 149 | N, M = open(0).readline().split()
from collections import Counter
cnt = Counter(open(0).read().split())
print('\n'.join(list(map(str,cnt.values())))) |
s513416628 | p03720 | u074220993 | 1599436527 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9388 | 143 | N, M = open(0).readline().split()
from collections import Counter
cnt = Counter(open(0).read().split())
print('\n'.join(map(str,cnt.values()))) |
s624904572 | p03720 | u074220993 | 1599436432 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9340 | 156 | N, M = open(0).readline().split()
from collections import Counter
cnt = Counter([x for x in open(0).read().split()])
print('\n'.join(map(str,cnt.values()))) |
s193491243 | p03720 | u074220993 | 1599436324 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9356 | 161 | N, M = open(0).readline().split()
from collections import Counter
cnt = Counter([int(x) for x in open(0).read().split()])
print('\n'.join(map(str,cnt.values()))) |
s477844830 | p03720 | u011872685 | 1599421215 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9200 | 345 | N,M=map(int,input().split())
import ita
data=ita.array.make1d(2*M)
for i in range(0,M):
data[2*i],data[2*i+1]=map(int,input().split())
honsu=ita.array.make1d(N)
for j in range(0,N):
honsu[j]=0
for k in range(0,len(data)):
if data[k]==j+1:
honsu[j]=honsu[j]+1
for l in range(0,len(honsu)):... |
s814212202 | p03720 | u011872685 | 1599421087 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9080 | 340 | N,M=map(int,input().split())
import ita
data=ita.array.make1d(2*M)
for i in range(0,M):
data[2*i],data[2*i+1]=map(int,input().split())
honsu=ita.array.make1d(N)
for j in range(0,N):
honsu[j]=0
for k in range(0,len(data)):
if data[k]==j+1:
honsu[j]=honsu[j]+1
for l in range(0,len(honsu)):... |
s194211653 | p03720 | u546440137 | 1599274199 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8964 | 16 | 4 3
1 2
2 3
1 4
|
s412490849 | p03720 | u705418271 | 1599022138 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9132 | 183 | n,m=map(int,input().split())
a_s=[]
b_s=[]
for i in range(m):
a,b=map(int,input().split())
a_s.append(a)
b_s.append(b)
for i in range(1,N+1):
print(a_s.count(i)+b_s.count(i)) |
s763689048 | p03720 | u395620499 | 1598919341 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9184 | 175 | n,m = map(int, input().split())
g = [[] for _ in range(n)]
for i in range(m):
a,b = map(int, input().split())
g[a-1] = b-1
g[b-1] = a-1
for nd in g:
print(len(nd)) |
s624548898 | p03720 | u675592520 | 1598821909 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8888 | 156 | n,m = map(int,input().split())
ar=[0]*n
for i in range(m):
a,b = map(int,input().split())
ar[a-1] += 1
ar[b-1] += 1
for i in range(n):
print(ar[i]) |
s088833136 | p03720 | u165318982 | 1597963738 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8864 | 186 | N, M = list(map(int, input().split())
A = [0 for _ in range(N)]
for i in range(M):
a, b = list(map(int, input().split())
A[a-1] += 1
A[b-1] += 1
for i range(N):
print(str(A[i])) |
s027475984 | p03720 | u740900987 | 1597936472 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8884 | 395 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<string> vs;
#define N 50
int p[N];
int main(){
ll n, m, ans;
ll a, b;
cin >> n >> m;
for (int i = 0; i < N; i++) {
p[i] = 0;
}
for (int i = 0; i < m; i++) {
cin >> a >> b;
p[a]++;
p[b]++;
... |
s336248844 | p03720 | u106778233 | 1597701820 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8932 | 219 | n,m = map(int, input().split())
AB = [[] for _ in range(n)]
for i in range(m):
a, b = map(int,input().split())
a -= 1
b -= 1
AB[a].append(b)
AB[b].append(a)
for i in range(n)
print(len(AB[i])) |
s234833845 | p03720 | u589969467 | 1597258568 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9064 | 214 | n,m = map(int,input().split())
dic = {}
for i in range(m):
a,b = map(int,input().split())
dic.setdefault(a,0)
dic[a] += 1
dic.setdefault(b,0)
dic[b] += 1
for j in range(1,n+1):
print(dic[j]) |
s555961071 | p03720 | u344030307 | 1597078852 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9012 | 153 | n, m = map(int, input().split())
a = []
for i in m:
a1, a2 = map(int, input().split())
a.append(a1)
a.append(a2)
for s in n:
print(a.count(s)) |
s632382150 | p03720 | u602140789 | 1597073091 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9072 | 177 | N, M = map(int, input().split())
city = [0] * 10
for i in range(M):
a, b = map(int, input().split())
city[a - 1] += 1
city[b - 1] += 1
for i in range (N):
print(city[i]) |
s847198330 | p03720 | u684743124 | 1596520924 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9064 | 165 | n,m=map(int,input().split())
ans=[0 for _ in range(n)]
for i in range(m):
a,b=map(int,input().split())
ans[a-1]+=1
ans[b-1]+=1
for i in range(n):
print(a[i]) |
s922610539 | p03720 | u075303794 | 1596081507 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9172 | 151 | N,M=map(int,input().split())
A=[0]*(N*1)
for _ in range(M):
a,b=map(int,input().split())
A[a]+=1
A[b]+=1
for i in range(1,N+1):
print(A[i]) |
s711414766 | p03720 | u075303794 | 1596081482 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9152 | 141 | N,M=map(int,input().split())
A=[0]*(N*1)
for _ in range(M):
a,b=map(int,input())
A[a]+=1
A[b]+=1
for i in range(1,N+1):
print(A[i]) |
s879814832 | p03720 | u017050982 | 1596028008 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9052 | 177 | M,N = map(int,input().split())
ans = [0 for _ in range(N)]
for _ in range(M):
a,b = map(int,input().split())
ans[a-1] += 1
ans[b-1] += 1
for i in range(N):
print(ans[i]) |
s097884920 | p03720 | u786020649 | 1595689246 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9460 | 213 | from collections import defaultdict
n,m=map(int,input().split())
r=[list(map(int,input().split())) for _ in range(n)]
d=defaultdict(int)
for x in r:
d[x[0]]+=1
d[x[1]]+=1
for i in range(1,n+1):
print(d[i]) |
s421489489 | p03720 | u319245933 | 1595139564 | Python | PyPy3 (7.3.0) | py | Runtime Error | 100 | 68224 | 76 | N,_,*L=map(int,open(0).read().split());for n in range(N):print(L.count(n+1)) |
s815117048 | p03720 | u694665829 | 1594500739 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9164 | 304 | from itertools import combinations
import math
n,d=map(int,input().split())
X=[list(map(int,input().split())) for _ in range(n)]
cnt=0
for perm in list(combinations(range(n),2)):
d=sum(map(lambda x: (x[0]-x[1])**2,zip(X[perm[0]],X[perm[1]])))
if d==int(math.sqrt(d))**2:
cnt+=1
print(cnt) |
s750133241 | p03720 | u694665829 | 1594486737 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9172 | 178 | n,m=map(int,input().split())
d={}
for i in range(5):
d[i]=0
for i in range(m):
a,b=map(int,input().split())
d[a-1]+=1
d[b-1]+=1
for i in range(n):
print(d[i]) |
s196965448 | p03720 | u926046014 | 1594171422 | Python | PyPy3 (7.3.0) | py | Runtime Error | 120 | 74180 | 151 | n,m=map(int,input().split())
lst=[0]*m
for i in range(m):
a,b=map(int,input().split())
lst[a-1]+=1
lst[b-1]+=1
for i in lst:
print(i) |
s709392099 | p03720 | u706414019 | 1593869460 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8836 | 238 | N,M = list(map(int,input().split()))
lis = []
for i in range(N):
lis.append([i+1])
for i in range(M):
a,b = list(map(int,input().split()))
lis[a-1].append(b)
lis[b-1].append(a)
for i in range(N):
print(len(lis[i])-1)
|
s671863717 | p03720 | u870518235 | 1593485560 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8960 | 135 | N, M = map(int, input().split())
R = [list(map(int, input().split())) for _ in range(N)]
for i in range(1,N+1):
print(R.count(i))
|
s323069443 | p03720 | u088488125 | 1593386893 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9112 | 169 | n,m=map(int, input().split())
road_num=[0]*n
for i in range(m):
a,b=map(int, input().split())
road_num[a]+=1
road_num[b]+=1
for i in range(n):
print(road_num[i]) |
s528811523 | p03720 | u179025808 | 1593221519 | Python | Python (3.8.2) | py | Runtime Error | 33 | 9284 | 278 | from collections import Counter
N, M = map(int, input().split())
dis_list = []
my_count = Counter()
for i in range(M):
a, b = map(int, input().split())
my_count[a] += 1
my_count[b] += 1
my_count = sorted(my_count.items())
for i in range(N):
print(my_count[i][1]) |
s245224794 | p03720 | u179025808 | 1593221386 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9392 | 293 | from collections import Counter
from operator import itemgetter
N, M = map(int, input().split())
dis_list = []
my_count = Counter()
for i in range(M):
a, b = map(int, input().split())
my_count[a] += 1
my_count[b] += 1
my_count = sorted(my_count.items())
for i in N:
print(i[1]) |
s889067373 | p03720 | u541929993 | 1592533300 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9172 | 179 | N,M=[int(i) for i in input().split()]
arrR=[0]*N
for m in range(M):
a,b=[int(i) for i in input().split()]
arrR[a-1]+=1
arrR[b-1]+=1
[print(arrR[i]) for i in range(M)]
|
s108088620 | p03720 | u581403769 | 1592276198 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 218 | n, m = map(int, input().split())
count = [0] * n
for i in range(m):
a = list(map(int, input().split()))
for j in range(j):
if j + 1 in a:
count[j] += 1
for i in range(i):
print(count[i]) |
s570612628 | p03720 | u750651325 | 1592253402 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 190 | N, M =map(int, input().split())
ans = []
for i in range(M):
a, b = map(int, input().split())
ans.append(a)
ans.append(b)
for i in range(1,N+1):
print(ans.index(i))
|
s127361916 | p03720 | u810787773 | 1591482073 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 385 | def counting_sort(array,city,road):
bucket = [0] * city
for i in range(road):
for j in range(2):
bucket[ array[i][j] ] += 1
return bucket
def main():
n,m = map(int, input().split())
way = [list(map(int,input().split())) for _ in range(m)]
ans_list = counting_sort(way, n, m... |
s700682326 | p03720 | u540290227 | 1591325319 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 194 | n, m = map(int, input().split())
result = [0 for _ in range(m)]
for i in range(m):
a, b = map(int, input().split())
result[a-1] += 1
result[b-1] += 1
for j in result:
print(j)
|
s557582936 | p03720 | u730769327 | 1591246887 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38768 | 141 | n,m=map(int,input().split())
a=[]
for i in range(m):
b=list(map(int,input()))
a+=b
for i in range(n):
dumy=a.count(i+1)
print(dumy)
|
s306532108 | p03720 | u730769327 | 1591246829 | Python | PyPy3 (2.4.0) | py | Runtime Error | 171 | 38256 | 135 | n,m=map(int,input().split())
a=[]
for i in range(m):
a+=list(map(int,input()))
for i in range(n):
dumy=a.count(i+1)
print(dumy)
|
s902444046 | p03720 | u243312682 | 1590775657 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 270 | def main():
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(m)]
res = [0] * n
for i in ab:
res[i[0] - 1] += 1
res[i[1] - 1] += 1
for i in res:
print(i)
if __name__ == '__main__':
main( |
s965159521 | p03720 | u551437236 | 1590478169 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | n, m = map(int, input().split())
ll = [0] + [ 0 * n]
for i in range(m):
a, b = map(int, input().split())
ll[a] += 1
ll[b] += 1
for l in ll[1:]:
print()
|
s258374577 | p03720 | u604655161 | 1590460936 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 380 | def ABC_61_B():
N,M = map(int, input().split())
t = [ 0 for _ in range(N)]
t2 = [ 0 for _ in range(N)]
for i in range(M):
a,b = map(str, input().split())
t[int(a)-1] = str(t[int(a)-1])+b
t[int(b)-1] = str(t[int(b)-1])+a
for i in range(len(t)):
t2=list(t[i])
... |
s933874055 | p03720 | u536034761 | 1589647823 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | N, M = map(int, input().split())
A = []
for i in range(M):
A += list(map(int, input().split()))
B = [0 for in range(N)]
for a in A:
B[a - 1] += 1
for b in B:
print(b) |
s660595336 | p03720 | u551109821 | 1589257305 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 197 | N,M = map(int,input().split())
value = []
ans = [0]*M
for i in range(M):
a,b = map(int,input().split())
value.append([a,b])
ans[a-1] += 1
ans[b-1] += 1
for i in ans:
print(i)
|
s799641146 | p03720 | u970809473 | 1589251290 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | n,m = map(int, input().split())
a = [0]*n
for i in range(m):
b,c = map(int, input().split())
a[b] += 1
a[c] += 1
[print(i) for i in a] |
s215122448 | p03720 | u603091581 | 1588925476 | Python | Python (3.4.3) | py | Runtime Error | 149 | 12424 | 294 | import numpy as np
n, m = map(int, input().split())
road = [0]*n
a = [0]*m
a = np.array(a)
b = [0]*m
b = np.array(b)
for i in range(m):
x, y = input().split()
a[i] = (int(x))
b[i] = (int(y))
for i in road:
road[int(a[i]) - 1] += 1
road[int(b[i]) - 1] += 1
for i in road:
print(i)
|
s676561286 | p03720 | u945839160 | 1588704188 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38384 | 564 | def resolve():
# 整数 1 つ
# n = int(input())
# 整数複数個
n, m = list(map(int, input().split()))
# 整数 N 個 (改行区切り)
# N = [int(input()) for i in range(N)]
# 整数 N 個 (スペース区切り)
# N = list(map(int, input().split()))
# 整数 (縦 H 横 W の行列)
A = [list(map(int, input().split())) for i in range(m)]
... |
s008612666 | p03720 | u912652535 | 1588651989 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 293 |
n,m = map(int, input().split())
xy = [map(int,input().split()) for _ in range(m)]
x,y = [list(i) for i in zip(*xy)]
l = x + y
d = {}#辞書同士の追加はupdate
for i in n:
d[i] =0
for i in l:
if i not in d:
d[i] = 0
d[i] += 1
for j in range(1,n+1):
print(d[j]) |
s271915376 | p03720 | u912652535 | 1588651586 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 239 |
n,m = map(int, input().split())
xy = [map(int,input().split()) for _ in range(m)]
x,y = [list(i) for i in zip(*xy)]
l = x + y
d = {}
for i in l:
if i not in d:
d[i] = 0
d[i] += 1
for j in range(1,n+1):
print(d[j])
|
s630943713 | p03720 | u912652535 | 1588651536 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 247 | n,m = map(int, input().split())
xy = [map(int,input().split()) for _ in range(m)]
x,y = [list(i) for i in zip(*xy)]
l = x + y
print(l)
d = {}
for i in l:
if i not in d:
d[i] = 0
d[i] += 1
for j in range(1,n+1):
print(d[j])
|
s832733106 | p03720 | u257442624 | 1588557760 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 255 | N, M = map(int, input().split())
for _ in range(M):
a, b = map(int, input().split())
for i in range(1, M, 1):
a.count(i)
b.count(i)
c = a + b
C = np.zeros((len(c), 1), dtype = 'int')
for i in range(len(C)):
C[i,0] = c[i]
print(C) |
s325847536 | p03720 | u103902792 | 1588364429 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 210 | n,m = map(int,input().split())
graph = {i:[] for i in range(1, n+1)}
for _ in range(m):
a,b = map(int,input().split())
graph[a].append(b)
graph[b].append(a)
for i in range(1, n+1):
print(len(graphp[i])) |
s437290881 | p03720 | u549161102 | 1587934661 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 153 | N,M = map(int, input().split())
x = []
for i in range(M):
a,b = map(int, input().split())
x[a-1] += 1
x[b-1] += 1
for i in range(N):
print(x[i])
|
s564829121 | p03720 | u549161102 | 1587933996 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 118 | N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(1,M+1):
print(S.count(i))
|
s018512496 | p03720 | u549161102 | 1587933970 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 120 | N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(1,M+1):
print(S.count('i'))
|
s024979543 | p03720 | u549161102 | 1587933857 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | N,M = int(input())
S = [list(map(int, input().split())) for i in range(M)]
for i in range(M):
print(S.count('i')) |
s816039219 | p03720 | u869265610 | 1587492380 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | a,b=map(int,input().split())
L=input()
for i in range(b):
L.append(input())
for j in range(b):
print(L.count(L)) |
s672971021 | p03720 | u506549878 | 1587141181 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 302 | n, m =map(int,input().split())
city = {}
for i in range(m):
x, y =map(int,input().split())
if x not in city:
city[x] = 1
else:
city[x] += 1
if y not in city:
city[y] = 1
else:
city[y] += 1
for i in range(1,n+1):
print(city[i]) |
s981061851 | p03720 | u506549878 | 1587141060 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 298 | n, m =map(int,input().split())
city = {}
for i in range(m):
x, y =map(int,input().split())
if x not in city:
city[x] = 1
else:
city[x] += 1
if y not in city:
city[y] = 1
else:
city[y] += 1
for i in range(n):
print(city[i]) |
s325345908 | p03720 | u994307795 | 1587082411 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 224 | n, m = map(int, input().split())
d = {}
def f(n):
if n not in d:
d[n] = 1
else:
d[n] += 1
for _ in [0]*m:
a, b = map(int, input().split())
f(a)
f(b)
for i in range(1, n+1):
print(d[i]) |
s462086981 | p03720 | u519939795 | 1586980611 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 39 | n,m=map(int,input().split())
while m>0: |
s290232246 | p03720 | u384124931 | 1586823203 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38256 | 148 | N, M = map(int, input().split())
for _ in range(M):
a, b = map(int, input().split())
for i in range(1,N+1):
print(a.count("i")+b.count("i")) |
s491135772 | p03720 | u384124931 | 1586823112 | Python | PyPy3 (2.4.0) | py | Runtime Error | 185 | 38384 | 144 | N, M = map(int, input().split())
for _ in range(M):
a, b = map(int, input().split())
for i in range(1,N+1):
print(a.count(i)+b.count(i)) |
s748250812 | p03720 | u384124931 | 1586822857 | Python | PyPy3 (2.4.0) | py | Runtime Error | 163 | 38384 | 129 | N, M = input().split()
for _ in range(M):
a, b = input().split()
for i in range(1, N+1):
print(a.count("i")+b.count("i")) |
s825237883 | p03720 | u384124931 | 1586822784 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 134 | N, M = input().split()
for i in range(1, M+1):
a, b = input().split()
for i in range(1, N+1):
print(a.count("i")+b.count("i")) |
s188070889 | p03720 | u384124931 | 1586822740 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38256 | 133 | N, M = input().split()
for i in range(1, M+1):
a, b = input().split()
for i in range(1, N+1):
print(a.count("i")+b.count("i") |
s408767605 | p03720 | u384124931 | 1586822688 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38256 | 128 | N, M = input().split()
for _ in range(M):
a, b = input().split()
for _ in range(1, N+1):
print(a.count("i")+b.count("i") |
s398442695 | p03720 | u384124931 | 1586822614 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38256 | 140 | N, M = map(int, input().split())
for _ in range(M):
a, b = input().split()
for _ in range(1, N+1):
print(a.count("i")+b.count("i")
|
s190975251 | p03720 | u358254559 | 1586795663 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38640 | 165 | n,m = map(int, input().split())
ans=[0]*n
for i in range(n):
a,b = list(map(int,input().split()))
ans[a-1]+=1
ans[b-1]+=1
for i in range(n):
print(ans[i])
|
s821933127 | p03720 | u852790844 | 1586559756 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 176 | n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m)
a, b = map(int,input().split())
c[a-1] += 1
c[b-1] += 1
for i in len(c):
print(c[i]) |
s337199470 | p03720 | u852790844 | 1586559686 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | n, m = map(int,input().split())
c = [0 for i in range(n)]
for i in range(m)
a, b = map(int,input().split())
c[a-1] += 1
c[b-1] += 1
for i in c:
print(i) |
s403919525 | p03720 | u852790844 | 1586559195 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 175 | import numpy as np
n, m = map(int,input().split())
c = np.zeros(n)
for i in range(m)
a, b = map(int,input().split())
c[a-1] + 1
c[b-1] + 1
for i in c:
print(i) |
s650230170 | p03720 | u852790844 | 1586559161 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | n, m = map(int,input().split())
c = np.zeros(n)
for i in range(m)
a, b = map(int,input().split())
c[a-1] + 1
c[b-1] + 1
for i in c:
print(i) |
s619903619 | p03720 | u478266845 | 1585664628 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 327 | import numpy as np
N,M =[int(i) for i in input().split()]
a = np.ones(M)
b = np.ones(M)
for i in in range(M):
a[i],b[i] = [int(j) for j in input().split()]
ans = np.zeros(N)
for i in range(N):
A = int(a[i]-1)
B = int(b[i]-1)
ans[A]+=1
ans[B]+=1
for i in range(N):
print(ans[i]... |
s915601468 | p03720 | u702786238 | 1585156088 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38384 | 183 | N, M = map(int, input().split())
dic = { m:0for m in range(M)}
for n in range(N):
a,b = map(int,input().split())
dic[a-1] += 1
dic[b-1] += 1
for m in range(M):
print(dic[m]) |
s177319262 | p03720 | u702786238 | 1585156060 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38384 | 183 | N, M = map(int, input().split())
dic = { m:0for m in range(M)}
for n in range(N):
a,b = map(int,input().split())
dic[a-1] += 1
dic[b-1] += 1
for m in range(M):
print(dic[m]) |
s804051313 | p03720 | u089142196 | 1584912454 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 172 | N,N=map(int,input().split())
a=[0]*M
b=[0]*M
r=[0]*M
for i in range(M):
A[i],B[i]=map(int,input().split())
r[A[i]-1] +=1
r[B[i]-1] +=1
for item in r:
print(item) |
s678200534 | p03720 | u137808818 | 1584039862 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 170 | N,M=map(int,input().split())
A=[list(map(int,input().split())) for _ in range(M)]
ans=[0]
for a in A:
ans[a[0]-1]+=1
ans[a[1]-1]+=1
for a in ans:
print(a) |
s332489737 | p03720 | u697696097 | 1583812831 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 152 | n,m=map(int,input().split())
road=[0]*n
for _ in range(m):
a,b=map(int,input().split())
road[a]+=1
road[b]+=1
for i in range(n):
print(road[i]) |
s632310765 | p03720 | u686713618 | 1583213802 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 35 | 8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8 |
s786337252 | p03720 | u953794676 | 1582830988 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 264 | n, m = [int(e) for e in input().split()]
map_dict = {}
for i in range(n):
map_dict[str(i+1)] = 0
for _ in range(m):
cities = [e for e in input().split()]
map_dict[cities[0]]+=1
map_dict[cities[1]]+=1
for i in range(m):
print(map_dict[str(i+1)]) |
s273915154 | p03720 | u372144784 | 1582241448 | Python | PyPy3 (2.4.0) | py | Runtime Error | 185 | 38256 | 184 | n,m = map(int,input().split())
lst1 = [list(map(int,input().split())) for i in range(m)]
lst2 = [0]*n
for i,j in lst1:
lst2[i] += 1
lst2[j] += 1
for i in lst2:
print(i) |
s678676140 | p03720 | u408375121 | 1582046340 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 245 | N, M = map(int, input().split())
dic = {}
for i in range(M):
a, b = map(int, input().split())
if a in dic:
dic[a] += 1
else:
dic[a] = 1
if b in dic:
dic[b] += 1
else:
dic[b] = 1
for i in range(1, N + 1):
print(dic[i]) |
s299925854 | p03720 | u368796742 | 1581993350 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 143 | n,m = map(int,input().split())
l = [0]*n
for i in range(n):
a,b = map(int,input().split())
l[a-1] += 1
l[b-1] += 1
for i in l:
print(i) |
s526921931 | p03720 | u857070771 | 1581971076 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 159 | n,m=map(int,input().split())
c=[]
for _ in range:
a,b=map(int,input().split())
c.append(a)
c.append(b)
for i in range(1,n+1):
print(c.count(i)) |
s923863782 | p03720 | u150985282 | 1581884342 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 577 | [N, M] = list(map(int, input().split()))
[s, e] = [ [], [] ]
for _ in range(M):
input_line = list(map(int, input().split()))
s.append(input_line[0])
e.append(input_line[1])
bucket = {}
for i in range(M):
if s[i] in bucket and e[i] in bucket:
bucket[s[i]].append(s[i])
bucket[e[i]].append(e[i])
elif s[... |
s710838886 | p03720 | u150985282 | 1581884186 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 578 | [N, M] = list(map(int, input().split()))
[s, e] = [ [], [] ]
for _ in range(N):
input_line = list(map(int, input().split()))
s.append(input_line[0])
e.append(input_line[1])
bucket = {}
for i in range(N):
if s[i] in bucket and e[i] in bucket:
bucket[s[i]].append(s[i])
bucket[e[i]].append(e[i])
elif s[... |
s829799945 | p03720 | u796708718 | 1581874530 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 141 | N, M = [int(i) for i in input().split(" ")]
for i in range(0,N):
lst.append(input().split(" "))
for i in range(1,N+1):
print(lst.count(i) |
s014044478 | p03720 | u796708718 | 1581874480 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | N, M = [int(i) for i in input().split(" ")]
for i in range(0,N)
lst.append(input().split(" "))
for i in range(1,N+1)
print(lst.count(i)) |
s739938410 | p03720 | u810066979 | 1581581806 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 151 | n,m=map(int,input().split())
list=[0]*4
for i in range(m):
a,b=map(int,input().split())
list[a-1]+=1
list[b-1]+=1
for j in range(n):
print(list[j]) |
s965856514 | p03720 | u075155299 | 1581528860 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 270 | #!/usr/bin/env python3
n,m=map(int,input().split())
d={}
for i in range(m):
a,b=map(int,input().split())
if a in d:
d[a]=d[a]+1
else:
d[a]=1
if b in d:
d[b]=d[b]+1
else:
d[b]=1
for i in range(n):
print(d[i+1])
|
s683170160 | p03720 | u162893962 | 1580936203 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 403 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
# この書き方でa,bが取り出せる
for a, b in ABs:
a = int(a) # intに直すには先に直しておく
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for mp in... |
s174905279 | p03720 | u162893962 | 1580936009 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 405 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
# この書き方でa,bが取り出せる
a = int(a) # intに直すには先に直しておく
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for mp... |
s596076492 | p03720 | u162893962 | 1580935917 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 407 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
# この書き方でa,bが取り出せる
a = int(a) # intに直すには先に直しておく
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for m... |
s757408767 | p03720 | u506287026 | 1580934366 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 390 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
a = int(a)
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for mp in range(1, N+1):
if mp not in MPs:... |
s613607861 | p03720 | u506287026 | 1580934319 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 391 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
a = int(a)
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for mp in range(1, N+1):
if mp not in M... |
s020845257 | p03720 | u506287026 | 1580934261 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 388 | N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
a = int(a)
b = int(b)
if a not in MPs:
MPs[a] = 1
else:
MPs[a] += 1
if b not in MPs:
MPs[b] = 1
else:
MPs[b] += 1
for mp in range(1, N+1):
if mp not in MPs:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.