- contest: local history
- contest: task status cache
- utilitka, kterou si po soutezi mohou vsichni pretestovat na souteznich datech
-- per-task setting of maximum submission size
Various ideas:
scores dependent on time (like PL olympiad)
/*** SUBMIT ***/
static struct fastbuf *
-read_attachment(struct conn *c)
+read_attachment(struct conn *c, uns max_size)
{
uns size = obj_find_anum(c->request, 'S', 0);
- if (size > max_attachment_size)
+ if (size > max_size)
{
err(c, "Submission too large");
return NULL;
return;
}
- struct fastbuf *fb = read_attachment(c);
+ uns max_size = task->max_size ? : max_attachment_size;
+ struct fastbuf *fb = read_attachment(c, max_size);
if (!fb)
return;
MaxRequestSize 4K
# Maximum size of an attachment (i.e., a submitted solution)
+# This is a default, which can be overriden in task definitions.
MaxAttachSize 256K
# Number of bits for the Diffie-Hellman key exchange
# IP address range matched by this rule
IP 127.0.0.1
- # Administrator access allowed
+ # Administrator access allowed (does not do anything yet)
Admin 1
# Plain-text connections without any user authentication allowed
Tasks {
# Task plans
-# Task { Name world; OpenData 10; }
+ Task { Name world; OpenData 10; MaxSize 1M; }
Task necklace
Task nei
cnode n;
byte *name;
uns open_data; // Number of parts for open-data tasks
+ uns max_size; // Maximum size (0=use global default)
clist parts; // List of parts of this task (simp_nodes)
clist *extensions; // List of allowed extensions for this task (simp_nodes)
};
CF_ITEMS {
CF_STRING("Name", PTR_TO(struct task, name)),
CF_UNS("OpenData", PTR_TO(struct task, open_data)),
+ CF_UNS("MaxSize", PTR_TO(struct task, max_size)),
CF_END
}
};