mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
23 lines
425 B
Python
23 lines
425 B
Python
def problem_p03632(input_data):
|
|
import sys
|
|
|
|
sys.setrecursionlimit(4100000)
|
|
|
|
import itertools
|
|
import math
|
|
|
|
INF = float("inf")
|
|
|
|
from heapq import heapify, heappop, heappush
|
|
|
|
def main():
|
|
|
|
a, b, c, d = list(map(int, input_data.split()))
|
|
|
|
tmp = set(list(range(a, b + 1))) & set(list(range(c, d + 1)))
|
|
|
|
return max(0, len(tmp) - 1)
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|