SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
ACM ICPC 2016–2017
Northeastern European Regional Contest
Problems Review
December 4, 2016
Problems summary
Recap: 228 teams, 13 problems, 5 hours,
This review assumes the knowledge of the problem statements
(published separately on http://neerc.ifmo.ru/ web site)
Summary table on the next slide lists problem name and stats
author — author of the original idea
acc — number of teams that had solved the problem (gray bar
denotes a fraction of the teams that solved the problem)
runs — number of total attempts
succ — overall successful attempts rate (percent of accepted
submissions to total, also shown as a bar)
Problems summary (2)
problem name author acc/runs succ
Abbreviation Roman Elizarov 161 /447 36%
Binary Code Niyaz Nigmatullin 5 /76 6%
Cactus Construction Pavel Kunyavsky 8 /20 40%
Delight for a Cat Gennady Korotkevich 1 /2 50%
Expect to Wait Vitaliy Aksenov 62 /208 29%
Foreign Postcards Niyaz Nigmatullin 115 /261 44%
Game on Graph Pavel Kunyavsky 3 /12 25%
Hard Refactoring Elena Kryuchkova 168 /526 31%
Indiana Jones and the
Uniform Cave
Georgiy Korneev 0 /13 0%
Jenga Boom Georgiy Korneev 59 /396 14%
Kids Designing Kids Pavel Mavrin 7 /38 18%
List of Primes Mikhail Dvorkin 12 /28 42%
Mole Tunnels Borys Minaiev 2 /4 50%
Problem A. Abbreviation
Total
time
0h 1h 2h 3h 4h 5h
161
286
Java C++ Python Total
Accepted 9 142 10 161
Rejected 39 230 17 286
Total 48 372 27 447
solution team att time size lang
Fastest 1 16 2,015 C++
Shortest 1 19 386 Python
Max atts. 9 292 4,689 C++
Problem A. Abbreviation
One of the two simple problems in the contest
Many ways to write a solution
One of the ways is this:
Split each line into words and separators
Identify capitalized words per problem statement
Find the longest sequences of two or more words separated by
a single space
Perform replacements per the problem statement
The shortest solution from Ural Federal University 4
(Ankudinov, Borzunov, Stikhin) uses a single regular
expression with a replacement function:
re.sub(r’b[A-Z][a-z]+( [A-Z][a-z]+b)+’, abbr, text)
Problem B. Binary Code
Total
time
0h 1h 2h 3h 4h 5h
5
71
Java C++ Python Total
Accepted 1 4 0 5
Rejected 1 70 0 71
Total 2 74 0 76
solution team att time size lang
Fastest 2 204 4,918 Java
Shortest 2 204 4,918 Java
Max atts. 5 205 4,940 C++
Problem B. Binary Code
Solution outline: solve the problem by converting it into an
instance of 2-SAT problem
1. Build a trie of the given strings
2. Define two variables v0
i and v1
i = ¯v1
i for each word si that
contains a “?”
v0
i is true and v1
i is false when “?”is replaced with “0”in si
v0
i is false and v1
i is true when “?”is replaced with “1”in si
3. Create a graph with two nodes for each string. One node for
v0
i , the other for v1
i
4. Use the trie to convert binary code constraints into 2-SAT
problem instance using implications
5. Use the classical 2-SAT solution algorithm via the graph
algorithm to find strongly connected components in
implications graph
Problem B. Binary Code — Build a trie
Follow the classic approach, build a binary trie
For strings with “?”add both replacements for “?”into a trie
At the terminal nodes for the string s with “?”put the
corresponding variable (s0 or s1 depending on replacement)
At the terminal nodes for the string s without “?”put the
separate variable T that is always true
If more than one string without “?”ends at the same node of
the trie, the answer is “NO”
Problem B. Binary Code — Trie example
Trie for the first example
root
a0
b0
a1
c0
b1
d0
c1
d1
a: 00?
b: 0?00
c: ?1
d: 1?0
Implications
a0 nand b0:
a0 → b1
b0 → a1
c0 nand b1:
c0 → b0
b1 → c1
c1 nand d1:
c1 → d0
d1 → c0
Problem B. Binary Code — Implications graph example
a0 b0 c0 d0
a1 b1 c1 d1
Classic 2-SAT
algorithm finds the
answer or decides
that it is impossible
The sample output
assigns true to a0, b1,
c1, d0
Problem B. Binary Code — Many terminals at node
v1, v2, v3, · · · , vn
Node in a trie can have many terminals
(variables) at one node
At most one of them can be present in a
binary code
We can express this constraint in O(n)
implications using n additional variable
pairs
Define additional variable ri to be true if
and only if at least one vj , j ≥ i is true
Or exclude all vi and vj pairs, but return
“NO”answer when n is more than the
depth of this node in a trie plus one
Problem C. Cactus Construction
Total
time
0h 1h 2h 3h 4h 5h
8
12
Java C++ Python Total
Accepted 0 8 0 8
Rejected 0 12 0 12
Total 0 20 0 20
solution team att time size lang
Fastest 1 142 4,953 C++
Shortest 1 261 2,512 C++
Max atts. 4 275 6,786 C++
Problem C. Cactus Construction (1)
Depth-first search (DFS) of the cactus to split the edges of
the cactus into disjoint sets of bridges Bi and cycles Ci
Each back edge found during DFS signals a cycle
All edges that do not belong to any cycle are bridges
1
2
3
4
5
6
7
8
9
10 11
1213
14
15
C1
C2
C3
C4
B1
B2
Problem C. Cactus Construction (2)
Recursive procedure: given a cactus and a vertex P in it,
construct the cactus in such a way that all vertices have color
2 except P, which must have color 1.
Pick any vertex as P to start the procedure.
P
Problem C. Cactus Construction (3)
If there’s a bridge Bi connecting P with some other vertex Q:
Remove the bridge Bi .
Recursively construct two halves using P and Q as designated
vertices (color 1).
Build edge Bi and color Q with 2 (more details later).
B1
P
Q
Problem C. Cactus Construction (4)
If there’s a cycle Ci passing through P = P1, P2, . . . , Pk:
Remove all edges of Ci .
Graph splits into k components. Recursively construct them
using Pj as designated vertices (color 1).
Build all edges of Ci and color P2, P3, . . . , Pk with 2 (more
details later).
P P2
P3
C2
Problem C. Cactus Construction (5)
How to build a new bridge connecting two components with
designated vertices P and Q:
Initially P and Q are colored with 1, the rest with 2.
Recolor 1 to 3 in the component of Q.
Join components of P and Q.
Connect colors 1 an 3, connecting P and Q.
Recolor 3 to 2.
1
1
1
3
1
3
1
2
Problem C. Cactus Construction (6)
How to build a new cycle connecting k components with
designated vertices P = P1, P2, . . . Pk:
Build edges of the cycle one by one, starting with the edge
between P1 and P2.
Each edge except the last one is built as a new bridge.
But remember to recolor the first vertex P1 to 4 instead of 2
after building the first edge.
This allows to close the cycle in the end by connecting colors 1
and 4.
1 1
11
4 1
11
4 2
21
1 2
22
Problem D. Delight for a Cat
Total
time
0h 1h 2h 3h 4h 5h
1
1
Java C++ Python Total
Accepted 0 1 0 1
Rejected 0 1 0 1
Total 0 2 0 2
solution team att time size lang
Fastest 1 123 2,825 C++
Shortest 1 123 2,825 C++
Max atts. 1 123 2,825 C++
Problem D. Delight for a Cat
Out of every k consecutive hours, the cat must sleep at least
mins hours and eat at least mine hours
Let maxe = k − mins, now the cat must eat between mine and
maxe hours out of every k
Let’s say that the cat is sleeping by default, and it gets
δi = ei − si delight for eating at hour i
In the end, add
n
i=1
si to the answer
Problem D. Delight for a Cat (2)
Let mine = 0, maxe = 1
Dynamic programming:
Let fi be the maximum amount of delight for hours from i to n
fi = max(fi+1, δi + fi+k )
Here, we define fi = 0 for i > n
Dynamic programming → shortest path:
Vertices S, T and 1, 2, · · · , n
Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with
cost 0
Edge from vertex i to vertex i + k (or T, if i + k > n) with
cost −δi
Edges from vertex S to vertices 1, 2, · · · , k with cost 0
Negated length of the shortest path from S to T is the answer
Problem D. Delight for a Cat (3)
Let mine = 0, maxe ≥ 0
Graph for maxe = 1 → network for maxe ≥ 0:
Vertices S, T and 1, 2, · · · , n
Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with
cost 0 and capacity maxe
Edge from vertex i to vertex i + k (or T, if i + k > n) with
cost −δi and capacity 1
Edges from vertex S to vertices 1, 2, · · · , k with cost 0 and
capacity ∞
Negated minimum cost of flow of value maxe from S to T is
the answer
Problem D. Delight for a Cat (4)
Let maxe ≥ mine ≥ 0
Network for mine = 0 → network for mine ≥ 0:
Vertices S, T and 1, 2, · · · , n
Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with
cost 0 and capacity maxe − mine
Edge from vertex i to vertex i + k (or T, if i + k > n) with
cost −δi and capacity 1
Edges from vertex S to vertices 1, 2, · · · , k with cost 0 and
capacity ∞
Negated minimum cost of flow of value maxe from S to T is
the answer
Problem E. Expect to Wait
Total
time
0h 1h 2h 3h 4h 5h
62
146
Java C++ Python Total
Accepted 3 59 0 62
Rejected 3 143 0 146
Total 6 202 0 208
solution team att time size lang
Fastest 1 61 2,093 C++
Shortest 1 115 1,274 C++
Max atts. 6 285 2,167 C++
Problem E. Expect to Wait
0
+1
-6
+2
-1
+5
-6
+4
balance
t
Problem E. Expect to Wait (2)
-2
+1
-6
+2
-1
+5
-6
+4
balance
t
Problem E. Expect to Wait (3)
For bi , calculate square under line balance = −bi
Scan-line
O(NlogN + QlogQ)
Problem F. Foreign Postcards
Total
time
0h 1h 2h 3h 4h 5h
115
146
Java C++ Python Total
Accepted 3 112 0 115
Rejected 17 126 3 146
Total 20 238 3 261
solution team att time size lang
Fastest 1 23 1,774 C++
Shortest 1 68 483 C++
Max atts. 15 281 1,030 C++
Problem F. Foreign Postcards
Ai is the expected number of W’s starting from position i.
Ai = 1
n−i
n
j=i+1
Aj + |{k | k ∈ [i, j) ∧ Si = Sk}|
Straightforward calculation — O(N2) solution.
The second sum is
n
j=i+1
[Si = Sj ] · (n − j)
It is equal to either
Sj =C
(n − j) or
Sj =W
(n − j)
Calculate everything in linear time, O(N) solution.
Problem G. Game on Graph
Total
time
0h 1h 2h 3h 4h 5h
3
9
Java C++ Python Total
Accepted 0 3 0 3
Rejected 0 9 0 9
Total 0 12 0 12
solution team att time size lang
Fastest 7 174 3,103 C++
Shortest 2 221 2,023 C++
Max atts. 7 174 3,103 C++
Problem G. Game on Graph
Let’s name a pair of vertex and player who has move now a
position in game.
If first player can enforce draw, regardless of second player
moves, he will do it.
If second player can enforce his winning, regardless of first
player moves, he will do it.
If first player can’t enforce draw, second player will not allow
draw happen, because it’s worst result for him
If second player can’t enforce winning, first player will not
allow him to win, because it’s worst result for him.
So, in all other positions, first player will win.
Problem G. Game on Graph (2)
How to find all positions, where first player can enforce draw?
Let’s put in queue all positions, where player have no moves.
While queue is not empty, get next position from queue.
If it’s first player turn, than mark all positions of second player
with move to this posision and put them to queue.
If it’s second player turn, than mark all positions of first
player, where it’s last move to non-marked positions, and put
them to queue.
First player can enforce draw, iff position is not marked.
Postions, where second player can enforce win, can be found
in similar way.
Problem H. Hard Refactoring
Total
time
0h 1h 2h 3h 4h 5h
168
358
Java C++ Python Total
Accepted 10 154 4 168
Rejected 29 318 11 358
Total 39 472 15 526
solution team att time size lang
Fastest 1 20 1,982 C++
Shortest 2 109 1,303 Python
Max atts. 11 242 2,721 C++
Problem H. Hard Refactoring
It is an easy problem. The hardest part is parsing
Once input is parsed, it is Ok to simply fill a Boolean array of
216 items, then print the answer
The only tricky thing in this problem are the edges of the set
of 16-bit integers and the corresponding samples are given in
the problem statement
Problem I. Indiana Jones and the Uniform Cave
Total
time
0h 1h 2h 3h 4h 5h
13
Java C++ Python Total
Accepted 0 0 0 0
Rejected 0 13 0 13
Total 0 13 0 13
Problem I. Indiana Jones and the Uniform Cave
Solution overview: use depth-first-search (DFS) to recursively
traverse the graph
Mark with “right”chambers on the current DFS path to root.
Let us call them gray chambers
Mark with “left”chambers that were already visited. Let us
call them black chambers
At each node do “1 right 1” m times to check all outgoing
passages
Keep the track of the highest gray (“right”) chamber
encountered down from the current chamber in dfs and the
number of the corresponding passage in the chamber
When all m passages out of the chamber are visited, follow to
that chamber until gray (“right”) chamber is encountered
and follow down to the previous chamber
Problem I. Indiana Jones and the Uniform Cave (2)
When gray (“right”) chamber is encountered:
Mark it with “left”
Follow gray (“right”) chambers with
“0 right 0” until the chamber previously
marked with “left”is reached
Count the number of passages visited
Make another pass, taking one fewer passage to
“backtrack” and put stones at “right”again
Remember how many gray chambers up the
path we’ve got to!
Problem I. Indiana Jones and the Uniform Cave (3)
When black (“left”) chamber is encountered:
Follow black (“left”) chambers with
“0 left 0”
Follow gray (“right”) chambers with
“0 right 0”
Count the number of passages visited
Make another pass, taking one fewer passage to
“backtrack”
Put stones at “right”or “left”as they were
Remember how many gray chambers up the
path we’ve got to!
Problem I. Indiana Jones and the Uniform Cave (4)
When leaving the chamber in dfs (after visiting
all m passages), use the passage that is leading
to the highest gray chamber
Stones were properly left in place previously, just
follow them
Mark the chamber we are leaving as black
(“left”)
Problem J. Jenga Boom
Total
time
0h 1h 2h 3h 4h 5h
59
337
Java C++ Python Total
Accepted 2 57 0 59
Rejected 21 316 0 337
Total 23 373 0 396
solution team att time size lang
Fastest 1 55 1,919 C++
Shortest 1 138 1,707 C++
Max atts. 14 198 2,669 C++
Problem J. Jenga Boom
The solution is straightforward
Keep the sum of coordinates of centers of remaining blocks at
each level
Keep the set of remaining blocks (in a Boolean array)
When a block is removed, update this information, then
recheck stability condition for every level (top to bottom)
Sum centers of masses and count total number of blocks
above the current cross-section
Use the set of remaining block at the level immediately below
the current corss-section to compute its convex hull in a trivial
way
Some tips
The number w is irrelevant to the problem
It is easier to compute everything in 64-bit integer numbers
Do not do binary search on answer! Simulate every block
removal
Problem K. Kids Designing Kids
Total
time
0h 1h 2h 3h 4h 5h
7
31
Java C++ Python Total
Accepted 0 7 0 7
Rejected 3 28 0 31
Total 3 35 0 38
solution team att time size lang
Fastest 1 133 3,236 C++
Shortest 1 258 2,613 C++
Max atts. 4 252 3,682 C++
Problem K. Kids Designing Kids
Find the top-left freckle in each of three given pictures.
We’ll prove that after moving the figures, some two of these
three freckles must be in the same point.
There are only three possible shifts, check them all.
To check if two pictures are the same, again find top-left
freckles in each of them. These freckles must be in the same
point.
Problem K. Kids Designing Kids — Proof
Problem is equal to the following: move figures A, B and C in
such a way that A ⊕ B ⊕ C = ∅ (empty figure).
Let’s look on top-left freckle in each picture. Suppose that
after moving, they are in different points.
Now let’s find the top-left freckle from these three.
This freckle will be present in the final symmetrical difference
A ⊕ B ⊕ C, because it cannot be denied by any other freckle.
Problem L. List of Primes
Total
time
0h 1h 2h 3h 4h 5h
12
16
Java C++ Python Total
Accepted 0 12 0 12
Rejected 0 16 0 16
Total 0 28 0 28
solution team att time size lang
Fastest 1 108 3,093 C++
Shortest 1 108 3,093 C++
Max atts. 4 294 4,471 C++
Problem L. List of Primes
Recursive procedure — output all sets with the following
properties:
from the first x primes the set prefix is selected;
all the other selected primes add up to sum.
output(x, prefix, sum)
output(x + 1, prefix + [px+1], sum − px+1)
output(x + 1, prefix, sum)
If the output is to left from the desired segment, skip it
without going deeper in recursion.
Precalculte number and total length of all sets in which:
the first x primes are not used;
selected primes add up to sum.
Run output(0, [], sum) for sum = 2, 3, 4, . . .
Problem M. Mole Tunnels
Total
time
0h 1h 2h 3h 4h 5h
2
2
Java C++ Python Total
Accepted 0 2 0 2
Rejected 0 2 0 2
Total 0 4 0 4
solution team att time size lang
Fastest 3 215 3,397 C++
Shortest 1 227 2,185 C++
Max atts. 3 215 3,397 C++
Problem M. Mole Tunnels
Cannot be solved with Minimum Cost Maximum Flow
algorithm (too slow)
We need to find shortest path in a faster way
Calculate dynamic programming: shortest path in a subtree of
vertex v
Iterate over all possible LCA to find next shortest path
After sending flow along augmenting path dynamic
programming values changes only for at most 40 vertices
1
2 3
4 5
Credits
Special thanks to all jury members and assistants
(in alphabetic order):
Alexey Cherepanov, Andrey Lopatin, Andrey Stankevich,
Artem Vasilyev, Borys Minaiev, Demid Kucherenko,
Dmitry Shtukenberg, Egor Kulikov, Elena Andreeva,
Elena Kryuchkova, Eugene Kurpiliansky, Gennady Korotkevich,
Georgiy Korneev, Ilya Kornakov, Maxim Buzdalov, Mikhail Dvorkin,
Mikhail Pyaderkin, Nikita Ioffe, Niyaz Nigmatullin, Oleg Davydov,
Pavel Kunyavsky, Pavel Mavrin, Petr Mitrichev, Roman Elizarov,
Sergey Kopeliovich, Sergey Melnikov, Vitaly Aksenov

Weitere ähnliche Inhalte

Was ist angesagt?

05_Reliable UDP 구현
05_Reliable UDP 구현05_Reliable UDP 구현
05_Reliable UDP 구현noerror
 
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기Kiyoung Moon
 
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017devCAT Studio, NEXON
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPSeungmo Koo
 
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012Esun Kim
 
[세미나] 특이점이 온다
[세미나] 특이점이 온다[세미나] 특이점이 온다
[세미나] 특이점이 온다Yongha Kim
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현YEONG-CHEON YOU
 
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)Heungsub Lee
 
