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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s551642217 | p03569 | u293976191 | 1508725209 | Python | Python (2.7.6) | py | Runtime Error | 2104 | 44928 | 1424 | # coding: utf-8
S = raw_input()
def split(string):
mid = len(string) / 2
if len(string) % 2:
left = string[:mid]
center = string[mid]
right = (string[mid + 1:])[::-1]
else:
left = string[:mid]
center = ''
right = (string[mid:])[::-1]
return left, center,... |
s491123108 | p03569 | u796424048 | 1508725092 | Python | Python (3.4.3) | py | Runtime Error | 75 | 12140 | 1349 | from collections import Counter
S = input()
s = list(S)
counter = Counter(s)
odd = 0
flag = True
for k,v in counter.items():
#偶奇性の判定
if k != 'x':
if v%2 == 1:
odd += 1
mid = k
if odd >= 2:#奇数個ある小文字が複数ある場合できない
flag = False
#"x"を除いた時の回文判定
if flag:
s_sub = S.repl... |
s205451577 | p03569 | u656771711 | 1508724647 | Python | Python (2.7.6) | py | Runtime Error | 97 | 10116 | 528 | import sys
s=raw_input()
l=len(s)
sa=[]
cb=[]
ca=[]
for n in range(l):
an=s[n]
if an!="x":
sa.append(n)
ca.append(an)
bn=s[l-n-1]
if bn!="x":
cb.append(bn)
pnt=sa[int((len(sa)+1)/2)-1]
if ca!=cb:
print "-1"
sys.exit()
ha=s[:pnt+1]
bb=s[::-1]
hb=bb[:(l-pnt)]
count=0
lista=[]
listb=[]
for ch in ha:
if ch=="x... |
s061306357 | p03569 | u635974378 | 1508724356 | Python | Python (3.4.3) | py | Runtime Error | 103 | 5100 | 1093 | from collections import deque
def insert_c(s, idx, c):
return s[:idx] + c + s[idx:]
def calc(s):
if s == s[::-1]:
return 0
if s.replace('x', '') != s.replace('x', '')[::-1]:
return -1
# import ipdb;ipdb.set_trace()
revs = deque(s[::-1])
s = deque(s)
cnt = 0
o_gap, r_g... |
s942231920 | p03569 | u656771711 | 1508724327 | Python | Python (2.7.6) | py | Runtime Error | 153 | 27388 | 566 | import sys
s=raw_input()
l=len(s)
sa=[]
sb=[]
ca=[]
cb=[]
for n in range(l):
an=s[n]
if an!="x":
sa.append((n,an))
ca.append(an)
bn=s[l-n-1]
if bn!="x":
sb.append((l-n-1,bn))
cb.append(bn)
pnt=sa[int((len(sa)+1)/2)-1][0]
if ca!=cb:
print "-1"
sys.exit()
ha=s[:pnt+1]
bb=s[::-1]
hb=bb[:(l-pnt)]
count=0
list... |
s967143527 | p03569 | u635974378 | 1508724312 | Python | PyPy3 (2.4.0) | py | Runtime Error | 229 | 54384 | 1093 | from collections import deque
def insert_c(s, idx, c):
return s[:idx] + c + s[idx:]
def calc(s):
if s == s[::-1]:
return 0
if s.replace('x', '') != s.replace('x', '')[::-1]:
return -1
# import ipdb;ipdb.set_trace()
revs = deque(s[::-1])
s = deque(s)
cnt = 0
o_gap, r_g... |
s551698425 | p03569 | u205803237 | 1508724133 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4596 | 783 | s = input()
S = s.replace("x", "")
judge = 0
if len(s) == 1:
judge = 5
if judge != 5:
for i in range(len(S)):
if S[i] != S[-(i+1)]:
judge = 1
break
s_ = []
for i in range(len(s)):
s_.append(s[i])
ans = 0
if s_[0] == "x" and s_[-1] != "x":
s_.append("x")
ans += 1
... |
s108544671 | p03569 | u635974378 | 1508724110 | Python | Python (3.4.3) | py | Runtime Error | 98 | 5108 | 1043 | from collections import deque
def insert_c(s, idx, c):
return s[:idx] + c + s[idx:]
def calc(s):
if s == s[::-1]:
return 0
if s.replace('x', '') != s.replace('x', '')[::-1]:
return -1
# import ipdb;ipdb.set_trace()
revs = deque(s[::-1])
s = deque(s)
cnt = 0
o_gap, r_g... |
s729549466 | p03569 | u656771711 | 1508723910 | Python | Python (2.7.6) | py | Runtime Error | 143 | 27388 | 566 | import sys
s=raw_input()
l=len(s)
sa=[]
sb=[]
ca=[]
cb=[]
for n in range(l):
an=s[n]
if an!="x":
sa.append((n,an))
ca.append(an)
bn=s[l-n-1]
if bn!="x":
sb.append((l-n-1,bn))
cb.append(bn)
pnt=sa[int((len(sa)+1)/2)-1][0]
if ca!=cb:
print "-1"
sys.exit()
ha=s[:pnt+1]
bb=s[::-1]
hb=bb[:(l-pnt)]
count=0
list... |
s877944128 | p03569 | u688522869 | 1508723592 | Python | Python (3.4.3) | py | Runtime Error | 87 | 7196 | 804 | def kaibun(S):
frag = 1
start = 0
last = len(S)-1
if last == 0:
return frag
while(abs(start - last) >= 1):
if S[start] != S[last]:
frag = 0
break
start += 1
last -= 1
return frag
S = input()
s = ""
position = []
for i in range(len(S)):
... |
s986412629 | p03569 | u440018562 | 1508723354 | Python | Python (3.4.3) | py | Runtime Error | 304 | 3628 | 1076 | def palindrome(s):
for i in range(len(s) // 2):
if s[i] != s[-i -1]:
return False
return True
def main():
s = input()
t = ''
for ch in s:
if ch != 'x':
t += ch
if (palindrome(t) == False):
print(-1)
return
cnt = 0
odd = len(t) & 1
mid = len(t) // 2
if odd == 1: # ax[... |
s225100458 | p03569 | u497285470 | 1508723059 | Python | Python (3.4.3) | py | Runtime Error | 589 | 3316 | 315 | inputs = input()
a = inputs
ans = 0
while len(a) > 1:
if a[0] == a[-1]:
a = a[1:-1]
if a[0] == 'x' and a[-1] != 'x':
ans += 1
a += 'x'
if a[0] != 'x' and a[-1] == 'x':
ans += 1
a = 'x' + a
if a[0] != a[-1]:
ans = -1
break
print(ans) |
s509486115 | p03569 | u033407970 | 1508722767 | Python | Python (3.4.3) | py | Runtime Error | 1553 | 21524 | 1530 | import math as mt
import numpy as np
string = input()
use = string.split('x')
word =''
for x in use:
word += x
i = 0
n = len(word) - 1
while i < n:
if word[i] != word[n]:
print(-1)
exit()
i += 1
n -= 1
if len(word) % 2 == 0:
fh = []
i = 0
mid = int(len(word)/2)
count = 0... |
s177056986 | p03569 | u033407970 | 1508722592 | Python | Python (3.4.3) | py | Runtime Error | 1826 | 21508 | 1433 | import math as mt
import numpy as np
string = input()
use = string.split('x')
word =''
for x in use:
word += x
i = 0
n = len(word) - 1
while i < n:
if word[i] != word[n]:
print(-1)
exit()
i += 1
n -= 1
if len(word) % 2 == 0:
fh = []
i = 0
mid = int(len(word)/2)
count = 0... |
s410141775 | p03569 | u153147777 | 1508722483 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 314 | S = input()
st = 0
la = len(S) - 1
result = 0
while(st > la):
if S[st]== 'x' and S[la]== 'x':
st += 1
la += 1
continue
if S[st] != 'x' and S[la]== 'x':
result += 1
la += 1
elif S[st] == 'x' and S[la] != 'x':
result += 1
st += 1
else
result = -1
break
print(result)
|
s292354410 | p03569 | u033407970 | 1508722481 | Python | Python (3.4.3) | py | Runtime Error | 1938 | 21484 | 1438 | import math as mt
import numpy as np
string = input()
use = string.split('x')
word =''
for x in use:
word += x
i = 0
n = len(word) - 1
while i < n:
if word[i] != word[n]:
print(-1)
exit()
i += 1
n -= 1
for x in 1000000000:
y = 1+1
if len(word) % 2 == 0:
fh = []
i = 0
mid... |
s351102862 | p03569 | u033407970 | 1508722394 | Python | Python (3.4.3) | py | Runtime Error | 315 | 21484 | 1481 | import math as mt
import numpy as np
string = input()
use = string.split('x')
word =''
for x in use:
word += x
i = 0
n = len(word) - 1
while i < n:
if word[i] != word[n]:
print(-1)
exit()
i += 1
n -= 1
if len(word) % 2 == 0:
fh = []
i = 0
mid = int(len(word)/2)
count = ... |
s953694294 | p03569 | u758661720 | 1508722382 | Python | Python (2.7.6) | py | Runtime Error | 13 | 2568 | 292 | right = 0
left = len(s)-1
for i in range(len(s)*2):
if ( s[right] != s[left]):
count += 1
if(s[right]!="x"):
right -= 1
else:
left += 1
right += 1
left -= 1
if(right>=left):
print count
sys.exit() |
s176212141 | p03569 | u033407970 | 1508722239 | Python | Python (3.4.3) | py | Runtime Error | 1731 | 21668 | 1405 | import math as mt
import numpy as np
string = input()
use = string.split('x')
word =''
for x in use:
word += x
i = 0
n = len(word) - 1
while i < n:
if word[i] != word[n]:
print(-1)
exit()
i += 1
n -= 1
if len(word) % 2 == 0:
fh = []
i = 0
mid = int(len(word)/2)
count = ... |
s610129423 | p03569 | u315078622 | 1508722039 | Python | Python (3.4.3) | py | Runtime Error | 76 | 7968 | 538 | S = input()
N = len(S)
non_x = []
s_notx = []
for i, s in enumerate(S):
if s != 'x':
non_x.append(i)
s_notx.append(s)
s_notx = ''.join(s_notx)
if s_notx != s_notx[::-1]:
print(-1)
quit()
ans = 0
L = len(non_x)
if L % 2 == 0:
left, right = L // 2 - 1, L // 2
else:
left = right = L //... |
s297685018 | p03569 | u603253967 | 1508721984 | Python | Python (3.4.3) | py | Runtime Error | 128 | 101488 | 593 | import functools
def check(s):
if len(s)==0 or len(s)==1:
return 0
head = s[0]
tail = s[-1]
if head ==tail:
return check(s[1:-1])
if head =="x":
return 1+check(s[1:])
if tail =="x":
return 1+check(s[:-1])
return -1
def main():
n = check(input())
prin... |
s434097021 | p03569 | u652895610 | 1508721522 | Python | Python (3.4.3) | py | Runtime Error | 53 | 3316 | 345 | import sys
S = sys.stdin.readline().strip()
pl = 0
pr = len(S)
res = 0
while pl < pr:
cnt = 0
while S[pl] == 'x':
cnt += 1
pl += 1
while S[pr - 1] == 'x':
cnt -= 1
pr -= 1
res += abs(cnt)
if S[pl] != S[pr - 1]:
print(-1)
sys.exit()
pl += 1... |
s553890001 | p03569 | u743272507 | 1508721163 | Python | Python (3.4.3) | py | Runtime Error | 67 | 6312 | 531 | def main():
s = list(input())
wox = [i for i in s if i != "x"]
wowr = list(reversed(wox))
for i in range(len(wox)//2+1):
if wox[i] != wowr[i]:
return -1
sr = list(reversed(s))
si = ri = 0
ret = 0
while si < len(s) and ri < len(sr):
if s[si] == sr[ri]:
... |
s427607453 | p03570 | u761320129 | 1582741119 | Python | Python (3.4.3) | py | Runtime Error | 109 | 11264 | 450 | import sys
input = sys.stdin.readline
S = input()
def ctoi(c):
return ord(c) - ord('a')
cums = [0]
for c in S:
cums.append(cums[-1] ^ (1<<ctoi(c)))
if cums[-1] == 0:
print(1)
exit()
dp = {0:0}
for i,b in enumerate(cums):
for k in range(26):
msk = b^(1<<k)
if msk in dp:
... |
s258176273 | p03570 | u761320129 | 1582740014 | Python | Python (3.4.3) | py | Runtime Error | 1679 | 15728 | 468 | S = input()
N = len(S)
def ctoi(c):
return ord(c) - ord('a')
cums = [0]
for c in S:
cums.append(cums[-1] ^ (1<<ctoi(c)))
if cums[-1] == 0:
print(1)
exit()
dp = {0:0}
for b in cums:
if b in dp: continue
for k in range(26):
if b&(1<<k)==0: continue
msk = b^(1<<k)
if msk ... |
s146535449 | p03570 | u729417323 | 1509687375 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3572 | 568 | # --*-coding:utf-8-*--
import math
def f(str):
s = {}
s[0] = 0
pat = 0
for c in str:
pat ^= 2**(ord(c)-97)
s[pat] = min(
min(s.get(pat^2**i, math.inf) + 1 for i in range(26)),
s.get(pat, math.inf))
if pat == 0:
return 1
return s[pat]
... |
s879491009 | p03570 | u657930597 | 1509100242 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 404 | #include<bits/stdc++.h>
using namespace std;
typedef long long int uli;
int f[(1<<26)+10];
const int oo=1e9;
int main(){
for(int i=0;i<(1<<26);i++)f[i]=oo;
string s;
cin>>s;
int h=0,fi;
f[0]=0;
for(char ch:s){
h^=(1<<(ch-'a'));
fi=1+f[h];
for(int i=0;i<26;i++){
int m=(h^(1<<i));
fi=m... |
s292920522 | p03570 | u970348538 | 1508997538 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3572 | 386 | s = input()
tmp = set()
ss = []
for x in s:
if x in tmp:
tmp.add(x)
else:
tmp.remove(x)
ss.append(tmp)
n = [0]
for i in range(len(s)):
n.append(0)
n[i] = n[i-1] + 1
for j in range(i-1, -1, -1):
t = set(ss[j]).symmetric_difference(set(ss[i]))
if len(t) <= 1 and n[... |
s557473881 | p03570 | u792078574 | 1508727080 | Python | Python (2.7.6) | py | Runtime Error | 3166 | 162396 | 505 | s = raw_input()
def process(d, c):
d[c] = d.get(c, 0) + 1
d['odds'] += 1 if d[c] % 2 == 1 else -1
d['child'] = filter(lambda v:process(v,c), d['child'])
if d['odds'] <= 1:
d['child'].append({ 'child': [], 'odds': 0 })
return d['odds'] > 0
root = {
'child': [],
'odds': 0
}
for c in s:
process(ro... |
s806888532 | p03570 | u925364229 | 1508726965 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1630 | #! usr/bin/env python3
#D:
def is_kaibun (S):
#戻り値が0:回文,1:回文無理
l = len(S)
S.sort()
i = 0
if l % 2 == 1:
sign = 0
while True:
if i >= l-1:
return 0
elif S[i] == S[i+1]:
i += 2
else:
if sign == 1:
return 1
else:
sign += 1
i += 1
else:
while True:
if i >= l-1:... |
s780453260 | p03570 | u341855122 | 1508726802 | Python | Python (3.4.3) | py | Runtime Error | 1488 | 135592 | 432 | import sys
sys.setrecursionlimit(10000000)
s = input()
def check(str,flag):
print(str)
if str == "":
return True
flag += str.count(str[0])%2
if flag >1:
return False
else:
return check(str.replace(str[0],""),flag)
def check2(str,x):
if str=="" or check(str,0):
return x
count = len(str)-1
while(not chec... |
s498030269 | p03570 | u603253967 | 1508726763 | Python | Python (3.4.3) | py | Runtime Error | 70 | 4188 | 1274 | import functools
alpha = "abcdefghijklmnopqrstuvwxyz"
resultmap = {}
def replace(s:str):
l = [(s.index(a) if a in s else -1,a) for a in alpha]
l = [a for a in l if a[0] != -1]
t = sorted(l,key=lambda k:k[0])
# print(t)
for bef,aft in [(c,alpha[i]) for i,c in t]:
# print(bef,aft)
s... |
s784863621 | p03570 | u257374434 | 1508726675 | Python | Python (3.4.3) | py | Runtime Error | 37 | 4464 | 281 | from collections import Counter
from string import ascii_lowercase
from functools import lru_cache
import sys
s = input()
sys.setrecursionlimit(100000000)
tmp_c = Counter(s)
val = sum(tmp_c[s_tmp]%2 for s_tmp in ascii_lowercase)
if val==0:
val=1
if val>5:
raise
print(val)
|
s753630013 | p03570 | u257374434 | 1508726660 | Python | Python (3.4.3) | py | Runtime Error | 38 | 4468 | 281 | from collections import Counter
from string import ascii_lowercase
from functools import lru_cache
import sys
s = input()
sys.setrecursionlimit(100000000)
tmp_c = Counter(s)
val = sum(tmp_c[s_tmp]%2 for s_tmp in ascii_lowercase)
if val==0:
val=1
if val>6:
raise
print(val)
|
s387724022 | p03570 | u942033906 | 1508726611 | Python | Python (3.4.3) | py | Runtime Error | 3186 | 442324 | 932 | S = input()
A = [[0 for i in range(26)] for j in range(len(S) + 1)]
for i in range(1,len(S)+1):
c = S[i-1]
A[i] = [n for n in A[i-1]]
A[i][ord(c)-ord('a')] += 1
memo = {}
def isPal(start,end):
if (start,end) in memo:
return memo[(start,end)]
l = [(A[end][i] - A[start][i]) % 2 for i in range(26)]
odd = l.count(... |
s682649129 | p03570 | u097479715 | 1508726569 | Python | PyPy3 (2.4.0) | py | Runtime Error | 386 | 52820 | 1158 | import sys
import re
import math
import bisect
#[left, right)の文字列を並び替えて回文が作れるかどうか
def is_pal(left, right):
n_odd = 0
n_even = 0
for c, locs in c_loc.items():
#各locsについて、left以上right未満である要素の数をカウント
l_idx = bisect.bisect_left(locs, left)
r_idx = bisect.bisect_left(locs, right)
n... |
s380828075 | p03570 | u257374434 | 1508726565 | Python | Python (3.4.3) | py | Runtime Error | 40 | 4468 | 281 | from collections import Counter
from string import ascii_lowercase
from functools import lru_cache
import sys
s = input()
sys.setrecursionlimit(100000000)
tmp_c = Counter(s)
val = sum(tmp_c[s_tmp]%2 for s_tmp in ascii_lowercase)
if val==0:
val=1
if val>3:
raise
print(val)
|
s793724174 | p03570 | u942033906 | 1508726497 | Python | Python (3.4.3) | py | Runtime Error | 3185 | 441696 | 973 | import sys
sys.setrecursionlimit(100000)
S = input()
A = [[0 for i in range(26)] for j in range(len(S) + 1)]
for i in range(1,len(S)+1):
c = S[i-1]
A[i] = [n for n in A[i-1]]
A[i][ord(c)-ord('a')] += 1
memo = {}
def isPal(start,end):
if (start,end) in memo:
return memo[(start,end)]
l = [(A[end][i] - A[start][i]... |
s671566206 | p03570 | u257374434 | 1508726416 | Python | Python (3.4.3) | py | Runtime Error | 38 | 4468 | 281 | from collections import Counter
from string import ascii_lowercase
from functools import lru_cache
import sys
s = input()
sys.setrecursionlimit(100000000)
tmp_c = Counter(s)
val = sum(tmp_c[s_tmp]%2 for s_tmp in ascii_lowercase)
if val==0:
val=1
if val>2:
raise
print(val)
|
s612286938 | p03570 | u097479715 | 1508726291 | Python | Python (3.4.3) | py | Runtime Error | 219 | 14796 | 1158 | import sys
import re
import math
import bisect
#[left, right)の文字列を並び替えて回文が作れるかどうか
def is_pal(left, right):
n_odd = 0
n_even = 0
for c, locs in c_loc.items():
#各locsについて、left以上right未満である要素の数をカウント
l_idx = bisect.bisect_left(locs, left)
r_idx = bisect.bisect_left(locs, right)
n... |
s009775167 | p03570 | u112902287 | 1508726080 | Python | Python (3.4.3) | py | Runtime Error | 279 | 198424 | 699 | inf = float("inf")
def kaibun(x):
species = set(list(x))
lst = []
for char in species:
lst.append(x.count(char) % 2)
if lst.count(1) <= 1:
return 1
else:
return inf
def rec(curr, rest):
if (curr, rest) in memo.keys():
return memo[(curr, rest)]
if rest == "":
... |
s950423938 | p03570 | u112902287 | 1508725081 | Python | Python (3.4.3) | py | Runtime Error | 169 | 198416 | 559 | inf = float("inf")
def kaibun(x):
species = set(list(x))
lst = []
for char in species:
lst.append(x.count(char) % 2)
if lst.count(1) <= 1:
return 1
else:
return inf
def rec(curr, rest):
if rest == "":
return kaibun(curr)
else:
one_or_inf = kaibun(curr... |
s967737401 | p03570 | u033407970 | 1508724938 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1318 | #include <bits/stdc++.h>
#define REP(i,n) for(int i = 0; i < n; i++)
#define RREP(i, a, b) for (int i = a; i < (b); i++)
#define FOR(i, n) for (int i = n; i >= 0; i--)
using namespace std;
typedef long long ll;
int main(){
string in;
cin >> in;
ll n = in.length();
ll dp[n];
REP(i,n){
dp[i]... |
s495814956 | p03570 | u340781749 | 1508723227 | Python | Python (3.4.3) | py | Runtime Error | 3850 | 2060476 | 426 | from string import ascii_lowercase
import heapq
cd = {c: 1 << i for i, c in enumerate(ascii_lowercase)}
def solve(s):
queue = [(0, s)]
while queue:
n, s = heapq.heappop(queue)
if not s:
return n
b = 0
for i, c in enumerate(s):
b ^= cd[c]
if ... |
s843447406 | p03572 | u757805901 | 1508725716 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 220 | # -*- coding: utf-8 -*-
# 整数の入力
n = int(raw_input())
# スペース区切りの整数の入力
a = map(int, raw_input().split())
b = map(int, raw_input().split())
if len(a) == len(b):
def func(a, b):
if
|
s507828362 | p03573 | u656568465 | 1600719784 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8944 | 105 | a,b,c=map(int,input().split())
if a==b:
ans=c
elif b==c:
ans=a:
else:
ans=b
print(a+b+c-ans) |
s686642630 | p03573 | u752774573 | 1600487325 | Python | PyPy3 (7.3.0) | py | Runtime Error | 124 | 74476 | 95 | a,b,c=list(map(int,input().split()))
if a==b:
print(c)
elif b==c:
print(a)
eles:
print(b) |
s015416213 | p03573 | u343977188 | 1599710053 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9020 | 90 | a,b,c=map(int,input().split())
if a==b:
print(c)
elif b==c:
print(a):
else:
print(b) |
s112504756 | p03573 | u999503965 | 1599337306 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8948 | 379 | h,w=map(int,input().split())
l=[list(input()) for i in range(h)]
ans=[[0]*w for i in range(h)]
for i in range(h):
for j in range(w):
if l[i][j]=="#":
ans[i][j]=="#"
else:
for a in range(-1,2):
for b in range(-1,2):
if i+a<h and j+b<w ansl[i+a][j+b]=="#":
ans[i][j]+=... |
s928794151 | p03573 | u642012866 | 1598900607 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9024 | 103 | l = liet(map(int, input().split()))
for ll in l:
if l.count(ll)==1:
print(ll)
break |
s528745442 | p03573 | u031852574 | 1598653360 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8876 | 113 | a,b,c = map(int,input.split())
if a == b:
print(c)
elif a == c:
print(b)
else:
print(a)
|
s778394838 | p03573 | u031852574 | 1598653334 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9000 | 113 | a,b,c = map(int,input.split())
if a == b:
print(c)
elif a == c:
print(b)
else:
print(a)
|
s248825494 | p03573 | u808569469 | 1598643098 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9076 | 51 | a, b = map(int, input().split())
print(a ^ b ^ c)
|
s630118171 | p03573 | u620846115 | 1598642916 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9000 | 67 | a,b,c=map(int,input().split())
print(a if b=c else b if a=c else c) |
s667138092 | p03573 | u620846115 | 1598642864 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8924 | 65 | a,b,c=map(int,input().split())
print(a if b=c b elif a=c c else) |
s771075444 | p03573 | u763177133 | 1598039860 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9012 | 85 | a = map(int,input().split())
for i in a:
if a.count(i) > 1:
print(i)
break |
s778325005 | p03573 | u505830998 | 1598007507 | Python | PyPy3 (7.3.0) | py | Runtime Error | 97 | 74740 | 64 | al=list(map(int,input.split()))
al.sort()
print(sum(al)-al[1]*2) |
s672073638 | p03573 | u680851063 | 1597943891 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9016 | 52 | if a==b: print(c)
elif a==c: print(b)
else: print(a) |
s790366691 | p03573 | u556589653 | 1597501908 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9160 | 518 | h,w = map(int,input().split())
ls = []
side = [[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]]
for i in range(h):
ls.append(list(input()))
for i in range(h):
ans2 = ""
for j in range(w):
ans = 0
if ls[i][j] == "#":
ans2 += "#"
else:
for k in range(8):
if i+side[k][0] < 0 or ... |
s783950365 | p03573 | u556589653 | 1597501505 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9140 | 518 | h,w = map(int,input().split())
ls = []
side = [[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]]
for i in range(h):
ls.append(list(input()))
for i in range(h):
ans2 = ""
for j in range(w):
ans = 0
if ls[i][j] == "#":
ans2 += "#"
else:
for k in range(8):
if i+side[k][0] < 0 or ... |
s786207052 | p03573 | u556589653 | 1597498534 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9160 | 518 | h,w = map(int,input().split())
ls = []
side = [[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]]
for i in range(h):
ls.append(list(input()))
for i in range(h):
ans2 = ""
for j in range(w):
ans = 0
if ls[i][j] == "#":
ans2 += "#"
else:
for k in range(8):
if i+side[k][0] < 0 or ... |
s130332181 | p03573 | u193264896 | 1597409372 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9100 | 330 | import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
def main():
A, B, C == map(int, readline().split())
if A == B:
print(C)
elif B == C:
print(A)
else:
print(B)
if __name__ == '__main__':
... |
s650022678 | p03573 | u193264896 | 1597409352 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9100 | 334 | import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
def main():
A, B, C == map(int, readline().split())
if A == B:
print(C)
elif B == C:
print(A)
else:
print(bin())
if __name__ == '__main__... |
s856713508 | p03573 | u612635771 | 1595006132 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8896 | 88 | a, b, c = map(int, input().split())
print(a if b == c else b if a == c else c if a == b) |
s125338718 | p03573 | u612635771 | 1594939898 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8964 | 115 | a, b, c = map(int, input().split())
print(a if a not in [b, c] else b if b not in [a, c] else c if c not in [a, b]) |
s301434436 | p03573 | u113255362 | 1594867286 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9032 | 157 | List = list(map(int, input().split()))
res = 0
for i in range(3):
for j in range(i,3):
if List[i] == List[j]:
res = 6 - i+1 -j+1
print(List[res]) |
s484645730 | p03573 | u311592491 | 1593979490 | Python | Python (3.8.2) | py | Runtime Error | 20 | 9032 | 96 | A, B, C = map(int, input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s268486985 | p03573 | u311592491 | 1593979437 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9036 | 94 | A, B, C=map(int, input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s234053044 | p03573 | u311592491 | 1593979363 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9036 | 95 | A, B, C = map(int,input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s196882515 | p03573 | u311592491 | 1593979269 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8928 | 93 | A,B,C = map(int,input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s274179643 | p03573 | u311592491 | 1593979196 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8964 | 94 | A, B, C=map(int, input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s615263444 | p03573 | u311592491 | 1593979155 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9028 | 92 | A,B,C=map(int, input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s548893731 | p03573 | u311592491 | 1593979129 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9084 | 90 | A,B,C=map(int,input().slpit())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s388369932 | p03573 | u311592491 | 1593978422 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9160 | 105 | A=int(input())
B=int(input())
C=int(input())
if A==B:
print(C)
elif B==C:
print(A)
else:
print(B) |
s768470667 | p03573 | u311592491 | 1593978383 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9008 | 102 | A=int(input())
B=int(input())
C=int(input())
if A=B:
print(C)
elif B=C:
print(A)
else:
print(B) |
s517009666 | p03573 | u047931063 | 1593926109 | Python | PyPy3 (7.3.0) | py | Runtime Error | 96 | 74696 | 102 | A = list(map(int,input().split()))
B = set(A)
if A.count(B[0]) == 1:
print(B[0])
else:
print(B[1]) |
s721553511 | p03573 | u029000441 | 1593629631 | Python | PyPy3 (7.3.0) | py | Runtime Error | 97 | 74964 | 1504 | # coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect... |
s975743526 | p03573 | u634046173 | 1593034733 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9236 | 542 | def bakudanda (y,x):
if y < 0 or y >= len(s):
return 0
if x < 0 or x >= len(s[y]):
return 0
if s[y][x] == '#':
return 1
else:
return 0
H,W = map(int,input().split())
s=[]
for i in range(H):
s.append(input())
for i in range(len(s)):
a = s[i]
fp = ''
for j in range(len(a)):
if a[j] ... |
s234642135 | p03573 | u680503348 | 1592416113 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3316 | 1160 | # For taking integer inputs.
import math
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Str... |
s905961928 | p03573 | u626228246 | 1591985072 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | a,b,c =int(input())
if a == b:
print(c)
elif b == c:
print(a)
else:
print(b) |
s029665888 | p03573 | u757274384 | 1591575241 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | a,b,c = map(int, input().split())
if a==b:
print(c)
elif a==c:
print(b)
else b==c:
print(a) |
s171517216 | p03573 | u685244071 | 1591402483 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3316 | 100 | a, b, c = map(int, input().split())
if a == b:
input(c)
elif b == c:
input(a)
else:
input(b)
|
s670316092 | p03573 | u685244071 | 1591402460 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | a, b, c = map(int, input().split())
if a = b:
input(c)
elif b = c:
input(a)
else:
input(b) |
s490847121 | p03573 | u496687522 | 1590796968 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | A, B, C = map(int, input(),split())
if A == B:
print(C)
elif B == C:
print(A)
else:
print(B) |
s953928569 | p03573 | u658113376 | 1590273944 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1708 | import sys
def check(newLine, index, row, col):
count = 0
# 左と右
if index % col != 0:
if newLine[index - 1] == "#":
count += 1
if index % col != col - 1:
if newLine[index + 1] == "#":
count += 1
# 上と下
if index > col:
if newLine[index - col] == "#"... |
s355681553 | p03573 | u106778233 | 1590030972 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 117 | a=int(input())
b=int(input())
if a==b:
print(int(input()))
exit()
if int(input())==a:
print(b)
else:
print(a) |
s803098718 | p03573 | u730710086 | 1589862714 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 110 | # -*- coding: <encoding name> -*-
a, b, c = map(int, input())
print('a' if b ==c else 'b' if c == a else 'c') |
s751916437 | p03573 | u349600366 | 1589815796 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | A,B,C = map(int,input(),split())
print(A if B == C else B if A == C else C) |
s097697672 | p03573 | u350952439 | 1589778399 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | if a == b and a != c:
print(c)
elif a != b and a == c:
print(b)
else:
print(a) |
s684542965 | p03573 | u497952650 | 1589459868 | Python | PyPy3 (7.3.0) | py | Runtime Error | 81 | 68760 | 842 | from copy import deepcopy
def warshallfloyd(cost,V):
INF = float("inf")
for k in range(V):
for i in range(V):
for j in range(V):
if cost[i][k]!=INF and cost[k][j]!=INF:
cost[i][j] = min(cost[i][j], cost[i][k] + cost[k][j])
for i in cost:
if f... |
s503659168 | p03573 | u344813796 | 1589415496 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 386 | #Nはノード数、Mはエッジ数
n,m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(m)]
cnt=0
for x in ab:
ls=list(range(n))
for y in ab:
if y !=x:
for i in range(n)
ls=[ls[y[0]-1] if ls[i]==ls[y[1]-1] else ls[i] for i in range(n)] #bの値を根っこ(低い方a)にする
if len(set(ls)) !=1:
cn... |
s340762100 | p03573 | u165268875 | 1588728179 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 |
A, B, C = map(int, input().split())
print(C if A == B else B if A == C else A if B == C) |
s120507464 | p03573 | u115877451 | 1588446752 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | import Collections
a,b,c=map(int,input().split())
n=[a,b,c]
d,e=zip(*n.most_common())
d=list(d)
print(d[-1]) |
s513541868 | p03573 | u383450070 | 1588165418 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 77 | a,b,c=map(int,input().split())
print(a if b==c else b if a==c else c if a==b) |
s375377966 | p03573 | u852790844 | 1587580425 | Python | Python (3.4.3) | py | Runtime Error | 151 | 12508 | 214 | import sys
import numpy as np
readline = sys.stdin.readline
n = np.array(readline().split(), dtype=np.int64)
a = np.array(list(np.unique(n, return_counts=True))).T
ans = a[:,0][np.where(a[:,1] == 1)]
print(*ans) |
s840520441 | p03573 | u992910889 | 1587505350 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38256 | 229 | sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()
def resolve():
l=list(map(int,input().split()))
for i in l:
if l.count(i)==1:
print(i)
break
resolve() |
s442395932 | p03573 | u201802797 | 1587082934 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 560 | # solution
import io
import math
nim, mike = map(int, input().split())
data = [['.'] * (mike+2)]
data += [['.'] + list(input()) + ['.'] for _ in range(nim)]
data += [['.'] * (mike+2)]
result = []
for i in range(1, nim + 1):
strings = str()
for j in range(1, mike + 1):
counter = 0
if data[i][j] == '.':
... |
s897552926 | p03573 | u652656291 | 1586810622 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | L = list(map(int,input().split()))
M =L.sort()
if M[0]==M[1]:
print(M[2])
else:
print(M[0]) |
s142914670 | p03573 | u489959379 | 1586476823 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | a, b, c = map(int, input().split())
if a == b:
print(c)
elif a == c:
print(b)
elif b == c:
pritn(a) |
s825056980 | p03573 | u863370423 | 1586417059 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 234 | a=int(input("enter a"))
b=int(input("enter b"))
c=int(input("enter c"))
if a<=100 and a>=-100 and b<=100 and b>=-100 and c<=100 and c>=-100:
if a==b:
print(c)
elif a==c:
print(b)
elif c==b:
print(a) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.