msubmitter () {
# Extract the current directory name
local dir_name=$(basename "$PWD")
local problem_id="$1"
local file_name="$2"
local extension="${file_name##*.}"
local language="unknown"
case "$extension" in
cpp) language="c++" ;;
py) language="python" ;;
java) language="java" ;;
js) language="javascript" ;;
c) language="c" ;;
*) language="unknown" ;;
esac
local task_url="codeforces.com/contest/${dir_name}/problem/${problem_id}" //(add https:// at the beginning)
local command="submitter ${task_url} ${language} ${file_name}"
echo "Executing: ${command}"
eval "${command}"
}
bXN1Ym1pdHRlciAoKSB7CiAgICAjIEV4dHJhY3QgdGhlIGN1cnJlbnQgZGlyZWN0b3J5IG5hbWUKICAgIGxvY2FsIGRpcl9uYW1lPSQoYmFzZW5hbWUgIiRQV0QiKQogICAgbG9jYWwgcHJvYmxlbV9pZD0iJDEiCiAgICBsb2NhbCBmaWxlX25hbWU9IiQyIgogICAgbG9jYWwgZXh0ZW5zaW9uPSIke2ZpbGVfbmFtZSMjKi59IgogICAgbG9jYWwgbGFuZ3VhZ2U9InVua25vd24iCiAgICBjYXNlICIkZXh0ZW5zaW9uIiBpbgogICAgICAgIGNwcCkgbGFuZ3VhZ2U9ImMrKyIgOzsKICAgICAgICBweSkgbGFuZ3VhZ2U9InB5dGhvbiIgOzsKICAgICAgICBqYXZhKSBsYW5ndWFnZT0iamF2YSIgOzsKICAgICAgICBqcykgbGFuZ3VhZ2U9ImphdmFzY3JpcHQiIDs7CiAgICAgICAgYykgbGFuZ3VhZ2U9ImMiIDs7CiAgICAgICAgKikgbGFuZ3VhZ2U9InVua25vd24iIDs7CiAgICBlc2FjCiAgICBsb2NhbCB0YXNrX3VybD0iY29kZWZvcmNlcy5jb20vY29udGVzdC8ke2Rpcl9uYW1lfS9wcm9ibGVtLyR7cHJvYmxlbV9pZH0iIC8vKGFkZCBodHRwczovLyBhdCB0aGUgYmVnaW5uaW5nKQogICAgbG9jYWwgY29tbWFuZD0ic3VibWl0dGVyICR7dGFza191cmx9ICR7bGFuZ3VhZ2V9ICR7ZmlsZV9uYW1lfSIKICAgIGVjaG8gIkV4ZWN1dGluZzogJHtjb21tYW5kfSIKICAgIGV2YWwgIiR7Y29tbWFuZH0iCn0K
Main.java:1: error: class, interface, or enum expected
msubmitter () {
^
Main.java:2: error: illegal character: '#'
# Extract the current directory name
^
Main.java:10: error: class, interface, or enum expected
py) language="python" ;;
^
Main.java:11: error: class, interface, or enum expected
java) language="java" ;;
^
Main.java:12: error: class, interface, or enum expected
js) language="javascript" ;;
^
Main.java:13: error: class, interface, or enum expected
c) language="c" ;;
^
Main.java:14: error: class, interface, or enum expected
*) language="unknown" ;;
^
Main.java:15: error: class, interface, or enum expected
esac
^
8 errors