new file: .vscode/launch.json new file: .vscode/settings.json modified: __pycache__/get_in.cpython-310.pyc modified: __pycache__/get_info.cpython-310.pyc modified: __pycache__/initialization.cpython-310.pyc modified: __pycache__/kill_course.cpython-310.pyc modified: __pycache__/single_course.cpython-310.pyc deleted: course_info.json modified: demo.py modified: get_info.py deleted: info.json new file: requirements.txt modified: single_course.pymain
parent
a738b13d29
commit
da8a3404ae
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "macos-clang-arm64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "/usr/bin/clang",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "macos-clang-arm64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "C/C++ Runner: Debug Session",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "/Users/xuxiaolan/PycharmProjects/cyan_horse",
|
||||||
|
"program": "/Users/xuxiaolan/PycharmProjects/cyan_horse/build/Debug/outDebug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp_Runner.cCompilerPath": "clang",
|
||||||
|
"C_Cpp_Runner.cppCompilerPath": "clang++",
|
||||||
|
"C_Cpp_Runner.debuggerPath": "lldb",
|
||||||
|
"C_Cpp_Runner.cStandard": "",
|
||||||
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
|
"C_Cpp_Runner.msvcBatchPath": "",
|
||||||
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
|
"C_Cpp_Runner.warnings": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wpedantic",
|
||||||
|
"-Wshadow",
|
||||||
|
"-Wformat=2",
|
||||||
|
"-Wcast-align",
|
||||||
|
"-Wconversion",
|
||||||
|
"-Wsign-conversion",
|
||||||
|
"-Wnull-dereference"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
|
"/W4",
|
||||||
|
"/permissive-",
|
||||||
|
"/w14242",
|
||||||
|
"/w14287",
|
||||||
|
"/w14296",
|
||||||
|
"/w14311",
|
||||||
|
"/w14826",
|
||||||
|
"/w44062",
|
||||||
|
"/w44242",
|
||||||
|
"/w14905",
|
||||||
|
"/w14906",
|
||||||
|
"/w14263",
|
||||||
|
"/w44265",
|
||||||
|
"/w14928"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
|
"C_Cpp_Runner.includePaths": [],
|
||||||
|
"C_Cpp_Runner.includeSearch": [
|
||||||
|
"*",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
|
"**/build",
|
||||||
|
"**/build/**",
|
||||||
|
"**/.*",
|
||||||
|
"**/.*/**",
|
||||||
|
"**/.vscode",
|
||||||
|
"**/.vscode/**"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,10 +1,20 @@
|
|||||||
import json
|
from typing import List
|
||||||
dic = json.load(open('course_info.json', 'r'))
|
class Solution:
|
||||||
l1 = [ i for i in dic.keys() if dic[i]['type'] == '选修' ]
|
def maxArrayValue(self, nums: List[int]) -> int:
|
||||||
l2 = [ i for i in dic.keys() if dic[i]['type'] == '必修' ]
|
n = len(nums)
|
||||||
l3 = [ i for i in dic.keys() if dic[i]['type'] == '专题' ]
|
i = n - 1
|
||||||
l4 = [ i for i in dic.keys() if dic[i]['type'] == '培训' ]
|
while i > 0 and len(nums) > 1:
|
||||||
print(len(l1))
|
cur = nums[i]
|
||||||
print(len(l2))
|
formal = nums[i - 1]
|
||||||
print(len(l3))
|
if formal <= cur:
|
||||||
print(len(l4))
|
cur += formal
|
||||||
|
nums[i] = cur
|
||||||
|
nums.pop(i - 1)
|
||||||
|
i = len(nums) - 1
|
||||||
|
else:
|
||||||
|
i -= 1
|
||||||
|
return max(nums)
|
||||||
|
|
||||||
|
s = Solution()
|
||||||
|
print(s.maxArrayValue([5,3,3]))
|
||||||
|
print(s.maxArrayValue([2,3,7,9,3]))
|
@ -1 +0,0 @@
|
|||||||
{"username": "51140220050507901X", "password": "hnqm123456", "study_type": "\u7f51\u7edc\u6587\u660e\u5fd7\u613f\u8005"}
|
|
@ -0,0 +1,3 @@
|
|||||||
|
DrissionPage==4.0.4.8
|
||||||
|
DrissionPage==4.0.4.11
|
||||||
|
loguru==0.7.2
|
Loading…
Reference in new issue