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
s221718451
p03486
u933622697
1539230004
Python
Python (3.4.3)
py
Runtime Error
17
3064
361
s = sorted(input()) t = sorted(input(), reverse=True) len_s = len(s) len_t = len(t) n_passed = 0 for i in range(len_s): if s[i] < t[i]: print("Yes") exit() t = sorted(t) if len_s < len_t: for i in range(len_s): if s[i] == t[i]: n_passed += 1 if n_passed == len_s: ...
s672923767
p03486
u416964274
1538709443
Python
Python (3.4.3)
py
Runtime Error
17
3064
364
s = list(input()) t = list(input()) s.sort() t.sort() r = len(s) if len(s) < len(t) else len(t) for i in range(0, r): if (not s or not t): break if s.pop(i) == t.pop(i): continue elif s.pop(i) < t.pop(i): print("Yes") exit() else: print("No") exit() print...
s592564841
p03486
u416964274
1538709417
Python
Python (3.4.3)
py
Runtime Error
17
3064
325
s = list(input()) t = list(input()) s.sort() t.sort() r = len(s) if len(s) < len(t) else len(t) for i in range(0, r): if s.pop(i) == t.pop(i): continue elif s.pop(i) < t.pop(i): print("Yes") exit() else: print("No") exit() print("Yes") if len(s) < len(t) else print("...
s725022369
p03486
u416964274
1538708967
Python
Python (3.4.3)
py
Runtime Error
17
3064
327
s = list(input()) t = list(input()) s.sort() t.sort() r = len(s) if len(s) < len(t) else len(t) for i in range(0, r-1): if s.pop(i) == t.pop(i): continue elif s.pop(i) < t.pop(i): print("Yes") exit() else: print("No") exit() print("Yes") if len(s) < len(t) else print...
s855508190
p03486
u647656433
1537593429
Python
Python (3.4.3)
py
Runtime Error
16
2940
124
s,t = [i for i in input().split()] list(s).sort() list(t).sort(reverse = True) if s < t : print('Yes') else: print('No')
s008144486
p03486
u466478199
1537372103
Python
Python (3.4.3)
py
Runtime Error
17
2940
144
s=input() t=input() s.sort() T=t.sort()[::-1] L=sort([s,T]) if s==T: print('No') else: if L[0]==s: print('Yes') else: print('No')
s099738441
p03486
u879870653
1537227444
Python
Python (3.4.3)
py
Runtime Error
17
3064
1137
s = input() t = input() Alphabet = [] Alphabet.append("a") Alphabet.append("b") Alphabet.append("c") Alphabet.append("d") Alphabet.append("e") Alphabet.append("f") Alphabet.append("g") Alphabet.append("h") Alphabet.append("i") Alphabet.append("j") Alphabet.append("k") Alphabet.append("l") Alphabet.append("m") Alphabet....
s980739791
p03486
u932465688
1536537693
Python
Python (3.4.3)
py
Runtime Error
17
2940
128
s = list(input()) t = list(input()) p = s.sort() q = t.sort() r = q.reverse() if (p < r): print('Yes') else: print('No')
s366401702
p03486
u636311816
1535648280
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
s=sorted;print(['No','Yes'][s(input())<s(input())[-1]])
s276298802
p03486
u636311816
1535648145
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
s=sorted;print(['No','Yes'][s(input())<s(input())[-1]])
s925336639
p03486
u636311816
1535647584
Python
Python (3.4.3)
py
Runtime Error
17
2940
79
print('Yes') if input().sorted()<input().sorted(reversed=True) else:print('No')
s591865202
p03486
u363118893
1533494892
Python
Python (3.4.3)
py
Runtime Error
17
3060
247
s = str(input()) t = str(input()) sd = sorted(s) td = sorted(t, reverse=True) ans = "No" for i in range(len(sd)): if td[i] > sd[i]: ans = "Yes" break elif td[i] == sd[i]: pass else: break; print(ans)
s267032489
p03486
u690536347
1533049348
Python
Python (3.4.3)
py
Runtime Error
17
3060
138
a="".join(list(sorted(input()))) b="".join(list(sorted(input()))[::-1]) u=list(sorted(a,b)) if u[0]==a: print("Yes") else: print("No")
s390784509
p03486
u690536347
1533049287
Python
Python (3.4.3)
py
Runtime Error
17
2940
120
a="".join(sorted(input())) b="".join(sorted(input())[::-1]) u=sorted(a,b) if u[0]==a: print("Yes") else: print("No")
s592577813
p03486
u485716382
1533010856
Python
Python (3.4.3)
py
Runtime Error
17
2940
188
def solve(): s = input() t = input() s = sorted(s) t = sorted(t, reversed=True) if "".join(s) < "".join(t): print("Yes") else: print("No") solve()
s636625474
p03486
u409064224
1530659402
Python
Python (3.4.3)
py
Runtime Error
17
2940
113
s1 = input() s2 = input() s1.sort() s2.sort() s2 = s2[::-1] if s1 < s2: print("Yes") else: print("No")
s588420693
p03486
u506302470
1530469760
Python
Python (3.4.3)
py
Runtime Error
17
2940
215
#include<bits/stdc++.h> using namespace std; string s,t; int main(){ cin>>s>>t; sort(s.begin(),s.end()); sort(t.begin(),t.end(),greater<>()); if(s<t)puts("Yes"); else puts("No"); return 0; }
s503194602
p03486
u108808596
1529561846
Python
Python (2.7.6)
py
Runtime Error
10
2568
129
s=raw_input() t=raw_input() sa=''.join(sorted(s)) tz=''.join(sorted(t,reverse=True)) if sa < tz: print 'Yes' else: pritn 'No'
s917033336
p03486
u014741376
1527954161
Python
Python (3.4.3)
py
Runtime Error
31
4456
740
import random def main(): s = list(input()) t = list(input()) # randomize random.shuffle(s) random.shuffle(t) s_chr = "".join(s) t_chr = "".join(t) flag = 0 if len(s_chr) < len(t_chr): max_len = len(s_chr) elif len(t_chr)>len(s_chr): max_len = len(t_chr) el...
s311738356
p03486
u964998676
1526337471
Python
Python (3.4.3)
py
Runtime Error
17
2940
333
first = sorted(list(input(''))) second = sorted(list(input('')), reverse=True) length = len(first) < len(second) result = False check_equal = False for (f, s) in zip(first, second): check_equal = (s == f) if !check_equal: result = (f < s) break if (length and check_equal) or result: print('Yes') else: ...
s009690619
p03486
u050428930
1525316846
Python
Python (3.4.3)
py
Runtime Error
17
2940
149
s=sorted(input()) t=sorted(input(),reverse=True) if s==t: print("No") exit() a=sorted([s,t]) if a[0]==s: print("Yes") else: print("No")
s483697039
p03486
u591295155
1524771760
Python
Python (3.4.3)
py
Runtime Error
17
2940
69
s = input() t = input() print(["No", "Yes"][s.sort()<t.sort()[::-1]])
s462354843
p03486
u443630646
1524611703
Python
Python (3.4.3)
py
Runtime Error
17
2940
271
s = list(input()) s.sort() t = list(input()) t.sort(reverse=True) if s == t: print('No') else: j = 0 for i in s: if i < t[j]: print('Yes') break if i > t[j]: print('No') break j += 1
s382067021
p03486
u915214301
1522582976
Python
Python (3.4.3)
py
Runtime Error
17
2940
621
from itertools import zip_longest def twoAnagrams(s, t): s_str = ''.join(sorted(s)) t_str = ''.join(sorted(t, reverse=True)) if t_str.startswith(s_str): if len(s_str) < len(t_str): return True # this implies s and t is the same string else: return False ...
s294416872
p03486
u915214301
1522582674
Python
Python (3.4.3)
py
Runtime Error
19
3188
585
from itertools import zip_longest def twoAnagrams(s, t): s_str = ''.join(sorted(s)) t_str = ''.join(sorted(t, reverse=True)) if t_str.startswith(s_str): if len(s_str) < len(t_str): return True # this implies s and t is the same string else: return False ...
s779188908
p03486
u632369368
1521660193
Python
Python (3.4.3)
py
Runtime Error
17
3060
176
s = input() t = input() ss = list(s) tt = list(input()) ss.sort() tt.sort(reverse=True) s1 = ''.join(ss) t1 = ''.join(tt) if s1 < t1: print('Yes') else: print('No')
s029478447
p03486
u729707098
1521328430
Python
Python (3.4.3)
py
Runtime Error
17
3064
420
s = input() t = input() slist,tlist = [],[] for i in s: slist.append(i) for i in t: tlist.append(i) slist.sort() tlist.sort() tlist = tlist[::-1] for j in range(min(len(slist),len(tlist))): if ord(slist[j]) < ord(tlist[j]): print("Yes") break elif ord(slist[j]) > ord(tlist(j)): print("No") break else: if...
s103577015
p03486
u321354941
1520537823
Python
Python (3.4.3)
py
Runtime Error
17
3064
259
s = list(str(input())) t = list(str(input())) s.sort() t.sort() t.reverse() if len(s)==len(t) or len(s) > len(y): if s < t: print("Yes") else: print("No") elif len(s) < len(t): if s < t or s == t: print("Yes") else: print("No") else: print("No")
s782970368
p03486
u803647747
1519781588
Python
Python (3.4.3)
py
Runtime Error
17
2940
229
s_input_sort = sorted(list(str(input()))) t_input_sort = sorted(list(str(input())), reverse=True) s_str = "".join(s_input_sort) t_str = "".join(t_input_sort) if t_str >= s_str: print("Yes") else: print("No")
s788368051
p03486
u319612498
1519450254
Python
Python (3.4.3)
py
Runtime Error
17
3060
183
import sys s=input() t=input() s=sorted(list(s)) t=sorted(list(t))[::-1] sum=0 for i in range(len(s)): if ord(s[i])<ord(t[i]): print("Yes") sys.exit() print("No")
s256723409
p03486
u319612498
1519450044
Python
Python (3.4.3)
py
Runtime Error
17
3060
184
import sys s=input() t=input() s=sorted(list(s)) t=sorted(list(t))[::-1] sum=0 for i in range(len(s)): if chr(s[i])<chr(s[t]): print("Yes") sys.exit() print("No")
s913866283
p03486
u820351940
1519090617
Python
Python (3.4.3)
py
Runtime Error
19
3192
107
a = list(input()) b = list(input()) a.sort() b.sort() print("Yes" if "".join(a) < "".join(b) else "No")
s443602827
p03486
u030726788
1518930198
Python
Python (3.4.3)
py
Runtime Error
17
3064
326
import sys a=input() b=input() c=[] d=[] for i in range(len(a)): c.append(a[i]) for i in range(len(b)): d.append(b[i]) c.sort() d.reverse() for i in range(len(a)): if(c[i]<d[i]): print("Yes") sys.exit() if(len(a)<len(b)): if(a==b[0:len(a)]): print("Yes") sys.exit() print...
s801589172
p03486
u030726788
1518929481
Python
Python (3.4.3)
py
Runtime Error
17
3064
360
import sys a=input() b=input() """ if(len(a)>len(b)): print("Yes") sys.exit() elif(len(a)<len(b)): print("No") sys.exit() else: """ c=[] d=[] for i in range(len(a)): c.append(a[i]) for i in range(len(b)): d.append(b[i]) c.sort() d.reverse() for i in range(len(a)): if(c[i]<d[i]): pri...
s934364342
p03486
u667949809
1518838025
Python
Python (3.4.3)
py
Runtime Error
17
3060
246
s = list(input()) t = list(input()) N = len(s) M = len(t) s.sort() t.reverse() if N < M and s == t[:N]: print("Yes") else: for i in range(N): if s[i] < t[i]: print("Yes") break else: print("No")
s823259052
p03486
u377301040
1518165824
Python
Python (3.4.3)
py
Runtime Error
19
2940
125
s=input() t=input() s1="".join(sorted(s)); t1="".join(sorted(t, reverse=true)) if s1<t1: print("Yes\n") else: print("No\n")
s077893994
p03486
u711985352
1517768095
Python
Python (3.4.3)
py
Runtime Error
17
2940
1046
#include <cstdio> #include <iostream> #include <string> #include <vector> #include <sstream> #include <map> #include <set> #include <queue> #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <typeinfo> #include <numeric> using namespace std; using ll = long long; const ll INF = 1e...
s606044898
p03486
u350179603
1516513166
Python
Python (3.4.3)
py
Runtime Error
18
3064
411
s = list(input().strip()) s.sort() t = list(input()) t.reverse() a = [chr(i) for i in range(97, 97+26)] cnt = 0 for i in range(len(s)): if a.index(s[i]) < a.index(t[i]): print("Yes") break elif a.index(s[i]) > a.index(t[i]): print("No") break elif a.index(s[i]) == a.index(t[i]): cnt += 1 ...
s592911397
p03486
u140251125
1515180233
Python
Python (3.4.3)
py
Runtime Error
18
2940
120
import math s = list(input()) t = list(input()) s.sorted() t.sorted() if s < t: print('Yes') else: print('No')
s707820651
p03486
u401093859
1514756481
Python
Python (3.4.3)
py
Runtime Error
19
3064
1369
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) condition = 0 s.sort() t.sort() t.reverse() if len(s) == len(t): length = len(s) pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pa...
s728996800
p03486
u401093859
1514756096
Python
Python (3.4.3)
py
Runtime Error
17
3064
1349
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) condition = 0 s.sort() t.sort() t.reverse() if len(s) == len(t): pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: for...
s202290909
p03486
u401093859
1514755844
Python
Python (3.4.3)
py
Runtime Error
17
3064
1337
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) condition = 0 s.sort() t.sort() t.reverse() if len(s) == len(t): pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: for...
s539339255
p03486
u401093859
1514755734
Python
Python (3.4.3)
py
Runtime Error
17
3064
1345
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) condition = 0 s.sort() t.sort() t.reverse() if len(s) == len(t): pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: for...
s157917033
p03486
u401093859
1514755649
Python
Python (3.4.3)
py
Runtime Error
18
3064
1294
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) condition = 0 s.sort() t.sort() t.reverse() if len(s) == len(t): pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: for...
s736583147
p03486
u401093859
1514755551
Python
Python (3.4.3)
py
Runtime Error
18
3064
1095
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) s.sort() t.sort() t.reverse() if len(s) == len(t): length =len(s) pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: ...
s647120968
p03486
u401093859
1514755249
Python
Python (3.4.3)
py
Runtime Error
18
3064
1076
#sを最高のパターンにして,tを最悪のパターンにすればいい #continueで強制的に次のループへ s = list(input()) t = list(input()) s.sort() t.sort() t.reverse() if len(s) == len(t): pattern == -1 elif len(s) < len(t): length = len(s) pattern = 0 else:#sのほうが長い時 pattern = 1 length = len(t) pattern = 1 if pattern == -1: for i in range(le...
s059021746
p03486
u463059138
1514453940
Python
Python (3.4.3)
py
Runtime Error
17
3064
402
s = input() t = input() list_s = list(s) list_s.sort() list_t = list(t) list_t.sort(reverse=True) yes = False if len(list_s) < len(list_t): yes = True for i in range(len(list_s)): if len(list_t) < i: break if list_s[i] < list_t[i]: yes = True break elif list_s[i] > list_t[i]:...
s160689451
p03486
u877269263
1513866868
Python
Python (2.7.6)
py
Runtime Error
12
2820
84
s = sorted(raw_input()) t = sroted(raw_input())[::-1] print "Yes" if s < t else "No"
s043990510
p03486
u359856428
1513630829
Python
Python (3.4.3)
py
Runtime Error
17
2940
143
s = input() t = input() s_2 = "".join(sorted(s)) t_2 = "".join(sorted(t,reverse = True) if s_2 < t_2 : print("Yes") else: print("No")
s943244470
p03486
u359856428
1513630778
Python
Python (3.4.3)
py
Runtime Error
17
2940
143
s = input() t = input() s_2 = "".join(sorted(s)) t_2 = "".join(sorted(t,reverse = True) if(s_2 < t_2): print("Yes") else: print("No")
s903197480
p03486
u359856428
1513629851
Python
Python (3.4.3)
py
Runtime Error
17
2940
143
s = input() t = input() s_2 = "".join(sorted(s)) t_2 = "".join(sorted(t,reverse = True) if(s_2 < t_2): print("YES") else: print("NO")
s517672952
p03486
u110427890
1513541764
Python
Python (2.7.6)
py
Runtime Error
11
2696
668
a = raw_input() b = raw_input() a = "".join( sorted( list(a) ) ) b = "".join( sorted( list(b) ) ) yes = True printed = False if len(a) < len(b): i = 0 while i < len(a): if a[i] != b[i]: yes = False break i += 1 if yes: print "Yes" printed = True if...
s724477672
p03486
u110427890
1513541541
Python
Python (2.7.6)
py
Runtime Error
10
2692
653
a = raw_input() b = raw_input() a = "".join( sorted( list(a) ) ) b = "".join( sorted( list(b) ) ) yes = True printed = False if len(a) < len(b): i = 0 while i < len(a): if a[i] != b[i]: yes = False break i += 1 if yes: print "Yes" printed = True if...
s897700564
p03486
u110427890
1513541141
Python
Python (2.7.6)
py
Runtime Error
12
2696
713
a = raw_input() b = raw_input() a = "".join( sorted( list(a) ) ) b = "".join( sorted( list(b) ) ) yes = True printed = False if len(a) < len(b): i = 0 while i < len(a): if a[i] != b[i]: yes = False break i += 1 if yes: print "Yes" printed = True if...
s998111642
p03486
u562016607
1513487942
Python
Python (3.4.3)
py
Runtime Error
17
2940
139
s=list(input()) t=list(input()) ss=''.join(sorted(ss)) tt=''.join(sorted(tt,reverse=true)) if ss<tt: print("Yes") else: print("No")
s180709991
p03486
u562016607
1513487736
Python
Python (3.4.3)
py
Runtime Error
18
2940
139
s=list(input()) t=list(input()) ss=''+join(sorted(ss)) tt=''+join(sorted(tt,reverse=true)) if ss<tt: print("Yes") else: print("No")
s905949526
p03486
u363215066
1513482512
Python
Python (2.7.6)
py
Runtime Error
11
2568
548
s = raw_input() t = raw_input() flag = 0 outflag = 0 yflag = 0 for i in range(len(s)): for j in range(len(t)): if ord(t[j])>ord(s[i]): print "Yes" flag = 1 outflag=1 yflag = 1 break elif ord(t[j])<ord(s[i]): flag = 0 elif ord(t[j])==ord(s[i]): flag = 1 break if flag == 0: print "No"...
s340282224
p03486
u363215066
1513482481
Python
Python (2.7.6)
py
Runtime Error
10
2568
547
s = raw_input() t = raw_input() flag = 0 outflag = 0 yflag = 0 for i in range(len(s)): for j in range(len(t)): if ord(t[j])>ord(s[i]): print "Yes" flag = 1 outflag=1 yflag = 1 break elif ord(t[j])<ord(s[i]): flag = 0 elif ord(t[j])==ord(s[i]): flag = 1 break if flag == 0: print "No"...
s430150232
p03486
u767873777
1513481744
Python
Python (3.4.3)
py
Runtime Error
18
3064
450
#! /usr/bin/env python # coding: utf-8 import math def slove(s, t): if s == t: return "No" while (True): if min(s) == max(t): s.remove(min(s)) t.remove(max(t)) else: break if len(s) == 0: return "Yes" if min(s) < max(t): ...
s759168190
p03486
u767873777
1513481151
Python
Python (3.4.3)
py
Runtime Error
18
3060
398
#! /usr/bin/env python # coding: utf-8 import math def slove(s, t): if s == t: return "No" while (True): if min(s) == max(t): s.remove(min(s)) t.remove(max(t)) else: break if min(s) > max(t): return "No" return "Yes" if __name__ == ...
s265674537
p03486
u628758223
1513480694
Python
Python (3.4.3)
py
Runtime Error
19
3060
125
s, t = input().split() s = list(s) s.sort() t = list(t) t.sort(reverse = True) if t>s: print('Yes') else: print('No')
s741589950
p03486
u227791232
1513479918
Python
Python (3.4.3)
py
Runtime Error
18
3192
2073
#!/user/bin/python # coding: UTF-8 s = input() t = input() s_list = list(s) t_list = list(t) def a2n(alfabet): for i in range(len(alfabet)): if alfabet[i] == 'a': alfabet[i] = 1 elif alfabet[i] == 'b': alfabet[i] = 2 elif alfabet[i] == 'c': alfabet[i] = ...
s226723082
p03486
u227791232
1513479820
Python
Python (3.4.3)
py
Runtime Error
17
3192
2073
#!/user/bin/python # coding: UTF-8 s = input() t = input() s_list = list(s) t_list = list(t) def a2n(alfabet): for i in range(len(alfabet)): if alfabet[i] == 'a': alfabet[i] = 1 elif alfabet[i] == 'b': alfabet[i] = 2 elif alfabet[i] == 'c': alfabet[i] = ...
s027671950
p03486
u257974487
1513479221
Python
Python (3.4.3)
py
Runtime Error
17
3064
362
s = input() t = input() p = [] q = [] m = len(s) n = len(t) if m >= n: ans = "No" else: ans = "Yes" for i in range(m): p.append(s[i]) p.sort() for j in range(n): q.append(t[j]) for k in range(min(m,n)+1): if ord(p[k]) < ord(q[k]): ans = "Yes" break elif ord(p[k]) > ord(q[k]): ...
s632207725
p03486
u813450984
1513478763
Python
Python (3.4.3)
py
Runtime Error
17
3064
436
s = list(input()) t = list(input()) def f(s, t): s.sort() t.sort(reverse=True) s_sum = 0 t_sum = 0 for i in range(len(s)): s[i] = ord(s[i]) for i in range(len(t)): t[i] = ord(t[i]) for i in range(len(s)): s_sum += s[i] t_sum += t[i] if s_sum < t_sum: return 'Yes' eli...
s572404892
p03486
u813450984
1513478617
Python
Python (3.4.3)
py
Runtime Error
17
3064
471
s = list(input()) t = list(input()) def f(s, t): s.sort() t.sort(reverse=True) s_sum = 0 t_sum = 0 for i in range(len(s)): s[i] = ord(s[i]) for i in range(len(t)): t[i] = ord(t[i]) for i in range(len(s)): s_sum += s[i] t_sum += t[i] if s_sum < t_sum: return 'Yes' eli...
s040862784
p03486
u813450984
1513478232
Python
Python (3.4.3)
py
Runtime Error
19
3064
287
s = list(input()) t = list(input()) def f(s, t): s.sort() t.sort(reverse=True) for i in range(len(s)): if s[i] < t[i]: return 'Yes' elif s[i] > t[i]: return 'No' elif i + 1 >= len(s) and not i + 1 >= len(t): return 'No' return 'No' print(f(s, t))
s412711852
p03486
u774411119
1513478080
Python
Python (3.4.3)
py
Runtime Error
17
2940
211
A=list(input()) B=list(input()) minm=min(A) maxi=max(B) while min(len(A),len(B))!=0: if minm<maxi: print("Yes") break if minm==maxi: A.remove(minm) B.remove(maxi) if minm>maxi: print("No") break
s203272400
p03486
u813450984
1513477883
Python
Python (3.4.3)
py
Runtime Error
18
3064
288
s = list(input()) t = list(input()) def f(s, t): s.sort() t.sort(reverse=True) for i in range(len(s)): if s[i] < t[i]: return 'Yes' elif s[i] > t[i]: return 'No' elif i + 1 >= len(s) and not i + 1 >= len(t): return 'Yes' return 'No' print(f(s, t))
s897207262
p03486
u813450984
1513477566
Python
Python (3.4.3)
py
Runtime Error
17
3064
289
s = list(input()) t = list(input()) def f(s, t): s.sort() t.sort(reverse=True) for i in range(len(s)): if s[i] < t[i]: return 'Yes' elif s[i] > t[i]: return 'No' elif i + 1 >= len(s) and not i + 1 >= len(t): return 'Yes' return 'No' print(f(s, t))
s395835257
p03486
u767873777
1513477424
Python
Python (3.4.3)
py
Runtime Error
18
3064
350
#! /usr/bin/env python # coding: utf-8 import math def slove(s, t): s = sorted(s) t = sorted(t) for i in range(len(s)-1): if s[i] > t[i]: return "No" if s[len(s)-1] >= t[len(s)-1]: return "No" return "Yes" if __name__ == "__main__": s = list(input()) t = list(i...
s490884183
p03486
u439009525
1513477183
Python
Python (3.4.3)
py
Runtime Error
17
2940
164
S = input() T = input() # S = "cd" # T = "abc" sS = "".join(sorted(S)) sT = "".join(sorted(T, reverse = True)) if (sS < sT): print("Yes") else: print("No")
s037842394
p03486
u767873777
1513477074
Python
Python (3.4.3)
py
Runtime Error
17
3060
338
#! /usr/bin/env python # coding: utf-8 import math def slove(s, t): s = sorted(s) t = sorted(t) for i in range(len(s)): if s[i] < t[i]: return "Yes" if len(s) < len(t): return "Yes" return "No" if __name__ == "__main__": s = list(input()) t = list(input()) ...
s527190236
p03486
u767873777
1513476895
Python
Python (3.4.3)
py
Runtime Error
1624
21908
372
#! /usr/bin/env python # coding: utf-8 import numpy as np import math def slove(s, t): s = sorted(s) t = sorted(t) for i in range(len(s)): if s[i] < t[i]: return "Yes" if len(s) < len(t): return "Yes" return "No" return 0 if __name__ == "__main__": s = list(in...
s353634594
p03486
u274907892
1513476894
Python
Python (3.4.3)
py
Runtime Error
17
2940
149
s, t = map(str, input().split()) listS = list(s) listT = list(t) sorted(listS) sorted(listT) if listS > listT: print("Yes") else: print("No")
s676206370
p03486
u352499693
1513476214
Python
Python (2.7.6)
py
Runtime Error
10
2568
107
s = raw_input() t = raw_input() if sorted(*s) < sorted(*t, reverse=True): print 'Yes' else: print 'No'
s005679625
p03487
u342869120
1600831700
Python
PyPy3 (7.3.0)
py
Runtime Error
107
90772
232
N = int(input()) *a, = map(int, input().split()) M = 10**5+1 b = [0]*(M+1) for i in range(N): b[a[i]] += 1 ans = 0 for i in range(1, M+1): if i > b[i]: ans += b[i] elif i < b[i]: ans += b[i]-i print(ans)
s182990954
p03487
u342869120
1600831657
Python
PyPy3 (7.3.0)
py
Runtime Error
109
90432
220
N = int(input()) *a, = map(int, input().split()) b = [0]*(N+1) for i in range(N): b[a[i]] += 1 ans = 0 for i in range(1, N+1): if i > b[i]: ans += b[i] elif i < b[i]: ans += b[i]-i print(ans)
s291305327
p03487
u620846115
1600543031
Python
Python (3.8.2)
py
Runtime Error
62
21868
210
n = int(input()) alist = list(map(int,input().split())) from collections import Counter adic = Counter(alist) count = 0 for k,v in adic: if int(k) <= v: count+=(v-int(k)) else: count+=v print(count)
s280021116
p03487
u620846115
1600542898
Python
Python (3.8.2)
py
Runtime Error
63
21884
232
n = int(input()) alist = list(map(int,input().split())) from collections import Counter adic = Counter(alist) count = 0 for key,value in adic: if int(key) <= value: count+=(value-int(key)) else: count+=value print(count)
s579400755
p03487
u620846115
1600542803
Python
Python (3.8.2)
py
Runtime Error
29
8928
232
n = int(input()) alist = list(map(int,input().split())) from collections import Counter adic = Counter(alist) count = 0 for key,value in adic: if int(key) =< value: count+=(value-int(key)) else: count+=value print(count)
s690710143
p03487
u620846115
1600542747
Python
Python (3.8.2)
py
Runtime Error
26
8976
224
n = int(input()) alist = list(map(int,input())) from collections import Counter adic = Counter(alist) count = 0 for key,value in adic: if int(key) =< value: count+=(value-int(key)) else: count+=value print(count)
s640001964
p03487
u672316981
1600138526
Python
Python (3.8.2)
py
Runtime Error
108
20652
818
def main(): n = int(input()) a_lst = list(map(int, input().split())) a_lst.sort() a_set_lst = list(set(a_lst)) a_set_lst.sort() count_lst = [] count = 1 if n == 1: count_lst.append(count) else: for i in range(n - 1): a1 = a_lst[i] a2 = a_lst[i...
s029224390
p03487
u074220993
1598728626
Python
Python (3.8.2)
py
Runtime Error
73
20564
256
N = input() A = sorted([int(x) for x in input().split()]) import bisect as bs ans = 0 f = lambda X, x: bs.bisect_right(X,x) - bs.bisect_left(X.x) for a in set(A): cnt = f(A,a) if cnt < a: ans += cnt else: ans += cnt-a print(ans)
s464806718
p03487
u548514780
1597032342
Python
Python (3.8.2)
py
Runtime Error
2206
20604
501
N=int(input()) numbers=list(map(int,input().split())) if len(numbers)==1: print(1) exit() counter=0 counter_2=0 for i in range(len(numbers)): if numbers[i]>len(numbers): numbers.pop(i) for i in range(1000): if numbers.count(i)==i: counter_2+=i elif numbers.count(i) != i: if numbers.count(i) > i...
s141334662
p03487
u780698286
1596678551
Python
Python (3.8.2)
py
Runtime Error
27
8944
17
8 2 7 1 8 2 8 1 8
s603004191
p03487
u758738963
1596379819
Python
PyPy3 (7.3.0)
py
Runtime Error
93
74752
381
import numpy as np # input N = int(input().split()[0]) sequence = np.array(list( map(int, input().split()) )) # a_N>N must be removed remove = np.sum(sequence>N) sequence = sequence[sequence<=N] index = np.unique(sequence) for idx in index: n_idx = np.sum(sequence==idx) if n_idx < idx: remove += n_...
s961742946
p03487
u758738963
1596379649
Python
PyPy3 (7.3.0)
py
Runtime Error
114
74584
375
import numpy as np # input N = int(input().split()) sequence = list( map(int, input().split()) ) # a_N>N must be removed remove = np.sum(sequence>N) sequence = sequence[sequence<=N] index = np.unique(sequence) for idx in index(sequence): n_idx = np.sum(sequence==idx) if n_idx < idx: remove += n_idx...
s985524890
p03487
u759412327
1595298206
Python
Python (3.8.2)
py
Runtime Error
79
20724
226
N = int(input()) A = list(map(int,input().split())) B = 10**5*[0] ans = 0 for a in A: if a<=10**5: B[a]+=1 else: ans+=1 for n in range(10**5): if B[n]<n: ans+=B[n] elif n<B[n]: ans+=B[n]-n print(ans)
s981584277
p03487
u327532412
1594666192
Python
Python (3.8.2)
py
Runtime Error
68
21568
267
N = int(input()) *A, = map(int, input().split()) dic = {} for a in A: if a in dic: dic[a] += 1 else: dic[a] = 1 for k, v in dic.items(): if k == v: continue elif k > v: ans += v else: ans += v - k print(ans)
s547870342
p03487
u587589241
1592873467
Python
Python (3.8.2)
py
Runtime Error
82
20668
241
n=int(input()) a=list(map(int,input().split())) l=[0 for i in range(100001)] ans=0 for i in range(n): l[a[i]]+=1 for i in range(100001): if 0<l[i]<i: ans+=l[i] if i<l[i]: t=l[i]-i ans+=t print(ans)
s990157331
p03487
u789565565
1592361633
Python
Python (3.4.3)
py
Runtime Error
17
3060
234
n = int(input()) A = Counter(list(map(int,input().split()))) keys,counts = zip(*A.most_common()) total = 0 for key,count in zip(keys,counts): if key > count: total += count else: total += count-key print(total)
s130604468
p03487
u761062383
1592095305
Python
Python (3.4.3)
py
Runtime Error
80
18676
320
def resolve(): from collections import defaultdict N = int(input()) A = [int(i) for i in input().split()] dic = defaultdict(int) for a in A: dic[a] += 1 ans = 0 for k, v in dic: if k <= v: ans += v - k else: ans += v print(ans) resolve()
s752147010
p03487
u185424824
1591984576
Python
PyPy3 (2.4.0)
py
Runtime Error
220
63984
283
N = int(input()) a = list(map(int,input().split())) check = [0] * N ans = 0 for i in range(N): if a[i] > 10**5: ans += 1 else: check[a[i]-1] += 1 for j in range(N): if j+1 > check[j]: ans += check[j] elif j + 1 < check[j]: ans += check[j] -j - 1 print(ans)
s959112050
p03487
u954774382
1591294454
Python
Python (3.4.3)
py
Runtime Error
106
20044
1141
import sys from functools import lru_cache, cmp_to_key from heapq import merge, heapify, heappop, heappush from math import * # import math from collections import defaultdict as dd, deque, Counter as C from itertools import combinations as comb, permutations as perm from bisect import bisect_left as bl, bisect_right a...
s198779105
p03487
u922449550
1590502765
Python
Python (3.4.3)
py
Runtime Error
22
5548
159
from collections import Counter N = int(input()) c = Counter(list(map(int, input()))) ans = 0 for k in c: ans += d[k] - k if k <= d[k] else d[k] print(ans)
s920632532
p03487
u686036872
1589076029
Python
Python (3.4.3)
py
Runtime Error
60
18672
208
from collections import Counter N = int(input()) a = list(map(int, input().split())) c = Counter(a) ans = 0 for k, v in c.values(): if k > v: ans += v else: ans += (v-k) print(ans)
s446357733
p03487
u798260206
1588787413
Python
Python (3.4.3)
py
Runtime Error
97
19060
240
import collections N = int(input()) a = sorted(list(map(int,input().split()))) A = collections.Counter(a) cnt = 0 for i in A: # print(i) if i[0]<i[1]: cnt=cnt+i[1]-i[0] if i[0]>i[1]: cnt=cnt+i[1] print(cnt)
s162809347
p03487
u017415492
1588647879
Python
Python (3.4.3)
py
Runtime Error
94
14692
221
n=int(input()) a=list(map(int,input().split())) d=[0]*(10**5+1) ans=0 for i in range(len(a)): if d[i]<=10**5: d[a[i]]+=1 for i in range(1,len(d)): if d[i]>i: ans+=d[i]-i elif d[i]<i: ans+=d[i] print(ans)
s672711293
p03487
u017415492
1588647823
Python
Python (3.4.3)
py
Runtime Error
90
15260
201
n=int(input()) a=list(map(int,input().split())) d=[0]*(10**5+1) ans=0 for i in range(len(a)): d[a[i]]+=1 for i in range(1,len(d)): if d[i]>i: ans+=d[i]-i elif d[i]<i: ans+=d[i] print(ans)