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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s403504844 | p03852 | u740047492 | 1569339951 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | c = input()
if c == "a", "i", "u", "e", "o":
print("vowel")
else:
print("consonant") |
s579053412 | p03852 | u556371693 | 1569245076 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | c=input()
if c="a" or c="i" or c="u" or c="e" or c="o":
print("vowel")
else:
print("consonant") |
s649581714 | p03852 | u539018546 | 1569196632 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | W,H=map(int,input().split())
List=[input() for i in range(H)]
for j in range(H):
print(List[j][0])
print(List[j][0]) |
s421509731 | p03852 | u385244248 | 1569061808 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | if input() in set("a","b","c","d","e"):
print("vowel")
else:
print("consonant") |
s518261179 | p03852 | u597017430 | 1568848005 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | a = input()
for i in range('aiueo'):
if a == i:
print('vowel')
exit()
print('consonant')
|
s042992650 | p03852 | u597017430 | 1568847983 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | a = input()
for i in range('aiueo'):
if a = i:
print('vowel')
exit()
print('consonant') |
s113036873 | p03852 | u626337957 | 1568643091 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 875 | N, K, L = map(int, input().split())
par = list(range(N+1))
rank = [0] * (N+1)
cnt = [1] * (N+1)
def root(x):
if par[x] == x:
return x
else:
par[x] = root(par[x])
return par[x]
def same(x, y):
return root(x) == root(y)
def unite(x, y):
xr = root(x)
yr = root(y)
if xr == yr:
return
if rank[xr] < rank[yr]:
par[xr] = yr
else:
par[yr] = xr
if rank[xr] == rank[yr]:
rank[xr] += 1
for _ in range(K):
x, y = map(int, input().split())
unite(x, y)
par_r = par[:]
par = list(range(N+1))
for _ in range(L):
x, y = map(int, input().split())
unite(x, y)
ans = [1] * (N)
r_dict = {}
for i in range(1, N+1):
if (par_r[i], par[i]) in r_dict:
r_dict[(par_r[i], par[i])] += 1
else:
r_dict[(par_r[i], par[i])] = 1
ans = []
for i in range(1, N+1):
ans.append(r_dict[(par_r[i], par[i])])
print(' '.join(map(str, ans)))
|
s331248970 | p03852 | u482808969 | 1568499108 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38256 | 81 | c = int(input())
if c in 'aiueo':
print('vowel')
else:
print('consonant') |
s054572882 | p03852 | u976225138 | 1568410502 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 47 | print("vowel" if c in "aeiou" else "consonant") |
s834616673 | p03852 | u976225138 | 1568410483 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 48 | print("vowel" if c in "aeiou" else "consonant")) |
s132127118 | p03852 | u463775490 | 1568029773 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 82 | c = input()
v = [a,i,u,e,o]
if c in v:
print('vowel')
else:
print('consonant') |
s318091151 | p03852 | u346629192 | 1567188189 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | c = input()
if c in ["a","i","u","e","o"]:
print("vowel")
else:
print(consonant) |
s001643253 | p03852 | u476418095 | 1566939885 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 202 | #include<bits/stdc++.h>
using namespace std;
int main(){
char a;
cin>>a;
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u')
cout<<"vowel";
else
cout<<"consonant";
return 0;
} |
s774266907 | p03852 | u265118937 | 1566479967 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | c=int(input())
if c in "aiueo":
print("vowel")
else:
print("consonant") |
s936004456 | p03852 | u265118937 | 1566479897 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | c=int(input())
if c in "a","i","u","e","o"
print("vowel")
else :
print("consonant") |
s192563928 | p03852 | u952022797 | 1566417348 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38640 | 694 | # -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def main():
c = input()
an = [a,i,u,e,o]
if c in an:
print("vowel")
else:
print("consonant")
if __name__ == "__main__":
main()
|
s829753089 | p03852 | u093033848 | 1566206079 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | c = input()
if c == "a" or c == "i" or c == "u" ro c == "e" or c == "o":
print("vowel")
else:
print("consonant") |
s934889034 | p03852 | u318165580 | 1565829434 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 84 | A=input()
List=[a,i,u,e,o]
if A in List:
print("vowel")
else:
print("consonant") |
s739901665 | p03852 | u318165580 | 1565829360 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | A=input()
if A in [a,i,u,e,o]:
print("vowel")
else:
print("consonant") |
s605782445 | p03852 | u532099150 | 1565756155 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | a = set("a", "e", "i", "o", "u")
if input() in a:
print("vowel")
else:
print("consonant")
|
s873091885 | p03852 | u641722141 | 1565027653 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | a=input();print('cvoonwseoln a n t'[('a'or'i'or'u'or'e'or'o')in a ::2])a=['a','i','u','e','o'];print('cvoonwseoln a n t'[input() in a::2]) |
s039453604 | p03852 | u584174687 | 1564598274 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3316 | 1622 | from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
def union_r(node):
global road_union
if road_union[node] != node:
road_union[node] = union_r(road_union[node])
return road_union[node]
def union_t(node):
global train_union
if train_union[node] != node:
train_union[node] = union_t(train_union[node])
return train_union[node]
road_union, train_union = [], []
def main():
node_num, road_num, train_num = map(int, input().split())
global road_union
road_union = [i for i in range(node_num + 1)]
for i in range(road_num):
a, b = map(int, input().split())
parent_a = union_r(a)
parent_b = union_r(b)
road_union[min(parent_a, parent_b)] = max(parent_a, parent_b)
# print(road_union)
global train_union
train_union = [i for i in range(node_num + 1)]
for i in range(train_num):
a, b = map(int, input().split())
parent_a = union_t(a)
parent_b = union_t(b)
train_union[min(parent_a, parent_b)] = max(parent_a, parent_b)
# print(train_union, road_union)
ryouhou = [0 for i in range(node_num + 1)]
for i in range(1, node_num + 1):
parent_r = union_r(i)
parent_t = union_t(i)
ryouhou[i] = (parent_r, parent_t)
# print(train_union, road_union, 'uuu')
count_d = Counter(ryouhou)
for i in range(1, node_num + 1):
now_flg = ryouhou[i]
print(count_d[now_flg], end=' ')
print()
if __name__ == '__main__':
main() |
s350172398 | p03852 | u982594421 | 1564438698 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 83 | s = input().split()
if s in "aeiou":
print('vowel')
else:
print('consonant')
|
s883083997 | p03852 | u333190709 | 1564244949 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 91 | s = input()
if s in ['a', 'i', 'u', 'e'. 'o']:
print('vowel')
else:
print('consonant') |
s132661371 | p03852 | u516242950 | 1564163930 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | boin = [a, i, u, e, o]
moji = input()
if moji in boin:
print('vowel')
else:
print('consonant') |
s476834701 | p03852 | u675073679 | 1563380415 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | c = input()
if c == a or e or i or o or u:
print("vowel")
else:
print("constant") |
s343433365 | p03852 | u474423089 | 1562513606 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 166 | import re
def main():
c = input()
if re.match("[aiueo]",c):
print('vowel')
else:
print(consonant)
if __name__ == '__main__':
main()
|
s809409446 | p03852 | u093500767 | 1562191466 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 115 | x = input().str()
vowel = ["a", "i", "u", "e", "o"]
if x in vowel:
print("vowel")
else:
print("consonant") |
s482212223 | p03852 | u314050667 | 1562123645 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | print("vowel") if input() in ["a","i","u","e","o"] else print("consonant
") |
s932656858 | p03852 | u288948615 | 1561941256 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | c = input()
vowel = ['a', 'i', 'u', 'e', 'o']
if c in boin:
print('vowel')
else:
print('consonant') |
s139969622 | p03852 | u295652340 | 1561659106 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | h,w = map(int,input().split())
for i in range(h):
s=str(input())
print(s)
print(s) |
s342536827 | p03852 | u295652340 | 1561657991 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | s = input()
b = ['a','e','i','o','u']
for i in b:
if s == b[i]:
print('vowel')
exit()
print('consonant')
|
s015148885 | p03852 | u295652340 | 1561657942 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | s = input()
b = ['a','e','i','o','u']
for i in b:
if s.find(b[i]):
print('vowel')
exit()
print('consonant') |
s625874069 | p03852 | u471212175 | 1561517423 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | c = inuput()
if c == 'a' or c == 'i' or c == 'u' or c == 'e' or c == 'o':
print('vowel')
else:
print("consonant")
|
s482160317 | p03852 | u013594089 | 1561517392 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 84 | c = input()
lst = [a,e,i,o,u]
if c in lst:
print("vowel")
else:
print("consonant") |
s514541376 | p03852 | u471212175 | 1561517380 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | c = inuput()
if c == 'a' or c == 'i' or c == 'u' or c == 'e' or c == 'o':
print('vowel')
else:
print("consonant"
|
s442638902 | p03852 | u248221744 | 1561363905 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | c = input()
if c = "a" or "i" or "u" or "e" or "o":
print("vowel")
else:
print("consonant") |
s653683950 | p03852 | u992394626 | 1560909018 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 92 | H,W = map(int,input().split())
for i in range(H):
C = input()
print(C)
print(C) |
s327997401 | p03852 | u181668771 | 1560830987 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | import sys
H, W = sys.stdin.readline().split()
C = sys.stdin
for i in C:
print(i)
print(i)
|
s040980208 | p03852 | u203501420 | 1559859710 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 202 | s = input()
if s == "a":
print "vowel"
elif s == "e":
print "vowel"
elif s == "i":
print "vowel"
elif s == "0":
print "vowel"
elif s == "u":
print "vowel"
else:
print "consonant" |
s288743381 | p03852 | u811000506 | 1559838160 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | c = str(input()))
if (c=="a" or c=="i" or c=="u" or c=="e" or c=="o"):
print("vowel")
else:
print("consonant") |
s753922710 | p03852 | u117579775 | 1559152588 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | mozi=input()
if mozi == a or mozi == i or mozi == u or mozi == e or mozi == o:
print('vowel')
else:
print('consonant')
|
s144565846 | p03852 | u117579775 | 1559152446 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | mozi=input()
if mozi == a or mozi == i or mozi == u or mozi == e or mozi == o:
print("vowel")
else:
print("consonant") |
s861674865 | p03852 | u259738923 | 1558996288 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 127 | c = input()
msg = 'vowel' if ((c == 'a') or (c == 'i') or (c == 'u') or (c == 'e') or (c == 'o')) else 'consonant':
print(msg) |
s357237814 | p03852 | u259738923 | 1558995932 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 207 | c = input()
if (c == 'a'):
elif (c == 'i'):
elif (c == 'u'):
elif (c == 'e'):
elif (c == 'o'):
is_vowel = True
else:
is_vowel = False
if is_vowel:
print('vowel')
else:
print('consonant') |
s216648290 | p03852 | u591779169 | 1558858788 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | h, w = (int(i) for i in input().split())
for i in range(h):
s = input()
print(s)
print(s)
|
s668151444 | p03852 | u189950446 | 1557956162 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 671 | import re
S = input()
a = []
num = []
l = ["dream","dreamer","erase","eraser"]
re.split("\d+",S)
if ("dream" in S) == True:
num.append(S.count("dream"))
a.append(S.find("dream"))
if ("dreamer" in S) == True:
num.append(S.count("dreamer"))
a.append(S.find("dreamer"))
if ("erase" in S) == True:
num.append(S.count("erase"))
a.append(S.find("erase"))
if ("eraser" in S) == True:
num.append(S.count("eraser"))
a.append(S.find("eraser"))
"""
print(num[0])
print(num[1])
print(num[2])
print(a[0])
print(a[1])
print(a[2])
print(a[3])
"""
if (num[0] or num[1] or num[2] or num[3])> 0:
print("YES")
elif (num[0] or num[1] or num[2] or num[3]) <= 0:
print("NO") |
s782757517 | p03852 | u239301277 | 1557714876 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | c=input()
if c='a' or c='i' or c='u' or c='e' or c='o':
print('vowel')
else:
print('consonant') |
s792771247 | p03852 | u239301277 | 1557714676 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
print(vowel)
else:
print(consonant) |
s348879700 | p03852 | u239301277 | 1557714627 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | c=input()
if c='a' or c='i' or c='u' or c='e' or c='o':
print(vowel)
else:
print(consonant) |
s961643695 | p03852 | u185331085 | 1557294920 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 106 | c = input()
if c == a or c == e or c == i or c == o or c == u:
print("vowel")
else:
print("consonant") |
s757780677 | p03852 | u182047166 | 1556973096 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 144 | a = str(input())
for i in {"a", "i", "u", "e", "o"}:
if a == i:
flag = 1
print("vowel")
if flag == 0:
print("consonant") |
s068501262 | p03852 | u457960175 | 1556113570 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | c = str(inout())
if c = 'a' or 'e' or 'i' or 'o' or 'u' :
print('vowel')
else :
print('consonant') |
s502422156 | p03852 | u023540496 | 1555958999 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 38256 | 65 | s=input(); if s in "aiueo" print("vowel") else print("consonant") |
s355520781 | p03852 | u023540496 | 1555958919 | Python | PyPy3 (2.4.0) | py | Runtime Error | 177 | 38384 | 60 | if input() in "aiueo" print("vowel") else print("consonant") |
s297468908 | p03852 | u481026841 | 1555941830 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 203 | c = input()
if c == a:
print('vowel')
elif c == e:
print('vowel')
elif c == i:
print('vowel')
elif c == o:
print('vowel')
elif c == u:
print('vowel')
else:
print('consonant')
|
s695811998 | p03852 | u481026841 | 1555941756 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | c = input()
if c = a:
print('vowel')
elif c = e:
print('vowel')
elif c = i:
print('vowel')
elif c = o:
print('vowel')
elif c = u:
print('vowel')
else:
print('consonant') |
s293431862 | p03852 | u481026841 | 1555941483 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 200 | c = input('')
if c == a:
print('vowel')
elif c == e:
print('vowel')
elif c == i:
print('vowel')
elif c == o:
print('vowel')
elif c == u:
print('vowel')
else:
print('consonant') |
s057727252 | p03852 | u481026841 | 1555941419 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 195 | c = input('')
if c = a:
print('vowel')
elif c = e:
print('vowel')
elif c = i:
print('vowel')
elif c = o:
print('vowel')
elif c = u:
print('vowel')
else:
print('consonant') |
s988212496 | p03852 | u545998622 | 1555550163 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 73 | c=input()
if c in[a,i,u,e,o]:
print("vowel")
else:print("consonant")
|
s814234535 | p03852 | u545998622 | 1555550137 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | c=input(str())
if c in[a,i,u,e,o]:
print("vowel")
else:print("consonant") |
s212574685 | p03852 | u331464808 | 1555425533 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | c = input()
if v,c in 'aeiou':
print(vowel)
else:
print(consonant) |
s288568324 | p03852 | u331464808 | 1555425494 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 68 | c = input()
if c in 'aeiou':
print(vowel)
else:
print(consonant) |
s644667944 | p03852 | u331464808 | 1555369524 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 105 | s =input()
v = ['a','e','i','o','u']
for i in v:
if s = i:
print(vowel)
else:
print(consonant |
s286624714 | p03852 | u798129018 | 1554750800 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | s = input()
if s == "a" or s=="i" or s=="u" or s=="e" or s=="o":
print(vowel)
else:
print(consonant) |
s793714216 | p03852 | u962330718 | 1554662749 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 68 | c=input()
if c in"aiueo"
print("vowel")
else:
print("consonant") |
s029004229 | p03852 | u480806810 | 1554521898 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 274 | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main() {
char c;
cin >> c;
if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){
cout << "vowel" << endl;
}else{
cout << "consonant" << endl;
}
return 0;
} |
s258666535 | p03852 | u597374218 | 1554261657 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 79 | c=int(input())
if c in "aiueo":
print("vowel")
else:
print("consonant") |
s013924998 | p03852 | u543954314 | 1550678618 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 80 | v = {a, e, i, o, u}
if input() in v:
print("vowel")
else:
print("consonant") |
s395812829 | p03852 | u562767072 | 1550603373 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 427 | S = input()
sys.setrecursionlimit(10**7)
def is_ok(s):
if len(s)==0:
return 'YES'
elif len(s)<5:
return 'NO'
elif s[-7:]=='dreamer':
next_s = s[:-7]
elif s[-6:]=='eraser':
next_s = s[:-6]
elif s[-5:]=='dream' or s[-5:]=='erase':
next_s = s[:-5]
else:
return 'NO'
# import pdb;pdb.set_trace()
ans = is_ok(next_s)
return ans
print(is_ok(S))
|
s566617862 | p03852 | u952130512 | 1550449203 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 103 | c=input()
if c="a" or c="i" or c="u" or c="e" or c="o":
print("vowel")
else:
print("consonant") |
s874720560 | p03852 | u439392790 | 1550202821 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | c=input()
if c == a or c== i or c == u or c == e or c == o :
print('vowel')
else:
print('consonant') |
s969278607 | p03852 | u777028980 | 1550095156 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | a=input()
if(a=="a" or a=="i" or a=="u" or a=="e" or a=="o):
print("vowel")
else:
print("consonant") |
s654131443 | p03852 | u215329188 | 1546462659 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3184 | 993 | N,K,L = map(int, input().split())
D = [list(map(int, input().split())) for _ in range(K)]
T = [list(map(int, input().split())) for _ in range(L)]
#print(N,K,L,D,T)
list_D = [set([i]) for i in range(N)]
list_T = [set([i]) for i in range(N)]
root_D = [i for i in range(N)]
root_T = [i for i in range(N)]
#print(list_D)
for d in D:
d0 = d[0] - 1
d1 = d[1] - 1
r0 = root_D[d0]
r1 = root_D[d1]
a = list_D[r0]
b = list_D[r1]
c = a | b
list_D[r0] = c
root_D[r1] = r0
root_D[d1] = r0
#print(list_D, root_D)
for t in T:
t0 = t[0] - 1
t1 = t[1] - 1
r0 = root_T[t0]
r1 = root_T[t1]
a = list_T[r0]
b = list_T[r1]
c = a | b
list_T[r0] = c
root_T[r1] = r0
root_T[t1] = r0
#print(list_T, root_T)
#和集合
res = [0] * N
for i in range(N):
rd = root_D[i]
rt = root_T[i]
d = list_D[rd]
t = list_T[rt]
res[i] = len(d & t)
#print(*(res[i] for i in range(N)))
print(" ".join([str(i) for i in res])) |
s460598688 | p03852 | u740284863 | 1546085441 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 86 | c = str(input())
if c in [a,i,u,e,o]:
print("vowel")
else:
print("consonant")
|
s931780392 | p03852 | u740284863 | 1546085424 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 86 | c = str(input())
if c in {a,i,u,e,o}:
print("vowel")
else:
print("consonant")
|
s875980838 | p03852 | u726439578 | 1546063931 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 103 | c=input()
if c="a" or c="i" or c="u" or c="e" or c="o":
print("vowel")
else:
print("consonant") |
s623678901 | p03852 | u928784113 | 1544628042 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 100 | # -*- coding: utf-8 -*-
c = str(input())
if c == "a" or c == "i" or c == "u" or c == "e" or c == "o" |
s550540094 | p03852 | u105456682 | 1542386498 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 63 | print(['vowel','consonant'][['a','e','i','o','u'].in(input())]) |
s695470144 | p03852 | u366133198 | 1542065401 | Python | PyPy3 (2.4.0) | py | Runtime Error | 277 | 45296 | 1936 | import itertools
import sys
import itertools
import operator
import collections
from inspect import currentframe
u'''Return all length combination'''
def all_comb(iterable):
for i in range(0, len(iterable) + 1):
comb = itertools.combinations(iterable, i)
for pair in comb:
yield(pair)
class UnionFind:
def __init__(self, elems=None):
class KeyDict(dict):
def __missing__(self, key):
self[key] = key
return key
self.parent = KeyDict()
self.rank = collections.defaultdict(int)
if elems is not None:
for elem in elems:
_, _ = self.parent[elem], self.rank[elem]
def find(self, x):
if self.parent[x] == x:
return x
else:
self.parent[x] = self.find(self.parent[x])
return self.parent[x]
def unite(self, x, y):
x = self.find(x)
y = self.find(y)
if self.rank[x] < self.rank[y]:
self.parent[x] = y
else:
self.parent[y] = x
if self.rank[x] == self.rank[y]:
self.rank[x] += 1
def are_same(self, x, y):
return self.find(x) == self.find(y)
def grouper(self):
roots = [(x, self.find(x_par)) for x, x_par in self.parent.items()]
root = operator.itemgetter(1)
for _, group in itertools.groupby(sorted(roots, key=root), root):
yield [x for x, _ in group]
N, K, L = map(int, input().split())
load_connections = UnionFind(range(1, N + 1))
rail_connections = UnionFind(range(1, N + 1))
for i in range(K):
(p, q) = map(int, input().split())
load_connections.unite(p, q)
for i in range(L):
(r, s) = map(int, input().split())
rail_connections.unite(r, s)
for i in range(1, N + 1):
print([load_connections.are_same(i, j) and rail_connections.are_same(i, j) for j in range(1, N + 1)].count(True))
|
s434293153 | p03852 | u844789719 | 1540938751 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | c = input()
if 'a' in 'aeiuo'.split(''):
print('vowel')
else:
print('consonant') |
s874701736 | p03852 | u240793404 | 1540904773 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | print("vowel" if input() in 'a','e','i','o','u' else ""consonant) |
s984404176 | p03852 | u328755070 | 1540138962 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | if input() in ['a','e','i','o','u'] print('vowel') else print('constant')
|
s857510935 | p03852 | u518556834 | 1537325432 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 82 | s = input()
a = {a,e,u,i,o}
if s in a:
print("vowel")
else:
print("consonant") |
s684947967 | p03852 | u474270503 | 1537055285 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 48 | グリコ森永事件【完全永久保存版】 |
s009156015 | p03852 | u304561065 | 1536816053 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | c=input()
if c==a or c==i or c==u or c==e or c==o:
print('vowel')
else:
print('consonant') |
s133029846 | p03852 | u138486156 | 1535136618 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 116 | ch = input()
if ch == 'a' | ch == 'i' | ch == 'u' | ch == 'e' | ch == 'o':
print('vowel')
else:
print('consonant') |
s933937167 | p03852 | u277802731 | 1534206880 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | #49a
s = input()
if s=='a' or s=='i' or s=='u' or s='e' or s='o':
print('vowel')
else:
print('consonant') |
s413069472 | p03852 | u761989513 | 1533273827 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | c = input()
vowel = ["a", "e", "i", "o", "u"]
if vowel.find(c) == -1:
print("consonant")
else:
print("vowel") |
s573266433 | p03852 | u636775911 | 1531930849 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | #coding:utf-8
n=[a,i,u,e,o]
c=input()
if(c in n):
print("vowel")
else:
print("consonant") |
s612815396 | p03852 | u095969144 | 1530845670 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 181 | H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
px.append(input())
ans.append(px[x])
ans.append(px[x])
for x in range(len(ans)):
print(ans[x])
|
s394879945 | p03852 | u095969144 | 1530845398 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 175 | H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
px.append(input())
ans.append(px[x])
ans.append(px[x])
for x in range(ans):
print(ans[x]) |
s771575498 | p03852 | u095969144 | 1530845252 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 147 | H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
px.append(W[x])
px.append(W[x])
for x in range(px):
print(px[x])
|
s786777157 | p03852 | u533679935 | 1529091774 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | c=input()
if c == "a" = "i" = "u" = "e" = "o":
print("vowel")
else:
print("consonant") |
s175063818 | p03852 | u533679935 | 1529090495 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | c=input()
if c == a or i or u or e or o:
print("vowel")
else:
print("consonant") |
s799071374 | p03852 | u577927591 | 1527000659 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 86 | if(input() == ("a"or"i"or"u"or"e"or"o"):
print("vowel")
else:
print("consonant") |
s443777586 | p03852 | u773981351 | 1521632333 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 64 | rint('vowel') if input() in 'aeiouAEIOU' else print('consonant') |
s360355887 | p03852 | u403355272 | 1520105215 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 101 | H, W = list(map(int, input().split()))
for i in range(H):
C = input()
print(C)
print(C)
|
s850415046 | p03852 | u898651494 | 1517910364 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | x = input()
if x == 'a' or x == 'i' or x == 'u' or x=='e' or x=='o':
print ('vowel')
else
print ('consonant') |
s760204312 | p03852 | u898651494 | 1517910105 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | x = input()
if x == 'a' || x == 'i' || x == 'u'||x=='e'||x=='o':
print ('vowel')
else:
print ('consonant') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.