장재화, Replay system, NDC2011
장재화, Replay system, NDC2011장재화, Replay system, NDC2011
장재화, Replay system, NDC2011재화 장
 
Overlapped IO와 IOCP 조사 발표
Overlapped IO와 IOCP 조사 발표Overlapped IO와 IOCP 조사 발표
Overlapped IO와 IOCP 조사 발표Kwen Won Lee
 
BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」BitVisor
 
게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가Seungmo Koo
 
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3Heungsub Lee
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략YEONG-CHEON YOU
 
Threads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonThreads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonYi-Lung Tsai
 
온라인 게임과 소셜 게임 서버는 어떻게 다른가?
온라인 게임과 소셜 게임 서버는 어떻게 다른가?온라인 게임과 소셜 게임 서버는 어떻게 다른가?
온라인 게임과 소셜 게임 서버는 어떻게 다른가?Seok-ju Yun
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)Seungmo Koo
 
Constexpr 中3女子テクニック
Constexpr 中3女子テクニックConstexpr 中3女子テクニック
Constexpr 中3女子テクニックGenya Murakami
 

Was ist angesagt? (20)

05_Reliable UDP 구현
05_Reliable UDP 구현05_Reliable UDP 구현
05_Reliable UDP 구현
 
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
 
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCP
 
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012
덤프 파일을 통한 사후 디버깅 실용 테크닉 NDC2012
 
