fork download
  1. msubmitter () {
  2. # Extract the current directory name
  3. local dir_name=$(basename "$PWD")
  4. local problem_id="$1"
  5. local file_name="$2"
  6. local extension="${file_name##*.}"
  7. local language="unknown"
  8. case "$extension" in
  9. cpp) language="c++" ;;
  10. py) language="python" ;;
  11. java) language="java" ;;
  12. js) language="javascript" ;;
  13. c) language="c" ;;
  14. *) language="unknown" ;;
  15. esac
  16. local task_url="codeforces.com/contest/${dir_name}/problem/${problem_id}" //(add https:// at the beginning)
  17. local command="submitter ${task_url} ${language} ${file_name}"
  18. echo "Executing: ${command}"
  19. eval "${command}"
  20. }
  21.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty