problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03834
u777394984
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = Input()\nr1 = s[0:4]\nr2 = s[6:12]\nr3 = s[14:]\nprint("{} {} {}".format(r1, r2, r3))', 'a,b,c = map(str,input().split(","))\nprint(a + " " + b + " " + c)']
['Runtime Error', 'Accepted']
['s400519945', 's578919193']
[3064.0, 2940.0]
[17.0, 18.0]
[85, 64]
p03834
u779455925
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['print([" " if i=="," or i for i in input()])\n', 'print("".join([" " if i=="," else i for i in input()]))']
['Runtime Error', 'Accepted']
['s738103278', 's922680349']
[2940.0, 2940.0]
[17.0, 17.0]
[45, 55]
p03834
u786020649
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s=input()\n\ns[5]=' '\ns[13]=' '\n\nprint(s)", "s=input()\n\nprint(s.replace(',',' '))"]
['Runtime Error', 'Accepted']
['s292597715', 's070338583']
[8868.0, 8972.0]
[22.0, 28.0]
[39, 36]
p03834
u787562674
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['input().replace(",", " ")', 'print(input().replace(",", " "))']
['Wrong Answer', 'Accepted']
['s515925241', 's380076977']
[2940.0, 2940.0]
[17.0, 17.0]
[25, 32]
p03834
u798129018
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = input()\ns[5] = " "\ns[13] = " "\nprint(s)\n\n', 's = list(input())\ns[5] = " "\ns[13] = " "\nans = map(str,s)\n\nprint("".join(ans))']
['Runtime Error', 'Accepted']
['s046587880', 's872574528']
[2940.0, 2940.0]
[17.0, 18.0]
[45, 78]
p03834
u798316285
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a=input()\nprint(a[0:5],a[6:13],a[13:18])', 'a=input()\nprint(a[0:4],a[6:12],a[13:17])', 'a=input()\nprint(a[0:5],a[6:13],a[14:19])\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s296557856', 's312918714', 's416435080']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[40, 40, 41]
p03834
u808569469
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a = input()\nprint(a.split(","))', 's = input()\nprint(s.replace(","," "))']
['Wrong Answer', 'Accepted']
['s360014303', 's085842292']
[8936.0, 9008.0]
[31.0, 27.0]
[31, 37]
p03834
u811000506
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['K, S = map(int,input().split())\ncount = 0\nfor x in range(0,K+1,1):\n for y in range(0,K+1,1):\n z = S - x - y\n print(x,y,z)\n if x+y+z == S and z <= K and z >= 0:\n count += 1\nprint(count)', 's = str(input())\ns=s.replace(","," ")\nprint(s)']
['Runtime Error', 'Accepted']
['s721173779', 's606134707']
[3060.0, 2940.0]
[17.0, 18.0]
[199, 46]
p03834
u811967730
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['K, S = map(int, input().split())\ncount = 0\n\nfor x in range(K + 1):\n for y in range(K + 1):\n z = S - (x + y)\n if 0 <= z and z <= K:\n count += 1\n\nprint(count)\n', 's = input()\n\nprint(s.replace(",", " "))\n']
['Runtime Error', 'Accepted']
['s665224175', 's306907450']
[2940.0, 2940.0]
[17.0, 17.0]
[185, 40]
p03834
u816631826
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["\nprint(s.replace(',', ' '))", 's=str(input("enter a statment))\nz=s.replace(","," ")\nprint(z)', 'word ="happy,newyear,enjoy "\ny = word.replace(\',\' , \' \')\nprint(y)\n', 'string = input("Enter a string separated by commas: ")\nnew_string = string.replace(",", " ",string.count(","))\nprint(new_string)', 's=\' \'\...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s255503994', 's398796147', 's399595951', 's585089199', 's346477226']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 19.0, 18.0]
[92, 61, 66, 128, 52]
p03834
u821588465
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s= input().split(",")\nprint(*s, sep="")', 's = input().split(\',\')\nprint(*s, sep="")', 'print(*input().split(\',\'), sep = "")', 'print(*input().split(","))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s143345750', 's220439374', 's944531650', 's719116611']
[2940.0, 2940.0, 3064.0, 2940.0]
[17.0, 17.0, 18.0, 17.0]
[40, 40, 36, 26]
p03834
u821775079
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=list(input.split(","))\nprint(*s)', 's=input.split(",")\nprint(*s)', 's=input().split(",")\nprint(*s)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s171557804', 's230841907', 's846424574']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[34, 28, 30]
p03834
u822738981
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['# -*- coding: utf-8 -*-\n\nk, s = map(int, input().split())\n\nans = 0\n\nfor i in range(k+1):\n for j in range(k+1):\n k2 = s - j - i\n if 0 <= k2 <=k:\n ans += 1\n\n \n # if k2 > k or k2 < 0:\n # continue\n \n # ans += 1\n\nprint(ans)\n', "# -*-...
['Runtime Error', 'Accepted']
['s066205951', 's944035340']
[2940.0, 2940.0]
[17.0, 17.0]
[325, 64]
p03834
u835575472
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = input();\ns.replace(",", " ")\nprint(s)', 's = input()\nprint(s.replace(",", " "))']
['Wrong Answer', 'Accepted']
['s393594815', 's212387228']
[9052.0, 8976.0]
[24.0, 29.0]
[41, 38]
p03834
u842028864
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['print(*list[input().split(",")])', 'a,b.c = input().split(",")\nprint(a,b,c)', 'print(*list(input().split(",")))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s259852955', 's595154243', 's398489300']
[9076.0, 3064.0, 9012.0]
[24.0, 17.0, 31.0]
[32, 39, 32]
p03834
u842696304
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['happy,newyear,enjoy', "print(input().replace(',', ' '))"]
['Runtime Error', 'Accepted']
['s875121191', 's755291496']
[2940.0, 2940.0]
[17.0, 17.0]
[19, 32]
p03834
u845620905
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a = input().split(\',\')\nans = ""\nfor i in a:\n ans += a[i] + " "\nans -= " "\nprint(ans)', 'a = input().replace(",", " ")\nprint(a)']
['Runtime Error', 'Accepted']
['s805591811', 's840423538']
[2940.0, 2940.0]
[18.0, 18.0]
[85, 38]
p03834
u857330600
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s=list(str(input()))\ns[5]=' '\ns[13]=' '\nprint('',join(s))", "s=list(str(input()))\ns[5]=' '\ns[13]=' '\nprint(''.join(s))"]
['Runtime Error', 'Accepted']
['s229439470', 's269601060']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 57]
p03834
u862296914
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['print(input().replace(/,/g," "))', 'print(input().replace(","," "))']
['Runtime Error', 'Accepted']
['s455109765', 's669977528']
[2940.0, 2940.0]
[18.0, 17.0]
[32, 31]
p03834
u863370423
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=str()\nz=s.replace(","," ")\nprint(z)\n"""my name is mohamed"""', 'n=str(input())\nfor i in n:\n if i==",":\n n=n.replace(","," ")\nprint(n)']
['Wrong Answer', 'Accepted']
['s537687485', 's132536619']
[2940.0, 2940.0]
[17.0, 17.0]
[62, 79]
p03834
u863442865
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['k, s = list(map(int, input().split()))\ncnt = 0\nfor i in range(k+1):\n for j in range(k+1):\n for k in range(k+1):\n total = i+j+k\n if total==s:\n cnt += 1\nprint(cnt)', "s = input()\nprint(s.replace(',', ' '))"]
['Runtime Error', 'Accepted']
['s030054381', 's038986042']
[2940.0, 2940.0]
[17.0, 19.0]
[208, 38]
p03834
u864667985
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["print(input().replace(',',''))", "print(input().replace(',',' '))"]
['Wrong Answer', 'Accepted']
['s873731034', 's784908722']
[2940.0, 2940.0]
[18.0, 18.0]
[30, 31]
p03834
u869265610
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c=input().split()\nprint(a,b,c,="")', 'a,b,c=input().split(",")\nprint(a,b,c)']
['Runtime Error', 'Accepted']
['s230873216', 's381667586']
[2940.0, 2940.0]
[18.0, 17.0]
[38, 37]
p03834
u869728296
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a=input().strip().split(",")\n\nprint(a)\n', 'a=input().strip().split(",")\n\nprint(a[0]+" "+a[1]+" "+a[2])\n']
['Wrong Answer', 'Accepted']
['s435170191', 's960953654']
[2940.0, 3064.0]
[19.0, 18.0]
[39, 60]
p03834
u871596687
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = list(str(input()))\n\nprint(s[0]+s[1]+s[2]+s[3]+s[4])+" "+s[6]+s[7]+s[8]+s[9]+s[10]+s[11]+s[12]+" "+s[14]+s[15]+s[16]+s[17]+s[18])\n\n\n\n', 's = list(str(input()))\n\nprint(s[0]+s[1]+s[2]+s[3]+s[4]+" "+s[6]+s[7]+s[8]+s[9]+s[10]+s[11]+s[12]+" "+s[14]+s[15]+s[16]+s[17]+s[18])\n\n\n\n']
['Runtime Error', 'Accepted']
['s307632841', 's781285574']
[3064.0, 2940.0]
[18.0, 17.0]
[136, 135]
p03834
u875600867
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['print(input().replace("," " "))', "print(input().replace(',', ' '))\n"]
['Runtime Error', 'Accepted']
['s922696407', 's443457988']
[2940.0, 2940.0]
[18.0, 17.0]
[31, 33]
p03834
u881100099
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c=input().split(",")\nprint("a","b","c")', 'a,b,c=input().split(",")\nprint(a,b,c)']
['Wrong Answer', 'Accepted']
['s544338476', 's613823410']
[2940.0, 2940.0]
[17.0, 17.0]
[43, 37]
p03834
u884795391
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = input()\nprint(s.split(',')", 's = input()\nprint(*s.split(","))']
['Runtime Error', 'Accepted']
['s191556990', 's074820743']
[2940.0, 2940.0]
[17.0, 17.0]
[30, 32]
p03834
u886902015
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=input()\nprint(s.split(","))', 's=input()\nprint(s.split(,))', 's=input()\nprint(s.replace(","," "))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s212226409', 's337437136', 's019112211']
[9060.0, 9004.0, 8980.0]
[26.0, 23.0, 28.0]
[29, 27, 35]
p03834
u895040371
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['A,B,C =map(str, input().split(,))\nprint(A,B,C)', 'a, b, c = input().split(",")\nprint(a, b, c)']
['Runtime Error', 'Accepted']
['s618850184', 's270608043']
[2940.0, 2940.0]
[17.0, 18.0]
[46, 43]
p03834
u896741788
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["a,s,d=input(),split(',')\nprint(a,s,d)", "a,s,d=input().split(',')\nprint(a,s,d)"]
['Runtime Error', 'Accepted']
['s898038751', 's858929024']
[2940.0, 2940.0]
[17.0, 17.0]
[37, 37]
p03834
u897436032
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['input_ = inpur().split(",")\nprint(" ".join(str for i in input))', 'inp = input().split(",")\n\nprint(" ".join(inp))']
['Runtime Error', 'Accepted']
['s647908422', 's798727682']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 46]
p03834
u901598613
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c=input().split()\nprint(a+" "+b+" "+c)', 'a=input()\nl=a.split(",")\nprint(l[0]+" "+l[1]+" "+l[2])']
['Runtime Error', 'Accepted']
['s165979525', 's932033904']
[2940.0, 2940.0]
[17.0, 17.0]
[42, 54]
p03834
u902242214
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['x, y ,z = input().split(,)\nprint(x, y, z)', 'a, b, c = input().split(,)\nprint(a, b, c)', 'a, b, c = input().split(",")\nprint(a, b, c)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s046137213', 's099493705', 's503838911']
[8824.0, 8816.0, 8856.0]
[25.0, 25.0, 29.0]
[41, 41, 43]
p03834
u904995051
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a = input()\nb = a.split(",")\nprint(b)', 's = input().split(",")\nprint(*s, sep=" ")']
['Wrong Answer', 'Accepted']
['s289638603', 's795515263']
[2940.0, 8960.0]
[17.0, 29.0]
[37, 41]
p03834
u905582793
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['k,s=map(int,input().split())\nans = 0\nfor i in range(k+1):\n if k<=s-i<=2*k:\n ans+= s-i+1\n elif 0<=s-i<=k:\n ans+= k*2-s+1\nprint(ans)', 'k,s=map(int,input().split())\nans = 0\nfor i in range(k+1):\n if k <=s-i<=2*k:\n ans+= s-i+1\n elif 0<=s-i<=k:\n ans+= k*2-s+1\nprint(ans)', 'print(input().r...
['Runtime Error', 'Runtime Error', 'Accepted']
['s220144480', 's665082650', 's894522704']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[142, 139, 31]
p03834
u911153222
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = [input().split()]\nprint('{} {} {}'.format(s))\n", "print(*input().split(','))"]
['Runtime Error', 'Accepted']
['s407288819', 's795184309']
[3060.0, 2940.0]
[19.0, 17.0]
[50, 26]
p03834
u911575040
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["a,b,c=input().split(' ')\nif b=='+':\n print(int(a)+int(c))\nelse:\n print(int(a)-int(c))\n", "a,b,c=map(str,input().split(','))\nprint(a,b,c)\n"]
['Runtime Error', 'Accepted']
['s323289958', 's672745022']
[2940.0, 2940.0]
[17.0, 18.0]
[92, 47]
p03834
u919521780
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = input()\ns.replace(',', ' ')\nprint(s)", "s = input()\ns = s.replace(',', ' ')\nprint(s)"]
['Wrong Answer', 'Accepted']
['s334611562', 's750121658']
[2940.0, 2940.0]
[17.0, 17.0]
[40, 44]
p03834
u920299620
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=input()\nprint(f"{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )', 's=input()\nprint("{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )', 's=list(input()\nprint("{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )', 's=input()\nprint("{} {} {}".format( s[0:5], s[6:13],s[14:19] ) )']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s240987921', 's475149967', 's648508570', 's707836351']
[2940.0, 3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[64, 63, 68, 63]
p03834
u920438243
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['k,s = map(int,input().split())\ncount = 0\nfor i in range(k+1):\n for j in range(k+1):\n if s-i-j <= k:\n count += 1\nprint(count)\n', 'k,s = map(int,input().split())\ncount = 0\nfor i in range(k+1):\n for j in range(k+1):\n if s-(i+j) <= k and s-(i+j) >= 0:\n count += 1\npri...
['Runtime Error', 'Runtime Error', 'Accepted']
['s535704241', 's867557522', 's770333849']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[146, 165, 44]
p03834
u921632705
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['x, y, z = input().split\nprint(x, y, z)', "x,y,z = int().split(',')\nprint(x,y,z)", "x,y,z = input().split(',')\nprint(x,y,z)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s267864881', 's712544202', 's183889486']
[9012.0, 9004.0, 8980.0]
[24.0, 26.0, 26.0]
[38, 37, 39]
p03834
u921773161
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = input()\nfor i in range(len(s)):\n if s[i]==',':\n s[i]==' '\nprint(s)", "s = list(input())\nfor i in range(len(s)):\n if s[i]==',':\n s[i]=' '\nprint(''.join(s))"]
['Wrong Answer', 'Accepted']
['s818406253', 's641035810']
[2940.0, 2940.0]
[17.0, 17.0]
[74, 88]
p03834
u923659712
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a = str(input())\n\na.replace(","," ")\n\nprint(a)', 'a = str(input())\n\na=a.replace(","," ")\n\nprint(a)']
['Wrong Answer', 'Accepted']
['s174470983', 's761403337']
[2940.0, 2940.0]
[17.0, 17.0]
[46, 48]
p03834
u932465688
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = input()\ns.replace(',',' ')", "s = input()\np = s.replace(',',' ')\nprint(p)"]
['Wrong Answer', 'Accepted']
['s064116196', 's744319480']
[2940.0, 2940.0]
[17.0, 17.0]
[30, 43]
p03834
u936985471
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c=input().split()\nprint(a,b,c)', 'print(input().split())', 'a,b,c=input().split(",")\nprint(a,b,c)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s818910217', 's955580158', 's478630667']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[34, 22, 37]
p03834
u945419374
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=input()\nprint(s.replace(",","/"))\n', 's=input()\nprint(s.replace(","," "))\n']
['Wrong Answer', 'Accepted']
['s762372904', 's970597018']
[2940.0, 2940.0]
[17.0, 17.0]
[36, 36]
p03834
u953486781
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s = input()\ns_list = [s.strip() for x in s.split(',')]\nprint(' '.join(s_list))", "s = input()\ns_list = [x.strip() for x in s.split(',')]\nprint(' '.join(s_list))"]
['Wrong Answer', 'Accepted']
['s902518940', 's331358395']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 78]
p03834
u957872856
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c = input().split(,)\nprint(a+" "+b+" "+c)', 'a,b,c = input().split(",")\nprint(a+" "+b+" "+c)']
['Runtime Error', 'Accepted']
['s576639775', 's584804062']
[2940.0, 2940.0]
[17.0, 17.0]
[45, 47]
p03834
u959759457
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s,t,u=map(int,input().split(''))\nprint(s,t,u)", "s,t,u=map(int,input().split(','))\nprint(s,t,u)", "s,t,u=map(str,input().split(','))\nprint(s,t,u)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s106238431', 's319677785', 's913372310']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[45, 46, 46]
p03834
u967835038
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['K, S = list(map(int, input().split()))\n\na = 0\nfor i in range(K + 1):\n r = S - i\n if i <= S and r <= K * 2:\n t = (r + 1) - max(0, r - K) * 2\n a += t\n\nprint(a)\n', "print(input().replace(',',' '))"]
['Runtime Error', 'Accepted']
['s493327543', 's534499966']
[2940.0, 2940.0]
[17.0, 17.0]
[178, 31]
p03834
u969190727
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a,b,c=input()split(",")\nprint(a,b,c)', 'a,b,c=input().split(",")\nprint(a,b,c)\n']
['Runtime Error', 'Accepted']
['s189715906', 's201688111']
[2940.0, 2940.0]
[17.0, 17.0]
[36, 38]
p03834
u970082363
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['list = list(map(str,input()))\nlist[5] = " "\nlist[13] = " "\nprint(list)', 'list = list(map(str,input()))\nlist[5] = " "\nlist[13] = " "\nprint("".join(list))\n']
['Wrong Answer', 'Accepted']
['s023546062', 's608307526']
[2940.0, 2940.0]
[17.0, 18.0]
[70, 80]
p03834
u970449052
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
["s=input()\nprint(s.replace(',',' ')", "s=input()\nprint(s.replace(',',' '))"]
['Runtime Error', 'Accepted']
['s347964569', 's155848990']
[2940.0, 3068.0]
[17.0, 17.0]
[34, 35]
p03834
u971091945
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = input()\nprint(s[:5]+" "+s[7:14]+" "+s[16:])', "s = input()\nl = s.split(',')\nans = ' '.join(l)\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s242956658', 's906389969']
[2940.0, 2940.0]
[19.0, 17.0]
[47, 57]
p03834
u972892985
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a, b, c = input().split(",")\nprint(a+b+c)', 'a, b, c = input().split(",")\nprint(a, b, c)']
['Wrong Answer', 'Accepted']
['s705503666', 's528891076']
[2940.0, 2940.0]
[17.0, 18.0]
[41, 43]
p03834
u974935538
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s=str("haiku,atcoder,tasks")\nprint(s.replace(",", " "))', 't=str(s)\nprint(t.replace(",", " "))', "s = input()\nprint(s.replace(',', ' '))"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s131363156', 's865795900', 's749801062']
[2940.0, 2940.0, 2940.0]
[18.0, 19.0, 18.0]
[55, 35, 38]
p03834
u975016227
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['k, s = list(map(int, input().split()))\nnum = 0\n\nfor x in range(k+1):\n for y in range(k+1):\n if s-k <= x+y <= s:\n num += 1\n\nprint(num)\n', "s = input()\nprint(s.replace(',', ' '))\n"]
['Runtime Error', 'Accepted']
['s737338807', 's614409300']
[2940.0, 2940.0]
[18.0, 18.0]
[143, 39]
p03834
u975676823
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a, b, c = input().split(sep = ", ")\n\nprint(a + " " + b + " " + c)\n', 'a, b, c = input().split(sep = ",")\n\nprint(a + b + c)\n\n', 'a, b, c = input().split(sep = ",")\nprint(a + b + c)\n', 'a, b, c = input().split(sep = ", ")\nif(len(a) == 7):\n print(b.lower() + " " + a.lower() + " " + c.lower())\nelif(len(b) ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s225018985', 's726825141', 's854347235', 's887148738', 's325309214']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 18.0, 17.0]
[66, 54, 52, 264, 52]
p03834
u975719989
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['s = input()\ns = s.replace(",", "")\n\nprint(s)', "s = input()\ns = s.replace(',', ' ')\nprint(s)"]
['Wrong Answer', 'Accepted']
['s893868026', 's577110229']
[2940.0, 2940.0]
[17.0, 17.0]
[44, 44]
p03834
u978494963
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['import re\nre.sub(","," ",str(input()))', 'import re\nprint(re.sub(","," ",str(input())))']
['Wrong Answer', 'Accepted']
['s783695712', 's213026028']
[3188.0, 3188.0]
[19.0, 19.0]
[38, 45]
p03834
u979078704
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['a, b, c = input.split(",")\nprint(a,b,c)', "a = input()\nprint(a.replace(',' , ' ')", "a = input()\nprint(a.replace(',' , ' ')", 'a, b, c = input.split(",")\nprint(a, b, c)', 'print(*input.split(",")', "s = input()\nprint(s.replace(',', ' '))\na = input()\nprint(a.replace(',' , ' ')", "print(*input().split(',')", "a ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s113579100', 's280795525', 's517390147', 's704453346', 's707837305', 's784544041', 's869248919', 's822823906']
[2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 20.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[39, 38, 38, 41, 23, 77, 25, 39]
p03834
u998082063
2,000
262,144
As a New Year's gift, Dolphin received a string s of length 19. The string s has the following format: `[five lowercase English letters],[seven lowercase English letters],[five lowercase English letters]`. Dolphin wants to convert the comma-separated string s into a space-separated string. Write a program to perf...
['happy,newyear,enjoy', 'a = input()\n\nb = a.replace(",", " ")\n\nprint(b)']
['Runtime Error', 'Accepted']
['s918832565', 's008683005']
[2940.0, 2940.0]
[17.0, 17.0]
[19, 46]
p03837
u021337285
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import sys\nfrom scipy.sparse.csgraph import dijkstra\n\ninput = sys.stdin.readline\nN, M = map(int, input().split())\n\ngraph = [[0 if i == j else float("inf") for i in range(N)] for j in range(N)]\nfor i in range(M):\n ai, bi, ci = map(int, input().split())\n graph[ai - 1][bi - 1] = ci\n graph[bi - 1][ai -...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s678129334', 's970392260', 's226409867']
[17436.0, 18640.0, 18296.0]
[936.0, 901.0, 897.0]
[707, 714, 685]
p03837
u021548497
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import sys\ninput = sys.stdin.readline\n\ndef main():\n n, m = map(int, input().split())\n road = [[100000]*n for _ in range(n)]\n count = [[-1]*n for i in range(n)]\n for _ in range(m):\n a, b, c = map(int, input().split())\n road[a-1][b-1] = c\n road[b-1][a-1] = c\n count[a-1][b-1] = 0\n count[b-...
['Wrong Answer', 'Accepted']
['s205261691', 's233010164']
[9092.0, 9420.0]
[166.0, 165.0]
[664, 649]
p03837
u075012704
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["N, M = map(int, input().split())\nG = [[float('inf')]*N for i in range(N)]\nG2 = [[float('inf')]*N for i in range(N)]\nfor i in range(M):\n a, b, c = map(int, input().split())\n G[a-1][b-1] = c\n G[b-1][a-1] = c\n G2[a-1][b-1] = c\n G2[b-1][a-1] = c\n\nfor i in range(N):\n for j in range(N):\n ...
['Wrong Answer', 'Accepted']
['s550913992', 's159784240']
[3468.0, 3992.0]
[680.0, 673.0]
[573, 578]
p03837
u127499732
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import heapq\n\n\ndef dijkstra(n, s, g):\n h = [(0, s)]\n heapq.heapify(h)\n cost = [float("Inf")] * (n + 1) \n cost[s] = 0\n\n while h:\n c, v = heapq.heappop(h)\n if c > cost[v]:\n continue\n for d, u in g[v]:\n d_s_u = d + cost[v]\n if d_s_u < c...
['Runtime Error', 'Accepted']
['s604703279', 's622514059']
[9400.0, 9328.0]
[31.0, 64.0]
[1006, 1007]
p03837
u139112865
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['#051_D\nfrom heapq import heappop, heappush\ninf = 10 ** 10\nd = [[inf for _ in range(n)] for _ in range(n)]\nfor i in range(n):\n d[i][i] = 0\nn, m = map(int, input().split())\nedges = []\nfor _ in range(m):\n a, b, c = map(int, input().split())\n d[a-1][b-1] = c\n d[b-1][a-1] = c\n edges.append((a-1,...
['Runtime Error', 'Accepted']
['s072272859', 's601148971']
[3192.0, 3444.0]
[18.0, 485.0]
[703, 651]
p03837
u167751176
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["def main():\n\tN, M = map(int, input().split())\n\tpoints = [[] for _ in range(N+1)]\n\tfor i in range(1, M+1):\n\t\ta, b, c = map(int, input().split())\n\t\tpoints[a].append([b, c, i])\n\t\tpoints[b].append([a, c, i])\n\tuse = set()\n\tdef dijksta(start):\n\t\tis_visited = [False]*(N+1)\n\t\tis_visited[0] = True\n\t...
['Runtime Error', 'Runtime Error', 'Accepted']
['s241414194', 's543285252', 's331096398']
[3828.0, 3828.0, 3428.0]
[1099.0, 1079.0, 427.0]
[958, 928, 745]
p03837
u169350228
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["import math\n#import numpy as np\nimport queue\nfrom collections import deque,defaultdict\nimport heapq as hpq\nfrom sys import stdin,setrecursionlimit\nfrom scipy.sparse.csgraph import dijkstra\nfrom scipy.sparse import csr_matrix\nipt = stdin.readline\nsetrecursionlimit(10**7)\n\ndef main():\n n,m = map(int,ipt(...
['Runtime Error', 'Accepted']
['s534380098', 's245683842']
[17408.0, 15916.0]
[249.0, 301.0]
[875, 918]
p03837
u169650582
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['N,M=map(int,input().split())\nIslands=[[] for i in range(N)]\nEdge=[]\nS=0\nfor i in range(M):\n a,b,c=map(int,input().split())\n Islands[a-1].append([b-1,c])\n Islands[b-1].append([a-1,c])\n Edge.append([a-1,b-1])\nfor m in range(M):\n a=Edge[m][0]\n b=Edge[m][1]\n for i in Islands[a]:\n if i[0]==b:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s442915266', 's455952485', 's756679465', 's870199855']
[106996.0, 105780.0, 280220.0, 3444.0]
[2104.0, 2104.0, 2122.0, 554.0]
[636, 660, 602, 402]
p03837
u180058306
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['\nN, M = map(int, input().split())\n\n\ndic_edge_dist = {(i, j) : float("inf") for i in range(1, N + 1) for j in range(1, N + 1)}\nfor i in range(1, N + 1):\n dic_edge_dist[(i, i)] = 0\n\nlist_edge = []\n\ndef warshall_floyd(dic_edge_dist):\n dic_shortest_dist = dic_edge_dist.copy()\n for i in range(1, N + 1...
['Wrong Answer', 'Accepted']
['s839684218', 's928232727']
[6188.0, 5496.0]
[661.0, 638.0]
[1590, 1490]
p03837
u188745744
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['N,M=list(map(int,input().split()))\nimport numpy as np\nfrom scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse import csr_matrix\nl=[np.array([0]*N) for i in range(N)]\nfor i in range(M):\n tmp=(list(map(int,input().split())))\n l[tmp[0]-1][tmp[1]-1]=tmp[2]\n l[tmp[1]-1][tmp[0]-1]=tmp[2]\nl2=csr_mat...
['Wrong Answer', 'Accepted']
['s231649857', 's399201625']
[25328.0, 26236.0]
[375.0, 382.0]
[470, 458]
p03837
u200030766
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["\nV, E=map(int,input().strip().split(' '))\ninf=10**9\ncost=[[inf]*V for i in range(V)]\nedge=[]\nfor i in range(E):\n fr, to, co=map(int,input().strip().split(' '))\n cost[fr-1][to-1]=co\n cost[to-1][fr-1]=co\n edge.append([fr-1,to-1])\n \nd=[]\nfor i in range(V):\n d.append(dijkstra(i))\n\ncand=E\...
['Runtime Error', 'Accepted']
['s489056248', 's580118453']
[3188.0, 3504.0]
[21.0, 452.0]
[938, 838]
p03837
u232852711
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n, m = list(map(int, input().split()))\nconnect = {}\ndist = {}\nfor _ in range(m):\n a, b, c = list(map(int, input().split()))\n if not a in connect.keys(): connect[a] = [b]\n else: connect[a].append(b)\n if not b in connect.keys(): connect[b] = [a]\n else: connect[b].append(a)\n \n dist[tuple(s...
['Wrong Answer', 'Accepted']
['s954159591', 's369395663']
[3700.0, 3568.0]
[2104.0, 572.0]
[995, 611]
p03837
u252805217
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['from itertools import product as prod\n\nn, m = [int(x) for x in input().split()]\n\ngr = [[] for _ in range(n)]\nfor _ in range(m):\n a, b, c = [int(x) for x in input().split()]\n a -= 1\n b -= 1\n gr[a].append((b, c))\n gr[b].append((a, c))\n\nnumset = set(range(n))\ndef dist(i, j, gr=gr):\n tmp_d...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s352817267', 's490352421', 's815158606', 's603094444']
[3444.0, 3444.0, 11508.0, 4212.0]
[29.0, 31.0, 2103.0, 1231.0]
[732, 612, 701, 639]
p03837
u279493135
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\nfrom heapq import heappop, heappush, heapify, heappushpop\nfrom itertools import permutations, combinations, product\nfrom operator import itemgetter, mul\nfrom copy import deepco...
['Wrong Answer', 'Accepted']
['s887235337', 's090045344']
[3944.0, 4192.0]
[53.0, 444.0]
[1314, 1305]
p03837
u316386814
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n, m = list(map(int, input().split()))\n\nimport numpy as np\ndists = np.ones((n + 1, n + 1)) * (10 ** 6)\nedges = []\nfor _ in range(m):\n a, b, c = list(map(int, input().split()))\n dists[a, b] = dists[b, a] = c\n edges.append(a, b, c)\nfor i in range(1, n + 1):\n dists[i, i] = 0\nfor i in range(1, 1 + ...
['Runtime Error', 'Accepted']
['s213294744', 's382913110']
[12636.0, 22304.0]
[148.0, 312.0]
[462, 464]
p03837
u326552320
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tD_fix\n# CreatedDate: 2020-02-21 01:20:19 +0900\n# LastModified: 2020-02-21 02:04:42 +0900\n#\n\n\nimport os\nimport sys\nimport numpy as np\nimport heapq\n\ndef make_matrix(matrix,a,b,c):\n matrix[a-1][b-1] = c\n matrix[b-1][a-1] = c\n\ndef init...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s050898426', 's552878960', 's610422429', 's908375046', 's567173462']
[14252.0, 14252.0, 3804.0, 14624.0, 3572.0]
[2108.0, 2108.0, 157.0, 2108.0, 155.0]
[1388, 1388, 1115, 1396, 1095]
p03837
u368780724
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import heapq\n\nn, m = [int(i) for i in input().split()]\ninf = 10**10\npath = [[0] * n for _ in range(n)]\nQ = [[inf] * n for _ in range(n)]\nans = 0\npathnum = []\nctr = 0\n\nfor i in range(m):\n a, b, c = map(lambda x: int(x)-1 ,input().split()) \n path[a][b] = path[b][a] = c+1\n pathnum.append((a,b))\...
['Wrong Answer', 'Accepted']
['s788448694', 's407809011']
[3444.0, 3572.0]
[26.0, 291.0]
[1002, 967]
p03837
u373958718
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n,m=map(int,input().split())\nl=[list(map(int,input().split()))for i in range(m)]\ndist=[[1<<29]*n for i in range(n)]\nfor i in range(n): dist[i][i]=0\nfor a in l:\n dist[a[0]-1][a[1]-1] = min(dist[a[0]-1][a[1]-1],a[2])\n dist[a[1]-1][a[0]-1] = min(dist[a[1]-1][a[0]-1],a[2])\nprint(dist)\nfor k in range(n):\n for ...
['Wrong Answer', 'Accepted']
['s470798522', 's789671643']
[3756.0, 3568.0]
[652.0, 621.0]
[559, 562]
p03837
u411858517
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['def warshall_floyd(d, V, M): \n for k in range(V):\n for i in range(V):\n for j in range(V):\n d[i][j] = min(d[i][j], d[i][k] + d[k][j])\n \n return d\n \nN, M = map(int, input().split())\nL = [list(map(int, input().split())) for _ in range(M)]\ndist = [[10...
['Wrong Answer', 'Accepted']
['s775442404', 's262132703']
[3572.0, 3572.0]
[458.0, 416.0]
[708, 709]
p03837
u429843511
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['INF=100000000000\n\n\ndef floyd_warshall(dist):\n for i in range(n):\n for j in range(n):\n for k in range(n):\n if (dist[i][j] > dist[i][k]+dist[k][j]):\n dist[i][j] = dist[i][k]+dist[k][j]\n dist[j][i] = dist[i][k]+dist[k][j]\n\nn,m = map(int...
['Wrong Answer', 'Accepted']
['s565564848', 's229652238']
[3444.0, 3440.0]
[273.0, 427.0]
[805, 683]
p03837
u437727817
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n,m = map(int,input().split())\ndist = []\na = []\nb = []\nc = []\n\nfor i in range(m):\n\ta[i], b[i], c[i] = map(int,input().split())\n\tdist[a[i]-1][b[i]-1] = c[i]\n\tdist[b[i]-1][a[i]-1] = c[i]\n\n\n\n\n\n\nfor i in range(n):\n\tfor j in range(n):\n\t\tfor k in range(n):\n\t\t\tdist[i][j] = min(dist[i][j], dist[i]...
['Runtime Error', 'Accepted']
['s675486617', 's566572085']
[3064.0, 3392.0]
[18.0, 555.0]
[452, 541]
p03837
u477320129
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['#!/usr/bin/env python3\nimport sys\n\ndef solve(N: int, M: int, a: "List[int]", b: "List[int]", c: "List[int]"):\n import numpy as np \n from scipy.sparse import csr_matrix \n from scipy.sparse.csgraph import floyd_warshall\n omat = csr_matrix((c, (a, b)), shape=(N+1, N+1), dtype=np.int32, directed=...
['Runtime Error', 'Accepted']
['s977828810', 's006373485']
[41456.0, 38188.0]
[390.0, 187.0]
[1092, 1087]
p03837
u489108157
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["n, m = map(lambda x: int(x), input().split())\na = [0] * m\nb = [0] * m\nc = [0] * m\nfor i in range(m):\n a[i], b[i], c[i] = map(lambda x: int(x), input().split())\n\ndef dijkstra(graph, start, end):\n print('start:{}, end:{}'.format(start, end))\n cost = [1000*100 for _ in range(n+1)]\n fixed = [False f...
['Wrong Answer', 'Accepted']
['s432590639', 's213895071']
[3316.0, 3444.0]
[783.0, 162.0]
[1047, 1046]
p03837
u505420467
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["from scipy.sparse.csgraph import floyd_warshall\nfrom scipy.sparse.csgraph import dijkstra\nn,m=map(int,input().split())\ndis=[[float('inf') for i in range(n)]for j in range(n)]\nfor i in range(n):\n dis[i][i]=0\nfor i in range(m):\n a,b,t=map(int,input().split())\n dis[a-1][b-1]=t\n dis[b-1][a-1]=t\ncost...
['Runtime Error', 'Accepted']
['s791274953', 's089600840']
[17176.0, 3444.0]
[279.0, 583.0]
[431, 485]
p03837
u557494880
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
["\ndef warshall_floyd(d):\n \n for k in range(1,n+1):\n for i in range(1,n+1):\n for j in range(1,n+1):\n d[i][j] = min(d[i][j],d[i][k] + d[k][j])\n return d\n\n##############################\nn,w = map(int,input().split()) \nd = [[float('inf') for i in range(n+1)] for i in ra...
['Wrong Answer', 'Accepted']
['s837723528', 's992581635']
[3444.0, 3700.0]
[23.0, 475.0]
[786, 791]
p03837
u594956556
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import sys\nfrom copy import deepcopy\ninput = sys.stdin.readline\nn,m=map(int,input().split())\nd=[[100000]*n for _ in range(n)]\na=[0]*m\nb=[0]*m\nc=[0]*m\nfor i in range(m):\n a0,b0,c0=map(int,input().split())\n a[i]=a0-1\n b[i]=b0-1\n c[i]=c0\n d[a0-1][b0-1]=c0\n d[b0-1][a0-1]=c0\nfor i in range(n):\n d[i]...
['Wrong Answer', 'Accepted']
['s905591441', 's033445348']
[3964.0, 3444.0]
[544.0, 677.0]
[530, 419]
p03837
u631277801
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['\nfrom heapq import heappush, heappop\n\ndef dijkstra(graph:list, node:int, start:int) -> list:\n \n INF = float("inf")\n dist = [INF]*node\n \n \n dist[start] = 0\n heap = [(0,start)]\n \n \n while heap:\n cost, cur_node = heappop(heap)\n \n for nex_cost, nex_node i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s312783516', 's330795742', 's242829454']
[3692.0, 7640.0, 3660.0]
[97.0, 1240.0, 96.0]
[2556, 2730, 1586]
p03837
u638795007
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['def examD():\n N, M = LI()\n D = [[float("inf") for i in range(N)] for i in range(N)]\n \n XY = [[0,0]]*M\n for i in range(M):\n x, y, z = map(int, input().split())\n XY[i] = [x-1,y-1]\n D[x - 1][y - 1] = z\n D[y - 1][x - 1] = z\n for i in range(N):\n D[i][i] = 0 ...
['Runtime Error', 'Accepted']
['s997243731', 's359895396']
[3956.0, 4292.0]
[35.0, 462.0]
[941, 1159]
p03837
u664373116
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['\nclass Graph():\n \n def __init__(self,vertex_num,node_num,naive_input):\n self.vertex_num=vertex_num\n self.node_num=node_num\n \n \n node=[[] for _ in range(vertex_num)]\n for i in range(node_num):\n u,v=naive_input[i][:2]\n w=naive_input[i][2]\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s353750703', 's869254138', 's636767328']
[3444.0, 3444.0, 4084.0]
[45.0, 212.0, 1650.0]
[4236, 2300, 2974]
p03837
u677121387
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n,m = map(int,input().split())\nINF = 10**18\nd = [[INF]*n for _ in range(n)]\nused = [[True]*n for _ in range(n)]\nfor i in range(n): d[i][i] = 0\nfor _ in range(m):\n a,b,c = map(int,input().split())\n a -= 1\n b -= 1\n d[a][b] = c\n d[b][a] = c\n used[a][b] = False\n used[b][a] = False\n\nfor ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s595675770', 's863134321', 's375745077']
[9496.0, 9352.0, 9308.0]
[384.0, 28.0, 455.0]
[692, 484, 484]
p03837
u731028462
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['g = Graph()\nN,M = list(map(int, input().split()))\nINF = 10**9+7\nA = [[INF if i!=j else 0 for i in range(N)] for j in range(N)]\nS=[]\nE=[]\nW=[]\n\nfor i in range(M):\n s,e,w=list(map(int,input().split()))\n g.add_edge(s-1, e-1, w)\n g.add_edge(e-1, s-1, w)\n S.append(s-1)\n E.append(e-1)\n W.app...
['Runtime Error', 'Accepted']
['s179824173', 's025842716']
[3064.0, 3824.0]
[18.0, 119.0]
[658, 2594]
p03837
u736729525
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['def dijkstra(m, s, t):\n INF = 1e10\n D = [INF] * N\n D[s] = 0\n Q = [v for v in range(N)]\n\n while Q:\n d = INF\n v = None\n for x in Q:\n if D[x] <= d:\n d = D[x]\n v = x\n Q.remove(v)\n\n for u, w in enumerate(m[v]):\n ...
['Wrong Answer', 'Accepted']
['s002059420', 's524405937']
[3188.0, 3316.0]
[2104.0, 644.0]
[672, 758]
p03837
u761989513
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import heapq\n\ndef dijkstra(adj, start, goal=None):\n n = len(adj)\n dist = [float("inf") for i in range(n)]\n prev = [float("inf") for i in range(n)]\n\n dist[start] = 0\n q = []\n heapq.heappush(q, (0, start))\n\n while len(q) != 0:\n prov_cost, src = heapq.heappop(q)\n\n if dist...
['Wrong Answer', 'Accepted']
['s925380395', 's428283750']
[3828.0, 3572.0]
[2104.0, 102.0]
[1428, 880]
p03837
u780962115
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['# cadidates of no shortest paths\nn, m = map(int, input().split())\n\nd = [[float("inf") for i in range(n + 1)] for i in range(n + 1)]\nedge_data=[]\nconnect={i:[] for i in range(1,n+1)}\nfor i in range(m):\n x, y, z = map(int, input().split())\n \n d[x][y] = z\n d[y][x] = z\n connect[x].append(y)\n ...
['Runtime Error', 'Accepted']
['s844193191', 's077551613']
[3700.0, 3700.0]
[434.0, 434.0]
[954, 955]
p03837
u784022244
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n,w = map(int,input().split()) \nfrom collections import defaultdict\nD=defaultdict(list)\ndef warshall_floyd(d):\n \n for k in range(n):\n for i in range(n):\n for j in range(n):\n if d[i][j]>d[i][k]+d[k][j]:\n d[i][j] = d[i][k] + d[k][j]\n ...
['Wrong Answer', 'Accepted']
['s954813822', 's544712666']
[16992.0, 16992.0]
[497.0, 492.0]
[1053, 1056]
p03837
u789339072
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['import sys\nimport numpy as np\ninput = sys.stdin.readline\n\nN, M = map(int, input().split())\na = [0]*N\nb = [0]*N\nc = [0]*N\nfor i in range(M):\n a[i], b[i], c[i] = map(int, input().split())\n a[i] -=1\n b[i] -=1\n\nMAX = 10**10\ndist = np.zeros((N,N))\ndist += MAX\n\nfor i in range(N):\n dist[i,i] = ...
['Runtime Error', 'Accepted']
['s761234637', 's927815471']
[14408.0, 3408.0]
[1377.0, 568.0]
[587, 641]
p03837
u808806124
2,000
262,144
You are given an undirected connected weighted graph with N vertices and M edges that contains neither self-loops nor double edges. The i-th (1≤i≤M) edge connects vertex a_i and vertex b_i with a distance of c_i. Here, a _self-loop_ is an edge where a_i = b_i (1≤i≤M), and _double edges_ are two edges where (a_i,b_i...
['n, m = map(int, input().split())\n\nd = np.ones((n, n)) * 1001\n\nes = []\nfor i in range(m):\n es.append(list(map(int, input().split())))\n\nfor (i, j, w) in es:\n d[i - 1][j - 1] = w\n d[j - 1][i - 1] = w\n\n\nfor k in range(n):\n for i in range(n):\n for j in range(n):\n l = d[i][k] +...
['Runtime Error', 'Accepted']
['s240412850', 's793289076']
[3064.0, 3556.0]
[17.0, 347.0]
[448, 455]