[세미나] 특이점이 온다
[세미나] 특이점이 온다[세미나] 특이점이 온다
[세미나] 특이점이 온다
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현
 
目grepのはなし
目grepのはなし目grepのはなし
目grepのはなし
 
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
[야생의 땅: 듀랑고] 서버 아키텍처 Vol. 2 (자막)
 
장재화, Replay system, NDC2011
장재화, Replay system, NDC2011장재화, Replay system, NDC2011
장재화, Replay system, NDC2011
 
Overlapped IO와 IOCP 조사 발표
Overlapped IO와 IOCP 조사 발표Overlapped IO와 IOCP 조사 발표
Overlapped IO와 IOCP 조사 발표
 
BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」
 
게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가
 
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
〈야생의 땅: 듀랑고〉 서버 아키텍처 Vol. 3
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략
 
Threads and Callbacks for Embedded Python
Threads and Callbacks for Embedded PythonThreads and Callbacks for Embedded Python
Threads and Callbacks for Embedded Python
 
온라인 게임과 소셜 게임 서버는 어떻게 다른가?
온라인 게임과 소셜 게임 서버는 어떻게 다른가?온라인 게임과 소셜 게임 서버는 어떻게 다른가?
온라인 게임과 소셜 게임 서버는 어떻게 다른가?
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
 
