From 82dea348a6d3c52381f3a0ef5a5d608f02e30dca Mon Sep 17 00:00:00 2001 From: SUMIN Date: Sat, 11 Apr 2026 11:57:53 +0900 Subject: [PATCH] =?UTF-8?q?Upload=20files=20to=20"=EB=B0=B1=EC=A4=80"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 백준/30805.py | 41 ++++++++++++++++++++++++++++++++++ 백준/42860.py | 38 +++++++++++++++++++++++++++++++ 백준/84512.py | 31 ++++++++++++++++++++++++++ 백준/app 2.py | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 172 insertions(+) create mode 100644 백준/30805.py create mode 100644 백준/42860.py create mode 100644 백준/84512.py create mode 100644 백준/app 2.py diff --git a/백준/30805.py b/백준/30805.py new file mode 100644 index 0000000..1fdc459 --- /dev/null +++ b/백준/30805.py @@ -0,0 +1,41 @@ +import sys + +input = sys.stdin.readline + +n = int(input()) +A = list(map(int, input().split())) +m = int(input()) +B = list(map(int, input().split())) + +nextA = [[-1] * 101 for _ in range(n+1)] +nextB = [[-1] * 101 for _ in range(m+1)] + +for i in range(n-1, -1 ,-1): + for num in range(1, 101): + nextA[i][num] = nextA[i+1][num] + nextA[i][A[i]] = i + +for i in range(m-1, -1 ,-1): + for num in range(1, 101): + nextB[i][num] = nextB[i+1][num] + nextB[i][B[i]] = i + +result = [] +i = j = 0 +while ialert("hello {userid}");history.go(-1);' + return '' + +app.run(host='0.0.0.0', port=8000)