gnull's blog

By gnull, 10 years ago, translation, In English

text

Hello everyone! I've written a script in emacs lisp, that can:

  • Submit solution
  • Download tests
  • Enter by handle/password
  • Store cookies between runs

All the requests are made using curl. link.

Installation

  • Download script.
  • Insert to your ~/.emacs file the following code:
(add-to-list 'load-path "/folder/containing/script/")
(load "cf-keys.el")

Using

  • C-c i — Log in
  • C-c o — Log out
  • C-c w — Get your current handle
  • C-c s — Submit currently open file
  • C-c d — Save tests to current folder

Submit and save functions "guess" the contest number, problem index and the programming language by the current file name in one of the following forms:

  • directory/505/A/myfile.cpp
  • directory/505/a.c
  • directory/505a.cc

Setup

In your ~/.emacs file you can change the default variable values:

  • cf-default-language — Default language. Can be one of the values defined in cf-languages.el
  • cf-host — "codeforces.ru" or "codeforces.com"
  • cf-cookies-file — File, in which curl will store cookies

Example: (setq cf-cookies-file "/home/vasya/my_codeforces_cookies")

Keybindings can be changed at the end of the file cf-keys.el.

Full text and comments »

  • Vote: I like it
  • +42
  • Vote: I do not like it

By gnull, 12 years ago, translation, In English

What is probability to guess the answer of this problem?

A. 25%
B. 50%
C. 60%
D. 25%

I found another variants of this problem:link , translated

Full text and comments »

  • Vote: I like it
  • +12
  • Vote: I do not like it