rtnetlink
rtnetlinkrtnetlink
rtnetlink
 
Constexpr 中3女子テクニック
Constexpr 中3女子テクニックConstexpr 中3女子テクニック
Constexpr 中3女子テクニック
 

Andere mochten auch

Quic을 이용한 네트워크 성능 개선
 Quic을 이용한 네트워크 성능 개선 Quic을 이용한 네트워크 성능 개선
Quic을 이용한 네트워크 성능 개선NAVER D2
 
Многопоточное Программирование - Теория и Практика
Многопоточное Программирование - Теория и ПрактикаМногопоточное Программирование - Теория и Практика
Многопоточное Программирование - Теория и ПрактикаRoman Elizarov
 
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Roman Elizarov
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?Roman Elizarov
 
MI 224: International Classification for Primary Care
MI 224: International Classification for Primary CareMI 224: International Classification for Primary Care
MI 224: International Classification for Primary CareRoy Dahildahil
 
Многопоточные Алгоритмы (для BitByte 2014)
Многопоточные Алгоритмы (для BitByte 2014)Многопоточные Алгоритмы (для BitByte 2014)
Многопоточные Алгоритмы (для BitByte 2014)Roman Elizarov
 
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)Теоретический минимум для понимания Java Memory Model (для JPoint 2014)
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)Roman Elizarov
 
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
VSCO: an easy way to replicate film photography
VSCO: an easy way to replicate film photographyVSCO: an easy way to replicate film photography
VSCO: an easy way to replicate film photographyAmy Bensema
 

Andere mochten auch (12)

ICPC
ICPCICPC
ICPC
 
Quic을 이용한 네트워크 성능 개선
 Quic을 이용한 네트워크 성능 개선 Quic을 이용한 네트워크 성능 개선
Quic을 이용한 네트워크 성능 개선
 
Многопоточное Программирование - Теория и Практика
Многопоточное Программирование - Теория и ПрактикаМногопоточное Программирование - Теория и Практика
Многопоточное Программирование - Теория и Практика
 
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2015 NEERC (Northeastern European Regional Contest) Problems Review
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!
 
Why GC is eating all my CPU?
Why GC is eating all my CPU?Why GC is eating all my CPU?
Why GC is eating all my CPU?
 
MI 224: International Classification for Primary Care
MI 224: International Classification for Primary CareMI 224: International Classification for Primary Care
MI 224: International Classification for Primary Care
 
Многопоточные Алгоритмы (для BitByte 2014)
Многопоточные Алгоритмы (для BitByte 2014)Многопоточные Алгоритмы (для BitByte 2014)
Многопоточные Алгоритмы (для BitByte 2014)
 
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)Теоретический минимум для понимания Java Memory Model (для JPoint 2014)
Теоретический минимум для понимания Java Memory Model (для JPoint 2014)
 
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
 
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
 
