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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03036 | u765237551 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = map(int, input().split())\nxs = [x]\nfor i in range(10):\n xs.append(xs[-1] * r - d)\nprint("\\n".join(map(str, xs)))', 'r, d, x = map(int, input().split())\nxs = [x]\nfor i in range(10):\n xs.append(xs[-1] * r - d)\nprint("\\n".join(map(str, xs[1:])))'] | ['Wrong Answer', 'Accepted'] | ['s599412392', 's243390994'] | [2940.0, 2940.0] | [17.0, 17.0] | [125, 129] |
p03036 | u767995501 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = map(int,input().split())\nprint((x = x * r - k ) for _ in range(10))', 'r, d, x = map(int,input().split())\nprint(x = x * r - d for _ in range(10))\n', 'r, d, x = map(int,input().split())\nfor _ in range(10):\n x = x * r - d\n print(x)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s182857551', 's615574556', 's431353627'] | [3064.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [77, 76, 86] |
p03036 | u769818408 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,D,x=list((map(int,input().split())))\nfor _ in range(20):\n x=x*r-D\n print(x)', 'r,D,x=list((map(int,input().split())))\nfor _ in range(10):\n x=x*r-D\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s922108187', 's472954108'] | [2940.0, 2940.0] | [18.0, 17.0] | [83, 83] |
p03036 | u774160580 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, D, X = list(map(int, input().split()))\nfor i in range(10):\n x = r * x - D\n print(x)\n', 'r, D, x = list(map(int, input().split()))\nfor i in range(10):\n x = r * x - D\n print(x)\n'] | ['Runtime Error', 'Accepted'] | ['s281799022', 's231811983'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 93] |
p03036 | u779703200 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['a, b = map(int, input().split())\n\nif a>=13:\n print(b)\nelif a >= 6:\n print(int(b / 2))\nelse:\n print(0)', 'r ,d ,x = map(int, input().split())\n\nnew_x = r * x - d\nprint(new_x) #2011\nfor i in range(2002, 2011):\n new_x = r * new_x - d\n print(new_x)'] | ['Runtime Error', 'Accepted'] | ['s040103682', 's333807728'] | [3060.0, 2940.0] | [17.0, 17.0] | [110, 144] |
p03036 | u791527495 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['li = list(map(int,input().split()))\nr = li[0]\nD = li[1]\nx2000 = li[2]\ndef a(x):\n return r * x - D\n\nx2000 = a(x2000)\nprint(x2000)', 'li = list(map(int,input().split()))\nr = li[0]\nD = li[1]\nx2000 = li[2]\ndef a(x):\n return r * x - D\n\nfor i in range(10):\n x2000 = a(x2000)\n print(x2000)'] | ['Wrong Answer', 'Accepted'] | ['s718479407', 's476863532'] | [3060.0, 2940.0] | [17.0, 18.0] | [129, 153] |
p03036 | u795323188 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x = map(int,input().split())\nx_list = []\nx_list.append(x)\nfor i in range(10):\n x_2 = r*x_list[i] -d\n x_list.append(x_2)\n\nfor i in range(10):\n print(x_list[i])\n', 'r,d,x = map(int,input().split())\nx_list = []\nx_list.append(x)\nfor i in range(11):\n x_2 = r*x_list[i] -d\n x_list.append(x_2... | ['Wrong Answer', 'Accepted'] | ['s378861722', 's536497738'] | [3064.0, 2940.0] | [17.0, 17.0] | [172, 173] |
p03036 | u798260206 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['print(X[1])\nprint(X[2])\nprint(X[3])\nprint(X[4])\nprint(X[5])\nprint(X[6])\nprint(X[7])\nprint(X[8])\nprint(X[9])\nprint(X[10])', 'r,D,x = map(int,input().split())\nX = [x]*11\n\nfor i in range(0,10):\n X[i+1] = r*X[i] - D\n \n \nprint(X[1:11])', 'r,D,x = map(int,input().split())\nX = [x]*11\n\nfor i in range(0,... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s834426919', 's852380610', 's642035690'] | [3060.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0] | [120, 109, 215] |
p03036 | u799428010 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=map(int, input().split())\nans=x\nfor i in range(1,10):\n ans=r*ans-d\n print(ans)', 'r,d,x=map(int, input().split())\nans=x\nfor i in range(1,11):\n ans=r*ans-d\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s833148003', 's782983055'] | [9108.0, 9072.0] | [27.0, 30.0] | [90, 90] |
p03036 | u816631826 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['\nusing namespace std;\n\nint main()\n{\n int I,d,r,x1,x2,x3,x4,x5 ,x6 ,x7 ,x9 ,x8 ,x10;\n cin >> I>> d>>r;\n x1=r*I-d;\n x2=r*x1-d;\n x3=r*x2-d;\n x4=r*x3-d;\n x5=r*x4-d;\n x6=r*x5-d;\n x7=r*x6-d;\n x8=r*x7-d;\n x9=r*x8-d;\n x10=r*x9-d;\n cout << x1 <<endl;\n cout <<x2 <<end... | ['Runtime Error', 'Accepted'] | ['s235288842', 's194302613'] | [2940.0, 2940.0] | [17.0, 17.0] | [520, 87] |
p03036 | u823044869 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = map(int,input().split())\n\nresult = r*x-d\nfor i in range(9):\n result = r*result-d\n print(result)\n', 'r, d, x = map(int,input().split())\n\nresult = r*x-d\nprint(result)\nfor i in range(9):\n result = r*result-d\n print(result)\n'] | ['Wrong Answer', 'Accepted'] | ['s187832162', 's878915950'] | [2940.0, 2940.0] | [17.0, 18.0] | [108, 122] |
p03036 | u825440127 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = map(int, input().split())\n\nfor i in range(10):\n x = (r * x) - D\n print(x)\n', 'r, d, x = map(int, input().split())\n\nfor i in range(10):\n x = (r * x) - d\n print(x)\n'] | ['Runtime Error', 'Accepted'] | ['s559952027', 's763683957'] | [2940.0, 2940.0] | [17.0, 17.0] | [90, 90] |
p03036 | u852068828 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, D, x = map(int, input().split())\nans = r * x - D\nfinal = []\nfor num in range(10):\n x = r * x - D\n final.append(x)\nprint(final)', 'r, D, x = map(int, input().split())\nfinal = []\nfor num in range(10):\n x = r * x - D\n final.append(x)\nprint(final)', 'r, D, x = map(int, input().split())\nfinal = ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s417188861', 's438615271', 's345651360'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [135, 119, 128] |
p03036 | u853900545 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=map(int,input().split())\nfor i in range(10):\n x=r*d-x\n print(x)', 'r,d,x=map(int,input().split())\nfor i in range(10):\n x=r*x-d\n print(x)'] | ['Runtime Error', 'Accepted'] | ['s581494166', 's059916628'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 75] |
p03036 | u855831834 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x0 = map(int,input().split())\n\ndef mo(i):\n if i == 0:\n return x0\n return r*mo(i-1) - d \n\nfor i in range(1,10):\n print(mo(i))', 'r, d, x0 = map(int,input().split())\n\ndef mo(i):\n if i == 0:\n return x0\n return r*mo(i-1) - d \n\nfor i in range(1,11):\n print(mo(i))\n'] | ['Wrong Answer', 'Accepted'] | ['s308218178', 's783773939'] | [8948.0, 8940.0] | [27.0, 28.0] | [146, 147] |
p03036 | u857330600 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['def mos(r,d,x,i):\n if i==0:\n return(x)\n else:\n return(mos(r,d,x,i-1)*r-d)\n \nr,d,x=map(int,input().split())\nfor i in range(10):\n print(r,d,x,i)', 'def mos(r,d,x,i):\n if i==0:\n return(x)\n else:\n return(mos(r,d,x,i-1)*r-d)\n \nr,d,x=map(int,input().split())\nfor i in range(1,11):\n print(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s131926720', 's448499406', 's658040109'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0] | [152, 154, 71] |
p03036 | u863397945 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['#! python3\n# solve127A.py\n\nage,cost = map(int,input().split())\n\nif age <= 5:\n cost = 0\nelif 6 <= age <= 12:\n cost = cost//2\nelif 7 <= age:\n cost = cost\n\nprint(cost)', 'r,D,x =map(int,input().split())\n\nfor i in range(10)\n\tx = r*x-D\n \tprint(x)', '#! python3\n# solve127B.py\n\nr,D,x = map(i... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s838022602', 's878323249', 's546945039'] | [9076.0, 8880.0, 9100.0] | [22.0, 24.0, 30.0] | [174, 74, 109] |
p03036 | u870062840 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['!/work/yota509/env_python3/bin/python3 \n# -*- coding: utf-8 -*- \n\n\ndef read_input():\n a,b,c=map(int, input().split())\n if 2<=a<=5 and 1<=b<=100 and b<c<=200:\n r... | ['Runtime Error', 'Accepted'] | ['s089366654', 's513086420'] | [2940.0, 3060.0] | [17.0, 17.0] | [872, 361] |
p03036 | u870178975 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=list(map(int,input().split()))\nfor i in 9:\n x=r*x-d\n print(x)', 'r,d,x=list(map(int,input().split()))\nfor i in range(9):\n x=r*x-d\n print(x)', 'r,d,x=list(map(int,input().split()))\nfor i in range(10):\n x=r*x-d\n print(x)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s225292825', 's306883086', 's542412910'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [69, 76, 77] |
p03036 | u887777069 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=map(int,input().split())\nfor i in range(10):\n x=r*x-D\n print(x)', 'r,d,x=map(int,input().split())\nfor i in range(10):\n x=r*x-d\n print(x)'] | ['Runtime Error', 'Accepted'] | ['s535416945', 's751585295'] | [2940.0, 2940.0] | [19.0, 17.0] | [71, 71] |
p03036 | u889344512 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x = map(int,input().split())\nfor i in range(0,10):\n x = r+x-d\n print(x)', 'r,d,x = map(int,input().split())\nfor i in range(0,10):\n x = r*x - d\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s757159836', 's070282654'] | [2940.0, 2940.0] | [17.0, 17.0] | [77, 79] |
p03036 | u907223098 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['a,b,c=(int(i) for i in input().split())\nfor i in range(1,10):\n c=a*c-b\n print(c)\n', 'a,b,c=(int(i) for i in input().split())\nfor i in(1,10):\n c=a*c-b\n print(c)\n', 'a,b,c=map(int,input().split( ))\nfor i in range(0,9):\n c=a*c-b\n print c', 'a,b,c=(int(i) for i in input().split())\nfor i in range(0,9):\n... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s207430256', 's506392719', 's637703340', 's789479294', 's687201395'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [20.0, 18.0, 17.0, 17.0, 17.0] | [83, 77, 72, 82, 80] |
p03036 | u914671452 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['#coding:utf-8\nr,D,x = map(int,input().split())\nx2001 = r * X - D\nx2002 = r * X2001 -D\nx2003 = r * X2002 - D\nx2004 = r * X2003 - D\nx2005 = r * X2004- D\nx2006 = r * X2005- D\nx2007 = r * X2006 - D\nx2008 = r * X2007 - D\nx2009 = r * X2008 - D\nx2010 = r * X2009 - D\nX = [x2001,x2002,x2003,x2004,x2005,x2006,x2007... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s242713143', 's271425730', 's355320041', 's452201811', 's355547657'] | [3064.0, 3060.0, 3060.0, 3060.0, 3064.0] | [18.0, 18.0, 20.0, 17.0, 17.0] | [341, 334, 334, 346, 392] |
p03036 | u924467864 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x2000 = map(int, input().split())\n\nx = []\n\nfor i in range(10+1):\n x.append(0)\n\nprint(x)\n\nx[0] = x2000\n# print(x[0])\n\nfor i in range(10):\n x[i+1] = r * x[i] - d\n print(x[i+1])\n', 'r, d, x2000 = map(int, input().split())\n\nx = []\n\nfor i in range(10+1):\n x.append(0)\n\nx[0] = x2000\n... | ['Wrong Answer', 'Accepted'] | ['s755503882', 's361042703'] | [2940.0, 2940.0] | [17.0, 17.0] | [190, 180] |
p03036 | u934073551 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,D,x=map(int,input().split())\nfor i in range(2001,2011,1):\n print(x)\n x_=r*x-D\n x=x_', 'r,D,x=map(int,input().split())\nfor i in range(2001,2011,1):\n x_=r*x-D\n x=x_\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s402017000', 's124342596'] | [2940.0, 2940.0] | [17.0, 17.0] | [94, 94] |
p03036 | u936985471 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=map(int,input().split())\nfor i in range(10):\n r=r*x-d\n print(r)\n ', 'r,d,x=map(int,input().split())\nfor i in range(10):\n x=r*x-d\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s007954749', 's849369728'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 71] |
p03036 | u937618939 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x = map(int, input().split())\nresult=[]\nresult.append(x)\nfor i in range(10):\n\tx=r*x-d\n\tresult.append(x)\nfor i in result:\n\tprint(i)', 'r,d,x = map(int, input().split())\nresult=[]\nresult.append(x)\nfor i in range(10):\n\tx=r*x-d\n\tresult.append(x)\nfor i in result[1:11]:\n\tprint(str(i))'] | ['Wrong Answer', 'Accepted'] | ['s212518927', 's676428107'] | [2940.0, 2940.0] | [17.0, 18.0] | [134, 145] |
p03036 | u941284420 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x_2000=map(int,input().split())\nx_i = x_2000\nfor i in range(10):\n x_ii = r*x_i-D\n x_i = x_ii\n print(x_ii)', 'r,d,x_2000=map(int,input().split())\nx_i = x_2000\nfor i in range(10):\n x_ii = r*x_i-d\n x_i = x_ii\n print(x_ii)'] | ['Runtime Error', 'Accepted'] | ['s811631897', 's373397720'] | [2940.0, 2940.0] | [17.0, 17.0] | [112, 112] |
p03036 | u945419374 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x=map(int,input().split())\nfor i in range(10):\n\tx=x*r-d\nprint(x)\t\n\n\n\n\n', 'r,d,x=map(int,input().split())\nfor i in range(10):\n\tx=r*x-d\n\tprint(x)\t\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s820290495', 's803388101'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 75] |
p03036 | u947327691 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,d,x0 = map(int,input().split())\na=[x0]\n\nfor i in range(1,11):\n a.append(r*a[i-1]-d)\n\nfor i in range(11):\n print(a[i])', 'r,d,x0 = map(int,input().split())\na=[x0]\n\nfor i in range(1,11):\n a.append(r*a[i-1]-d)\n\nfor i in range(1,11):\n print(a[i])'] | ['Wrong Answer', 'Accepted'] | ['s101127936', 's726540367'] | [2940.0, 2940.0] | [17.0, 17.0] | [125, 127] |
p03036 | u957513998 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = [int(x) for x in input().split()]\nfor i in range(2001, 2011):\n x = r * x - D\n print(x)', 'r, d, x = [int(x) for x in input().split()]\nfor i in range(2001, 2011):\n x = r * x - d\n print(x)'] | ['Runtime Error', 'Accepted'] | ['s976256820', 's064746434'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 98] |
p03036 | u961916328 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ["a,b = map(int,input().split())\nif a <= 5:\n print('0')\nelse:\n if a <= 12:\n print(int(b/2))\n else:\n print(b)", 'a,b,c = map(int,input().split())\nfor i in range(10):\n c = a*c-b\n print(c)'] | ['Runtime Error', 'Accepted'] | ['s163502277', 's717947357'] | [3188.0, 2940.0] | [18.0, 17.0] | [115, 75] |
p03036 | u962330718 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,D,x=map(int,input().split())\nfor i in range(10):\n print(x)\n x=r*x-D\nprint(x)', 'r,D,x=map(int,input().split())\nfor i in range(10):\n x=r*x-D\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s870631199', 's370474948'] | [2940.0, 2940.0] | [18.0, 17.0] | [80, 71] |
p03036 | u963963908 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['#ABC127 B\n\nr,D,x = map(int,input().split())\nA = []\nfor i in range(10):\n if i == 0:\n A.append(x)\n else:\n A.append(r*(A[i-1])-D)\nprint(A)', '#ABC127 B\n\nr,D,x = map(int,input().split())\nA = []\nfor i in range(10):\n if i == 0:\n A.append(x)\n else:\n A.append(r*(A[i-1]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s597141279', 's848626881', 's809156266'] | [9068.0, 9024.0, 9088.0] | [26.0, 29.0, 28.0] | [155, 183, 185] |
p03036 | u971237642 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['# -*- coding: utf-8 -*-\n\n\n#x_i+1=r*x_i-D\n\nr, D, x = map(int, input().split())\n\nres = []\nres.append(x)\n\nfor i in range(1,11):\n res.append(r * res[i-1] - D)\n\nfor p in res:\n print(p)\n', '# -*- coding: utf-8 -*-\n\n\n#x_i+1=r*x_i-D\n\nr, D, x = map(int, input().split())\n\nres = []\nres.append(x)\n\n... | ['Wrong Answer', 'Accepted'] | ['s990947726', 's973010204'] | [2940.0, 2940.0] | [17.0, 17.0] | [218, 238] |
p03036 | u980452957 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = map(int, input().split())\nans = [0] * 13\nans[0] = x\n\nfor i in range(0, 11):\n ans[i+1] = (r * ans[i]) - d\n print(ans[i])', 'r, d, x = map(int, input().split())\nans = [x]\n\nfor i in range(11):\n ans.append((r * ans[i]) - d)\n if i == 0:\n continue\n print(ans[i])'] | ['Wrong Answer', 'Accepted'] | ['s389494297', 's221625476'] | [2940.0, 3060.0] | [17.0, 17.0] | [135, 149] |
p03036 | u997641430 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r,D,x=map(int,input().split())\nfor i in range(10):\n x=r*x-D\nprint(x)', 'r,D,x=map(int,input().split())\nfor i in range(10):\n x=r*x-D\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s053046943', 's902215814'] | [2940.0, 2940.0] | [17.0, 17.0] | [71, 75] |
p03036 | u999482355 | 2,000 | 1,048,576 | The development of algae in a pond is as follows. Let the total weight of the algae at the beginning of the year i be x_i gram. For i≥2000, the following formula holds: * x_{i+1} = rx_i - D You are given r, D and x_{2000}. Calculate x_{2001}, ..., x_{2010} and print them in order. | ['r, d, x = list(map(int, input().split()))\nfor i in range(10):\n x = r*x-D\n print(x)\n', 'r, d, x = map(int, input().split())\nfor i in range(10):\n x = r*x-D\n print(x)', 'r, D, x = list(map(int, input().split()))\nfor i in range(10):\n x = r*x-D\n print(x)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s438571962', 's976170611', 's180356831'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [85, 78, 85] |
p03037 | u001041019 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nli = [list(map(int, input().split())) for i in range(m)]\n\na=li[0][0]\nb=li[0][1]\nfor i in range(m-1):\n if li[i+1][0]>a:\n a=li[i+1][0]\n if li[i+1][1]<b:\n b=li[i+1][1]\n\nif b<a:\n print(int(0))\n break\n \nif b-a+1<n:\n print(b-a+1)\nelse:\n print(n)', 'n,m=map(int,inp... | ['Runtime Error', 'Accepted'] | ['s190420516', 's622901115'] | [3064.0, 27340.0] | [17.0, 371.0] | [281, 284] |
p03037 | u001272273 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ["N, M = map(int,input().split())\n\nfrom collections import defaultdict\n\n\ndef main():\n\tLs = []\n\tcardDic = defaultdict(int)\n\tRs = []\n\tfor i in range(M):\n\t\tinputs= list(map(int,input().split()))\n\t\tLs.append(inputs[0])\n\t\tcardDic[inputs[0]] += 1\n\t\tRs.append(inputs[1])\n\t\tcardDic[inputs[1]] += 1\n\... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s901834161', 's994187000', 's830933880'] | [20644.0, 11060.0, 11232.0] | [761.0, 336.0, 325.0] | [663, 323, 301] |
p03037 | u006180579 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ["# coding: UTF-8\n# sample code\n\nv = list(map(int, input().split()))\nn, m = v[0], v[1]\n\nl, r = [], []\nfor i in range(m):\n\tv = list(map(int, input().split()))\n\tl.append(v[0])\n\tr.append(v[1])\n\nmin = 1\nmax = n\nfor i in range(m):\n\tif l[i] > min:\n\t\tmin = l[i]\n\tif max > r[i]:\n\t\tmax = r[i]\n\tprint(... | ['Wrong Answer', 'Accepted'] | ['s283522577', 's239019932'] | [12784.0, 11072.0] | [493.0, 352.0] | [360, 338] |
p03037 | u007764502 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['a,b=map(int,input().split())\n\nanswer = 0\n\nupper = a\nunder = 0\n\nfor i in range(b):\n c,d=map(int,input().split())\n if d <= upper:\n upper = d\n if under <= c:\n under = c\n\nif (upper - under) >= 0:\n print(0)\nelse: \n print(upper - under + 1)', 'a,b=map(int,input().split())\n\nanswer = 0\n\nupp... | ['Wrong Answer', 'Accepted'] | ['s400451121', 's227011827'] | [3188.0, 3060.0] | [280.0, 286.0] | [248, 247] |
p03037 | u010069411 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['L=[]\nR=[]\nfor _ in range(M):\n\tl,r=map(int, input().split())\n\tL.append(l)\n\tR.append(r)\n\nl = max(L)\nr = min(R)\n\nres = 0\nfor i in range(1,N+1):\n\tif l<=i and i<=r:\n\t\tres+=1\nprint(res)\n', 'N,M=map(int, input().split())\nL=[]\nR=[]\nfor _ in range(M):\n\tl,r=map(int, input().split())\n\tL.append(l)\n\t... | ['Runtime Error', 'Accepted'] | ['s923329626', 's481478638'] | [3060.0, 10996.0] | [17.0, 317.0] | [180, 210] |
p03037 | u016901717 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nl=[0]*m\nr=[0]*m\nfor i in range(m):\n l[i],r[i]=map(int,input().split())\nif max(l)<min(r):\n print(0)\nelse:\n print(min(r)-max(l)+1)', 'n,m=map(int,input().split())\nl=[0]*m\nr=[0]*m\nfor i in range(m):\n l[i],r[i]=map(int,input().split())\nif max(l)<=min(r):\n print(0)... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s020860949', 's159799380', 's358053602', 's985174430'] | [10868.0, 10996.0, 10868.0, 10868.0] | [288.0, 300.0, 294.0, 290.0] | [166, 167, 199, 166] |
p03037 | u017415492 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nlh=0\nrh=10**9\nfor i in range(m):\n l,r=map(int,input().split())\n if lh<=l:\n lh=l\n if rh>=r:\n rh=r\nprint(rh,lh)\nif rh-lh<0:\n print(0)\nelse:\n print(rh-lh+1)', 'n,m=map(int,input().split())\nlh=0\nrh=10**9\nfor i in range(m):\n l,r=map(int,input().split())\n if lh<=l... | ['Wrong Answer', 'Accepted'] | ['s594168390', 's257329546'] | [3060.0, 3060.0] | [283.0, 287.0] | [193, 180] |
p03037 | u020812754 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = (int(x) for x in input().split())\nL = []\nR = []\nfor i in range(M):\n\tl, r = (int(x) for x in input().split())\n\tL.append(l)\n\tR.append(r)\n\t\nlmax = max(L)\nrmin = min(R)\nans = lmax - rmin + 1\n\nprint(ans)', 'N, M = (int(x) for x in input().split())\nL = []\nR = []\nfor i in range(M):\n\tl, r = (int(x... | ['Wrong Answer', 'Accepted'] | ['s589628282', 's832431135'] | [10996.0, 11040.0] | [340.0, 350.0] | [205, 226] |
p03037 | u023141436 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\n\nLmax = 0\nRmin = 100000\nfor i in range(m):\n\tL,R = map(int,input().split())\n\tif Lmax < L:\n\t\tLmax = L\n\tif Rmin > R:\n\t\tRmin = R\nif Rmin > Lmax:\n\tprint("0")\nelse:\n\tprint("%d" % (Rmin - Lmax +1))', 'n,m = map(int,input().split())\n\nLmax = 0\nRmin = 1000000\nfor i in ra... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s448280720', 's549960382', 's135780573'] | [3060.0, 3060.0, 3060.0] | [279.0, 284.0, 286.0] | [221, 220, 238] |
p03037 | u025501820 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\ncard = False\nfor _ in range(M):\n L, R = map(int, input().split())\n if card is True:\n card = card & set([i for i in range(L, R + 1)])\n else:\n card = set([i for i in range(L, R + 1)])\nprint(len(card))', 'N, M = map(int, input().split()) \nleft = 1\nright =... | ['Wrong Answer', 'Accepted'] | ['s489642863', 's450903637'] | [24604.0, 3060.0] | [2105.0, 327.0] | [254, 222] |
p03037 | u028014940 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['\nn,m = map(int,input().split())\ns = -1\nt = n+1\nfor i in range(m):\n l_i,r_i = map(int,input().split())\n l = max(l,l_i)\n r = min(r,r_i)\nprint(max(0,r-l+1))', '\n\nn,m = map(int,input().split())\nl = -1\nr = n+1\nfor i in range(m):\n l_i,r_i = map(int,input().split())\n l = max(l,l_i)\n r = min... | ['Runtime Error', 'Accepted'] | ['s103535435', 's140855535'] | [3060.0, 3060.0] | [17.0, 320.0] | [162, 240] |
p03037 | u038024401 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\ngate = [None] * M\nrange_L = 1\nrange_R = N\nfor i in range(M):\n gate[i] = tuple(map(int, input().split()))\n left = gate[i][0]\n right = gate[i][1]\n if range_L < left:\n range_L = left\n if right < range_R:\n range_R = right\n\nprint(range_R, range_L)\... | ['Wrong Answer', 'Accepted'] | ['s539774663', 's972138047'] | [16460.0, 10868.0] | [367.0, 293.0] | [334, 220] |
p03037 | u038408819 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nlr = [tuple(map(int, input().split())) for _ in range(M)]\n\ns = [0] * (N + 1)\nfor i in range(M):\n l, r = lr[i]\n s[l - 1] += 1\n if r != N + 2:\n s[r] -= 1\n\nruiseki = [0] * (N + 1)\nfor i in range(1, N + 1):\n ruiseki[i] += ruiseki[i - 1] + s[i]\n\n\nprint(rui... | ['Wrong Answer', 'Accepted'] | ['s433910105', 's886160800'] | [21464.0, 21464.0] | [385.0, 372.0] | [338, 334] |
p03037 | u039360403 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M=map(int,input().split())\nLR=list(map(int,input().split()) for _ in range(M) )\nL=1\nR=N\nfor i in range(M):\n L=max(L,LR[i][0])\n R=min(R,LR[i][1])\nprint(R-L+1 if R<=L else 0)', 'N,M=map(int,input().split())\nLR=list(list(map(int,input().split())) for _ in range(M))\nL=1\nR=N\nfor i in range(M):\n L=ma... | ['Runtime Error', 'Accepted'] | ['s640788040', 's062654266'] | [48784.0, 27332.0] | [424.0, 406.0] | [180, 185] |
p03037 | u054825571 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M = map(int, input().split())\nl=0\nr=N\nfor _ in range(M):\n ll,rr=map(int,input().split())\n l = max(l,ll)\n r = min(r,rr)\nprint(rr-ll+1)', 'N,M = map(int, input().split())\nl=0\nr=N\nfor _ in range(M):\n ll,rr=map(int,input().split())\n l = max(l,ll)\n r = min(r,rr)\nans = r - l + 1\nprint(ans if ans > 0 ... | ['Wrong Answer', 'Accepted'] | ['s347052065', 's504465680'] | [9184.0, 9204.0] | [218.0, 218.0] | [138, 168] |
p03037 | u055941944 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,(input().spit()))\nL = []\nR = []\n\nfor i in range(m):\n\tl,r = map(int(input().spit()))\n\tL.append(l)\n\tR.append(r)\n\nans = min(R) - max(L) + 1\n\nif ans >0:\n\tprint(ans)\nelse:\n\tprint(0)', 'n, m = map(int, input().split())\nL = []\nR = []\nfor i in range(m):\n\tl,r = map(int,input().split())\n\... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s050499586', 's582988156', 's597802432', 's639684304', 's695644928', 's749942648', 's783954574'] | [3060.0, 11012.0, 3064.0, 10996.0, 10996.0, 3060.0, 11052.0] | [17.0, 304.0, 17.0, 301.0, 300.0, 20.0, 307.0] | [190, 144, 189, 194, 196, 170, 186] |
p03037 | u057993957 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = list(map(int, input().split()))\n\nR, L = [], []\nfor i in range(m):\n r, l = list(map(int, input().split()))\n R.append(r)\n L.append(l)\n \nprint( min(R) - max(L) + 1)', 'n, m = list(map(int, input().split()))\n\nR, L = [], []\nfor i in range(m):\n l, r = list(map(int, input().split()))\n R.append(r)\n... | ['Wrong Answer', 'Accepted'] | ['s331622248', 's739296357'] | [11048.0, 11056.0] | [336.0, 340.0] | [172, 179] |
p03037 | u058640635 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M=(int(x) for x in int(input().split()))\nL=0\nR=N\nfor i in range(M):\n Li,Ri=(int(x) for x in int(input().split()))\n L=Li if Li>L \n R=Ri if Ri<R\nprint(Ri-Li+1)', 'N,M=(int(x) for x in input().split())\nL=0\nR=N\nfor i in range(M):\n Li,Ri=(int(x) for x in input().split())\n L=Li if Li>L else L\n R=Ri if ... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s310349887', 's542455909', 's600403055', 's834516625'] | [2940.0, 4084.0, 3060.0, 3060.0] | [18.0, 942.0, 327.0, 338.0] | [162, 209, 165, 186] |
p03037 | u062459048 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nL = []*M\nR = []*M\nfor i in range(M):\n L[i], R[i] = map(int, input().split())\n \nans = min(R)-(max(L)-1)\n\nprint(ans)', 'N, M = map(int, input().split())\nL = [0 for i in range(M)]\nR = [0 for i in range(M)]\nfor i in range(M):\n L[i], R[i] = map(int, input().split())\n \nans... | ['Runtime Error', 'Accepted'] | ['s053080751', 's815915469'] | [3060.0, 11016.0] | [17.0, 338.0] | [149, 191] |
p03037 | u072606168 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int, input().split())\nn = range(1,n+1)\nfor i in range(m):\n a,b = map(int, input().split())\n n = [j for j in n if a <= j <= b]\nprint(len(j))', "n,m = map(int, input().split())\np,q = float('-inf'),float('inf')\nfor i in range(m):\n a,b = map(int, input().split())\n if a > p:\n p = a\n if b < q:\... | ['Runtime Error', 'Accepted'] | ['s587725524', 's877324764'] | [7856.0, 3060.0] | [2104.0, 275.0] | [151, 207] |
p03037 | u073852194 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nD=[list(map(int,input().split())) for i in range(m)]\nmaxI=n\nminI=1\nfor i in range(m):\n maxI=max(maxI,D[i][1])\n minI=min(minI,D[i][0])\nprint(maxI-minI+1)', 'n,m=map(int,input().split())\nD=[list(map(int,input().split())) for i in range(m)]\nmaxI=n\nminI=1\nfor i in range(m):\n ma... | ['Wrong Answer', 'Accepted'] | ['s596402482', 's252283325'] | [27336.0, 27336.0] | [377.0, 375.0] | [183, 190] |
p03037 | u082861480 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import sys\nN,M = map(int,input().split())\nL,R = sorted(map(int, input().split()))\nrange_min = L\nrange_max = R\n\n\ndef end_checker(L,R,range_min,range_max):\n if L < range_max or R < range_min:\n return True\n return False\n\nwhile M > 1:\n L,R = sorted(map(int, input().split()))\n if end_checker(L,R,rang... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s120676842', 's277212823', 's674719145', 's947114867', 's521453758'] | [3064.0, 3828.0, 4212.0, 4212.0, 3064.0] | [390.0, 970.0, 960.0, 953.0, 394.0] | [503, 532, 542, 322, 502] |
p03037 | u086716588 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import numpy as np\nN, M = map(int, input().split())\nL = []\nR = []\nfor i in range(M):\n l, r = map(int, input().split())\n L.append(l)\n R.append(r)\nL, R = np.array(L), np.array(R)\nnp.append(L, R)\nprint(np.sum((L[M-1]<=L)*(L<R[0])))\n', 'N, M = map(int, input().split())\nL, R = [], []\nfor _ in range(M... | ['Wrong Answer', 'Accepted'] | ['s117349291', 's073156165'] | [21564.0, 10996.0] | [436.0, 304.0] | [238, 166] |
p03037 | u094213642 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = list(map(int, input().split()))\n\nlist = [list(map(int, input().split())) for x in range(m)]\n\nans = [1]*n\n\ns = 0\nm = n\n\nfor i in list:\n if i[0] > s:\n s = i[0]\n if i[1] < m:\n m = i[1]\nif m>=s:\n print(s, m)\nelse:\n print(0)', 'n, m = list(map(int, input().split()))\n\nlis... | ['Wrong Answer', 'Accepted'] | ['s565729942', 's404130333'] | [27808.0, 27960.0] | [225.0, 219.0] | [252, 253] |
p03037 | u094932051 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['while True:\n try:\n N, M = map(int, input().split())\n gate = [list(map(int, input().split())) for i in range(M)]\n \n dp = [0] * (N+1)\n for l, r in gate:\n dp[l-1] += 1\n dp[r] -= 1\n print(dp)\n \n cnt = 0\n ans = 0\n ... | ['Wrong Answer', 'Accepted'] | ['s080986823', 's541041364'] | [116312.0, 3956.0] | [2105.0, 346.0] | [459, 418] |
p03037 | u095094246 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nl=1\nr=n\nfor i in range(m):\n li,ri=map(int,input().split())\n l = max(l,li)\n r = min(r,ri)\nprint(max(r-l,0)', 'n,m=map(int,input().split())\nl=1\nr=n\nfor i in range(m):\n li,ri=map(int,input().split())\n l = max(l,li)\n r = min(r,ri)\nprint(max(r-l+1,0))'] | ['Runtime Error', 'Accepted'] | ['s030338718', 's370400997'] | [9044.0, 9200.0] | [23.0, 217.0] | [137, 140] |
p03037 | u097317219 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M = map(int,input().split())\nL = []\nR = []\nfor i in range(1,M+1):\n x,y = map(int,input().split())\n L.append(L_val)\n R.append(R_val)\nans = max(min(R) - max(L) + 1,0)\nprint(ans)', 'N,M = map(int,input().split())\nL = []\nR = []\nfor i in range(M+1):\n L_val,R_val = map(int,input().split())\n L.append(L_v... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s147475544', 's975952158', 's992053804'] | [3060.0, 11016.0, 10996.0] | [17.0, 303.0, 294.0] | [180, 186, 188] |
p03037 | u101151851 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = map(int, input().split())\nans_l = 1\nans_r = 10 ** 5\nl_list = []\nr_list = []\nfor i in range(m):\n l, r = map(int, input().split())\n l_list.append(l)\n r_list.append(r)\nfor r in r_list:\n if ans_r > r:\n ans_r = r\nfor l in l_list:\n if ans_l <= l:\n asn_l = l\nif ans_r > ans_... | ['Wrong Answer', 'Accepted'] | ['s234588204', 's898922744'] | [11004.0, 10996.0] | [317.0, 328.0] | [353, 347] |
p03037 | u102223485 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nB = set()\nfor i in range(M):\n L, R = map(int, input().split())\n A = set(for j in range(L, R+1))\n if i == 0:\n B = A\n B = A & B\nprint(len(B))', 'N, M = map(int, input().split())\nmaxL = 1\nminR = 1\nfor i in range(M):\n L, R = map(int, input().split())\n maxL = max(maxL... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s293908933', 's630807991', 's679367105'] | [2940.0, 3060.0, 3060.0] | [19.0, 319.0, 326.0] | [179, 179, 178] |
p03037 | u102278909 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['# coding: utf-8\n\nimport sys\ninput = sys.stdin.readline\n\n# N = int(input())\n# L = [int(x) for x in input().split()]\nN, M = map(int, input().split())\n# S = input()\n\nok = [0] * (N + 2)\nfor i in range(M):\n L, R = map(int, input().split())\n print(L, R)\n ok[L] += 1\n ok[R + 1] -= 1\n\nans = 0\ntmp... | ['Wrong Answer', 'Accepted'] | ['s241613245', 's625555279'] | [5388.0, 3956.0] | [334.0, 187.0] | [399, 383] |
p03037 | u102731033 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\nleft,right = 1,n\nfor i in range(m):\n l,r = map(int,input().split())\n left = max(left,1)\n right = min(right,r)\nprint(max(0,right-left+1))\n', 'n,m = map(int ,input().split())\nleft,right = 1,n\nfor i in range(m):\n l,r = map(int,input().split())\n left = max(left,l)\... | ['Wrong Answer', 'Accepted'] | ['s561795940', 's415097434'] | [3060.0, 3060.0] | [316.0, 318.0] | [177, 182] |
p03037 | u103902792 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\nans = [0 for _ in range(n+1)]\nfor i in range(m):\n l,r = map(int,input().split())\n ans[l] += 1\n ans[r+1] += -1\n \nfrom itertools import accumulate\nans = list(accumulate(ans))\ncount = 0\nfor a in ans:\n if a == n:\n count +=1\nprint(count)', 'n,m = map(int,input().split())... | ['Runtime Error', 'Accepted'] | ['s263695239', 's115458501'] | [7844.0, 8100.0] | [325.0, 327.0] | [271, 273] |
p03037 | u104442591 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = map(int, input().split())\nlist_open = []\nfor i in range(m):\n list_open.append(list((int(i) for i in input().split())))\ndict_open = {}\nfor i in range(m):\n for j in range(list_open[i][0], list_open[i][1] + 1):\n try:\n dict_open[j] += 1\n else:\n dict_open[j] = 1\nprint(list(dict_open.val... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s480745422', 's865537930', 's039686171'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 280.0] | [322, 323, 277] |
p03037 | u111497285 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = map(int, input().split())\nls = []\nrs = []\n\nfor _ in range(m):\n l, r = map(int, input().split())\n ls.append(l)\n rs.append(r)\n\nl_max = max(l)\nr_min = min(r)\nmaster_card_num = r_min - l_max\n\nif master_card_num < 0:\n print(0)\nelse:\n print(master_card_num + 1)', 'n, m = map(int, input... | ['Runtime Error', 'Accepted'] | ['s786615949', 's324427211'] | [10996.0, 10992.0] | [293.0, 299.0] | [277, 286] |
p03037 | u113827770 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ["n, m = list(map(int, input().split()))\nl = []\nr = []\nfor i in range(m):\n x, y=[int(i) for i in input().split()]\n l.append(x)\n r.append(y)\nans = 0\nfor i in range(n):\n cnt = 0\n for j in range(m):\n\n for k in range(l[j], r[j]+1):\n print(l[j], end=' ')\n print(r[j])... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s095454866', 's180123577', 's540732536', 's690581462', 's675498551'] | [22128.0, 3060.0, 2940.0, 22372.0, 3060.0] | [2104.0, 357.0, 20.0, 2108.0, 359.0] | [409, 232, 353, 449, 234] |
p03037 | u115284827 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['nm = [int(i) for i in input().split()]\nlr = [[int(i) for i in input().split()] for i in range(nm[1])]\n\n\na = [{j for j in range(lr[i][0], lr[0][1]+1)} for i in range(nm[1])]\nb = set()\nfor i in range(len(a)):\n if b == set():\n b = a[i]\n b = b & a[i]\n print(b)\nprint(len(b))', 'nm = [int(i) for ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001689238', 's836953294', 's207917590'] | [2077112.0, 2040884.0, 22816.0] | [2253.0, 2248.0, 318.0] | [286, 295, 184] |
p03037 | u116233709 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nlm,mr=0,n\nfor i in range(m):\n l,r=map(int(input()).split())\n lm=max(lm,l)\n mr=min(mr,r)\n x=mr-lm+1\n\nif x>=0:\n print(x)\nelse:\n print(0)\n', 'n,m=map(int,input().split())\nlm,mr=0,n\nfor i in range(m):\n l,r=map(int(input()))\n lm=max(lm,l)\n mr=min(mr,r)\n x=mr-lm+1\n\... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s018733072', 's075136032', 's209929833', 's356018563', 's899032655', 's234237799'] | [3060.0, 3060.0, 2940.0, 7056.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0, 290.0, 18.0, 349.0] | [170, 162, 152, 209, 207, 169] |
p03037 | u118211443 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = list(map(int, input().split()))\na = []\nb = [] * M\nr = []\nfor i in range(M):\n x, y = map(int, input().split())\n for j in range(x, y):\n a.append(j)\n b.append(a)\n a = []\nfor i in range(M - 1):\n r = list(set(b[i]) & set(b[i + 1]))\n\nif M >= 2:\n print(len(r))\n\nelse:\n prin... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s037586062', 's642224934', 's630412177'] | [810868.0, 10996.0, 3060.0] | [2155.0, 301.0, 317.0] | [317, 186, 184] |
p03037 | u119030449 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['def solve():\n maxCards, gates = map(int, input().split())\n gateRanges = [tuple(map(int, input().split())) for i in range(gates)]\n\n for i, permitRange in enumerate(gateRanges):\n if i == 0:\n activeBegin, activeEnd = permitRange\n continue\n begin, end = permitRange\n ... | ['Runtime Error', 'Accepted'] | ['s790967792', 's936260960'] | [16592.0, 16584.0] | [333.0, 345.0] | [694, 645] |
p03037 | u120485519 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, Q = map(int, input().split())\nl = [list(map(int, input().split())) for i in range(Q)]\n\ns_ids = []\nm_ids = []\n\nfor i in range(Q):\n s_ids.append(l[i][0])\n m_ids.append(l[i][1])\n\nmax_s_id = max(s_ids)\nmin_m_id = min(m_ids)\n\nprint(max_s_id)\nprint(min_m_id)\n\ndiff = abs(max_s_id - min_m_id)\nprint(... | ['Wrong Answer', 'Accepted'] | ['s531023451', 's928986644'] | [29092.0, 29100.0] | [360.0, 418.0] | [309, 364] |
p03037 | u125348436 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M=map(int,input().split())\nl=[list(map(int,input().split())) for i in range(M)]\nkyotu=[]\n\nfor m in range(M):\n code="name{}=[]".format(m)\n exec(code)\n\nfor j in range(M):\n "name{}=range(l[j][0],l[j][1]+1)".format(j)\n codea=print("name{}").format(j)\n exec(codea)\n \n \nfor k in range(M):\n co="kyotu... | ['Runtime Error', 'Accepted'] | ['s581872822', 's388194394'] | [54252.0, 27332.0] | [1486.0, 379.0] | [424, 207] |
p03037 | u135265051 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['# import math\n# import statistics\n# a=input()\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\ne1,e2 = map(int,input().split())\n#f = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\nh = []\nfor i in range(e2):\n h.append(list(map(int,input().split())))\n\nans=[]\nha1=[]\nha = [k fo... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s217929455', 's639879168', 's093798322'] | [616712.0, 27392.0, 28864.0] | [2224.0, 2206.0, 257.0] | [778, 533, 460] |
p03037 | u135847648 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M= map(int,input().split())\nLRlis = [list(map(int, input().split())) for i in range(M)]\nprint(LRlis[0][0])\nA = list(range(LRlis[0][0],LRlis[0][1]+1))\nfor i in range(M):\n B = list(range(LRlis[i][0],LRlis[i][1]+1))\n C = list(set(A) & set(B))\n\nprint(len(C))', 'N,M= map(int,input().split())\nLRlis = [list(map... | ['Wrong Answer', 'Accepted'] | ['s449586617', 's591833793'] | [53660.0, 27328.0] | [2107.0, 386.0] | [258, 256] |
p03037 | u143492911 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input().split())\nL=[]\nR=[]\nfor i in range(m):\n l,r=map(int,input().split())\n L[i],R[i]=l,r\nprint(abs(max(L)-min(R)+1)\n', 'n,m=map(int,input().split())\nL=[0]*m\nR=[0]*m\ntable=[0]*(n+2)\nfor i in range(m):\n L[i],R[i]=map(int,input().split())\n table[L[i]]+=1\n table[R[i]+1]-=1\ns=[0... | ['Runtime Error', 'Accepted'] | ['s445701910', 's815920842'] | [2940.0, 15836.0] | [17.0, 374.0] | [136, 265] |
p03037 | u148540382 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import copy\n\nn, m = list(map(int, input().split()))\n\nlr = [list(map(int, input().split())) for i in range(m)]\nlr.sort()\nlr_min = 100000\nlr_difference = 0\n\nfor i in range(m - 1):\n if max(lr[i]) >= min(lr[i + 1]):\n lr_difference = max(lr[i]) - min(lr[i + 1]) + 1\n print(lr_difference)\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s008023035', 's067820180', 's377763441', 's903309496', 's577536975'] | [28684.0, 28272.0, 47088.0, 32776.0, 27772.0] | [809.0, 791.0, 919.0, 881.0, 502.0] | [495, 481, 698, 505, 305] |
p03037 | u150664457 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['mi = 1\nma = N\n\nfor i in range(M):\n if mi < List[i][0]:\n mi = List[i][0]\n if ma > List[i][1]:\n ma = List[i][1]\n\ndiff = ma - mi + 1\nif diff < 0:\n diff = 0\nprint("{}".format(diff))', 'N, M = map(int,input().split())\nList = [list(map(int,input().split())) for i in range(M)]\n\nmi = 1\n... | ['Runtime Error', 'Accepted'] | ['s931375197', 's315560919'] | [3060.0, 27332.0] | [17.0, 347.0] | [200, 291] |
p03037 | u152614052 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\nli=[list(map(int,input().split())) for i in range(m)]\nmax_l,min_r=0,10**9\n\nfor i in li:\n max_l = max(max_l,li[0])\n min_r = min(min_r,li[1])\nprint(min_r-max_l+1)', 'n,m = map(int,input().split())\nli=[list(map(int,input().split())) for i in range(m)]\ncnt = ()\nans=[]\n\nfor... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s037359975', 's845569511', 's683263623'] | [27328.0, 27348.0, 27328.0] | [328.0, 323.0, 384.0] | [197, 250, 235] |
p03037 | u152861889 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\n\nleft = 1\nright = N\n\nfor i in range(M):\n L, R = map(int, input().split())\n if L > left :\n left = L\n if R < right:\n right = R\n\nprint(left-right+1)\n', 'N, M = map(int, input().split())\n\nleft = 1\nright = N\n\nfor i in range(M):\n L, R = map(int, ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s029505845', 's092000237', 's444501857', 's796990740'] | [3060.0, 3060.0, 5108.0, 3060.0] | [312.0, 281.0, 855.0, 279.0] | [202, 195, 294, 246] |
p03037 | u152891327 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nL = 0\nR = 100000\nfor i in range(M):\n Li, Ri = map(int, input().split())\n if Li > L:\n L = Li\n if Ri < R:\n R = Ri\nprint(L - R + 1)', 'N, M = map(int, input().split())\nL = 1\nR = N\nfor i in range(M):\n Li, Ri = map(int, input().split())\n if Li > L:\n L = Li\n i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s360895413', 's553683297', 's113079110'] | [3060.0, 3060.0, 3060.0] | [283.0, 285.0, 284.0] | [170, 166, 196] |
p03037 | u153729035 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\n\nL, R = map(int, input().split())\nans = set(range(L, R + 1))\n\nfor i in range(1, M):\n L, R = map(int, input().split())\n ans -= set(range(L, R + 1))\n\nprint(len(ans))', 'N, M = map(int, input().split())\n\nL = []\nR = []\n\nfor i in range(M):\n l, r = map(int, input().s... | ['Wrong Answer', 'Accepted'] | ['s325071725', 's021513002'] | [26176.0, 16764.0] | [2206.0, 202.0] | [202, 172] |
p03037 | u155774139 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M - map(int, input())\ngate_l = [[int(x) for x in input().split()] for _ in range(M)]\n\nmin_card = max(l[0] for l in gate_l)\nmax_card = min(l[1] for l in gate_l)\n\nprint(max_card - min_card +1)', 'N,M - map(int, input())\ngate_l = [[int(x) for x in input().split()] for _ in range(M)]\n\nmin_card = max(l[0] for l... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s113326404', 's535946029', 's786558275'] | [2940.0, 3060.0, 21108.0] | [17.0, 17.0, 316.0] | [192, 244, 253] |
p03037 | u156113867 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import sys\nfrom sys import stdin\nimport numpy as np\n\nN, M = map(int, input().split())\nL, R = list(), list()\nfor i in range(M):\n l,r = map(int, input().split())\n L.append(int(l))\n R.append(int(r))\n\ninputs = np.vstack((L, R)).T\n \ncount = 0\nfor i in range(1, N+1):\n out = (inputs[:, 0] >= i) & (inputs... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s380002912', 's424650323', 's755151557', 's112987640'] | [23172.0, 23364.0, 18736.0, 20788.0] | [2109.0, 2112.0, 278.0, 284.0] | [362, 373, 371, 318] |
p03037 | u163421511 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n, m = map(int, input().split())\nl, r = [], []\n\nfor _ in range(m):\n s, t = map(int, input().split())\n l.append(s)\n r.append(t)\n\nans = min(r) - max(s) + 1\nprint(ans)', 'n, m = map(int, input().split())\nl, r = [], []\n\nfor _ in range(m):\n s, t = map(int, input().split())\n l.append(int(s))\n ... | ['Runtime Error', 'Accepted'] | ['s934665358', 's014158095'] | [16840.0, 16812.0] | [203.0, 223.0] | [173, 211] |
p03037 | u164229553 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import numpy as np\nN, M = [int(i) for i in input().split()]\n\ngate = np.zeros(N+1)\nfor i in range(0, M):\n L, R = [int(j) for j in input().split()]\n gate[L-1] += 1\n gate[R] -=1\n\ncount = 0\nfor i in range(1, len(gate)):\n gate[i] = gate[i] + gate[i-1]\n\nfor i in range(0, M):\n if gate[i] == M:\n... | ['Runtime Error', 'Accepted'] | ['s142428641', 's283220066'] | [13184.0, 14552.0] | [1046.0, 1038.0] | [335, 344] |
p03037 | u165436807 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N, M = map(int, input().split())\nL = [0] * M\nR = [0] * M\nmin = 1\nmax = N\nX = 0\nfor i in range(M):\n L[i], R[i] = map(int, input().split())\n if L[i] > min:\n min = L[i]\n if R[i] < max:\n max = R[i]\n if R[i] < min or L[i] > max:\n X +=1\n\n\nif X = 0:\n print(max-min+1)\nels... | ['Runtime Error', 'Accepted'] | ['s263857964', 's992650846'] | [3060.0, 10868.0] | [17.0, 332.0] | [316, 317] |
p03037 | u167681750 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['import sys\ninput = sys.stdin.readline\n\nn, m = map(int, input().split())\na = sorted(list(map(int, input().split())))\nbc = sorted([list(map(int, input().split())) for i in range(m)], key = itemgetter(1), reverse=True)\n\nans = 0\nfor i in range(n):\n now = a[i]\n for rep, con in enumerate(bc):\n if no... | ['Runtime Error', 'Accepted'] | ['s674913721', 's423667273'] | [27340.0, 27376.0] | [155.0, 388.0] | [481, 276] |
p03037 | u175590965 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int,input().split())\nl = [0]*m\nr = [0]*m\nfor i in range(m):\n l[i],r[i] = map(int,input().split())\nif min(r)-max(l) < 0:\n print(0)\nelse:\n print(min(r)-max(l))', 'n,m = map(int,input().split())\nl = [0]*m\nr = [0]*m\nfor i in range(m):\n l[i],r[i] = map(int,input().split())\nif min(r)-max(... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s132683963', 's221474045', 's165735286'] | [10868.0, 2940.0, 16640.0] | [296.0, 17.0, 199.0] | [176, 175, 178] |
p03037 | u178192749 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = map(int, input().split())\nleft = 0\nright = 10**5\nfor _ in range(m):\n l,r = map(int,input().split())\n left = max(left, l)\n right = min(right,r)\nprint(r-l+1)', 'n,m = map(int, input().split())\nleft = 0\nright = 10**5\nfor _ in range(m):\n l,r = map(int,input().split())\n left = max(left, l)... | ['Wrong Answer', 'Accepted'] | ['s962144106', 's822623787'] | [3060.0, 3060.0] | [319.0, 324.0] | [170, 185] |
p03037 | u178392375 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['\nn, m = map(int, input().split())\ncard = [0 for _ in range(n+2)]\n\nfor _ in range(m):\n l, r = map(int, input().split())\n card[l] += 1\n card[r+1] -= 1\n\n#print(card)\n\nfor i in range(n+1):\n card[i+1] += card[i]\n\n#print(card)\nprint(card.count(3))\n', '\nn, m = map(int, input().split())\ncard = [... | ['Wrong Answer', 'Accepted'] | ['s669989804', 's331108293'] | [7080.0, 7080.0] | [347.0, 344.0] | [254, 254] |
p03037 | u182332190 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m=map(int,input())\n\nl=-1\nr=10**6\n\nfor _ in range(m):\n il, ir=map(int,input())\n l=max(l,il)\n r=min(r,ir)\n \nprint(r-l+1)', 'n,m=map(int,input())\n \nl=-1\nr=10**6\n \nfor _ in range(m):\n il, ir=map(int,input())\n l=max(l,il)\n r=min(r,ir)\n \nprint(max(0,r-l+1))', 'n,m=map(int,input().split())\n \n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s429550836', 's698669567', 's453136464'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 325.0] | [124, 133, 149] |
p03037 | u185405877 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['n,m = list(map(int, input().split()))\nhigh=10**10\nlow=0\nfor i in range(m):\n a,b = list(map(int, input().split()))\n if a>low:\n low=a\n if b<high:\n kigk=b\nprint(high-low+1)', 'n,m = list(map(int, input().split()))\nhigh=10**10\nlow=0\nfor i in range(m):\n a,b = list(map(int, input().sp... | ['Wrong Answer', 'Accepted'] | ['s008017036', 's341504624'] | [3060.0, 3188.0] | [330.0, 323.0] | [192, 228] |
p03037 | u188745744 | 2,000 | 1,048,576 | We have N ID cards, and there are M gates. We can pass the i-th gate if we have one of the following ID cards: the L_i- th, (L_i+1)-th, ..., and R_i-th ID cards. How many of the ID cards allow us to pass all the gates alone? | ['N,M= list(map(int,input().split()))\nend = []\nstart = []\nfor i in range(M):\n A,B = list(map(int,input().split()))\n end.append(B)\n start.append(A)\nend_min = min(end)\nstart_max = max(start)\nif start_max => end_min:\n print(0)\nelse:\n print(end_min-start_end+1)', 'N,M= list(map(int,input().split(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s045155192', 's535836909', 's574201976'] | [2940.0, 11056.0, 11064.0] | [17.0, 346.0, 334.0] | [270, 270, 269] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.