hi, a Croatian Olympiad in Informatics will be held at time.

Where do I register for the contest? Everyone with an account on evaluator.hsin.hr can compete. There is no additional registration for the contest.

Who is eligible for participating in COCI? Everyone (but not teams).

Should I use %lld or %I64d for long long input/output in C++? %lld.

How fast is the CPU of the evaluator? model name : Intel(R) Xeon(R) CPU E5520 @ 2.27GHz 4 cores

What are the input / output file names? You don’t read the input from files, you don’t print the results to files. Use standard input and standard output (stdin/stdout).

My code received "Non-zero exit code (#).". What does that mean? It means your program crashed on our machine. You may want to use the test interface to see more details about the error.

What compiler and flags are used to compile my source? We are using the following compilers and flags: Language Compiler Flags C gcc 4.7.2 -std=c99 -O2 -static -s -lm C++ g++ 4.7.2 -O2 -static -s -lm C++11 g++ 4.8.2 -std=c++0x -O2 -static -s -lm Pascal fpc 2.6.2 -O1 -XS Java javac 1.6.0_27 Python python 2.7.3

Thank you for the notification. Will you always notify COCI contests into Codeforces?

Sure, why not. :-)

This contest starts 2 hours before TCO14 Round 1A, but lasts 3 hours.

Actually, the duration of this contest is 5 hours.

In case anyone was curious, short solution ideas:

CSS: construct a tree where each vertex contains element name &`set<>`

of classes (the root represents the body of the page); for every query, check which vertices match each classifier and do a DP (DP[i][j] denotes whether the firsticlassifiers can match some vertices on the path from the root to vertexj); for "ancestor" relations between consecutive classifiersi,i+ 1, do a BFS (if some vertex hadDP[i][j] =True, then all its children will have it True) before computingDP[i+ 1][]; map the class names to ints, so the complexity is , whereLis the max. number of class names in 1 queryHISTOGRAMI: sweepline DP — sort the points by thex-coordinate, computeB[i] — min. error if we ended a horizontal segment at pointi(take just the nearest point to the left of the current one), and from thatA[i] — min. error if we ended a vertical segment there (find the point with the samex-coordinate and smallestB[i]), also keep 1 more array that says from which point we'd need to make the last segment to get that answer and reconstruct the full answer from it; in order to knowB[i], compute using another sweeplineW[i] — the error we'd get if we had just 1 horizontal segment (0, 0) - (0,i); for type 1, it needs just 1 array where we mark how many heights in that segment would add 0 to the error, for type 2 we need a BIT where we store, for each heighty, +yinF[y] (so we can sum up the heights ≤t); complexity:MOSTOVI: you never need to take 3 bridges, because you'd get a cycle in your path, and that leaves 3 cases; keep the whole segments connected by 1-way roads in a`map<>`

, which allows you to check if you can take 0 bridges; for 2 bridges (A,B), bridgeAmust be afterG_{1}, bridgeBbeforeG_{2}and there must be a path from the other end of bridgeAto that of bridgeB, so we can take just the first possibleAand last possibleB(for that, keep the bridges in a`map<>`

) and check if this path works; for 1 bridge, bin-search the last bridge (or its endpoint) that's afterA, reachable fromAand beforeB, and check ifBis reachable from it; bin-search on map takes and the other 2 types of queries just (per query)NIZOVI: always bin-search how many points in the right array are smaller than the leftmost one in the left array, reverse these points, reverse the left array and reverse them both together; the result is correctly sorted up to the smallest point of the left array, so ignore that (correctly sorted) part and run the same algorithm on the new array, which has the same form as before, just with newN_{A}- 1 and some smallerN_{B}; that means at most 20N_{A}comparisons, 3N_{A}reverses and reverse cost at most 2N_{B}+N_{A}(N_{A}+ 1) (which almost fits, just needs some optimization)How can i submit problems,I didn't find.

evaluator.hsin.hr

I didn't find,Could you say me where?