VSCO: an easy way to replicate film photography
VSCO: an easy way to replicate film photographyVSCO: an easy way to replicate film photography
VSCO: an easy way to replicate film photography
 

Ähnlich wie ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review

Ähnlich wie ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review (20)

Computer Network Homework Help
Computer Network Homework HelpComputer Network Homework Help
Computer Network Homework Help
 
Design and Analysis of Algorithms Exam Help
Design and Analysis of Algorithms Exam HelpDesign and Analysis of Algorithms Exam Help
Design and Analysis of Algorithms Exam Help
 
Design and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment HelpDesign and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment Help
 
Daa chapter 3
Daa chapter 3Daa chapter 3
Daa chapter 3
 
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docxDivide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
Divide-and-Conquer & Dynamic ProgrammingDivide-and-Conqu.docx
 
Ee gate'14-paper-01
Ee gate'14-paper-01Ee gate'14-paper-01
Ee gate'14-paper-01
 
Mit6 006 f11_quiz1
Mit6 006 f11_quiz1Mit6 006 f11_quiz1
Mit6 006 f11_quiz1
 
M112rev
M112revM112rev
M112rev
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
 
Mit15 082 jf10_lec01
Mit15 082 jf10_lec01Mit15 082 jf10_lec01
Mit15 082 jf10_lec01
 
Dynamic Programming.pptx
Dynamic Programming.pptxDynamic Programming.pptx
Dynamic Programming.pptx
 
Algorithm Assignment Help
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
 
5.3 dynamic programming 03
5.3 dynamic programming 035.3 dynamic programming 03
5.3 dynamic programming 03
 
Programming Exam Help
 Programming Exam Help Programming Exam Help
Programming Exam Help
 
Gate-Cs 1993
Gate-Cs 1993Gate-Cs 1993
Gate-Cs 1993
 
Icse entrance test class ix by anurag tyagi classes
Icse entrance test  class ix  by anurag tyagi classesIcse entrance test  class ix  by anurag tyagi classes
Icse entrance test class ix by anurag tyagi classes
 
Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Linear Algebra Assignment help
Linear Algebra Assignment helpLinear Algebra Assignment help
Linear Algebra Assignment help
 
Unit 3
Unit 3Unit 3
Unit 3
 

Mehr von Roman Elizarov

Kotlin Coroutines in Practice @ KotlinConf 2018
Kotlin Coroutines in Practice @ KotlinConf 2018Kotlin Coroutines in Practice @ KotlinConf 2018
Kotlin Coroutines in Practice @ KotlinConf 2018Roman Elizarov
 
Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017Roman Elizarov
 
Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017Roman Elizarov
 
Fresh Async with Kotlin @ QConSF 2017
Fresh Async with Kotlin @ QConSF 2017Fresh Async with Kotlin @ QConSF 2017
Fresh Async with Kotlin @ QConSF 2017Roman Elizarov
 
Scale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOneScale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOneRoman Elizarov
 
Kotlin Coroutines Reloaded
Kotlin Coroutines ReloadedKotlin Coroutines Reloaded
Kotlin Coroutines ReloadedRoman Elizarov
 
Lock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesLock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesRoman Elizarov
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutinesRoman Elizarov
 
Non blocking programming and waiting
Non blocking programming and waitingNon blocking programming and waiting
Non blocking programming and waitingRoman Elizarov
 
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
Java Serialization Facts and Fallacies
Java Serialization Facts and FallaciesJava Serialization Facts and Fallacies
Java Serialization Facts and FallaciesRoman Elizarov
 
Millions quotes per second in pure java
Millions quotes per second in pure javaMillions quotes per second in pure java
Millions quotes per second in pure javaRoman Elizarov
 
The theory of concurrent programming for a seasoned programmer
The theory of concurrent programming for a seasoned programmerThe theory of concurrent programming for a seasoned programmer
The theory of concurrent programming for a seasoned programmerRoman Elizarov
 
Пишем самый быстрый хеш для кэширования данных
Пишем самый быстрый хеш для кэширования данныхПишем самый быстрый хеш для кэширования данных
Пишем самый быстрый хеш для кэширования данныхRoman Elizarov
 

Mehr von Roman Elizarov (15)

Kotlin Coroutines in Practice @ KotlinConf 2018
Kotlin Coroutines in Practice @ KotlinConf 2018Kotlin Coroutines in Practice @ KotlinConf 2018
Kotlin Coroutines in Practice @ KotlinConf 2018
 
Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017Deep dive into Coroutines on JVM @ KotlinConf 2017
Deep dive into Coroutines on JVM @ KotlinConf 2017
 
Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017
 
Fresh Async with Kotlin @ QConSF 2017
Fresh Async with Kotlin @ QConSF 2017Fresh Async with Kotlin @ QConSF 2017
Fresh Async with Kotlin @ QConSF 2017
 
Scale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOneScale Up with Lock-Free Algorithms @ JavaOne
Scale Up with Lock-Free Algorithms @ JavaOne
 
Kotlin Coroutines Reloaded
Kotlin Coroutines ReloadedKotlin Coroutines Reloaded
Kotlin Coroutines Reloaded
 
Lock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesLock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin Coroutines
 
Introduction to Kotlin coroutines
Introduction to Kotlin coroutinesIntroduction to Kotlin coroutines
Introduction to Kotlin coroutines
 
Non blocking programming and waiting
Non blocking programming and waitingNon blocking programming and waiting
Non blocking programming and waiting
 
DIY Java Profiling
DIY Java ProfilingDIY Java Profiling
DIY Java Profiling
 
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
 
Java Serialization Facts and Fallacies
Java Serialization Facts and FallaciesJava Serialization Facts and Fallacies
Java Serialization Facts and Fallacies
 
Millions quotes per second in pure java
Millions quotes per second in pure javaMillions quotes per second in pure java
Millions quotes per second in pure java
 
The theory of concurrent programming for a seasoned programmer
The theory of concurrent programming for a seasoned programmerThe theory of concurrent programming for a seasoned programmer
The theory of concurrent programming for a seasoned programmer
 
Пишем самый быстрый хеш для кэширования данных
Пишем самый быстрый хеш для кэширования данныхПишем самый быстрый хеш для кэширования данных
Пишем самый быстрый хеш для кэширования данных
 

