## Problem `LANGUAGE_VERSIONS` only covered cpp and python. Several platform IDs were wrong — CodeChef used `C++ 17`/`Python 3` (correct: `C++`/`PYTH 3`), USACO listed nonexistent c++20/c++23 options, and CSES only had C++17. ## Solution Verify every platform's submit page and update all language ID tables. Add java and rust entries where supported, fix incorrect CodeChef and USACO IDs, and expand CSES `CSES_LANGUAGES` dict with C++11/C++20/PyPy3/Java/Rust variants.
39 lines
803 B
Python
39 lines
803 B
Python
LANGUAGE_IDS = {
|
|
"atcoder": {
|
|
"cpp": "6017",
|
|
"python": "6082",
|
|
"java": "6056",
|
|
"rust": "6088",
|
|
},
|
|
"codeforces": {
|
|
"cpp": "89",
|
|
"python": "70",
|
|
},
|
|
"cses": {
|
|
"cpp": "C++17",
|
|
"python": "Python3",
|
|
"java": "Java",
|
|
"rust": "Rust2021",
|
|
},
|
|
"usaco": {
|
|
"cpp": "cpp",
|
|
"python": "python",
|
|
"java": "java",
|
|
},
|
|
"kattis": {
|
|
"cpp": "C++",
|
|
"python": "Python 3",
|
|
"java": "Java",
|
|
"rust": "Rust",
|
|
},
|
|
"codechef": {
|
|
"cpp": "C++",
|
|
"python": "PYTH 3",
|
|
"java": "JAVA",
|
|
"rust": "rust",
|
|
},
|
|
}
|
|
|
|
|
|
def get_language_id(platform: str, language: str) -> str | None:
|
|
return LANGUAGE_IDS.get(platform, {}).get(language)
|