Kürzlich hochgeladen

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review

  • 1. ACM ICPC 2016–2017 Northeastern European Regional Contest Problems Review December 4, 2016
  • 2. Problems summary Recap: 228 teams, 13 problems, 5 hours, This review assumes the knowledge of the problem statements (published separately on http://neerc.ifmo.ru/ web site) Summary table on the next slide lists problem name and stats author — author of the original idea acc — number of teams that had solved the problem (gray bar denotes a fraction of the teams that solved the problem) runs — number of total attempts succ — overall successful attempts rate (percent of accepted submissions to total, also shown as a bar)
  • 3. Problems summary (2) problem name author acc/runs succ Abbreviation Roman Elizarov 161 /447 36% Binary Code Niyaz Nigmatullin 5 /76 6% Cactus Construction Pavel Kunyavsky 8 /20 40% Delight for a Cat Gennady Korotkevich 1 /2 50% Expect to Wait Vitaliy Aksenov 62 /208 29% Foreign Postcards Niyaz Nigmatullin 115 /261 44% Game on Graph Pavel Kunyavsky 3 /12 25% Hard Refactoring Elena Kryuchkova 168 /526 31% Indiana Jones and the Uniform Cave Georgiy Korneev 0 /13 0% Jenga Boom Georgiy Korneev 59 /396 14% Kids Designing Kids Pavel Mavrin 7 /38 18% List of Primes Mikhail Dvorkin 12 /28 42% Mole Tunnels Borys Minaiev 2 /4 50%
  • 4. Problem A. Abbreviation Total time 0h 1h 2h 3h 4h 5h 161 286 Java C++ Python Total Accepted 9 142 10 161 Rejected 39 230 17 286 Total 48 372 27 447 solution team att time size lang Fastest 1 16 2,015 C++ Shortest 1 19 386 Python Max atts. 9 292 4,689 C++
  • 5. Problem A. Abbreviation One of the two simple problems in the contest Many ways to write a solution One of the ways is this: Split each line into words and separators Identify capitalized words per problem statement Find the longest sequences of two or more words separated by a single space Perform replacements per the problem statement The shortest solution from Ural Federal University 4 (Ankudinov, Borzunov, Stikhin) uses a single regular expression with a replacement function: re.sub(r’b[A-Z][a-z]+( [A-Z][a-z]+b)+’, abbr, text)
  • 6. Problem B. Binary Code Total time 0h 1h 2h 3h 4h 5h 5 71 Java C++ Python Total Accepted 1 4 0 5 Rejected 1 70 0 71 Total 2 74 0 76 solution team att time size lang Fastest 2 204 4,918 Java Shortest 2 204 4,918 Java Max atts. 5 205 4,940 C++
  • 7. Problem B. Binary Code Solution outline: solve the problem by converting it into an instance of 2-SAT problem 1. Build a trie of the given strings 2. Define two variables v0 i and v1 i = ¯v1 i for each word si that contains a “?” v0 i is true and v1 i is false when “?”is replaced with “0”in si v0 i is false and v1 i is true when “?”is replaced with “1”in si 3. Create a graph with two nodes for each string. One node for v0 i , the other for v1 i 4. Use the trie to convert binary code constraints into 2-SAT problem instance using implications 5. Use the classical 2-SAT solution algorithm via the graph algorithm to find strongly connected components in implications graph
  • 8. Problem B. Binary Code — Build a trie Follow the classic approach, build a binary trie For strings with “?”add both replacements for “?”into a trie At the terminal nodes for the string s with “?”put the corresponding variable (s0 or s1 depending on replacement) At the terminal nodes for the string s without “?”put the separate variable T that is always true If more than one string without “?”ends at the same node of the trie, the answer is “NO”
  • 9. Problem B. Binary Code — Trie example Trie for the first example root a0 b0 a1 c0 b1 d0 c1 d1 a: 00? b: 0?00 c: ?1 d: 1?0 Implications a0 nand b0: a0 → b1 b0 → a1 c0 nand b1: c0 → b0 b1 → c1 c1 nand d1: c1 → d0 d1 → c0
  • 10. Problem B. Binary Code — Implications graph example a0 b0 c0 d0 a1 b1 c1 d1 Classic 2-SAT algorithm finds the answer or decides that it is impossible The sample output assigns true to a0, b1, c1, d0
  • 11. Problem B. Binary Code — Many terminals at node v1, v2, v3, · · · , vn Node in a trie can have many terminals (variables) at one node At most one of them can be present in a binary code We can express this constraint in O(n) implications using n additional variable pairs Define additional variable ri to be true if and only if at least one vj , j ≥ i is true Or exclude all vi and vj pairs, but return “NO”answer when n is more than the depth of this node in a trie plus one
  • 12. Problem C. Cactus Construction Total time 0h 1h 2h 3h 4h 5h 8 12 Java C++ Python Total Accepted 0 8 0 8 Rejected 0 12 0 12 Total 0 20 0 20 solution team att time size lang Fastest 1 142 4,953 C++ Shortest 1 261 2,512 C++ Max atts. 4 275 6,786 C++
  • 13. Problem C. Cactus Construction (1) Depth-first search (DFS) of the cactus to split the edges of the cactus into disjoint sets of bridges Bi and cycles Ci Each back edge found during DFS signals a cycle All edges that do not belong to any cycle are bridges 1 2 3 4 5 6 7 8 9 10 11 1213 14 15 C1 C2 C3 C4 B1 B2
  • 14. Problem C. Cactus Construction (2) Recursive procedure: given a cactus and a vertex P in it, construct the cactus in such a way that all vertices have color 2 except P, which must have color 1. Pick any vertex as P to start the procedure. P
  • 15. Problem C. Cactus Construction (3) If there’s a bridge Bi connecting P with some other vertex Q: Remove the bridge Bi . Recursively construct two halves using P and Q as designated vertices (color 1). Build edge Bi and color Q with 2 (more details later). B1 P Q
  • 16. Problem C. Cactus Construction (4) If there’s a cycle Ci passing through P = P1, P2, . . . , Pk: Remove all edges of Ci . Graph splits into k components. Recursively construct them using Pj as designated vertices (color 1). Build all edges of Ci and color P2, P3, . . . , Pk with 2 (more details later). P P2 P3 C2
  • 17. Problem C. Cactus Construction (5) How to build a new bridge connecting two components with designated vertices P and Q: Initially P and Q are colored with 1, the rest with 2. Recolor 1 to 3 in the component of Q. Join components of P and Q. Connect colors 1 an 3, connecting P and Q. Recolor 3 to 2. 1 1 1 3 1 3 1 2
  • 18. Problem C. Cactus Construction (6) How to build a new cycle connecting k components with designated vertices P = P1, P2, . . . Pk: Build edges of the cycle one by one, starting with the edge between P1 and P2. Each edge except the last one is built as a new bridge. But remember to recolor the first vertex P1 to 4 instead of 2 after building the first edge. This allows to close the cycle in the end by connecting colors 1 and 4. 1 1 11 4 1 11 4 2 21 1 2 22
  • 19. Problem D. Delight for a Cat Total time 0h 1h 2h 3h 4h 5h 1 1 Java C++ Python Total Accepted 0 1 0 1 Rejected 0 1 0 1 Total 0 2 0 2 solution team att time size lang Fastest 1 123 2,825 C++ Shortest 1 123 2,825 C++ Max atts. 1 123 2,825 C++
  • 20. Problem D. Delight for a Cat Out of every k consecutive hours, the cat must sleep at least mins hours and eat at least mine hours Let maxe = k − mins, now the cat must eat between mine and maxe hours out of every k Let’s say that the cat is sleeping by default, and it gets δi = ei − si delight for eating at hour i In the end, add n i=1 si to the answer
  • 21. Problem D. Delight for a Cat (2) Let mine = 0, maxe = 1 Dynamic programming: Let fi be the maximum amount of delight for hours from i to n fi = max(fi+1, δi + fi+k ) Here, we define fi = 0 for i > n Dynamic programming → shortest path: Vertices S, T and 1, 2, · · · , n Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with cost 0 Edge from vertex i to vertex i + k (or T, if i + k > n) with cost −δi Edges from vertex S to vertices 1, 2, · · · , k with cost 0 Negated length of the shortest path from S to T is the answer
  • 22. Problem D. Delight for a Cat (3) Let mine = 0, maxe ≥ 0 Graph for maxe = 1 → network for maxe ≥ 0: Vertices S, T and 1, 2, · · · , n Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with cost 0 and capacity maxe Edge from vertex i to vertex i + k (or T, if i + k > n) with cost −δi and capacity 1 Edges from vertex S to vertices 1, 2, · · · , k with cost 0 and capacity ∞ Negated minimum cost of flow of value maxe from S to T is the answer
  • 23. Problem D. Delight for a Cat (4) Let maxe ≥ mine ≥ 0 Network for mine = 0 → network for mine ≥ 0: Vertices S, T and 1, 2, · · · , n Edge from vertex i to vertex i + 1 (or T, if i + 1 > n) with cost 0 and capacity maxe − mine Edge from vertex i to vertex i + k (or T, if i + k > n) with cost −δi and capacity 1 Edges from vertex S to vertices 1, 2, · · · , k with cost 0 and capacity ∞ Negated minimum cost of flow of value maxe from S to T is the answer
  • 24. Problem E. Expect to Wait Total time 0h 1h 2h 3h 4h 5h 62 146 Java C++ Python Total Accepted 3 59 0 62 Rejected 3 143 0 146 Total 6 202 0 208 solution team att time size lang Fastest 1 61 2,093 C++ Shortest 1 115 1,274 C++ Max atts. 6 285 2,167 C++
  • 25. Problem E. Expect to Wait 0 +1 -6 +2 -1 +5 -6 +4 balance t
  • 26. Problem E. Expect to Wait (2) -2 +1 -6 +2 -1 +5 -6 +4 balance t
  • 27. Problem E. Expect to Wait (3) For bi , calculate square under line balance = −bi Scan-line O(NlogN + QlogQ)
  • 28. Problem F. Foreign Postcards Total time 0h 1h 2h 3h 4h 5h 115 146 Java C++ Python Total Accepted 3 112 0 115 Rejected 17 126 3 146 Total 20 238 3 261 solution team att time size lang Fastest 1 23 1,774 C++ Shortest 1 68 483 C++ Max atts. 15 281 1,030 C++
  • 29. Problem F. Foreign Postcards Ai is the expected number of W’s starting from position i. Ai = 1 n−i n j=i+1 Aj + |{k | k ∈ [i, j) ∧ Si = Sk}| Straightforward calculation — O(N2) solution. The second sum is n j=i+1 [Si = Sj ] · (n − j) It is equal to either Sj =C (n − j) or Sj =W (n − j) Calculate everything in linear time, O(N) solution.
  • 30. Problem G. Game on Graph Total time 0h 1h 2h 3h 4h 5h 3 9 Java C++ Python Total Accepted 0 3 0 3 Rejected 0 9 0 9 Total 0 12 0 12 solution team att time size lang Fastest 7 174 3,103 C++ Shortest 2 221 2,023 C++ Max atts. 7 174 3,103 C++
  • 31. Problem G. Game on Graph Let’s name a pair of vertex and player who has move now a position in game. If first player can enforce draw, regardless of second player moves, he will do it. If second player can enforce his winning, regardless of first player moves, he will do it. If first player can’t enforce draw, second player will not allow draw happen, because it’s worst result for him If second player can’t enforce winning, first player will not allow him to win, because it’s worst result for him. So, in all other positions, first player will win.
  • 32. Problem G. Game on Graph (2) How to find all positions, where first player can enforce draw? Let’s put in queue all positions, where player have no moves. While queue is not empty, get next position from queue. If it’s first player turn, than mark all positions of second player with move to this posision and put them to queue. If it’s second player turn, than mark all positions of first player, where it’s last move to non-marked positions, and put them to queue. First player can enforce draw, iff position is not marked. Postions, where second player can enforce win, can be found in similar way.
  • 33. Problem H. Hard Refactoring Total time 0h 1h 2h 3h 4h 5h 168 358 Java C++ Python Total Accepted 10 154 4 168 Rejected 29 318 11 358 Total 39 472 15 526 solution team att time size lang Fastest 1 20 1,982 C++ Shortest 2 109 1,303 Python Max atts. 11 242 2,721 C++
  • 34. Problem H. Hard Refactoring It is an easy problem. The hardest part is parsing Once input is parsed, it is Ok to simply fill a Boolean array of 216 items, then print the answer The only tricky thing in this problem are the edges of the set of 16-bit integers and the corresponding samples are given in the problem statement
  • 35. Problem I. Indiana Jones and the Uniform Cave Total time 0h 1h 2h 3h 4h 5h 13 Java C++ Python Total Accepted 0 0 0 0 Rejected 0 13 0 13 Total 0 13 0 13
  • 36. Problem I. Indiana Jones and the Uniform Cave Solution overview: use depth-first-search (DFS) to recursively traverse the graph Mark with “right”chambers on the current DFS path to root. Let us call them gray chambers Mark with “left”chambers that were already visited. Let us call them black chambers At each node do “1 right 1” m times to check all outgoing passages Keep the track of the highest gray (“right”) chamber encountered down from the current chamber in dfs and the number of the corresponding passage in the chamber When all m passages out of the chamber are visited, follow to that chamber until gray (“right”) chamber is encountered and follow down to the previous chamber
  • 37. Problem I. Indiana Jones and the Uniform Cave (2) When gray (“right”) chamber is encountered: Mark it with “left” Follow gray (“right”) chambers with “0 right 0” until the chamber previously marked with “left”is reached Count the number of passages visited Make another pass, taking one fewer passage to “backtrack” and put stones at “right”again Remember how many gray chambers up the path we’ve got to!
  • 38. Problem I. Indiana Jones and the Uniform Cave (3) When black (“left”) chamber is encountered: Follow black (“left”) chambers with “0 left 0” Follow gray (“right”) chambers with “0 right 0” Count the number of passages visited Make another pass, taking one fewer passage to “backtrack” Put stones at “right”or “left”as they were Remember how many gray chambers up the path we’ve got to!
  • 39. Problem I. Indiana Jones and the Uniform Cave (4) When leaving the chamber in dfs (after visiting all m passages), use the passage that is leading to the highest gray chamber Stones were properly left in place previously, just follow them Mark the chamber we are leaving as black (“left”)
  • 40. Problem J. Jenga Boom Total time 0h 1h 2h 3h 4h 5h 59 337 Java C++ Python Total Accepted 2 57 0 59 Rejected 21 316 0 337 Total 23 373 0 396 solution team att time size lang Fastest 1 55 1,919 C++ Shortest 1 138 1,707 C++ Max atts. 14 198 2,669 C++
  • 41. Problem J. Jenga Boom The solution is straightforward Keep the sum of coordinates of centers of remaining blocks at each level Keep the set of remaining blocks (in a Boolean array) When a block is removed, update this information, then recheck stability condition for every level (top to bottom) Sum centers of masses and count total number of blocks above the current cross-section Use the set of remaining block at the level immediately below the current corss-section to compute its convex hull in a trivial way Some tips The number w is irrelevant to the problem It is easier to compute everything in 64-bit integer numbers Do not do binary search on answer! Simulate every block removal
  • 42. Problem K. Kids Designing Kids Total time 0h 1h 2h 3h 4h 5h 7 31 Java C++ Python Total Accepted 0 7 0 7 Rejected 3 28 0 31 Total 3 35 0 38 solution team att time size lang Fastest 1 133 3,236 C++ Shortest 1 258 2,613 C++ Max atts. 4 252 3,682 C++
  • 43. Problem K. Kids Designing Kids Find the top-left freckle in each of three given pictures. We’ll prove that after moving the figures, some two of these three freckles must be in the same point. There are only three possible shifts, check them all. To check if two pictures are the same, again find top-left freckles in each of them. These freckles must be in the same point.
  • 44. Problem K. Kids Designing Kids — Proof Problem is equal to the following: move figures A, B and C in such a way that A ⊕ B ⊕ C = ∅ (empty figure). Let’s look on top-left freckle in each picture. Suppose that after moving, they are in different points. Now let’s find the top-left freckle from these three. This freckle will be present in the final symmetrical difference A ⊕ B ⊕ C, because it cannot be denied by any other freckle.
  • 45. Problem L. List of Primes Total time 0h 1h 2h 3h 4h 5h 12 16 Java C++ Python Total Accepted 0 12 0 12 Rejected 0 16 0 16 Total 0 28 0 28 solution team att time size lang Fastest 1 108 3,093 C++ Shortest 1 108 3,093 C++ Max atts. 4 294 4,471 C++
  • 46. Problem L. List of Primes Recursive procedure — output all sets with the following properties: from the first x primes the set prefix is selected; all the other selected primes add up to sum. output(x, prefix, sum) output(x + 1, prefix + [px+1], sum − px+1) output(x + 1, prefix, sum) If the output is to left from the desired segment, skip it without going deeper in recursion. Precalculte number and total length of all sets in which: the first x primes are not used; selected primes add up to sum. Run output(0, [], sum) for sum = 2, 3, 4, . . .
  • 47. Problem M. Mole Tunnels Total time 0h 1h 2h 3h 4h 5h 2 2 Java C++ Python Total Accepted 0 2 0 2 Rejected 0 2 0 2 Total 0 4 0 4 solution team att time size lang Fastest 3 215 3,397 C++ Shortest 1 227 2,185 C++ Max atts. 3 215 3,397 C++
  • 48. Problem M. Mole Tunnels Cannot be solved with Minimum Cost Maximum Flow algorithm (too slow) We need to find shortest path in a faster way Calculate dynamic programming: shortest path in a subtree of vertex v Iterate over all possible LCA to find next shortest path After sending flow along augmenting path dynamic programming values changes only for at most 40 vertices 1 2 3 4 5
  • 49. Credits Special thanks to all jury members and assistants (in alphabetic order): Alexey Cherepanov, Andrey Lopatin, Andrey Stankevich, Artem Vasilyev, Borys Minaiev, Demid Kucherenko, Dmitry Shtukenberg, Egor Kulikov, Elena Andreeva, Elena Kryuchkova, Eugene Kurpiliansky, Gennady Korotkevich, Georgiy Korneev, Ilya Kornakov, Maxim Buzdalov, Mikhail Dvorkin, Mikhail Pyaderkin, Nikita Ioffe, Niyaz Nigmatullin, Oleg Davydov, Pavel Kunyavsky, Pavel Mavrin, Petr Mitrichev, Roman Elizarov, Sergey Kopeliovich, Sergey Melnikov, Vitaly Aksenov