1.60 score from hupso.pl for:
lyinch.com



HTML Content


Titlelyinch's world

Length: 19, Words: 3
Description pusty

Length: 0, Words: 0
Keywords pusty
Robots
Charset UTF-8
Og Meta - Title pusty
Og Meta - Description pusty
Og Meta - Site name pusty
Tytuł powinien zawierać pomiędzy 10 a 70 znaków (ze spacjami), a mniej niż 12 słów w długości.
Meta opis powinien zawierać pomiędzy 50 a 160 znaków (łącznie ze spacjami), a mniej niż 24 słów w długości.
Kodowanie znaków powinny być określone , UTF-8 jest chyba najlepszy zestaw znaków, aby przejść z powodu UTF-8 jest bardziej międzynarodowy kodowaniem.
Otwarte obiekty wykresu powinny być obecne w stronie internetowej (więcej informacji na temat protokołu OpenGraph: http://ogp.me/)

SEO Content

Words/Characters 9583
Text/HTML 16.02 %
Headings H1 16
H2 0
H3 5
H4 0
H5 0
H6 0
H1
lyinch's world
maximum subarray problem
lio 2005 preliminary problem 4 – chess
lio 2006 preliminary problem 3 – sudoku
lio 2013 preliminary problem 3 – sudoku
lio 2003 preliminary problem 1 – cilonacci sequences
lio 2002 preliminary problem 3 – pi determination
lio 2004 preliminary problem 4 – shortest path
lio 2002 preliminary problem 2 – suites
c++ dynamic multidimensional vectors
lio 2002 preliminary problem 1 – comptage
posts navigation
recent posts
archives
categories
visit also
H2
H3
the naive algorithm: brutforce
pre-computation of prefix-summations
divide and conquer
induction
last step
H4
H5
H6
strong
4
7
3
5
7
b
i
em
Bolds strong 5
b 0
i 0
em 0
Zawartość strony internetowej powinno zawierać więcej niż 250 słów, z stopa tekst / kod jest wyższy niż 20%.
Pozycji używać znaczników (h1, h2, h3, ...), aby określić temat sekcji lub ustępów na stronie, ale zwykle, użyj mniej niż 6 dla każdego tagu pozycje zachować swoją stronę zwięzły.
Styl używać silnych i kursywy znaczniki podkreślić swoje słowa kluczowe swojej stronie, ale nie nadużywać (mniej niż 16 silnych tagi i 16 znaczników kursywy)

Statystyki strony

twitter:title pusty
twitter:description pusty
google+ itemprop=name pusty
Pliki zewnętrzne 18
Pliki CSS 7
Pliki javascript 11
Plik należy zmniejszyć całkowite odwołanie plików (CSS + JavaScript) do 7-8 maksymalnie.

Linki wewnętrzne i zewnętrzne

Linki 121
Linki wewnętrzne 2
Linki zewnętrzne 119
Linki bez atrybutu Title 121
Linki z atrybutem NOFOLLOW 0
Linki - Użyj atrybutu tytuł dla każdego łącza. Nofollow link jest link, który nie pozwala wyszukiwarkom boty zrealizują są odnośniki no follow. Należy zwracać uwagę na ich użytkowania

Linki wewnętrzne

search #search-container
skip to content #content

Linki zewnętrzne

lyinch's world http://lyinch.com/
algorithms http://lyinch.com/category/algorithms/
java http://lyinch.com/category/java/
maximum subarray problem http://lyinch.com/maximum-subarray-problem/
http://lyinch.com/maximum-subarray-problem/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/maximum-subarray-problem/#respond
algorithms http://lyinch.com/tag/algorithms/
java http://lyinch.com/tag/java/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2005 preliminary problem 4 – chess http://lyinch.com/lio-2005-preliminary-problem-4-chess/
http://lyinch.com/lio-2005-preliminary-problem-4-chess/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2005-preliminary-problem-4-chess/#respond
- http://lyinch.com/wp-content/uploads/2015/12/chess_board.png
github https://github.com/lyinch/lio/blob/master/2005/pr%c3%a9liminaire/prob4/main.cpp
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2006 preliminary problem 3 – sudoku http://lyinch.com/lio-2006-preliminary-problem-3-sudoku/
http://lyinch.com/lio-2006-preliminary-problem-3-sudoku/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2006-preliminary-problem-3-sudoku/#respond
github https://github.com/lyinch/lio/blob/master/2006/pr%c3%a9liminaire/prob3/main.cpp
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2013 preliminary problem 3 – sudoku http://lyinch.com/lio-2013-preliminary-problem-3-sudoku/
http://lyinch.com/lio-2013-preliminary-problem-3-sudoku/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2013-preliminary-problem-3-sudoku/#respond
github https://github.com/lyinch/lio/blob/master/2013/pr%c3%a9liminaire/prob3/main.cpp
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2003 preliminary problem 1 – cilonacci sequences http://lyinch.com/lio-2003-preliminary-problem-1-cilonacci-sequences/
http://lyinch.com/lio-2003-preliminary-problem-1-cilonacci-sequences/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2003-preliminary-problem-1-cilonacci-sequences/#respond
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2002 preliminary problem 3 – pi determination http://lyinch.com/lio-2002-preliminary-problem-3-pi-determination/
http://lyinch.com/lio-2002-preliminary-problem-3-pi-determination/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2002-preliminary-problem-3-pi-determination/#respond
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2004 preliminary problem 4 – shortest path http://lyinch.com/lio-2004-preliminary-problem-4-shortest-path/
http://lyinch.com/lio-2004-preliminary-problem-4-shortest-path/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2004-preliminary-problem-4-shortest-path/#respond
github https://github.com/lyinch/lio
this https://www.cs.bu.edu/teaching/alg/maze/
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2002 preliminary problem 2 – suites http://lyinch.com/lio-2002-preliminary-problem-2-suites/
http://lyinch.com/lio-2002-preliminary-problem-2-suites/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2002-preliminary-problem-2-suites/#respond
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
c++ http://lyinch.com/category/c/
c++ dynamic multidimensional vectors http://lyinch.com/cpp-dynamic-multidimensional-vectors/
http://lyinch.com/cpp-dynamic-multidimensional-vectors/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/cpp-dynamic-multidimensional-vectors/#respond
c++ http://lyinch.com/tag/c-2/
c++ http://lyinch.com/category/c/
lio http://lyinch.com/category/lio/
lio 2002 preliminary problem 1 – comptage http://lyinch.com/lio-2002-preliminary-problem-1-comptage/
http://lyinch.com/lio-2002-preliminary-problem-1-comptage/
lyinch http://lyinch.com/author/lyinch/
leave a comment http://lyinch.com/lio-2002-preliminary-problem-1-comptage/#respond
c++ http://lyinch.com/tag/c-2/
lio http://lyinch.com/tag/lio/
2 http://lyinch.com/page/2/
3 http://lyinch.com/page/3/
next → http://lyinch.com/page/2/
home http://lyinch.com/
maximum subarray problem http://lyinch.com/maximum-subarray-problem/
lio 2005 preliminary problem 4 – chess http://lyinch.com/lio-2005-preliminary-problem-4-chess/
lio 2006 preliminary problem 3 – sudoku http://lyinch.com/lio-2006-preliminary-problem-3-sudoku/
lio 2013 preliminary problem 3 – sudoku http://lyinch.com/lio-2013-preliminary-problem-3-sudoku/
lio 2003 preliminary problem 1 – cilonacci sequences http://lyinch.com/lio-2003-preliminary-problem-1-cilonacci-sequences/
october 2016 http://lyinch.com/2016/10/
january 2016 http://lyinch.com/2016/01/
december 2015 http://lyinch.com/2015/12/
october 2015 http://lyinch.com/2015/10/
august 2015 http://lyinch.com/2015/08/
december 2014 http://lyinch.com/2014/12/
august 2014 http://lyinch.com/2014/08/
july 2014 http://lyinch.com/2014/07/
june 2014 http://lyinch.com/2014/06/
may 2014 http://lyinch.com/2014/05/
algorithms http://lyinch.com/category/algorithms/
arch linux http://lyinch.com/category/linux-2/arch-linux/
arduino http://lyinch.com/category/arduino/
c++ http://lyinch.com/category/c/
dashpi http://lyinch.com/category/raspberry-pi/dashpi/
java http://lyinch.com/category/java/
linux http://lyinch.com/category/linux-2/
lio http://lyinch.com/category/lio/
math http://lyinch.com/category/math/
osx http://lyinch.com/category/osx/
raspberry pi http://lyinch.com/category/raspberry-pi/
rfid http://lyinch.com/category/rfid/
web development http://lyinch.com/category/web-development/
blockify http://www.blockify.co/
proudly powered by wordpress http://wordpress.org/

Zdjęcia

Zdjęcia 89
Zdjęcia bez atrybutu ALT 88
Zdjęcia bez atrybutu TITLE 2
Korzystanie Obraz ALT i TITLE atrybutu dla każdego obrazu.

Zdjęcia bez atrybutu TITLE

http://lyinch.com/wp-content/uploads/2015/12/chess_board-300x298.png
http://latex.codecogs.com/gif.latex?0

Zdjęcia bez atrybutu ALT

http://latex.codecogs.com/gif.latex?n
http://latex.codecogs.com/gif.latex?a_1,...,1_n&space;\in&space;\mathbb{z}
http://latex.codecogs.com/gif.latex?i,j&space;:&space;(1&space;\leqslant&space;i&space;\leqslant&space;j&space;\leqslant&space;n)
http://latex.codecogs.com/gif.latex?s&space;=&space;\sum_{k=i}^j&space;a_k
http://latex.codecogs.com/gif.latex?s&space;=&space;0
http://latex.codecogs.com/gif.latex?\sum_{i&space;=&space;1}^n&space;\sum_{j&space;=&space;i}^n(j-i)&space;=&space;\sum_{i&space;=&space;1}^n&space;\sum_{j&space;=&space;0}^{n-i}(j)&space;=&space;\sum_{i&space;=&space;1}^n&space;\frac{(n-i)(n-i+1)}{2}&space;=&space;\sum_{i'&space;=&space;0}^{n-1}&space;\frac{(i')(i'+1)}{2}
http://latex.codecogs.com/gif.latex?=&space;\frac{1}{2}&space;(\sum_{i'&space;=&space;0}^{n-1}&space;(i')^2&space;+&space;\sum_{i'&space;=&space;0}^{n-1}i)&space;=&space;\frac{1}{2}(\theta(n^3)&space;+&space;\theta(n^2))&space;=&space;\theta(n^3)
http://latex.codecogs.com/gif.latex?i
http://latex.codecogs.com/gif.latex?s_i&space;=&space;\sum_{k=1}^i&space;a_i
http://latex.codecogs.com/gif.latex?1
http://latex.codecogs.com/gif.latex?i
http://latex.codecogs.com/gif.latex?\mathcal{o}(n)
http://latex.codecogs.com/gif.latex?s_i
http://latex.codecogs.com/gif.latex?i
http://latex.codecogs.com/gif.latex?s_{i-1}
http://latex.codecogs.com/gif.latex?s&space;=&space;s_j-s_{i-1}
http://latex.codecogs.com/gif.latex?\mathcal{o}(n)
http://latex.codecogs.com/gif.latex?\sum_{i=1}^n&space;\sum_{j=i}^n&space;1&space;=&space;\sum_{i=1}^n&space;(&space;n+1-i)&space;=&space;\sum_{i=1}^n&space;(n)&space;+\sum_{i=1}^n&space;(1)&space;+\sum_{i=1}^n&space;(-i)
http://latex.codecogs.com/gif.latex?=&space;n^2+n-\frac{1}{2}n(n+1)&space;=\frac{1}{2}n(n+1)&space;=&space;\theta&space;(n^2)
http://latex.codecogs.com/gif.latex?\theta&space;(n^2)
http://latex.codecogs.com/gif.latex?a_1,\ldots,a_{n/2}
http://latex.codecogs.com/gif.latex?a_{n/2&space;+1},\ldots,1_n
http://latex.codecogs.com/gif.latex?n=2^k&space;,&space;k&space;\in&space;\mathbb{n}
http://latex.codecogs.com/gif.latex?i,j
http://latex.codecogs.com/gif.latex?1&space;\leq&space;i&space;\leq&space;j&space;\leq&space;n
http://latex.codecogs.com/gif.latex?1&space;\leq&space;i&space;\leq&space;j&space;\leq&space;\frac{n}{2}
http://latex.codecogs.com/gif.latex?\frac{n}{2}&space;+1&space;\leq&space;i&space;\leq&space;j&space;\leq&space;n
http://latex.codecogs.com/gif.latex?1&space;\leq&space;i&space;\leq&space;\frac{n}{2}&space;<&space;j&space;\leq&space;n
http://latex.codecogs.com/gif.latex?s_1,\ldots,s_{n/2}
http://latex.codecogs.com/gif.latex?s_i&space;=&space;\sum&space;_{k=1}^{n/2}a_k
http://latex.codecogs.com/gif.latex?p_{n/2+1},\ldots,p_{n}
http://latex.codecogs.com/gif.latex?p_j&space;=&space;\sum&space;_{k=n/2+1}^{j}a_k
http://latex.codecogs.com/gif.latex?\textup{max}_i(s_i)+\textup{max}_i&space;(p_i)
http://latex.codecogs.com/gif.latex?\frac{n}{2}
http://latex.codecogs.com/gif.latex?\frac{n}{2}
http://latex.codecogs.com/gif.latex?s_{i+1}
http://latex.codecogs.com/gif.latex?p_{i+1}
http://latex.codecogs.com/gif.latex?\mathcal{o}(n)
http://latex.codecogs.com/gif.latex?\exists&space;a
http://latex.codecogs.com/gif.latex?a&space;\times&space;n
http://latex.codecogs.com/gif.latex?t(n)&space;=&space;\left\{\begin{matrix}&space;c&space;&&space;\text{if&space;}&space;n=0\\&space;2t(\frac{n}{2})&space;+&space;an&space;&&space;\text{if&space;}&space;n>0&space;\end{matrix}\right.
http://latex.codecogs.com/gif.latex?n&space;=&space;2^k&space;;&space;k&space;\in\mathbb{n}
http://latex.codecogs.com/gif.latex?\overline{t}(k)&space;=&space;\left\{\begin{matrix}&space;c&space;&&space;\text{if&space;}&space;k=0\\&space;2\overline{t}(\frac{k-1}{2})&space;+&space;a\cdot&space;2^k&space;&&space;\text{if&space;}&space;k>0&space;\end{matrix}\right.
http://latex.codecogs.com/gif.latex?t(n)&space;=&space;\overline{t}(k)
http://latex.codecogs.com/gif.latex?\overline{t}(k)&space;=&space;2^k&space;\cdot&space;c&space;+&space;\sum&space;_{i=0}^{k+1}&space;2^i&space;\cdot&space;a&space;\cdot&space;2^{k-i}&space;=&space;c&space;\cdot&space;2^k+a\cdot&space;k\cdot&space;2^k
http://latex.codecogs.com/gif.latex?\theta&space;(k\cdot&space;2^k)
http://latex.codecogs.com/gif.latex?n
http://latex.codecogs.com/gif.latex?t(n)&space;=&space;\theta&space;(n&space;\log{n})
http://latex.codecogs.com/gif.latex?(i-1)
http://latex.codecogs.com/gif.latex?i
http://latex.codecogs.com/gif.latex?\theta&space;(n)
http://latex.codecogs.com/gif.latex?\mathcal{o}(\log{n})
http://latex.codecogs.com/gif.latex?a_i
http://latex.codecogs.com/gif.latex?a_i
http://latex.codecogs.com/gif.latex?a_i&space;:=&space;-&space;\infty
http://latex.codecogs.com/gif.latex?a_i
http://latex.codecogs.com/gif.latex?a_i&space;:=&space;\infty
http://latex.codecogs.com/gif.latex?a_i
http://latex.codecogs.com/gif.latex?\omega&space;(n)&space;\cap&space;\mathcal{o}(n)=&space;\theta&space;(n)
http://latex.codecogs.com/gif.latex?\omega&space;(n)
http://latex.codecogs.com/gif.latex?\mathcal{o}(n)
http://latex.codecogs.com/gif.latex?8&space;\times&space;8
http://latex.codecogs.com/gif.latex?3&space;\times&space;3
http://latex.codecogs.com/gif.latex?0,1,1,2,3,5,8,13,...
http://latex.codecogs.com/gif.latex?m&space;\geqslant&space;2
http://latex.codecogs.com/gif.latex?2&space;\leqslant&space;m&space;\leqslant&space;100
http://latex.codecogs.com/gif.latex?1&space;\leqslant&space;n&space;\leqslant&space;10'000
http://latex.codecogs.com/gif.latex?\pi
http://latex.codecogs.com/gif.latex?\pi
http://latex.codecogs.com/gif.latex?\frac{\pi^2}{6}&space;=&space;\frac{1}{1^2}&space;+&space;\frac{1}{2^2}&space;+&space;\frac{1}{3^2}&space;+&space;\frac{1}{4^2}&space;+&space;...
http://latex.codecogs.com/gif.latex?\pi
http://latex.codecogs.com/gif.latex?1'000'000
http://latex.codecogs.com/gif.latex?9
http://latex.codecogs.com/gif.latex?n&space;\times&space;m
http://latex.codecogs.com/gif.latex?0
http://latex.codecogs.com/gif.latex?1
http://latex.codecogs.com/gif.latex?2&space;\leq&space;m,n&space;\leq&space;127&space;\quad&space;|\quad&space;m,n&space;\in&space;\mathbb{n}
http://latex.codecogs.com/gif.latex?n&space;\times&space;m
http://latex.codecogs.com/gif.latex?[y][x]
http://latex.codecogs.com/gif.latex?[x][y]
http://latex.codecogs.com/gif.latex?x
http://latex.codecogs.com/gif.latex?y
http://latex.codecogs.com/gif.latex?x
http://latex.codecogs.com/gif.latex?u_n&space;=&space;u_{n-1}&space;+&space;c
http://latex.codecogs.com/gif.latex?u_n&space;=&space;u_{n-1}&space;*&space;c
http://latex.codecogs.com/gif.latex?u_{n+1}&space;=&space;u_n&space;+&space;c
http://latex.codecogs.com/gif.latex?u_0&space;=&space;i
http://latex.codecogs.com/gif.latex?u_1&space;=&space;u_0&space;+&space;c

Ranking:


Alexa Traffic
Daily Global Rank Trend
Daily Reach (Percent)









Majestic SEO











Text on page:

lyinch's world search primary menu skip to content search for: algorithms, java maximum subarray problem october 9, 2016 lyinch leave a comment given are  numbers . find the contiguous subarray with the highest summation; find  that  is the highest. if all the sums are negative, then . the naive algorithm: brutforce java private static int naive(int[] input) { int m = 0; int s; for(int i = 0;i < input.length; i++) { for (int j = i; j < input.length; j++){ s = 0; for (int k = i; k<=j; k++){ s += input[k]; } if (s > m) m = s; } } return m; } 1234567891011121314151617 private static int naive(int[] input) { int m = 0; int s; for(int i = 0;i < input.length; i++) { for (int j = i; j < input.length; j++){ s = 0; for (int k = i; k<=j; k++){ s += input[k]; } if (s > m) m = s; } } return m; } we compute every possible subarray, add them together and return the maximum. how good is the algorithm; how many additions does the algorithm need? pre-computation of prefix-summations we can see that the first algorithm calculates the same values multiple times. now, we calculate for every position  the sum  , in words, the sum of position  to . all those values can be calculated in linear time . to calculate  we simply need to add the th number to the sum . now, for each new sum, we need a single operation: java private static int precompute(int[] input) { int[] tmp; tmp = new int[input.length+1]; tmp[0] = 0; int max = 0; //precompute from 0 to i for (int i = 0; i < input.length; i++) { tmp[i+1] = tmp[i] + input[i]; } for (int i = 1; i < tmp.length; i++) { for(int j = i; j < tmp.length; j++) { if (tmp[j]-tmp[i-1] > max) max = tmp[j]-tmp[i-1]; } } return max; } 1234567891011121314151617181920212223 private static int precompute(int[] input) { int[] tmp; tmp = new int[input.length+1]; tmp[0] = 0; int max = 0; //precompute from 0 to i for (int i = 0; i < input.length; i++) { tmp[i+1] = tmp[i] + input[i]; } for (int i = 1; i < tmp.length; i++) { for(int j = i; j < tmp.length; j++) { if (tmp[j]-tmp[i-1] > max) max = tmp[j]-tmp[i-1]; } } return max; } the time complexity for the precomputation is, as stated above,  and the number of operations for the subarrays is . this means that the whole algorithm runs in . divide and conquer we split the whole array into two equal arrays and solve the problem for the smaller array :  and .  to ease the calculation, we assume that , but it works for any number. if we find  with  of a solution, we have three distinct cases: the solution is completely in the first subarray  the solution is completely in the second subarray the solution is in between the two subarrays to handle the third case,  we know that the best subarray is composed of the last parts of the first case (the left subarray) and the first parts of the second case (the right subarray). in other words, we want the suffix-sums  with  and the prefix-sums  with . the best solution has the value java private static int maxcrossingsum(int arr[], int l, int m, int r) { // suffix sums int sum = 0; int suffix_sum = integer.min_value; for (int i = m; i >= l; i--) { sum = sum + arr[i]; if (sum > suffix_sum) suffix_sum = sum; } // prefix sums sum = 0; int prefix_sum = integer.min_value; for (int i = m+1; i <= r; i++) { sum = sum + arr[i]; if (sum > prefix_sum) prefix_sum = sum; } return suffix_sum + prefix_sum; } private static int divideandconquer(int[] input, int l, int r) { if (l > r) return 0; if (l == r) { return math.max(0,input[l]); } int m = (l+r)/2; return math.max(divideandconquer(input,l,m), math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); } 123456789101112131415161718192021222324252627282930313233343536 private static int maxcrossingsum(int arr[], int l, int m, int r) { // suffix sums int sum = 0; int suffix_sum = integer.min_value; for (int i = m; i >= l; i--) { sum = sum + arr[i]; if (sum > suffix_sum) suffix_sum = sum; } // prefix sums sum = 0; int prefix_sum = integer.min_value; for (int i = m+1; i <= r; i++) { sum = sum + arr[i]; if (sum > prefix_sum) prefix_sum = sum; } return suffix_sum + prefix_sum; } private static int divideandconquer(int[] input, int l, int r) { if (l > r) return 0; if (l == r) { return math.max(0,input[l]); } int m = (l+r)/2; return math.max(divideandconquer(input,l,m), math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); } how is the time complexity of this algorithm? we have to calculate  suffix and  prefix sums. the sums  and  only need each a single addition, we have an upper bound of , which means that  such that we have not more than  costs. looking at the recursion, we make two splits every time, which gives us: we chose  to facilitate our calculations, we get: we know that , wich leaves us with: our complexity is . substituting back for  we get  can we do better? of course we can! induction we assume, that we have after  steps the current maximum.  when we add the element , we compare the new sum with the stored maximum until that point. with a second variable, we can easily check, if we have a new maximum or not. once we arrive at a negative sum, we start at zero and start a new sum from that point. the code is pretty self-explanatory. java private static int induction(int[] input) { int max = 0; int border = 0; for (int i = 0; i < input.length; i++) { border += input[i]; if (border > max) max = border; if (border < 0) border = 0; } return max; } 1234567891011121314 private static int induction(int[] input) { int max = 0; int border = 0; for (int i = 0; i < input.length; i++) { border += input[i]; if (border > max) max = border; if (border < 0) border = 0; } return max; } in this case, the time complexity is  can we do better? maybe ? no, we can’t: last step we say that the algorithm has to check every item at least once. let’s assume, that the algorithm doesn’t check every item. therefore, we have an item  that wasn’t checked by the algorithm. we have two distinct cases: if we compute a result which contains the element  , we simply set  and thus rendering our optimal sum useless. if we compute a result which doesn’t contain the element  , we simply set  and thus rendering our optimal sum useless. in both possible cases, we’ve shown that an algorithm which ignores element  can compute the wrong result. therefore, we can limit our possibilities to : where  comes from the fact that we need to check every item at least once, and  is the proposed algorithm above. algorithmsjava c++, lio lio 2005 preliminary problem 4 – chess january 1, 2016 lyinch leave a comment the problem statement: we have an  chess board with at most 2  rooks, at most 2 bishops, at most one queen and one king. the goal is to calculate how many pieces set the king in check. we do not need to calculate wether it is a plausible(realistic, valid) setup, not take in count the colour of the pieces nor of the different fields. the input file is made up like this: … with the following order: king,queen,rook,rook,bishop,bishop if a piece is missing it is denoted as 00. the horizontal axis goes from a to h and the vertical one from 1 to 8. consider the following example input from the input file chess_in.txt: d6 b2 g4 00 f4 a7 the output will be 1 the basic idea is to draw on the chess board the line of sight of each piece and see how many hit the king. if the line of sight collides with another piece, it stops there. we start with an enum and give each piece we place on the board a value. c++ enum pieces {empty = 0, king = 1, queen = 2, rook = 3, bishop = 4}; 1 enum pieces {empty = 0, king = 1, queen = 2, rook = 3, bishop = 4}; we create a struct and a vector to have a list where we can save the position of each piece. c++ struct t_pos{ int x; int y; int piece; }; vector p_pos; 1234567 struct t_pos{ int x; int y; int piece;}; vector p_pos; we now read in the pieces from the file, convert the chars to integer positions on the board and save the positions to the board and in the vector. c++ if(file.is_open()){ for(int i = 0; i <6; i++){ file >> input; //reads until whitespace //cout << input << endl; //debuggingy if(((int)input[0]-(int)'a' == -17)) //skip if piece is 00 continue; //converts chars to integer positions x = (int)input[0]-int('a'); y = (int)input[1]-int('0')-1; //increment the size of the list for a new piece p_pos.resize(p_pos.size()+1); tmp_size = p_pos.size()-1; //position every piece on the board and save it to the list p_pos (vector) switch(i){ case 0: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = king; chess[x][y] = king; break; case 1: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = queen; chess[x][y] = queen; break; case 2: case 3: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = rook; chess[x][y] = rook; break; case 4: case 5: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = bishop; chess[x][y] = bishop; break; } } }else{ cout << "could not read from file!" << endl; return 0; //exit ;) } 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 if(file.is_open()){ for(int i = 0; i <6; i++){ file >> input; //reads until whitespace //cout << input << endl; //debuggingy if(((int)input[0]-(int)'a' == -17)) //skip if piece is 00 continue; //converts chars to integer positions x = (int)input[0]-int('a'); y = (int)input[1]-int('0')-1; //increment the size of the list for a new piece p_pos.resize(p_pos.size()+1); tmp_size = p_pos.size()-1; //position every piece on the board and save it to the list p_pos (vector) switch(i){ case 0: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = king; chess[x][y] = king; break; case 1: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = queen; chess[x][y] = queen; break; case 2: case 3: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = rook; chess[x][y] = rook; break; case 4: case 5: p_pos[tmp_size].x = x; p_pos[tmp_size].y = y; p_pos[tmp_size].piece = bishop; chess[x][y] = bishop; break; } } }else{ cout << "could not read from file!" << endl; return 0; //exit ;) } we call our first function with a loop based on our vector c++ //call for every piece in the list the function for(int i = 0; i <= p_pos.size(); i++) call_mark_los(chess,p_pos[i].x,p_pos[i].y,p_pos[i].piece); 123 //call for every piece in the list the function for(int i = 0; i <= p_pos.size(); i++) call_mark_los(chess,p_pos[i].x,p_pos[i].y,p_pos[i].piece); the call_mark_los function takes the board with a reference parameter (that we can modify the board and don’t use a copy),  the position of each piece and the value of the piece to know which direction to look for. the function mark_los (mark line of sight) is then called with the board as reference parameter, the coordinates of the piece and a value for the x direction and one for the y direction the piece has a direct line of sight. c++ //calls the appropriate function to mark the line of sight according the the piece bool call_mark_los(int (&chess)[8][8] ,int x, int y,int piece){ //horizontal & vertical checks if((piece == rook) || (piece == queen)){ //right mark_los(chess,x,y,1,0); //left mark_los(chess,x,y,-1,0); //up mark_los(chess,x,y,0,-1); //down mark_los(chess,x,y,0,1); } //diagonal checks if((piece == bishop) || (piece == queen)){ mark_los(chess,x,y,1,1); mark_los(chess,x,y,-1,1); mark_los(chess,x,y,1,-1); mark_los(chess,x,y,-1,-1); } return false; } 12345678910111213141516171819202122232425 //calls the appropriate function to mark the line of sight according the the piecebool call_mark_los(int (&chess)[8][8] ,int x, int y,int piece){ //horizontal & vertical checks if((piece == rook) || (piece == queen)){ //right mark_los(chess,x,y,1,0); //left mark_los(chess,x,y,-1,0); //up mark_los(chess,x,y,0,-1); //down mark_los(chess,x,y,0,1); } //diagonal checks if((piece == bishop) || (piece == queen)){ mark_los(chess,x,y,1,1); mark_los(chess,x,y,-1,1); mark_los(chess,x,y,1,-1); mark_los(chess,x,y,-1,-1); } return false;} the mark_los function is a recursive function. with each call, the new x and y coordinates are added to the direction the piece can see. we then check if this new field is still in the board and if it doesn’t hit another piece (except the king). if this is all valid, we check if the line of sight hits the king, if it does, we increment our counter variable and exit the function. otherwise we mark a new field as part of the line of sight of a piece and recall our function. c++ //mark line of sight with the number 5 on the board bool mark_los(int (&chess)[8][8],int x, int y,int dir_x, int dir_y){ x += dir_x; y += dir_y; //check position is out of range or it is on another piece if((x > 7) || (x < 0) || (y > 7) || (y < 0) || (chess[x][y] > 1 && chess[x][y] < 5 )) return false; //check if hits the king if(chess[x][y] == 1){ counter++; return true; } //mark the position as line of sight chess[x][y] = 5; //recursive call to continue in the initialised direction mark_los(chess,x,y,dir_x,dir_y); return false; } 1234567891011121314151617181920212223 //mark line of sight with the number 5 on the boardbool mark_los(int (&chess)[8][8],int x, int y,int dir_x, int dir_y){ x += dir_x; y += dir_y; //check position is out of range or it is on another piece if((x > 7) || (x < 0) || (y > 7) || (y < 0) || (chess[x][y] > 1 && chess[x][y] < 5 )) return false; //check if hits the king if(chess[x][y] == 1){ counter++; return true; } //mark the position as line of sight chess[x][y] = 5; //recursive call to continue in the initialised direction mark_los(chess,x,y,dir_x,dir_y); return false;} at the end of all that, we output the counter… c++ cout << "checks: " << counter << endl; 1 cout << "checks: " << counter << endl; the whole code is available on github, check it out! stay tuned, lyinch. c++lio c++, lio lio 2006 preliminary problem 3 – sudoku december 31, 2015 lyinch leave a comment the problem statement: you receive a partially filled sudoku and the goal is to only fill in the missing numbers in a row, column or 3*3 grid where always 8 numbers are filled in. after each new number, you have to recheck if there is a new row, column, 3*3 field with 8 numbers. example input (sudo_in.txt): 0 3 0 0 0 8 0 5 0 0 0 0 0 0 6 0 2 0 8 2 6 1 5 0 3 9 7 6 0 0 5 4 0 0 0 2 0 4 0 8 9 2 0 1 0 0 0 2 3 6 1 0 8 0 0 0 0 0 0 0 0 4 9 1 9 0 4 2 3 8 6 5 0 0 0 0 0 9 0 7 0 example output: 0 3 0 0 0 8 0 5 0 0 0 0 0 0 6 0 2 0 8 2 6 1 5 4 3 9 7 6 0 0 5 4 7 0 3 2 0 4 0 8 9 2 0 1 0 0 0 2 3 6 1 0 8 0 0 0 0 0 0 5 0 4 9 1 9 7 4 2 3 8 6 5 0 0 0 0 0 9 0 7 0 the idea is to see with a check[10] array how many distinct numbers are filled in. if the first number [0] == 1, we know that the other 8 numbers are filled in. we then look for the missing number and the position of this number and fill it in the grid. we do this for every row, column and 3*3 grid. we repeat the process with a do while loop, because it checks at the end of every iteration if a new number has been added or not. we start by reading in the sudoku c++ ifstream input("sudo_in.txt"); if(input.is_open()){ cout << "original sudoku" << endl; for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ input >> sudoku[y][x]; cout << sudoku[y][x] << " "; } cout << "\n"; } }else{ cout << "error reading file" << endl; return 0; } 123456789101112131415 ifstream input("sudo_in.txt"); if(input.is_open()){ cout << "original sudoku" << endl; for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ input >> sudoku[y][x]; cout << sudoku[y][x] << " "; } cout << "\n"; } }else{ cout << "error reading file" << endl; return 0; } we check every row and column. the outer loops go trough a row or column, and if we find one where only one zero is filled in, we then look for the missing number and store those value in temporary variables (int val) to save them at the end of the checks in the sudoku field. c++ //check line by line for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[y][x]]++; //check if there is a line with 8 filled in numbers if(check[0] == 1){ found = true; for(int x = 0; x < 9 ;x++){ if(sudoku[y][x] == 0) pos = x; } //search for the empty position for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[y][pos] = val; } fill_array(check); } //check column for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[x][y]]++; //check if there is a column with 8 filled in numbers if(check[0] == 1){ found = true; for(int x = 0; x < 9 ;x++){ if(sudoku[x][y] == 0) pos = x; } //search for the empty position for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[pos][y] = val; } fill_array(check); } 12345678910111213141516171819202122232425262728293031323334353637383940414243 //check line by line for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[y][x]]++; //check if there is a line with 8 filled in numbers if(check[0] == 1){ found = true; for(int x = 0; x < 9 ;x++){ if(sudoku[y][x] == 0) pos = x; } //search for the empty position for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[y][pos] = val; } fill_array(check); } //check column for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[x][y]]++; //check if there is a column with 8 filled in numbers if(check[0] == 1){ found = true; for(int x = 0; x < 9 ;x++){ if(sudoku[x][y] == 0) pos = x; } //search for the empty position for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[pos][y] = val; } fill_array(check); } the 3*3 grids are based on the same idea but with a more complicated structure. the two outer loops switch every 3*3 block and the two inner loops look for the numbers in every block. c++ //check if 3*3 is filled with 8 numbers if(check[0] == 1){ found = true; //search for the empty pos. in the 3*3 grid for(int x = 0; x < 3; x++){ for(int y = 0; y < 3; y++){ if(sudoku[a+x][y+b] == 0){ t_x = a+x; t_y = b+y; } } } //search for the missing value for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[t_x][t_y] = val; } //end found missing number fill_array(check); } } 12345678910111213141516171819202122232425 //check if 3*3 is filled with 8 numbers if(check[0] == 1){ found = true; //search for the empty pos. in the 3*3 grid for(int x = 0; x < 3; x++){ for(int y = 0; y < 3; y++){ if(sudoku[a+x][y+b] == 0){ t_x = a+x; t_y = b+y; } } } //search for the missing value for(int i = 1; i < 10; i++){ //set val the value of the empty position if(check[i] == 0) val = i; } sudoku[t_x][t_y] = val; } //end found missing number fill_array(check); } } at the end we then output the sudoku: c++ for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ cout << sudoku[y][x] << " "; } cout << "\n"; } 123456 for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ cout << sudoku[y][x] << " "; } cout << "\n"; } the code is available on github. stay tuned, lyinch! c++lio c++, lio lio 2013 preliminary problem 3 – sudoku december 30, 2015 lyinch leave a comment the problem statement: you receive a sudoku game partially or complete filled and your goal is it to check if the game is correct. you don’t need to find a solution. this means: no repetition in a row, column and  grid.  the filename of the sudoku file is read in by the console. example input (in1.txt): 5 6 1 4 8 7 0 9 2 4 9 8 2 1 3 0 6 7 3 2 0 5 6 9 0 4 8 2 5 4 7 9 1 6 8 3 7 8 9 3 2 6 4 1 5 1 3 6 8 0 4 7 2 9 6 1 3 9 7 2 0 5 4 9 7 5 6 4 8 2 3 1 8 4 2 1 3 5 0 7 6 example output: correct the idea is to have an array check[10] which is filled with zeros and each index represents one number of a row, column or 3*3 field. for every number in the sudoku i then increment the value of my check[number] and see if one of the values is greater than 1 after a row, column or 3*3 field. we start by reading in the sudoku c++ cin >> input; ifstream file(input); if(file.is_open()){ for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ file >> sudoku[y][x]; } } file.close(); }else cout << "error opening file" << endl; 1234567891011 cin >> input; ifstream file(input); if(file.is_open()){ for(int y = 0; y < 9; y++){ for(int x = 0; x < 9; x++){ file >> sudoku[y][x]; } } file.close(); }else cout << "error opening file" << endl; the checks of the row/column are straightforward. after each row/column we check if the check array has an item larger than one, if yes we set the variable error to true. we reset the check array for each new row/column. c++ //check line for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[y][x]]++; for(int i = 1; i < 10; i++){ if(check[i] > 1) error = true; } fill_array(check); } //check column for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[x][y]]++; for(int i = 1; i < 10; i++){ if(check[i] > 1) error = true; } fill_array(check); } 1234567891011121314151617181920 //check line for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[y][x]]++; for(int i = 1; i < 10; i++){ if(check[i] > 1) error = true; } fill_array(check); } //check column for(int y = 0; y < 9; y++){ for(int x = 0; x < 9 ;x++) check[sudoku[x][y]]++; for(int i = 1; i < 10; i++){ if(check[i] > 1) error = true; } fill_array(check); } the check for the 3*3 grid is based on the same idea, but the loops are nested more complicated. the inner loops (x and y) always check a 3*3 grid, and the two outer loops switch to every new 3*3 block. c++ //check 3*3 for(int a = 0; a < 9; a += 3){ for(int b = 0; b < 9; b += 3){ for(int x = 0; x < 3; x++){ for(int y = 0; y < 3; y++){ check[sudoku[a+x][y+b]]++; } } for(int i = 1; i < 10; i++) if(check[i] > 1) error = true; fill_array(check); } } 1234567891011121314 //check 3*3 for(int a = 0; a < 9; a += 3){ for(int b = 0; b < 9; b += 3){ for(int x = 0; x < 3; x++){ for(int y = 0; y < 3; y++){ check[sudoku[a+x][y+b]]++; } } for(int i = 1; i < 10; i++) if(check[i] > 1) error = true; fill_array(check); } } we then check if our error flag has been set or not c++ if(error) cout << "error" << endl; else cout << "correct" << endl; 1234 if(error) cout << "error" << endl; else cout << "correct" << endl; the whole code is on github. stay tuned, lyinch c++lio c++, lio lio 2003 preliminary problem 1 – cilonacci sequences december 29, 2015 lyinch leave a comment the problem statement: the numbers of the fibonacci sequence are . the next number is calculated by adding the two previous ones. a cilonacci (doesn’t exist…) is a generalisation of the fibonacci sequence. the numbers of the sequence are made out of the sum of the previous m numbers (). the program reads the number m, followed by the first m numbers and then the number n, which is the position of the digit to calculate. the output shows the n-th term of the sequence. and  we save all the values in a vector, and to calculate the next digit, we have a loop which adds the last position, (last pos-1), (last pos-2),…(last pos-m). the summation is in a loop which counts until the digit we want. we only need to loop to n-m (wanted digit – initial terms) because we already have the first m digits. c++ #include #include using namespace std; int main(){ int n, to; //n: number of first terms; to: index of term to show int tmp; vector terms; int ans = 0; cin >> n; for(int i = 0; i < n; i++){ //reads in the first n terms cin >> tmp; terms.push_back(tmp); } cin >> to; vector::iterator it = terms.end(); for(int j = 0; j < to-n; j++){ // loop until to-n because we have the first n digits for (int q = 1; q < n+1; q++){ //go to the last term in the vector and add the q previous terms ans += *(it-q); } terms.push_back(ans); ans = 0; it = terms.end(); } cout << terms.back() << endl; return 0; } 12345678910111213141516171819202122232425262728 #include #include using namespace std; int main(){ int n, to; //n: number of first terms; to: index of term to show int tmp; vector terms; int ans = 0; cin >> n; for(int i = 0; i < n; i++){ //reads in the first n terms cin >> tmp; terms.push_back(tmp); } cin >> to; vector::iterator it = terms.end(); for(int j = 0; j < to-n; j++){ // loop until to-n because we have the first n digits for (int q = 1; q < n+1; q++){ //go to the last term in the vector and add the q previous terms ans += *(it-q); } terms.push_back(ans); ans = 0; it = terms.end(); } cout << terms.back() << endl; return 0;} c++lio c++, lio lio 2002 preliminary problem 3 – pi determination december 28, 2015 lyinch leave a comment the question statement: write a program which determines an approximation of  with the formula of bernoulli, which converts to the exact value of . the formula is : the program reads the number of rounds for the iteration and outputs the approximation of . the number of iterations can’t exceed  and the decimal precision needs to be at least . the only problems which occur in c++ are that we need to use long double for the precision and to output more than a few decimal places we need setprecision() from iomanip. c++ #include #include #include using namespace std; int main(){ long double pi = 0.0; //long double for better precision int in; cin >> in; if(in > 1000000) return 0; for(int i = 1; i <= in; i++){ pi = pi + (1/pow(i,2)); } cout << setprecision(15) << sqrt(pi*6) << endl; //setprecision to output 15 digits return 0; } 1234567891011121314151617 #include #include #include using namespace std; int main(){ long double pi = 0.0; //long double for better precision int in; cin >> in; if(in > 1000000) return 0; for(int i = 1; i <= in; i++){ pi = pi + (1/pow(i,2)); } cout << setprecision(15) << sqrt(pi*6) << endl; //setprecision to output 15 digits return 0;} c++lio c++, lio lio 2004 preliminary problem 4 – shortest path december 27, 2015 lyinch leave a comment the question statement: on an  field are obstacles. the task is to find the shortest path from north to south by only going down, left, right. the program reads in the file input.txt with the dimensions of the maze in the first line followed by the maze made out of  (free path) and  (obstacle). the program outputs either the smallest path or -1 if no solution has been found.  example maze. 20 10 00100000000001000100 11111001000001000010 00000001001111100000 00011101000001000111 00000000000011001111 11001000000000010111 11010001111000100000 11000000010110000000 11001111110110001110 11000010010000001110 this was a really tough problem. i didn’t want to use path finding algorithm such as a* because it’s first of all “only” a preliminary problem and should be easy, and secondly, i learned a lot trough this exercise. we need an array with with the size of . in c++ we can’t create dynamic arrays and i therefore used vectors. c++ vector v2; //tmp vector for the y space vector > field(0,v2); //2d vector 12 vector v2; //tmp vector for the y spacevector > field(0,v2); //2d vector by reading the input.txt file, i first read the size of the matrix, resize my vector and then proceed to read line by line the field data and store it in my 2d vector. (yes, i messed up and resized my vector to  instead of  but that can be easily changed) c++ if(input.is_open()){ input >> x >> y; getline(input,in_tmp); //switch to the first line of the field field.resize(y,vector(x)); //resize vector to [y][x] for(int i = 0; i < y; i++){ getline(input,in_tmp); for(int j = 0; j < x; j++){ if((int)in_tmp[j]-48 == 1) field[i][j] = 1; //use 1 for wall else field[i][j] = 0; //use 0 for a free field } } input.close(); } 1234567891011121314151617 if(input.is_open()){ input >> x >> y; getline(input,in_tmp); //switch to the first line of the field field.resize(y,vector(x)); //resize vector to [y][x] for(int i = 0; i < y; i++){ getline(input,in_tmp); for(int j = 0; j < x; j++){ if((int)in_tmp[j]-48 == 1) field[i][j] = 1; //use 1 for wall else field[i][j] = 0; //use 0 for a free field } } input.close(); } to output the field i created a simple procedure with two corresponding loops for  and . c++ void output2d_vector(vector > &field) { for(int i=0; i < field.size(); i++){ for(int j = 0; j < field[i].size();j++){ cout << field[i][j]; } cout << endl; } } 123456789 void output2d_vector(vector > &field){ for(int i=0; i < field.size(); i++){ for(int j = 0; j < field[i].size();j++){ cout << field[i][j]; } cout << endl; } } the path finding is done with a recursive  boolean function.  check if coordinates are in range and if that field hasn’t been checked:return false;  check if goal has been reached : return true;  check if we hit a wall: return false;  mark the current position as part of the solution (giving it the value 2) check the next field south, if true (the conditions above haven’t terminated the call): return true;  check the next field east, if true (the conditions above haven’t terminated the call): return true;  check the next field west, if true (the conditions above haven’t terminated the call): return true;  because the above checks couldn’t reach the goal, we unmark the path as part of the solution, give it the value 3 (already checked and wrong): return false; i used two counters iterp (iterations plus) and iterm (iterations minus) which are incremented/decremented when i mark a field as the solution respectively when i unmark one. the two counters together give me then the number of steps i need to reach my goal. an additional bool print parameter has been added to output the optimal solution once it has been found. c++ bool check_steps(vector > field,int x_pos, int y_pos,bool print = false){ //check that coords are in range if( (x_pos < 0) || (x_pos >= x) || (y_pos < 0) || (y_pos >= y) || (field[y_pos][x_pos] >= 1) ) return false; //check if goal has been reached if( (x_pos == x_g) && (y_pos == y_g)){ reached = true; //mark that a solution has been found field[y_g][x_g] = 2; //mark as path if(print) output2d_vector(field); return true; } //if wall hit if(field[y_pos][x_pos] == 1) return false; //mark path as part of the solution - set 2 as checked field[y_pos][x_pos] = 2; iterp++; //check south if(check_steps(field,x_pos,y_pos+1,print) == true) return true; //if solution found, terminate //check east if(check_steps(field,x_pos+1,y_pos,print) == true) return true; //check west if(check_steps(field,x_pos-1,y_pos,print) == true) return true; //unmark, path as part of the solution - set 3 as checked field[y_pos][x_pos] = 3; iterm--; return false; } 123456789101112131415161718192021222324252627282930313233343536373839404142 bool check_steps(vector > field,int x_pos, int y_pos,bool print = false){ //check that coords are in range if( (x_pos < 0) || (x_pos >= x) || (y_pos < 0) || (y_pos >= y) || (field[y_pos][x_pos] >= 1) ) return false; //check if goal has been reached if( (x_pos == x_g) && (y_pos == y_g)){ reached = true; //mark that a solution has been found field[y_g][x_g] = 2; //mark as path if(print) output2d_vector(field); return true; } //if wall hit if(field[y_pos][x_pos] == 1) return false; //mark path as part of the solution - set 2 as checked field[y_pos][x_pos] = 2; iterp++; //check south if(check_steps(field,x_pos,y_pos+1,print) == true) return true; //if solution found, terminate //check east if(check_steps(field,x_pos+1,y_pos,print) == true) return true; //check west if(check_steps(field,x_pos-1,y_pos,print) == true) return true; //unmark, path as part of the solution - set 3 as checked field[y_pos][x_pos] = 3; iterm--; return false;} because i need to go from north to south and don’t have a fixed starting and ending field, i have two nested loops wich try every possibility of starting and ending field. if one of the fields is a wall, i skip it (continue in a loop jumps to the next iteration) and if my end field has a wall above it, it isn’t reachable. (if we can reach it from the east or west, then we already reached the southern line, and don’t need to make more moves to the side). the variable min_steps holds the number of steps for the smallest path and the values bxs and bxg (best_x_start/goal) hold the  values for the best path. c++ for(int a = 0; a < field[0].size(); a++){ if(field[0][a] == 1) continue; //skip if starting field is a wall for(int b = 0; b < field[0].size(); b++){ //check every possible end position on y_g = y-1 if(field[y_g][b] == 1) //skip field if goal is a wall continue; if(field[y_g-1][b] == 1) //skip field if not reachable from above continue; x_g = b; check_steps(field,a,0); if(((iterp+iterm) < min_steps) && (iterp+iterm != 1)){ bxs = a; bxg = b; min_steps = iterp+iterm; } iterp = 1; iterm = 0; } } 12345678910111213141516171819202122232425 for(int a = 0; a < field[0].size(); a++){ if(field[0][a] == 1) continue; //skip if starting field is a wall for(int b = 0; b < field[0].size(); b++){ //check every possible end position on y_g = y-1 if(field[y_g][b] == 1) //skip field if goal is a wall continue; if(field[y_g-1][b] == 1) //skip field if not reachable from above continue; x_g = b; check_steps(field,a,0); if(((iterp+iterm) < min_steps) && (iterp+iterm != 1)){ bxs = a; bxg = b; min_steps = iterp+iterm; } iterp = 1; iterm = 0; } } if a boolean reached is true, i rerun my path finding with the best starting and ending coordinates and set the print flag as true to output the best path, else i output -1 which says that no path has been found. the full code is available on github.  i used this page to help me with the algorithm, it further explains how the backtracking of the algorithm works. stay tuned, lyinch c++lio c++, lio lio 2002 preliminary problem 2 – suites december 24, 2015 lyinch leave a comment the question statement: write a program which generates geometric and arithmetic sequences. an arithmetic sequence is defined:  and a geometric one :  . the program reads the first term from the sequence, the constant, the number of terms and a character ‘a’ or ‘g’ for the sequence. the program then outputs the sequence on the screen from the left to the right with a white space in between. we have two different loops which either multiply or add the last term to the constant and output it based on the input character. we use the following formula:  with  and  before that, we check if the input is correct and exit if not. c++ #include using namespace std; int main(){ int i,c,n; //first number, the constant and the repetitions char t; //type cin >> i >> c >> n >> t; //check if input is correct, by checking wheter one of the values is false (the ! at the beginning) if(!((i == (int)i) && (c == (int)c) && (n == (int)n) && (abs(i) <= 100) && (abs(c) <= 100) && (abs(n) <= 100) && ((t == 'a') || t == 'g'))) return 0; if(t == 'a'){ cout << i << " "; for(int q = 0; q < n-1; q++){ i += c; cout << i << " "; } cout << endl; } if(t == 'g'){ cout << i << " "; for(int q = 0; q < n-1; q++){ i *= c; cout << i << " "; } cout << endl; } return 0; } 12345678910111213141516171819202122232425262728 #include using namespace std; int main(){ int i,c,n; //first number, the constant and the repetitions char t; //type cin >> i >> c >> n >> t; //check if input is correct, by checking wheter one of the values is false (the ! at the beginning) if(!((i == (int)i) && (c == (int)c) && (n == (int)n) && (abs(i) <= 100) && (abs(c) <= 100) && (abs(n) <= 100) && ((t == 'a') || t == 'g'))) return 0; if(t == 'a'){ cout << i << " "; for(int q = 0; q < n-1; q++){ i += c; cout << i << " "; } cout << endl; } if(t == 'g'){ cout << i << " "; for(int q = 0; q < n-1; q++){ i *= c; cout << i << " "; } cout << endl; } return 0;} c++lio c++ c++ dynamic multidimensional vectors december 24, 2015 lyinch leave a comment i asked myself, how i could create a two dimensional array in c++ without a fixed size. i read the size from an input and then create the array according to this size. it actually is pretty easy with vectors: c++ vector one_d; //we create a normal vector without a fixed size //we need a gap between the two '>' vector > second_d(0,one_d); //we create a second vector with the size 0 and as datatype a vector which is the first vector 123 vector one_d; //we create a normal vector without a fixed size//we need a gap between the two '>'vector > second_d(0,one_d); //we create a second vector with the size 0 and as datatype a vector which is the first vector we now somehow read in our dimensions of the field and change the size accordingly. c++ input >> a >> b; //determine somehow the dimensions you want second_d.resize(a,vector(b)); //we resize both vectors to the dimensions we got earlier 12 input >> a >> b; //determine somehow the dimensions you wantsecond_d.resize(a,vector(b)); //we resize both vectors to the dimensions we got earlier to access the elements, we don’t need an iterator but can access the elements by an index just like an ordinary array. c++ for(int i=0; i < second_d.size(); i++){ for(int j = 0; j < second_d[i].size();j++){ cout << second_d[i][j] << " "; } cout << endl; } 123456 for(int i=0; i < second_d.size(); i++){ for(int j = 0; j < second_d[i].size();j++){ cout << second_d[i][j] << " "; } cout << endl; } if we want to pass this 2d vector to a function we can pass it by value or constant reference if we want to keep the original content, or by reference if we want to change the original content. c++ //keeps the original content void output_vector(const vector> & second_d); //keeps the original content void output_vector(vector> second_d); //modifies the original content void output_vector(vector> & second_d); //call the method output_vector(second_d); 1234567891011 //keeps the original contentvoid output_vector(const vector> & second_d); //keeps the original contentvoid output_vector(vector> second_d); //modifies the original contentvoid output_vector(vector> & second_d); //call the methodoutput_vector(second_d); and don’t forget to c++ #include 1 #include c++ c++, lio lio 2002 preliminary problem 1 – comptage december 20, 2015 lyinch leave a comment the problem statement: write a program which counts the number of appearance of a character in a text. the program reads the text from the keyboard and and outputs the number of occurrences. the text only made out if letters from the alphabet (french, but that sucks) and has not more than 100 characters. the program needs to differentiate between capital and lowercase letters, give an error message if the text or the character contain invalid characters and give one if the text is longer than 100 characters. pretty straightforward. we read the input with getline until a newline character comes. we then check with a loop every character of the string and increment a variable if an occurrence has been found. c++ #include using namespace std; //ignore the stupid rule of the ' and ç character... int main(){ string input; char c; int counter; bool error = false; getline(cin,input); //read input until new line appears cin >> c; if(!isalpha(c)) //check if c contains only characters error = true; if(input.size() > 100) error = true; for(int i = 0; i < input.size(); i++){ if(input[i] == c) counter++; if(!(((int)input[i] == 32) || ((int)input[i] >= 65 && (int)input[i] <= 90) || ((int)input[i] >= 97 && (int)input[i] <= 122 ))) //check if string contains valid character based on ascii code. we could also use isalpha and check only the special cases such as the white space. error = true; } if(error) cout << "there was an error" << endl; cout << counter << endl; return 0; } 1234567891011121314151617181920212223242526 #include using namespace std;//ignore the stupid rule of the ' and ç character... int main(){ string input; char c; int counter; bool error = false; getline(cin,input); //read input until new line appears cin >> c; if(!isalpha(c)) //check if c contains only characters error = true; if(input.size() > 100) error = true; for(int i = 0; i < input.size(); i++){ if(input[i] == c) counter++; if(!(((int)input[i] == 32) || ((int)input[i] >= 65 && (int)input[i] <= 90) || ((int)input[i] >= 97 && (int)input[i] <= 122 ))) //check if string contains valid character based on ascii code. we could also use isalpha and check only the special cases such as the white space. error = true; } if(error) cout << "there was an error" << endl; cout << counter << endl; return 0;} c++lio posts navigation 1 2 3 next → home recent posts maximum subarray problem lio 2005 preliminary problem 4 – chess lio 2006 preliminary problem 3 – sudoku lio 2013 preliminary problem 3 – sudoku lio 2003 preliminary problem 1 – cilonacci sequences archives october 2016 january 2016 december 2015 october 2015 august 2015 december 2014 august 2014 july 2014 june 2014 may 2014 categories algorithms arch linux arduino c++ dashpi java linux lio math osx raspberry pi rfid web development visit alsoblockify proudly powered by wordpress


Here you find all texts from your page as Google (googlebot) and others search engines seen it.

Words density analysis:

Numbers of all words: 7306

One word

Two words phrases

Three words phrases

the - 6.04% (441)
int - 3.96% (289)
for - 2.23% (163)
(int - 2.04% (149)
pos - 1.96% (143)
check - 1.88% (137)
and - 1.4% (102)
out - 1.37% (100)
input - 1.36% (99)
for(int - 1.26% (92)
vector - 1.22% (89)
if( - 1.18% (86)
field - 1.07% (78)
size - 0.99% (72)
sum - 0.89% (65)
tmp - 0.85% (62)
return - 0.82% (60)
val - 0.74% (54)
piece - 0.73% (53)
cout - 0.71% (52)
c++ - 0.71% (52)
end - 0.68% (50)
term - 0.64% (47)
mark - 0.64% (47)
number - 0.64% (47)
with - 0.63% (46)
true - 0.63% (46)
chess - 0.62% (45)
sudoku - 0.6% (44)
all - 0.6% (44)
p_pos - 0.57% (42)
i++) - 0.52% (38)
//check - 0.52% (38)
line - 0.51% (37)
array - 0.48% (35)
100 - 0.48% (35)
true; - 0.47% (34)
endl; - 0.44% (32)
max - 0.44% (32)
value - 0.41% (30)
position - 0.41% (30)
output - 0.41% (30)
error - 0.4% (29)
that - 0.4% (29)
lio - 0.4% (29)
read - 0.38% (28)
123 - 0.38% (28)
vector - 0.38% (28)
fill - 0.37% (27)
mark_los - 0.37% (27)
1234 - 0.36% (26)
tmp_size - 0.36% (26)
file - 0.34% (25)
123456 - 0.34% (25)
i++){ - 0.33% (24)
each - 0.33% (24)
second - 0.33% (24)
first - 0.33% (24)
1234567 - 0.31% (23)
set - 0.31% (23)
problem - 0.31% (23)
have - 0.3% (22)
case - 0.3% (22)
use - 0.3% (22)
char - 0.3% (22)
123456789 - 0.3% (22)
every - 0.29% (21)
1234567891011 - 0.29% (21)
one - 0.29% (21)
false - 0.29% (21)
from - 0.29% (21)
which - 0.27% (20)
call - 0.27% (20)
terms - 0.27% (20)
solution - 0.26% (19)
step - 0.26% (19)
new - 0.26% (19)
need - 0.26% (19)
1234567891011121314 - 0.26% (19)
has - 0.26% (19)
are - 0.25% (18)
loop - 0.25% (18)
can - 0.25% (18)
path - 0.25% (18)
column - 0.25% (18)
y++){ - 0.25% (18)
steps - 0.25% (18)
king - 0.25% (18)
count - 0.23% (17)
false; - 0.23% (17)
not - 0.23% (17)
numbers - 0.23% (17)
algorithm - 0.23% (17)
123456789101112131415 - 0.23% (17)
cin - 0.22% (16)
3*3 - 0.22% (16)
two - 0.22% (16)
chess[x][y] - 0.22% (16)
#include - 0.22% (16)
found - 0.22% (16)
1234567891011121314151617 - 0.22% (16)
[y][x] - 0.22% (16)
lyinch - 0.21% (15)
then - 0.21% (15)
how - 0.21% (15)
character - 0.21% (15)
space - 0.21% (15)
board - 0.19% (14)
x++){ - 0.19% (14)
sudoku[y][x] - 0.19% (14)
empty - 0.19% (14)
this - 0.19% (14)
vector - 0.19% (14)
our - 0.19% (14)
counter - 0.19% (14)
122 - 0.19% (14)
add - 0.19% (14)
bool - 0.18% (13)
preliminary - 0.18% (13)
– - 0.18% (13)
prefix - 0.18% (13)
reach - 0.18% (13)
hit - 0.18% (13)
been - 0.18% (13)
filled - 0.18% (13)
1234567891011121314151617181920 - 0.18% (13)
function - 0.18% (13)
border - 0.16% (12)
queen - 0.16% (12)
sight - 0.16% (12)
input, - 0.16% (12)
;x++) - 0.16% (12)
suffix - 0.16% (12)
row - 0.16% (12)
arch - 0.16% (12)
j++) - 0.16% (12)
1234567891011121314151617181920212223 - 0.16% (12)
fill_array(check); - 0.16% (12)
print - 0.16% (12)
if(check[i] - 0.16% (12)
only - 0.16% (12)
10; - 0.16% (12)
resize - 0.16% (12)
rook - 0.15% (11)
start - 0.15% (11)
idea - 0.15% (11)
wall - 0.15% (11)
program - 0.15% (11)
iterp - 0.15% (11)
iterm - 0.15% (11)
field, - 0.15% (11)
goal - 0.15% (11)
leave - 0.15% (11)
subarray - 0.15% (11)
bishop - 0.15% (11)
ans - 0.15% (11)
sequence - 0.15% (11)
else - 0.15% (11)
continue - 0.15% (11)
there - 0.15% (11)
 and - 0.15% (11)
2015 - 0.15% (11)
part - 0.15% (11)
,int - 0.14% (10)
original - 0.14% (10)
comment - 0.14% (10)
december - 0.14% (10)
y_g - 0.14% (10)
private - 0.14% (10)
checks - 0.14% (10)
(int)input[i] - 0.14% (10)
static - 0.14% (10)
input) - 0.14% (10)
//mark - 0.14% (10)
search - 0.14% (10)
j++){ - 0.14% (10)
skip - 0.14% (10)
if(in - 0.14% (10)
calculate - 0.14% (10)
pos. - 0.14% (10)
12345678910111213141516171819202122232425 - 0.14% (10)
int[] - 0.14% (10)
reads - 0.12% (9)
above - 0.12% (9)
loops - 0.12% (9)
create - 0.12% (9)
precision - 0.12% (9)
digit - 0.12% (9)
grid - 0.12% (9)
math - 0.12% (9)
until - 0.12% (9)
find - 0.12% (9)
content - 0.12% (9)
sums - 0.12% (9)
last - 0.12% (9)
want - 0.12% (9)
p_pos[tmp_size].piece - 0.11% (8)
p_pos[tmp_size].y - 0.11% (8)
p_pos[tmp_size].x - 0.11% (8)
//search - 0.11% (8)
missing - 0.11% (8)
continue; - 0.11% (8)
values - 0.11% (8)
//skip - 0.11% (8)
c++lio - 0.11% (8)
std; - 0.11% (8)
namespace - 0.11% (8)
back - 0.11% (8)
using - 0.11% (8)
void - 0.11% (8)
now - 0.11% (8)
list - 0.11% (8)
- 0.11% (8)
nor - 0.11% (8)
field. - 0.11% (8)
main(){ - 0.11% (8)
//we - 0.11% (8)
suffix_sum - 0.11% (8)
input.length; - 0.11% (8)
exit - 0.11% (8)
c++, - 0.11% (8)
(piece - 0.11% (8)
field[y_pos][x_pos] - 0.11% (8)
break; - 0.11% (8)
prefix_sum - 0.11% (8)
statement: - 0.11% (8)
compute - 0.11% (8)
1){ - 0.11% (8)
100) - 0.11% (8)
second_d); - 0.11% (8)
//set - 0.11% (8)
direct - 0.1% (7)
other - 0.1% (7)
getline - 0.1% (7)
divide - 0.1% (7)
(the - 0.1% (7)
correct - 0.1% (7)
integer - 0.1% (7)
reached - 0.1% (7)
conquer - 0.1% (7)
in. - 0.1% (7)
you - 0.1% (7)
java - 0.1% (7)
east - 0.1% (7)
code - 0.1% (7)
because - 0.1% (7)
next - 0.1% (7)
contain - 0.1% (7)
1234567891011121314151617181920212223242526 - 0.1% (7)
give - 0.1% (7)
checked - 0.1% (7)
time - 0.08% (6)
variable - 0.08% (6)
more - 0.08% (6)
long - 0.08% (6)
in; - 0.08% (6)
'a') - 0.08% (6)
sum; - 0.08% (6)
true) - 0.08% (6)
tmp; - 0.08% (6)
dimensions - 0.08% (6)
vector> - 0.08% (6)
field[i][j] - 0.08% (6)
south - 0.08% (6)
"error - 0.08% (6)
based - 0.08% (6)
increment - 0.08% (6)
//call - 0.08% (6)
val; - 0.08% (6)
but - 0.08% (6)
don’t - 0.08% (6)
 the - 0.08% (6)
direction - 0.08% (6)
}else - 0.08% (6)
than - 0.08% (6)
save - 0.08% (6)
switch - 0.08% (6)
(y_pos - 0.08% (6)
(x_pos - 0.08% (6)
if(check[0] - 0.08% (6)
could - 0.08% (6)
q++){ - 0.08% (6)
12345678910111213141516171819202122232425262728 - 0.08% (6)
input; - 0.08% (6)
best - 0.08% (6)
//read - 0.08% (6)
does - 0.08% (6)
((int)input[i] - 0.08% (6)
x_g - 0.08% (6)
))) - 0.08% (6)
iteration - 0.08% (6)
example - 0.08% (6)
maximum - 0.08% (6)
row, - 0.08% (6)
 check - 0.07% (5)
starting - 0.07% (5)
terminate - 0.07% (5)
look - 0.07% (5)
vectors - 0.07% (5)
range - 0.07% (5)
keep - 0.07% (5)
contains - 0.07% (5)
valid - 0.07% (5)
right - 0.07% (5)
call_mark_los - 0.07% (5)
see - 0.07% (5)
min_steps - 0.07% (5)
between - 0.07% (5)
t_x - 0.07% (5)
2014 - 0.07% (5)
white - 0.07% (5)
constant - 0.07% (5)
cases - 0.07% (5)
reading - 0.07% (5)
any - 0.07% (5)
pieces - 0.07% (5)
text - 0.07% (5)
left - 0.07% (5)
digits - 0.07% (5)
characters - 0.07% (5)
item - 0.07% (5)
string - 0.07% (5)
 we - 0.07% (5)
double - 0.07% (5)
x_pos, - 0.05% (4)
mark_los(int - 0.05% (4)
file" - 0.05% (4)
n-1; - 0.05% (4)
//if - 0.05% (4)
integer.min_value; - 0.05% (4)
(iterp+iterm - 0.05% (4)
terms.end(); - 0.05% (4)
dir_x, - 0.05% (4)
tuned, - 0.05% (4)
;x++){ - 0.05% (4)
know - 0.05% (4)
(field[y_pos][x_pos] - 0.05% (4)
check[sudoku[y][x]]++; - 0.05% (4)
 i - 0.05% (4)
ifstream - 0.05% (4)
0;} - 0.05% (4)
if(input.is_open()){ - 0.05% (4)
sudoku[y][x]; - 0.05% (4)
if(t - 0.05% (4)
stay - 0.05% (4)
whole - 0.05% (4)
after - 0.05% (4)
complexity - 0.05% (4)
counter++; - 0.05% (4)
"\n"; - 0.05% (4)
(chess[x][y] - 0.05% (4)
outputs - 0.05% (4)
check[sudoku[x][y]]++; - 0.05% (4)
block - 0.05% (4)
recursive - 0.05% (4)
function. - 0.05% (4)
fixed - 0.05% (4)
king; - 0.05% (4)
max) - 0.05% (4)
such - 0.05% (4)
possible - 0.05% (4)
//reads - 0.05% (4)
if(file.is_open()){ - 0.05% (4)
tmp.length; - 0.05% (4)
positions - 0.05% (4)
input[i]; - 0.05% (4)
convert - 0.05% (4)
3){ - 0.05% (4)
where - 0.05% (4)
getline(input,in_tmp); - 0.05% (4)
struct - 0.05% (4)
if(error) - 0.05% (4)
queen; - 0.05% (4)
another - 0.05% (4)
once - 0.05% (4)
- 0.05% (4)
isalpha - 0.05% (4)
west - 0.05% (4)
… - 0.05% (4)
made - 0.05% (4)
(border - 0.05% (4)
many - 0.05% (4)
previous - 0.05% (4)
error" - 0.05% (4)
doesn’t - 0.05% (4)
//use - 0.05% (4)
i=0; - 0.05% (4)
123456789101112131415161718192021222324252627282930313233343536 - 0.05% (4)
was - 0.05% (4)
rook; - 0.05% (4)
according - 0.05% (4)
arr[i]; - 0.05% (4)
max; - 0.05% (4)
show - 0.05% (4)
found. - 0.05% (4)
t_y - 0.05% (4)
better - 0.05% (4)
terms; - 0.05% (4)
queen)){ - 0.05% (4)
if((piece - 0.05% (4)
(sum - 0.05% (4)
to; - 0.05% (4)
y,int - 0.05% (4)
(&chess)[8][8] - 0.05% (4)
field[0].size(); - 0.05% (4)
to-n - 0.05% (4)
coordinates - 0.05% (4)
reference - 0.05% (4)
bishop; - 0.05% (4)
}else{ - 0.05% (4)
index - 0.05% (4)
//keeps - 0.05% (4)
2016 - 0.05% (4)
output_vector(vector> - 0.05% (4)
arrays - 0.05% (4)
unmark - 0.05% (4)
repetition - 0.04% (3)
bxs - 0.04% (3)
initial - 0.04% (3)
in, - 0.04% (3)
store - 0.04% (3)
ending - 0.04% (3)
simply - 0.04% (3)
sequence. - 0.04% (3)
bxg - 0.04% (3)
reachable - 0.04% (3)
means - 0.04% (3)
naive - 0.04% (3)
already - 0.04% (3)
complete - 0.04% (3)
row/column - 0.04% (3)
github. - 0.04% (3)
sequences - 0.04% (3)
cilonacci - 0.04% (3)
optimal - 0.04% (3)
123456789101112131415161718192021222324252627282930313233343536373839404142 - 0.04% (3)
(last - 0.04% (3)
outer - 0.04% (3)
enum - 0.04% (3)
horizontal - 0.04% (3)
vertical - 0.04% (3)
somehow - 0.04% (3)
change - 0.04% (3)
when - 0.04% (3)
pretty - 0.04% (3)
zero - 0.04% (3)
 to - 0.04% (3)
iterator - 0.04% (3)
also - 0.04% (3)
parameter - 0.04% (3)
call): - 0.04% (3)
not. - 0.04% (3)
maze - 0.04% (3)
contentvoid - 0.04% (3)
terminated - 0.04% (3)
october - 0.04% (3)
haven’t - 0.04% (3)
finding - 0.04% (3)
therefore - 0.04% (3)
used - 0.04% (3)
conditions - 0.04% (3)
same - 0.04% (3)
chars - 0.04% (3)
induction - 0.04% (3)
occur - 0.04% (3)
without - 0.04% (3)
following - 0.04% (3)
write - 0.04% (3)
assume - 0.04% (3)
free - 0.04% (3)
character. - 0.04% (3)
grid. - 0.04% (3)
number, - 0.04% (3)
distinct - 0.04% (3)
both - 0.04% (3)
algorithms - 0.04% (3)
result - 0.04% (3)
2002 - 0.04% (3)
available - 0.04% (3)
question - 0.04% (3)
most - 0.04% (3)
false;} - 0.04% (3)
formula - 0.04% (3)
least - 0.04% (3)
converts - 0.04% (3)
of . - 0.04% (3)
iterations - 0.04% (3)
can’t - 0.04% (3)
different - 0.04% (3)
hits - 0.04% (3)
added - 0.04% (3)
summation - 0.04% (3)
data - 0.04% (3)
field.size(); - 0.03% (2)
field[i].size();j++){ - 0.03% (2)
iterp++; - 0.03% (2)
field[i][j]; - 0.03% (2)
input[k]; - 0.03% (2)
together - 0.03% (2)
output2d_vector(field); - 0.03% (2)
x_g) - 0.03% (2)
0;i - 0.03% (2)
y_g)){ - 0.03% (2)
coords - 0.03% (2)
false){ - 0.03% (2)
field[y_g][x_g] - 0.03% (2)
if(print) - 0.03% (2)
y_pos,bool - 0.03% (2)
them - 0.03% (2)
field,int - 0.03% (2)
check_steps(vector - 0.03% (2)
if(field[y_pos][x_pos] - 0.03% (2)
k<=j; - 0.03% (2)
k++){ - 0.03% (2)
(iterations - 0.03% (2)
counters - 0.03% (2)
west, - 0.03% (2)
rendering - 0.03% (2)
checking - 0.03% (2)
if(check_steps(field,x_pos,y_pos+1,print) - 0.03% (2)
second_d.size(); - 0.03% (2)
characters. - 0.03% (2)
letters - 0.03% (2)
output_vector(second_d); - 0.03% (2)
method - 0.03% (2)
//modifies - 0.03% (2)
output_vector(const - 0.03% (2)
pass - 0.03% (2)
second_d[i][j] - 0.03% (2)
second_d[i].size();j++){ - 0.03% (2)
elements - 0.03% (2)
//ignore - 0.03% (2)
access - 0.03% (2)
earlier - 0.03% (2)
got - 0.03% (2)
second_d.resize(a,vector(b)); - 0.03% (2)
//determine - 0.03% (2)
datatype - 0.03% (2)
second_d(0,one_d); - 0.03% (2)
'>' - 0.03% (2)
gap - 0.03% (2)
occurrence - 0.03% (2)
stupid - 0.03% (2)
one_d; - 0.03% (2)
90) - 0.03% (2)
linux - 0.03% (2)
may - 0.03% (2)
august - 0.03% (2)
posts - 0.03% (2)
"there - 0.03% (2)
space. - 0.03% (2)
special - 0.03% (2)
code. - 0.03% (2)
ascii - 0.03% (2)
32) - 0.03% (2)
rule - 0.03% (2)
if(!(((int)input[i] - 0.03% (2)
if(input[i] - 0.03% (2)
input.size(); - 0.03% (2)
if(input.size() - 0.03% (2)
if(!isalpha(c)) - 0.03% (2)
appears - 0.03% (2)
getline(cin,input); - 0.03% (2)
counter; - 0.03% (2)
character... - 0.03% (2)
normal - 0.03% (2)
easy - 0.03% (2)
found, - 0.03% (2)
b++){ - 0.03% (2)
boolean - 0.03% (2)
iterp+iterm; - 0.03% (2)
1)){ - 0.03% (2)
min_steps) - 0.03% (2)
if(((iterp+iterm) - 0.03% (2)
check_steps(field,a,0); - 0.03% (2)
if(field[y_g-1][b] - 0.03% (2)
if(field[y_g][b] - 0.03% (2)
y-1 - 0.03% (2)
if(field[0][a] - 0.03% (2)
geometric - 0.03% (2)
a++){ - 0.03% (2)
hold - 0.03% (2)
it, - 0.03% (2)
fields - 0.03% (2)
naive(int[] - 0.03% (2)
iterm--; - 0.03% (2)
//unmark, - 0.03% (2)
if(check_steps(field,x_pos-1,y_pos,print) - 0.03% (2)
if(check_steps(field,x_pos+1,y_pos,print) - 0.03% (2)
24, - 0.03% (2)
arithmetic - 0.03% (2)
size. - 0.03% (2)
(int)n) - 0.03% (2)
dimensional - 0.03% (2)
using - 0.03% (2)
'g'){ - 0.03% (2)
'a'){ - 0.03% (2)
'g'))) - 0.03% (2)
((t - 0.03% (2)
(abs(n) - 0.03% (2)
(abs(c) - 0.03% (2)
(abs(i) - 0.03% (2)
(int)c) - 0.03% (2)
i,c,n; - 0.03% (2)
(int)i) - 0.03% (2)
if(!((i - 0.03% (2)
beginning) - 0.03% (2)
wheter - 0.03% (2)
correct, - 0.03% (2)
//type - 0.03% (2)
highest - 0.03% (2)
repetitions - 0.03% (2)
//first - 0.03% (2)
&field) - 0.03% (2)
"correct" - 0.03% (2)
output2d_vector(vector - 0.03% (2)
appropriate - 0.03% (2)
mark_los(chess,x,y,-1,0); - 0.03% (2)
//left - 0.03% (2)
mark_los(chess,x,y,1,0); - 0.03% (2)
//right - 0.03% (2)
rook) - 0.03% (2)
//horizontal - 0.03% (2)
piece){ - 0.03% (2)
suffix_sum) - 0.03% (2)
call_mark_los(int - 0.03% (2)
//calls - 0.03% (2)
mark_los(chess,x,y,0,-1); - 0.03% (2)
m+1; - 0.03% (2)
prefix_sum) - 0.03% (2)
prefix_sum; - 0.03% (2)
divideandconquer(int[] - 0.03% (2)
call_mark_los(chess,p_pos[i].x,p_pos[i].y,p_pos[i].piece); - 0.03% (2)
p_pos.size(); - 0.03% (2)
math.max(0,input[l]); - 0.03% (2)
(l+r)/2; - 0.03% (2)
math.max(divideandconquer(input,l,m), - 0.03% (2)
//exit - 0.03% (2)
//up - 0.03% (2)
//down - 0.03% (2)
"could - 0.03% (2)
dir_y){ - 0.03% (2)
that, - 0.03% (2)
mark_los(chess,x,y,dir_x,dir_y); - 0.03% (2)
initialised - 0.03% (2)
subarray) - 0.03% (2)
//recursive - 0.03% (2)
if(chess[x][y] - 0.03% (2)
if((x - 0.03% (2)
dir_y; - 0.03% (2)
dir_x; - 0.03% (2)
(&chess)[8][8],int - 0.03% (2)
mark_los(chess,x,y,0,1); - 0.03% (2)
maxcrossingsum(int - 0.03% (2)
arr[], - 0.03% (2)
king, - 0.03% (2)
i--) - 0.03% (2)
mark_los(chess,x,y,-1,-1); - 0.03% (2)
mark_los(chess,x,y,1,-1); - 0.03% (2)
mark_los(chess,x,y,-1,1); - 0.03% (2)
mark_los(chess,x,y,1,1); - 0.03% (2)
bishop) - 0.03% (2)
//diagonal - 0.03% (2)
file!" - 0.03% (2)
math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); - 0.03% (2)
2006 - 0.03% (2)
border; - 0.03% (2)
current - 0.03% (2)
4}; - 0.03% (2)
point. - 0.03% (2)
easily - 0.03% (2)
{empty - 0.03% (2)
place - 0.03% (2)
negative - 0.03% (2)
induction(int[] - 0.03% (2)
like - 0.03% (2)
is  - 0.03% (2)
t_pos{ - 0.03% (2)
take - 0.03% (2)
say - 0.03% (2)
king. - 0.03% (2)
therefore, - 0.03% (2)
january - 0.03% (2)
2005 - 0.03% (2)
element  , - 0.03% (2)
wrong - 0.03% (2)
thus - 0.03% (2)
useless. - 0.03% (2)
assume, - 0.03% (2)
piece; - 0.03% (2)
switch(i){ - 0.03% (2)
//converts - 0.03% (2)
(vector) - 0.03% (2)
single - 0.03% (2)
//position - 0.03% (2)
p_pos.size()-1; - 0.03% (2)
p_pos.resize(p_pos.size()+1); - 0.03% (2)
make - 0.03% (2)
//increment - 0.03% (2)
(int)input[1]-int('0')-1; - 0.03% (2)
(int)input[0]-int('a'); - 0.03% (2)
-17)) - 0.03% (2)
vector - 0.03% (2)
if(((int)input[0]-(int)'a' - 0.03% (2)
//debuggingy - 0.03% (2)
wich - 0.03% (2)
//cout - 0.03% (2)
whitespace - 0.03% (2)
<6; - 0.03% (2)
vector. - 0.03% (2)
file, - 0.03% (2)
better? - 0.03% (2)
p_pos; - 0.03% (2)
"checks: - 0.03% (2)
parts - 0.03% (2)
input.close(); - 0.03% (2)
n+1; - 0.03% (2)
needs - 0.03% (2)
words, - 0.03% (2)
decimal - 0.03% (2)
approximation - 0.03% (2)
#include - 0.03% (2)
terms.back() - 0.03% (2)
terms.push_back(ans); - 0.03% (2)
*(it-q); - 0.03% (2)
//go - 0.03% (2)
to-n; - 0.03% (2)
- 0.03% (2)
vector::iterator - 0.03% (2)
terms.push_back(tmp); - 0.03% (2)
those - 0.03% (2)
calculated - 0.03% (2)
to: - 0.03% (2)
//n: - 0.03% (2)
sum, - 0.03% (2)
counts - 0.03% (2)
precompute(int[] - 0.03% (2)
followed - 0.03% (2)
- 0.03% (2)
0.0; - 0.03% (2)
tmp[0] - 0.03% (2)
dynamic - 0.03% (2)
maximum. - 0.03% (2)
if((int)in_tmp[j]-48 - 0.03% (2)
//resize - 0.03% (2)
field.resize(y,vector(x)); - 0.03% (2)
//switch - 0.03% (2)
//2d - 0.03% (2)
field(0,v2); - 0.03% (2)
//tmp - 0.03% (2)
v2; - 0.03% (2)
smallest - 0.03% (2)
//long - 0.03% (2)
either - 0.03% (2)
input.txt - 0.03% (2)
north - 0.03% (2)
shortest - 0.03% (2)
//setprecision - 0.03% (2)
sqrt(pi*6) - 0.03% (2)
setprecision(15) - 0.03% (2)
(1/pow(i,2)); - 0.03% (2)
1000000) - 0.03% (2)
now, - 0.03% (2)
int[input.length+1]; - 0.03% (2)
//precompute - 0.03% (2)
receive - 0.03% (2)
sudoku" - 0.03% (2)
sudoku[pos][y] - 0.03% (2)
if(sudoku[x][y] - 0.03% (2)
sudoku[y][pos] - 0.03% (2)
subarrays - 0.03% (2)
if(sudoku[y][x] - 0.03% (2)
split - 0.03% (2)
trough - 0.03% (2)
column. - 0.03% (2)
works - 0.03% (2)
"original - 0.03% (2)
complicated - 0.03% (2)
input("sudo_in.txt"); - 0.03% (2)
 of - 0.03% (2)
check[10] - 0.03% (2)
output: - 0.03% (2)
column, - 0.03% (2)
solution, - 0.03% (2)
cases: - 0.03% (2)
completely - 0.03% (2)
case, - 0.03% (2)
partially - 0.03% (2)
12345678910111213141516171819202122232425262728293031323334353637383940414243 - 0.03% (2)
inner - 0.03% (2)
fibonacci - 0.03% (2)
opening - 0.03% (2)
2003 - 0.03% (2)
tmp[i+1] - 0.03% (2)
tmp[i] - 0.03% (2)
"error" - 0.03% (2)
flag - 0.03% (2)
check[sudoku[a+x][y+b]]++; - 0.03% (2)
nested - 0.03% (2)
yes - 0.03% (2)
straightforward. - 0.03% (2)
(tmp[j]-tmp[i-1] - 0.03% (2)
file.close(); - 0.03% (2)
block. - 0.03% (2)
file(input); - 0.03% (2)
game - 0.03% (2)
2013 - 0.03% (2)
tmp[j]-tmp[i-1]; - 0.03% (2)
//end - 0.03% (2)
sudoku[t_x][t_y] - 0.03% (2)
b+y; - 0.03% (2)
a+x; - 0.03% (2)
0){ - 0.03% (2)
if(sudoku[a+x][y+b] - 0.03% (2)
always - 0.03% (2)
cout << - 0.71% (52)
of the - 0.62% (45)
(int i - 0.55% (40)
{ for(int - 0.47% (34)
<< endl; - 0.44% (32)
for(int i - 0.41% (30)
check if - 0.36% (26)
or the - 0.34% (25)
for the - 0.33% (24)
in the - 0.33% (24)
} 123456 - 0.3% (22)
for(int x - 0.3% (22)
= true; - 0.27% (20)
} 123456789 - 0.27% (20)
} 1234567891011121314 - 0.26% (19)
) return - 0.25% (18)
for(int y - 0.25% (18)
return 0; - 0.25% (18)
} 123456789101112131415 - 0.23% (17)
the first - 0.23% (17)
} cout - 0.22% (16)
and the - 0.22% (16)
} 1234567891011121314151617 - 0.22% (16)
for (int - 0.22% (16)
//check if - 0.22% (16)
the value - 0.22% (16)
the number - 0.21% (15)
to the - 0.21% (15)
return false; - 0.21% (15)
return true; - 0.19% (14)
line of - 0.19% (14)
y++){ for(int - 0.19% (14)
9; y++){ - 0.19% (14)
cin >> - 0.19% (14)
error = - 0.19% (14)
at the - 0.19% (14)
on the - 0.18% (13)
preliminary problem - 0.18% (13)
with the - 0.18% (13)
} 1234567891011121314151617181920 - 0.18% (13)
if the - 0.18% (13)
the empty - 0.16% (12)
fill_array(check); } - 0.16% (12)
} return - 0.16% (12)
of sight - 0.16% (12)
chess[x][y] = - 0.16% (12)
(int j - 0.16% (12)
} 1234567891011121314151617181920212223 - 0.16% (12)
9 ;x++) - 0.16% (12)
10; i++) - 0.16% (12)
we have - 0.16% (12)
has been - 0.16% (12)
with a - 0.16% (12)
the board - 0.15% (11)
leave a - 0.14% (10)
private static - 0.14% (10)
we can - 0.14% (10)
for(int j - 0.14% (10)
} 12345678910111213141516171819202122232425 - 0.14% (10)
lyinch leave - 0.14% (10)
number of - 0.14% (10)
i++) { - 0.14% (10)
a comment - 0.14% (10)
true; } - 0.14% (10)
static int - 0.14% (10)
0; int - 0.14% (10)
the solution - 0.14% (10)
10; i++){ - 0.14% (10)
empty position - 0.14% (10)
need to - 0.12% (9)
value of - 0.12% (9)
board a - 0.12% (9)
comment the - 0.11% (8)
the program - 0.11% (8)
p_pos[tmp_size].x = - 0.11% (8)
x; p_pos[tmp_size].y - 0.11% (8)
(piece == - 0.11% (8)
from the - 0.11% (8)
p_pos[tmp_size].piece = - 0.11% (8)
is the - 0.11% (8)
lio lio - 0.11% (8)
< input.length; - 0.11% (8)
p_pos[tmp_size].y = - 0.11% (8)
y; p_pos[tmp_size].piece - 0.11% (8)
c++, lio - 0.11% (8)
//search for - 0.11% (8)
the two - 0.11% (8)
using namespace - 0.11% (8)
2015 lyinch - 0.11% (8)
namespace std; - 0.11% (8)
int main(){ - 0.11% (8)
the original - 0.11% (8)
vector > - 0.11% (8)
the piece - 0.11% (8)
endl; return - 0.11% (8)
field i - 0.11% (8)
} fill_array(check); - 0.11% (8)
endl; } - 0.11% (8)
original content - 0.11% (8)
== 1){ - 0.11% (8)
filled in - 0.11% (8)
the size - 0.11% (8)
with 8 - 0.1% (7)
3*3 grid - 0.1% (7)
the algorithm - 0.1% (7)
a wall - 0.1% (7)
c++lio c++ - 0.1% (7)
first n - 0.1% (7)
we need - 0.1% (7)
as part - 0.1% (7)
part of - 0.1% (7)
} 1234567891011121314151617181920212223242526 - 0.1% (7)
board and - 0.1% (7)
the position - 0.1% (7)
input) { - 0.08% (6)
1){ found - 0.08% (6)
to calculate - 0.08% (6)
we then - 0.08% (6)
x, int - 0.08% (6)
the input - 0.08% (6)
c++lio c++, - 0.08% (6)
the line - 0.08% (6)
100) && - 0.08% (6)
the next - 0.08% (6)
based on - 0.08% (6)
: return - 0.08% (6)
the list - 0.08% (6)
if(check[i] > - 0.08% (6)
1) error - 0.08% (6)
break; case - 0.08% (6)
<= 100) - 0.08% (6)
create a - 0.08% (6)
field[y_pos][x_pos] = - 0.08% (6)
add the - 0.08% (6)
input >> - 0.08% (6)
that the - 0.08% (6)
been found - 0.08% (6)
= val; - 0.08% (6)
std; int - 0.08% (6)
<< "error - 0.08% (6)
int max - 0.08% (6)
numbers if(check[0] - 0.08% (6)
9; x++){ - 0.08% (6)
val the - 0.08% (6)
the sudoku - 0.08% (6)
the problem - 0.08% (6)
} //search - 0.08% (6)
sum; } - 0.08% (6)
to output - 0.08% (6)
row, column - 0.08% (6)
} 12345678910111213141516171819202122232425262728 - 0.08% (6)
found = - 0.08% (6)
true; for(int - 0.08% (6)
i++){ //set - 0.08% (6)
the field - 0.08% (6)
true) return - 0.08% (6)
position if(check[i] - 0.08% (6)
val; } - 0.08% (6)
== true) - 0.08% (6)
0; for - 0.08% (6)
0) val - 0.08% (6)
the king - 0.08% (6)
if(check[0] == - 0.08% (6)
if(check[i] == - 0.08% (6)
input.length; i++) - 0.08% (6)
//set val - 0.08% (6)
program reads - 0.07% (5)
output the - 0.07% (5)
long double - 0.07% (5)
the values - 0.07% (5)
we want - 0.07% (5)
the best - 0.07% (5)
that we - 0.07% (5)
problem 3 - 0.07% (5)
read in - 0.07% (5)
a loop - 0.07% (5)
there is - 0.07% (5)
if goal - 0.07% (5)
vector to - 0.07% (5)
if there - 0.07% (5)
for every - 0.07% (5)
code is - 0.07% (5)
the check - 0.07% (5)
path as - 0.07% (5)
c++ #include - 0.07% (5)
need a - 0.07% (5)
the missing - 0.07% (5)
the dimensions - 0.07% (5)
8 numbers - 0.07% (5)
the last - 0.07% (5)
missing number - 0.07% (5)
problem statement: - 0.07% (5)
n-1; q++){ - 0.05% (4)
if(file.is_open()){ for(int - 0.05% (4)
file >> - 0.05% (4)
in numbers - 0.05% (4)
c++ //check - 0.05% (4)
8 filled - 0.05% (4)
9 ;x++){ - 0.05% (4)
//check column - 0.05% (4)
i++){ if(check[i] - 0.05% (4)
0) pos - 0.05% (4)
line for(int - 0.05% (4)
one of - 0.05% (4)
< n-1; - 0.05% (4)
;x++) check[sudoku[y][x]]++; - 0.05% (4)
|| (y_pos - 0.05% (4)
position for(int - 0.05% (4)
c; cout - 0.05% (4)
size of - 0.05% (4)
main(){ int - 0.05% (4)
"; for(int - 0.05% (4)
} }else{ - 0.05% (4)
for(int q - 0.05% (4)
if( (x_pos - 0.05% (4)
q++){ i - 0.05% (4)
if(t == - 0.05% (4)
>> sudoku[y][x]; - 0.05% (4)
is filled - 0.05% (4)
another piece - 0.05% (4)
a solution - 0.05% (4)
checks if((piece - 0.05% (4)
look for - 0.05% (4)
|| (piece - 0.05% (4)
== queen)){ - 0.05% (4)
been found. - 0.05% (4)
< field[0].size(); - 0.05% (4)
3; y++){ - 0.05% (4)
3; x++){ - 0.05% (4)
we check - 0.05% (4)
int y,int - 0.05% (4)
false; //check - 0.05% (4)
)) return - 0.05% (4)
x++){ for(int - 0.05% (4)
out of - 0.05% (4)
//skip field - 0.05% (4)
1) //skip - 0.05% (4)
solution - - 0.05% (4)
mark a - 0.05% (4)
field if - 0.05% (4)
as checked - 0.05% (4)
a fixed - 0.05% (4)
,int x, - 0.05% (4)
the function - 0.05% (4)
<< sudoku[y][x] - 0.05% (4)
by the - 0.05% (4)
file" << - 0.05% (4)
are in - 0.05% (4)
<< "\n"; - 0.05% (4)
and don’t - 0.05% (4)
sudoku[y][x] << - 0.05% (4)
as the - 0.05% (4)
//check line - 0.05% (4)
"\n"; } - 0.05% (4)
– sudoku - 0.05% (4)
} //check - 0.05% (4)
counter << - 0.05% (4)
column for(int - 0.05% (4)
;x++) check[sudoku[x][y]]++; - 0.05% (4)
if((piece == - 0.05% (4)
the end - 0.05% (4)
is correct - 0.05% (4)
the constant - 0.05% (4)
the 3*3 - 0.05% (4)
checked field[y_pos][x_pos] - 0.05% (4)
stay tuned, - 0.05% (4)
<< counter - 0.05% (4)
== 'a') - 0.05% (4)
//we create - 0.05% (4)
for(int a - 0.05% (4)
have an - 0.05% (4)
field[i][j] = - 0.05% (4)
(int)input[i] <= - 0.05% (4)
((int)input[i] >= - 0.05% (4)
we start - 0.05% (4)
i++){ for(int - 0.05% (4)
max) max - 0.05% (4)
for(int i=0; - 0.05% (4)
if (border - 0.05% (4)
border = - 0.05% (4)
return max; - 0.05% (4)
the text - 0.05% (4)
l, int - 0.05% (4)
#include - 0.05% (4)
which is - 0.05% (4)
set the - 0.05% (4)
from a - 0.05% (4)
void output_vector(vector> - 0.05% (4)
each piece - 0.05% (4)
how many - 0.05% (4)
//keeps the - 0.05% (4)
& second_d); - 0.05% (4)
want to - 0.05% (4)
suffix_sum = - 0.05% (4)
} 123456789101112131415161718192021222324252627282930313233343536 - 0.05% (4)
position of - 0.05% (4)
int l, - 0.05% (4)
all the - 0.05% (4)
java private - 0.05% (4)
0;} c++lio - 0.05% (4)
< tmp.length; - 0.05% (4)
&& (int)input[i] - 0.05% (4)
> max) - 0.05% (4)
|| ((int)input[i] - 0.05% (4)
max; } - 0.05% (4)
the whole - 0.05% (4)
solution has - 0.05% (4)
int r) - 0.05% (4)
error" << - 0.05% (4)
= integer.min_value; - 0.05% (4)
arr[i]; if - 0.05% (4)
(sum > - 0.05% (4)
= sum; - 0.05% (4)
prefix_sum = - 0.05% (4)
integer.min_value; for - 0.05% (4)
return 0;} - 0.05% (4)
+ arr[i]; - 0.05% (4)
if (sum - 0.05% (4)
= terms.end(); - 0.05% (4)
a vector - 0.05% (4)
i=0; i - 0.05% (4)
= queen; - 0.05% (4)
vector with - 0.05% (4)
= king; - 0.05% (4)
and if - 0.05% (4)
//skip if - 0.05% (4)
if(error) cout - 0.05% (4)
tuned, lyinch - 0.05% (4)
for(int b - 0.05% (4)
>> input; - 0.05% (4)
else cout - 0.05% (4)
= rook; - 0.05% (4)
every piece - 0.05% (4)
3){ for(int - 0.05% (4)
= bishop; - 0.05% (4)
+= 3){ - 0.05% (4)
}else{ cout - 0.05% (4)
and save - 0.04% (3)
filled in. - 0.04% (3)
example input - 0.04% (3)
numbers are - 0.04% (3)
false; } - 0.04% (3)
idea is - 0.04% (3)
or 3*3 - 0.04% (3)
first line - 0.04% (3)
vector and - 0.04% (3)
the same - 0.04% (3)
last term - 0.04% (3)
in range - 0.04% (3)
available on - 0.04% (3)
because i - 0.04% (3)
endl; 1 - 0.04% (3)
end of - 0.04% (3)
valid character - 0.04% (3)
starting and - 0.04% (3)
(the conditions - 0.04% (3)
continue in - 0.04% (3)
the numbers - 0.04% (3)
c++ for(int - 0.04% (3)
filled with - 0.04% (3)
field is - 0.04% (3)
are filled - 0.04% (3)
2002 preliminary - 0.04% (3)
know that - 0.04% (3)
double for - 0.04% (3)
question statement: - 0.04% (3)
we compute - 0.04% (3)
every possible - 0.04% (3)
such as - 0.04% (3)
reads in - 0.04% (3)
the file - 0.04% (3)
path finding - 0.04% (3)
in c++ - 0.04% (3)
without a - 0.04% (3)
the time - 0.04% (3)
line by - 0.04% (3)
solution is - 0.04% (3)
call): return - 0.04% (3)
constant and - 0.04% (3)
outputs the - 0.04% (3)
that a - 0.04% (3)
by reading - 0.04% (3)
a program - 0.04% (3)
terminated the - 0.04% (3)
statement: write - 0.04% (3)
by line - 0.04% (3)
the question - 0.04% (3)
prefix sums - 0.04% (3)
above haven’t - 0.04% (3)
check a - 0.04% (3)
input is - 0.04% (3)
and then - 0.04% (3)
we know - 0.04% (3)
return false;} - 0.04% (3)
term to - 0.04% (3)
every item - 0.04% (3)
then check - 0.04% (3)
values is - 0.04% (3)
problem 4 - 0.04% (3)
piece is - 0.04% (3)
to integer - 0.04% (3)
the following - 0.04% (3)
position as - 0.04% (3)
to check - 0.04% (3)
how the - 0.04% (3)
write a - 0.04% (3)
at least - 0.04% (3)
problem 1 - 0.04% (3)
program which - 0.04% (3)
because we - 0.04% (3)
an error - 0.04% (3)
we simply - 0.04% (3)
the goal - 0.04% (3)
original contentvoid - 0.04% (3)
endl; the - 0.04% (3)
true;  check - 0.04% (3)
white space - 0.04% (3)
and output - 0.04% (3)
been reached - 0.04% (3)
than 1 - 0.04% (3)
value for - 0.04% (3)
new sum - 0.04% (3)
a second - 0.04% (3)
between the - 0.04% (3)
if true - 0.04% (3)
made out - 0.04% (3)
integer positions - 0.04% (3)
 check if - 0.04% (3)
goal has - 0.04% (3)
chars to - 0.04% (3)
don’t need - 0.04% (3)
of term - 0.04% (3)
content void - 0.04% (3)
reached if( - 0.03% (2)
digits return - 0.03% (2)
<< field[i][j]; - 0.03% (2)
(y_pos == - 0.03% (2)
range if( - 0.03% (2)
y_g)){ reached - 0.03% (2)
the path - 0.03% (2)
output 15 - 0.03% (2)
//mark that - 0.03% (2)
that coords - 0.03% (2)
found. c++ - 0.03% (2)
bool check_steps(vector - 0.03% (2)
//setprecision to - 0.03% (2)
|| (field[y_pos][x_pos] - 0.03% (2)
from north - 0.03% (2)
added to - 0.03% (2)
//tmp vector - 0.03% (2)
when i - 0.03% (2)
to use - 0.03% (2)
the smallest - 0.03% (2)
x_g) && - 0.03% (2)
a recursive - 0.03% (2)
vector v2; - 0.03% (2)
y space - 0.03% (2)
shortest path - 0.03% (2)
to south - 0.03% (2)
field(0,v2); //2d - 0.03% (2)
vector 12 - 0.03% (2)
(x_pos == - 0.03% (2)
> field(0,v2); - 0.03% (2)
an array - 0.03% (2)
//2d vector - 0.03% (2)
if(check_steps(field,x_pos,y_pos+1,print) == - 0.03% (2)
y_pos,bool print - 0.03% (2)
> field,int - 0.03% (2)
wall else - 0.03% (2)
if(check_steps(field,x_pos-1,y_pos,print) == - 0.03% (2)
hit if(field[y_pos][x_pos] - 0.03% (2)
//mark path - 0.03% (2)
|| (x_pos - 0.03% (2)
field[i][j]; } - 0.03% (2)
j++){ if((int)in_tmp[j]-48 - 0.03% (2)
//check west - 0.03% (2)
< field[i].size();j++){ - 0.03% (2)
1; //use - 0.03% (2)
2; iterp++; - 0.03% (2)
0; //use - 0.03% (2)
//if wall - 0.03% (2)
east if(check_steps(field,x_pos+1,y_pos,print) - 0.03% (2)
a free - 0.03% (2)
field } - 0.03% (2)
} input.close(); - 0.03% (2)
< field.size(); - 0.03% (2)
terminate //check - 0.03% (2)
solution found, - 0.03% (2)
void output2d_vector(vector - 0.03% (2)
true; //if - 0.03% (2)
> &field) - 0.03% (2)
getline(input,in_tmp); for(int - 0.03% (2)
y; i++){ - 0.03% (2)
false){ //check - 0.03% (2)
if(input.is_open()){ input - 0.03% (2)
field[i].size();j++){ cout - 0.03% (2)
the current - 0.03% (2)
x_pos, int - 0.03% (2)
print = - 0.03% (2)
int y_pos,bool - 0.03% (2)
//check south - 0.03% (2)
field,int x_pos, - 0.03% (2)
my vector - 0.03% (2)
field.size(); i++){ - 0.03% (2)
= false){ - 0.03% (2)
check_steps(vector > - 0.03% (2)
to [y][x] - 0.03% (2)
getline(input,in_tmp); //switch - 0.03% (2)
found field[y_g][x_g] - 0.03% (2)
iterm--; return - 0.03% (2)
//mark as - 0.03% (2)
path if(print) - 0.03% (2)
//check that - 0.03% (2)
field field.resize(y,vector(x)); - 0.03% (2)
true; //unmark, - 0.03% (2)
//resize vector - 0.03% (2)
coords are - 0.03% (2)
output2d_vector(field); return - 0.03% (2)
maximum subarray - 0.03% (2)
1; iterm - 0.03% (2)
(x_pos < - 0.03% (2)
input until - 0.03% (2)
than 100 - 0.03% (2)
100 characters. - 0.03% (2)
//ignore the - 0.03% (2)
stupid rule - 0.03% (2)
ç character... - 0.03% (2)
string input; - 0.03% (2)
char c; - 0.03% (2)
int counter; - 0.03% (2)
bool error - 0.03% (2)
= false; - 0.03% (2)
getline(cin,input); //read - 0.03% (2)
new line - 0.03% (2)
a character - 0.03% (2)
appears cin - 0.03% (2)
if(!isalpha(c)) //check - 0.03% (2)
contains only - 0.03% (2)
characters error - 0.03% (2)
if(input.size() > - 0.03% (2)
100) error - 0.03% (2)
input.size(); i++){ - 0.03% (2)
if(input[i] == - 0.03% (2)
c) counter++; - 0.03% (2)
if(!(((int)input[i] == - 0.03% (2)
32) || - 0.03% (2)
and outputs - 0.03% (2)
//modifies the - 0.03% (2)
122 ))) - 0.03% (2)
second_d.size(); i++){ - 0.03% (2)
change the - 0.03% (2)
//determine somehow - 0.03% (2)
you want - 0.03% (2)
second_d.resize(a,vector(b)); //we - 0.03% (2)
resize both - 0.03% (2)
vectors to - 0.03% (2)
we got - 0.03% (2)
b; //determine - 0.03% (2)
somehow the - 0.03% (2)
dimensions you - 0.03% (2)
access the - 0.03% (2)
second_d[i].size();j++){ cout - 0.03% (2)
output_vector(vector> second_d); - 0.03% (2)
<< second_d[i][j] - 0.03% (2)
123456 for(int - 0.03% (2)
< second_d.size(); - 0.03% (2)
< second_d[i].size();j++){ - 0.03% (2)
second_d[i][j] << - 0.03% (2)
reference if - 0.03% (2)
output_vector(const vector> - 0.03% (2)
second_d); //modifies - 0.03% (2)
output_vector(vector> & - 0.03% (2)
second_d); //call - 0.03% (2)
the method - 0.03% (2)
90) || - 0.03% (2)
string contains - 0.03% (2)
as datatype - 0.03% (2)
code. we - 0.03% (2)
< input.size(); - 0.03% (2)
i++){ if(input[i] - 0.03% (2)
counter++; if(!(((int)input[i] - 0.03% (2)
== 32) - 0.03% (2)
<= 90) - 0.03% (2)
<= 122 - 0.03% (2)
))) //check - 0.03% (2)
if string - 0.03% (2)
contains valid - 0.03% (2)
character based - 0.03% (2)
on ascii - 0.03% (2)
could also - 0.03% (2)
true; if(input.size() - 0.03% (2)
use isalpha - 0.03% (2)
and check - 0.03% (2)
only the - 0.03% (2)
special cases - 0.03% (2)
the white - 0.03% (2)
space. error - 0.03% (2)
} if(error) - 0.03% (2)
"there was - 0.03% (2)
an error" - 0.03% (2)
sudoku lio - 0.03% (2)
lio 2003 - 0.03% (2)
> 100) - 0.03% (2)
only characters - 0.03% (2)
ascii code. - 0.03% (2)
the stupid - 0.03% (2)
we could - 0.03% (2)
also use - 0.03% (2)
isalpha and - 0.03% (2)
check only - 0.03% (2)
the special - 0.03% (2)
cases such - 0.03% (2)
white space. - 0.03% (2)
<< "there - 0.03% (2)
was an - 0.03% (2)
endl; cout - 0.03% (2)
#include using - 0.03% (2)
rule of - 0.03% (2)
c contains - 0.03% (2)
and ç - 0.03% (2)
character... int - 0.03% (2)
main(){ string - 0.03% (2)
input; char - 0.03% (2)
c; int - 0.03% (2)
counter; bool - 0.03% (2)
false; getline(cin,input); - 0.03% (2)
//read input - 0.03% (2)
until new - 0.03% (2)
line appears - 0.03% (2)
c; if(!isalpha(c)) - 0.03% (2)
a vector - 0.03% (2)
> second_d(0,one_d); - 0.03% (2)
(x_pos >= - 0.03% (2)
wall continue; - 0.03% (2)
if one - 0.03% (2)
field has - 0.03% (2)
we already - 0.03% (2)
a++){ if(field[0][a] - 0.03% (2)
continue; //skip - 0.03% (2)
if starting - 0.03% (2)
field[0].size(); b++){ - 0.03% (2)
//check every - 0.03% (2)
possible end - 0.03% (2)
position on - 0.03% (2)
y-1 if(field[y_g][b] - 0.03% (2)
if(field[y_g-1][b] == - 0.03% (2)
3; iterm--; - 0.03% (2)
not reachable - 0.03% (2)
from above - 0.03% (2)
continue; x_g - 0.03% (2)
check_steps(field,a,0); if(((iterp+iterm) - 0.03% (2)
< min_steps) - 0.03% (2)
&& (iterp+iterm - 0.03% (2)
!= 1)){ - 0.03% (2)
a; bxg - 0.03% (2)
min_steps = - 0.03% (2)
iterp+iterm; } - 0.03% (2)
iterp = - 0.03% (2)
north to - 0.03% (2)
//unmark, path - 0.03% (2)
december 24, - 0.03% (2)
if(print) output2d_vector(field); - 0.03% (2)
(y_pos < - 0.03% (2)
(y_pos >= - 0.03% (2)
(field[y_pos][x_pos] >= - 0.03% (2)
== x_g) - 0.03% (2)
&& (y_pos - 0.03% (2)
== y_g)){ - 0.03% (2)
reached = - 0.03% (2)
true; //mark - 0.03% (2)
field[y_g][x_g] = - 0.03% (2)
2; //mark - 0.03% (2)
as path - 0.03% (2)
} //if - 0.03% (2)
west if(check_steps(field,x_pos-1,y_pos,print) - 0.03% (2)
wall hit - 0.03% (2)
if(field[y_pos][x_pos] == - 0.03% (2)
1) return - 0.03% (2)
false; //mark - 0.03% (2)
iterp++; //check - 0.03% (2)
south if(check_steps(field,x_pos,y_pos+1,print) - 0.03% (2)
//if solution - 0.03% (2)
found, terminate - 0.03% (2)
//check east - 0.03% (2)
if(check_steps(field,x_pos+1,y_pos,print) == - 0.03% (2)
true; //check - 0.03% (2)
<< setprecision(15) - 0.03% (2)
arithmetic sequence - 0.03% (2)
gap between - 0.03% (2)
== (int)c) - 0.03% (2)
i,c,n; //first - 0.03% (2)
number, the - 0.03% (2)
the repetitions - 0.03% (2)
char t; - 0.03% (2)
//type cin - 0.03% (2)
correct, by - 0.03% (2)
checking wheter - 0.03% (2)
is false - 0.03% (2)
(the ! - 0.03% (2)
beginning) if(!((i - 0.03% (2)
== (int)i) - 0.03% (2)
== (int)n) - 0.03% (2)
12345678910111213141516171819202122232425262728 #include - 0.03% (2)
&& (abs(i) - 0.03% (2)
&& (abs(c) - 0.03% (2)
&& (abs(n) - 0.03% (2)
&& ((t - 0.03% (2)
== 'g'))) - 0.03% (2)
'a'){ cout - 0.03% (2)
} if(t - 0.03% (2)
== 'g'){ - 0.03% (2)
vector one_d; - 0.03% (2)
a normal - 0.03% (2)
vector without - 0.03% (2)
using namespace - 0.03% (2)
'g'){ cout - 0.03% (2)
sequence. the - 0.03% (2)
wheter one - 0.03% (2)
the right - 0.03% (2)
that, we - 0.03% (2)
using - 0.03% (2)
int i,c,n; - 0.03% (2)
//first number, - 0.03% (2)
repetitions char - 0.03% (2)
t; //type - 0.03% (2)
t; //check - 0.03% (2)
if input - 0.03% (2)
is correct, - 0.03% (2)
by checking - 0.03% (2)
false (the - 0.03% (2)
== 'a'){ - 0.03% (2)
the beginning) - 0.03% (2)
if(!((i == - 0.03% (2)
(int)i) && - 0.03% (2)
(int)c) && - 0.03% (2)
(int)n) && - 0.03% (2)
(abs(i) <= - 0.03% (2)
(abs(c) <= - 0.03% (2)
(abs(n) <= - 0.03% (2)
((t == - 0.03% (2)
'a') || - 0.03% (2)
'g'))) return - 0.03% (2)
0; if(t - 0.03% (2)
<< sqrt(pi*6) - 0.03% (2)
github. stay - 0.03% (2)
+ (1/pow(i,2)); - 0.03% (2)
bishop; break; - 0.03% (2)
(vector) switch(i){ - 0.03% (2)
case 0: - 0.03% (2)
king; chess[x][y] - 0.03% (2)
1: p_pos[tmp_size].x - 0.03% (2)
queen; break; - 0.03% (2)
case 2: - 0.03% (2)
case 3: - 0.03% (2)
rook; chess[x][y] - 0.03% (2)
4: case - 0.03% (2)
5: p_pos[tmp_size].x - 0.03% (2)
<< "could - 0.03% (2)
save it - 0.03% (2)
not read - 0.03% (2)
from file!" - 0.03% (2)
//exit ;) - 0.03% (2)
<6; i++){ - 0.03% (2)
input; //reads - 0.03% (2)
until whitespace - 0.03% (2)
//cout << - 0.03% (2)
input << - 0.03% (2)
endl; //debuggingy - 0.03% (2)
if(((int)input[0]-(int)'a' == - 0.03% (2)
list p_pos - 0.03% (2)
p_pos.size()-1; //position - 0.03% (2)
if piece - 0.03% (2)
i++){ file - 0.03% (2)
queen = - 0.03% (2)
2, rook - 0.03% (2)
bishop = - 0.03% (2)
to have - 0.03% (2)
t_pos{ int - 0.03% (2)
x; int - 0.03% (2)
y; int - 0.03% (2)
vector p_pos; - 0.03% (2)
save the - 0.03% (2)
and in - 0.03% (2)
//reads until - 0.03% (2)
tmp_size = - 0.03% (2)
whitespace //cout - 0.03% (2)
<< input - 0.03% (2)
//debuggingy if(((int)input[0]-(int)'a' - 0.03% (2)
== -17)) - 0.03% (2)
00 continue; - 0.03% (2)
//converts chars - 0.03% (2)
positions x - 0.03% (2)
= (int)input[0]-int('a'); - 0.03% (2)
(int)input[1]-int('0')-1; //increment - 0.03% (2)
list for - 0.03% (2)
piece p_pos.resize(p_pos.size()+1); - 0.03% (2)
-17)) //skip - 0.03% (2)
continue; //converts - 0.03% (2)
{empty = - 0.03% (2)
according the - 0.03% (2)
//call for - 0.03% (2)
list the - 0.03% (2)
function for(int - 0.03% (2)
<= p_pos.size(); - 0.03% (2)
i++) call_mark_los(chess,p_pos[i].x,p_pos[i].y,p_pos[i].piece); - 0.03% (2)
reference parameter - 0.03% (2)
direction the - 0.03% (2)
//calls the - 0.03% (2)
appropriate function - 0.03% (2)
to mark - 0.03% (2)
bool call_mark_los(int - 0.03% (2)
piece in - 0.03% (2)
(&chess)[8][8] ,int - 0.03% (2)
y,int piece){ - 0.03% (2)
//horizontal & - 0.03% (2)
vertical checks - 0.03% (2)
rook) || - 0.03% (2)
queen)){ //right - 0.03% (2)
mark_los(chess,x,y,1,0); //left - 0.03% (2)
mark_los(chess,x,y,-1,0); //up - 0.03% (2)
mark_los(chess,x,y,0,-1); //down - 0.03% (2)
mark_los(chess,x,y,0,1); } - 0.03% (2)
//diagonal checks - 0.03% (2)
p_pos.size(); i++) - 0.03% (2)
c++ //call - 0.03% (2)
(int)input[0]-int('a'); y - 0.03% (2)
king; break; - 0.03% (2)
= (int)input[1]-int('0')-1; - 0.03% (2)
//increment the - 0.03% (2)
new piece - 0.03% (2)
p_pos.resize(p_pos.size()+1); tmp_size - 0.03% (2)
= p_pos.size()-1; - 0.03% (2)
//position every - 0.03% (2)
piece on - 0.03% (2)
p_pos (vector) - 0.03% (2)
switch(i){ case - 0.03% (2)
0: p_pos[tmp_size].x - 0.03% (2)
case 1: - 0.03% (2)
0; //exit - 0.03% (2)
queen; chess[x][y] - 0.03% (2)
2: case - 0.03% (2)
3: p_pos[tmp_size].x - 0.03% (2)
rook; break; - 0.03% (2)
case 4: - 0.03% (2)
case 5: - 0.03% (2)
bishop; chess[x][y] - 0.03% (2)
break; } - 0.03% (2)
"could not - 0.03% (2)
read from - 0.03% (2)
file!" << - 0.03% (2)
0, king - 0.03% (2)
enum pieces - 0.03% (2)
queen)){ mark_los(chess,x,y,1,1); - 0.03% (2)
i--) { - 0.03% (2)
completely in - 0.03% (2)
the second - 0.03% (2)
in between - 0.03% (2)
parts of - 0.03% (2)
case (the - 0.03% (2)
maxcrossingsum(int arr[], - 0.03% (2)
int m, - 0.03% (2)
suffix sums - 0.03% (2)
int sum - 0.03% (2)
int suffix_sum - 0.03% (2)
suffix_sum) suffix_sum - 0.03% (2)
arrays and - 0.03% (2)
= m+1; - 0.03% (2)
r; i++) - 0.03% (2)
> prefix_sum) - 0.03% (2)
return suffix_sum - 0.03% (2)
+ prefix_sum; - 0.03% (2)
} private - 0.03% (2)
divideandconquer(int[] input, - 0.03% (2)
r) return - 0.03% (2)
return math.max(0,input[l]); - 0.03% (2)
(l+r)/2; return - 0.03% (2)
we assume - 0.03% (2)
means that - 0.03% (2)
int maxcrossingsum(int - 0.03% (2)
for each - 0.03% (2)
find the - 0.03% (2)
naive(int[] input) - 0.03% (2)
s; for(int - 0.03% (2)
input.length; j++){ - 0.03% (2)
(int k - 0.03% (2)
k<=j; k++){ - 0.03% (2)
input[k]; } - 0.03% (2)
can see - 0.03% (2)
sum of - 0.03% (2)
can be - 0.03% (2)
precompute(int[] input) - 0.03% (2)
. this - 0.03% (2)
{ int[] - 0.03% (2)
tmp; tmp - 0.03% (2)
int[input.length+1]; tmp[0] - 0.03% (2)
//precompute from - 0.03% (2)
{ tmp[i+1] - 0.03% (2)
= tmp[i] - 0.03% (2)
+ input[i]; - 0.03% (2)
tmp.length; i++) - 0.03% (2)
j++) { - 0.03% (2)
if (tmp[j]-tmp[i-1] - 0.03% (2)
tmp[j]-tmp[i-1]; } - 0.03% (2)
math.max(divideandconquer(input,l,m), math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); - 0.03% (2)
arr[], int - 0.03% (2)
and give - 0.03% (2)
optimal sum - 0.03% (2)
int border - 0.03% (2)
border += - 0.03% (2)
input[i]; if - 0.03% (2)
(border > - 0.03% (2)
= border; - 0.03% (2)
complexity is  - 0.03% (2)
therefore, we - 0.03% (2)
a result - 0.03% (2)
the element  , - 0.03% (2)
rendering our - 0.03% (2)
element  , we - 0.03% (2)
is pretty - 0.03% (2)
simply set - 0.03% (2)
 and thus - 0.03% (2)
2005 preliminary - 0.03% (2)
– chess - 0.03% (2)
2016 lyinch - 0.03% (2)
most 2 - 0.03% (2)
the pieces - 0.03% (2)
input file - 0.03% (2)
the output - 0.03% (2)
sight of - 0.03% (2)
and see - 0.03% (2)
int induction(int[] - 0.03% (2)
the code - 0.03% (2)
m, int - 0.03% (2)
prefix_sum; } - 0.03% (2)
// suffix - 0.03% (2)
sums int - 0.03% (2)
l; i--) - 0.03% (2)
> suffix_sum) - 0.03% (2)
// prefix - 0.03% (2)
sums sum - 0.03% (2)
int prefix_sum - 0.03% (2)
m+1; i - 0.03% (2)
prefix_sum) prefix_sum - 0.03% (2)
suffix_sum + - 0.03% (2)
int divideandconquer(int[] - 0.03% (2)
that point. - 0.03% (2)
input, int - 0.03% (2)
{ return - 0.03% (2)
math.max(0,input[l]); } - 0.03% (2)
= (l+r)/2; - 0.03% (2)
return math.max(divideandconquer(input,l,m), - 0.03% (2)
math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); } - 0.03% (2)
have to - 0.03% (2)
not more - 0.03% (2)
can we - 0.03% (2)
do better? - 0.03% (2)
assume, that - 0.03% (2)
bishop) || - 0.03% (2)
mark_los(chess,x,y,-1,1); mark_los(chess,x,y,1,-1); - 0.03% (2)
i++){ pi - 0.03% (2)
2003 preliminary - 0.03% (2)
i++) if(check[i] - 0.03% (2)
true; fill_array(check); - 0.03% (2)
3*3 for(int - 0.03% (2)
y++){ check[sudoku[a+x][y+b]]++; - 0.03% (2)
<< "error" - 0.03% (2)
<< "correct" - 0.03% (2)
"error" << - 0.03% (2)
endl; else - 0.03% (2)
"correct" << - 0.03% (2)
whole code - 0.03% (2)
– cilonacci - 0.03% (2)
check[sudoku[a+x][y+b]]++; } - 0.03% (2)
numbers of - 0.03% (2)
the fibonacci - 0.03% (2)
sequence are - 0.03% (2)
m numbers - 0.03% (2)
first m - 0.03% (2)
then the - 0.03% (2)
and to - 0.03% (2)
loop which - 0.03% (2)
the digit - 0.03% (2)
#include - 0.03% (2)
} for(int - 0.03% (2)
//check 3*3 - 0.03% (2)
int n, - 0.03% (2)
ifstream file(input); - 0.03% (2)
= a+x; - 0.03% (2)
b+y; } - 0.03% (2)
value for(int - 0.03% (2)
sudoku[t_x][t_y] = - 0.03% (2)
//end found - 0.03% (2)
2013 preliminary - 0.03% (2)
you receive - 0.03% (2)
to find - 0.03% (2)
file is - 0.03% (2)
the idea - 0.03% (2)
x++){ file - 0.03% (2)
check[sudoku[x][y]]++; for(int - 0.03% (2)
file.close(); }else - 0.03% (2)
"error opening - 0.03% (2)
input; ifstream - 0.03% (2)
file(input); if(file.is_open()){ - 0.03% (2)
sudoku[y][x]; } - 0.03% (2)
} file.close(); - 0.03% (2)
}else cout - 0.03% (2)
opening file" - 0.03% (2)
check array - 0.03% (2)
the variable - 0.03% (2)
check[sudoku[y][x]]++; for(int - 0.03% (2)
using - 0.03% (2)
to; //n: - 0.03% (2)
if(sudoku[a+x][y+b] == - 0.03% (2)
15 digits - 0.03% (2)
0.0; //long - 0.03% (2)
better precision - 0.03% (2)
int in; - 0.03% (2)
in; if(in - 0.03% (2)
> 1000000) - 0.03% (2)
in; i++){ - 0.03% (2)
(1/pow(i,2)); } - 0.03% (2)
setprecision(15) << - 0.03% (2)
sqrt(pi*6) << - 0.03% (2)
endl; //setprecision - 0.03% (2)
main(){ long - 0.03% (2)
the formula - 0.03% (2)
double pi - 0.03% (2)
= 0.0; - 0.03% (2)
//long double - 0.03% (2)
for better - 0.03% (2)
precision int - 0.03% (2)
in; cin - 0.03% (2)
>> in; - 0.03% (2)
if(in > - 0.03% (2)
1000000) return - 0.03% (2)
0; for(int - 0.03% (2)
<= in; - 0.03% (2)
using - 0.03% (2)
#include #include - 0.03% (2)
first terms; - 0.03% (2)
to; vector::iterator - 0.03% (2)
to: index - 0.03% (2)
to show - 0.03% (2)
int tmp; - 0.03% (2)
vector terms; - 0.03% (2)
int ans - 0.03% (2)
n; for(int - 0.03% (2)
i++){ //reads - 0.03% (2)
terms cin - 0.03% (2)
>> tmp; - 0.03% (2)
terms.push_back(tmp); } - 0.03% (2)
terms.end(); for(int - 0.03% (2)
<< terms.back() - 0.03% (2)
< to-n; - 0.03% (2)
j++){ // - 0.03% (2)
loop until - 0.03% (2)
to-n because - 0.03% (2)
n digits - 0.03% (2)
< n+1; - 0.03% (2)
q++){ //go - 0.03% (2)
q previous - 0.03% (2)
terms ans - 0.03% (2)
+= *(it-q); - 0.03% (2)
} terms.push_back(ans); - 0.03% (2)
0){ t_x - 0.03% (2)
empty pos. - 0.03% (2)
mark_los(chess,x,y,-1,-1); } - 0.03% (2)
call to - 0.03% (2)
on another - 0.03% (2)
piece if((x - 0.03% (2)
|| (chess[x][y] - 0.03% (2)
&& chess[x][y] - 0.03% (2)
if hits - 0.03% (2)
if(chess[x][y] == - 0.03% (2)
1){ counter++; - 0.03% (2)
} //mark - 0.03% (2)
as line - 0.03% (2)
5; //recursive - 0.03% (2)
the initialised - 0.03% (2)
position is - 0.03% (2)
direction mark_los(chess,x,y,dir_x,dir_y); - 0.03% (2)
//mark line - 0.03% (2)
number 5 - 0.03% (2)
<< "checks: - 0.03% (2)
"checks: " - 0.03% (2)
lio 2006 - 0.03% (2)
sudoku december - 0.03% (2)
statement: you - 0.03% (2)
receive a - 0.03% (2)
after each - 0.03% (2)
range or - 0.03% (2)
dir_y; //check - 0.03% (2)
then look - 0.03% (2)
mark_los(chess,x,y,1,1); mark_los(chess,x,y,-1,1); - 0.03% (2)
call_mark_los(int (&chess)[8][8] - 0.03% (2)
piece){ //horizontal - 0.03% (2)
& vertical - 0.03% (2)
== rook) - 0.03% (2)
//right mark_los(chess,x,y,1,0); - 0.03% (2)
//left mark_los(chess,x,y,-1,0); - 0.03% (2)
//up mark_los(chess,x,y,0,-1); - 0.03% (2)
//down mark_los(chess,x,y,0,1); - 0.03% (2)
} //diagonal - 0.03% (2)
== bishop) - 0.03% (2)
mark_los(chess,x,y,1,-1); mark_los(chess,x,y,-1,-1); - 0.03% (2)
+= dir_x; - 0.03% (2)
mark_los function - 0.03% (2)
coordinates are - 0.03% (2)
if this - 0.03% (2)
new field - 0.03% (2)
and exit - 0.03% (2)
a piece - 0.03% (2)
sight with - 0.03% (2)
bool mark_los(int - 0.03% (2)
(&chess)[8][8],int x, - 0.03% (2)
dir_x, int - 0.03% (2)
dir_y){ x - 0.03% (2)
example output: - 0.03% (2)
column and - 0.03% (2)
true; //search - 0.03% (2)
3*3 is - 0.03% (2)
if(sudoku[y][x] == - 0.03% (2)
} sudoku[y][pos] - 0.03% (2)
a column - 0.03% (2)
;x++){ if(sudoku[x][y] - 0.03% (2)
sudoku[pos][y] = - 0.03% (2)
more complicated - 0.03% (2)
two outer - 0.03% (2)
loops switch - 0.03% (2)
inner loops - 0.03% (2)
block. c++ - 0.03% (2)
pos. in - 0.03% (2)
check[sudoku[y][x]]++; //check - 0.03% (2)
grid for(int - 0.03% (2)
y++){ if(sudoku[a+x][y+b] - 0.03% (2)
== 0){ - 0.03% (2)
a+x; t_y - 0.03% (2)
= b+y; - 0.03% (2)
missing value - 0.03% (2)
} sudoku[t_x][t_y] - 0.03% (2)
} //end - 0.03% (2)
found missing - 0.03% (2)
number fill_array(check); - 0.03% (2)
if 3*3 - 0.03% (2)
line with - 0.03% (2)
} 12345678910111213141516171819202122232425262728293031323334353637383940414243 - 0.03% (2)
new number - 0.03% (2)
endl; for(int - 0.03% (2)
start by - 0.03% (2)
reading in - 0.03% (2)
input("sudo_in.txt"); if(input.is_open()){ - 0.03% (2)
"original sudoku" - 0.03% (2)
sudoku[y][x]; cout - 0.03% (2)
reading file" - 0.03% (2)
ifstream input("sudo_in.txt"); - 0.03% (2)
if(input.is_open()){ cout - 0.03% (2)
<< "original - 0.03% (2)
sudoku" << - 0.03% (2)
x++){ input - 0.03% (2)
} sudoku[pos][y] - 0.03% (2)
"error reading - 0.03% (2)
every row - 0.03% (2)
and store - 0.03% (2)
those value - 0.03% (2)
the checks - 0.03% (2)
a line - 0.03% (2)
;x++){ if(sudoku[y][x] - 0.03% (2)
sudoku[y][pos] = - 0.03% (2)
check[sudoku[x][y]]++; //check - 0.03% (2)
column with - 0.03% (2)
if(sudoku[x][y] == - 0.03% (2)
cilonacci sequences - 0.03% (2)
for(int i = - 0.36% (26)
for(int x = - 0.3% (22)
for(int y = - 0.25% (18)
} cout << - 0.22% (16)
< 9; y++){ - 0.19% (14)
y++){ for(int x - 0.19% (14)
9; y++){ for(int - 0.19% (14)
line of sight - 0.16% (12)
error = true; - 0.16% (12)
< 9 ;x++) - 0.16% (12)
"; } cout - 0.14% (10)
leave a comment - 0.14% (10)
private static int - 0.14% (10)
for(int j = - 0.14% (10)
lyinch leave a - 0.14% (10)
for (int i - 0.14% (10)
the empty position - 0.14% (10)
cout << i - 0.14% (10)
< 10; i++){ - 0.14% (10)
check if the - 0.12% (9)
2015 lyinch leave - 0.11% (8)
<< endl; return - 0.11% (8)
y; p_pos[tmp_size].piece = - 0.11% (8)
x; p_pos[tmp_size].y = - 0.11% (8)
= y; p_pos[tmp_size].piece - 0.11% (8)
c++, lio lio - 0.11% (8)
= x; p_pos[tmp_size].y - 0.11% (8)
the value of - 0.11% (8)
cout << endl; - 0.11% (8)
using namespace std; - 0.11% (8)
//search for the - 0.11% (8)
p_pos[tmp_size].y = y; - 0.11% (8)
} fill_array(check); } - 0.11% (8)
p_pos[tmp_size].x = x; - 0.11% (8)
<< endl; } - 0.11% (8)
the board a - 0.11% (8)
the original content - 0.11% (8)
a comment the - 0.11% (8)
the number of - 0.1% (7)
as part of - 0.1% (7)
part of the - 0.1% (7)
value of the - 0.1% (7)
} //search for - 0.08% (6)
numbers if(check[0] == - 0.08% (6)
if(check[i] == 0) - 0.08% (6)
1){ found = - 0.08% (6)
== 0) val - 0.08% (6)
the board and - 0.08% (6)
//set val the - 0.08% (6)
empty position if(check[i] - 0.08% (6)
== 1){ found - 0.08% (6)
if(check[0] == 1){ - 0.08% (6)
position if(check[i] == - 0.08% (6)
for the empty - 0.08% (6)
i++){ //set val - 0.08% (6)
of the solution - 0.08% (6)
== true) return - 0.08% (6)
10; i++){ //set - 0.08% (6)
found = true; - 0.08% (6)
val the value - 0.08% (6)
= true; for(int - 0.08% (6)
of the empty - 0.08% (6)
cout << "error - 0.08% (6)
namespace std; int - 0.08% (6)
the line of - 0.08% (6)
i < input.length; - 0.08% (6)
c++lio c++, lio - 0.08% (6)
true) return true; - 0.08% (6)
<= 100) && - 0.08% (6)
input.length; i++) { - 0.08% (6)
return 0; } - 0.08% (6)
1) error = - 0.08% (6)
std; int main(){ - 0.08% (6)
> 1) error - 0.08% (6)
= true; } - 0.08% (6)
< input.length; i++) - 0.08% (6)
input) { int - 0.08% (6)
if(check[i] > 1) - 0.08% (6)
path as part - 0.07% (5)
there is a - 0.07% (5)
if there is - 0.07% (5)
0; } 123456789101112131415 - 0.07% (5)
the program reads - 0.07% (5)
is a wall - 0.07% (5)
preliminary problem 3 - 0.07% (5)
we have a - 0.07% (5)
the first n - 0.07% (5)
the problem statement: - 0.07% (5)
comment the problem - 0.07% (5)
x; } //search - 0.05% (4)
c; cout << - 0.05% (4)
program reads the - 0.05% (4)
the size of - 0.05% (4)
" "; for(int - 0.05% (4)
1) //skip field - 0.05% (4)
checks if((piece == - 0.05% (4)
position for(int i - 0.05% (4)
//skip field if - 0.05% (4)
false; //check if - 0.05% (4)
,int x, int - 0.05% (4)
|| (piece == - 0.05% (4)
== 1) //skip - 0.05% (4)
8 filled in - 0.05% (4)
for(int q = - 0.05% (4)
in numbers if(check[0] - 0.05% (4)
3 – sudoku - 0.05% (4)
in the sudoku - 0.05% (4)
"; for(int q - 0.05% (4)
} }else{ cout - 0.05% (4)
< n-1; q++){ - 0.05% (4)
true; for(int x - 0.05% (4)
}else{ cout << - 0.05% (4)
<< "\n"; } - 0.05% (4)
< 9 ;x++){ - 0.05% (4)
sudoku[y][x] << " - 0.05% (4)
//we create a - 0.05% (4)
<< counter << - 0.05% (4)
with 8 filled - 0.05% (4)
int main(){ int - 0.05% (4)
at the end - 0.05% (4)
the solution - - 0.05% (4)
return true; } - 0.05% (4)
fill_array(check); } //check - 0.05% (4)
column for(int y - 0.05% (4)
n-1; q++){ i - 0.05% (4)
9 ;x++) check[sudoku[x][y]]++; - 0.05% (4)
checked field[y_pos][x_pos] = - 0.05% (4)
//check if there - 0.05% (4)
one of the - 0.05% (4)
as checked field[y_pos][x_pos] - 0.05% (4)
//check column for(int - 0.05% (4)
filled in numbers - 0.05% (4)
return 0;} c++lio - 0.05% (4)
return max; } - 0.05% (4)
return 0; if - 0.05% (4)
file" << endl; - 0.05% (4)
} } return - 0.05% (4)
|| ((int)input[i] >= - 0.05% (4)
java private static - 0.05% (4)
of the field - 0.05% (4)
if (sum > - 0.05% (4)
sum + arr[i]; - 0.05% (4)
: return true; - 0.05% (4)
0; for (int - 0.05% (4)
counter << endl; - 0.05% (4)
int l, int - 0.05% (4)
c++ #include - 0.05% (4)
i++){ if(check[i] > - 0.05% (4)
true; } fill_array(check); - 0.05% (4)
stay tuned, lyinch - 0.05% (4)
else cout << - 0.05% (4)
if(error) cout << - 0.05% (4)
for(int a = - 0.05% (4)
+= 3){ for(int - 0.05% (4)
for(int b = - 0.05% (4)
it = terms.end(); - 0.05% (4)
&& (int)input[i] <= - 0.05% (4)
a row, column - 0.05% (4)
< 3; y++){ - 0.05% (4)
for(int i=0; i - 0.05% (4)
== 0) pos - 0.05% (4)
empty position for(int - 0.05% (4)
i++){ for(int j - 0.05% (4)
val; } fill_array(check); - 0.05% (4)
} //check column - 0.05% (4)
solution - set - 0.05% (4)
vector> & second_d); - 0.05% (4)
//keeps the original - 0.05% (4)
< 3; x++){ - 0.05% (4)
for the missing - 0.05% (4)
x++){ for(int y - 0.05% (4)
max) max = - 0.05% (4)
cout << "\n"; - 0.05% (4)
<< sudoku[y][x] << - 0.05% (4)
return false; //check - 0.05% (4)
fill_array(check); } } - 0.05% (4)
int max = - 0.05% (4)
error" << endl; - 0.05% (4)
which is the - 0.04% (3)
in the vector - 0.04% (3)
with the size - 0.04% (3)
problem 1 – - 0.04% (3)
for the y - 0.04% (3)
comment the question - 0.04% (3)
the first line - 0.04% (3)
have the first - 0.04% (3)
hits the king - 0.04% (3)
false; } 1234567891011121314151617181920212223 - 0.04% (3)
2002 preliminary problem - 0.04% (3)
the last term - 0.04% (3)
lio lio 2002 - 0.04% (3)
we check if - 0.04% (3)
return false; } - 0.04% (3)
to output the - 0.04% (3)
haven’t terminated the - 0.04% (3)
based on the - 0.04% (3)
look for the - 0.04% (3)
is filled with - 0.04% (3)
if goal has - 0.04% (3)
are in range - 0.04% (3)
is available on - 0.04% (3)
row, column or - 0.04% (3)
the values is - 0.04% (3)
the call): return - 0.04% (3)
above haven’t terminated - 0.04% (3)
true (the conditions - 0.04% (3)
call): return true; - 0.04% (3)
(the conditions above - 0.04% (3)
} } 1234567891011121314 - 0.04% (3)
the next field - 0.04% (3)
return true;  check - 0.04% (3)
terminated the call): - 0.04% (3)
conditions above haven’t - 0.04% (3)
if true (the - 0.04% (3)
line by line - 0.04% (3)
goal has been - 0.04% (3)
solution has been - 0.04% (3)
the missing number - 0.04% (3)
numbers are filled - 0.04% (3)
column or 3*3 - 0.04% (3)
has been reached - 0.04% (3)
code is available - 0.04% (3)
statement: write a - 0.04% (3)
starting and ending - 0.04% (3)
we want to - 0.04% (3)
the solution is - 0.04% (3)
a fixed size - 0.04% (3)
check every item - 0.04% (3)
problem 4 – - 0.04% (3)
without a fixed - 0.04% (3)
of each piece - 0.04% (3)
to integer positions - 0.04% (3)
the constant and - 0.04% (3)
of the piece - 0.04% (3)
if we want - 0.04% (3)
0;} c++lio c++ - 0.04% (3)
the time complexity - 0.04% (3)
chars to integer - 0.04% (3)
board and save - 0.04% (3)
between the two - 0.04% (3)
isalpha and check - 0.03% (2)
only the special - 0.03% (2)
cases such as - 0.03% (2)
by checking wheter - 0.03% (2)
character based on - 0.03% (2)
could also use - 0.03% (2)
ascii code. we - 0.03% (2)
} if(error) cout - 0.03% (2)
string contains valid - 0.03% (2)
))) //check if - 0.03% (2)
(int)input[i] <= 122 - 0.03% (2)
 check the next - 0.03% (2)
90) || ((int)input[i] - 0.03% (2)
((int)input[i] >= 65 - 0.03% (2)
the white space. - 0.03% (2)
stupid rule of - 0.03% (2)
<< "there was - 0.03% (2)
cout << field[i][j]; - 0.03% (2)
} input.close(); } - 0.03% (2)
//read input until - 0.03% (2)
= false; getline(cin,input); - 0.03% (2)
void output2d_vector(vector > - 0.03% (2)
counter; bool error - 0.03% (2)
field.size(); i++){ for(int - 0.03% (2)
j < field[i].size();j++){ - 0.03% (2)
char c; int - 0.03% (2)
an error" << - 0.03% (2)
endl; } } - 0.03% (2)
main(){ string input; - 0.03% (2)
ç character... int - 0.03% (2)
the ' and - 0.03% (2)
c) counter++; if(!(((int)input[i] - 0.03% (2)
endl; cout << - 0.03% (2)
it the value - 0.03% (2)
== 32) || - 0.03% (2)
> 100) error - 0.03% (2)
i++){ if(input[i] == - 0.03% (2)
a solution has - 0.03% (2)
been reached if( - 0.03% (2)
and ç character... - 0.03% (2)
(x_pos == x_g) - 0.03% (2)
&& (y_pos == - 0.03% (2)
y_g)){ reached = - 0.03% (2)
true; //mark that - 0.03% (2)
the stupid rule - 0.03% (2)
been found field[y_g][x_g] - 0.03% (2)
input; char c; - 0.03% (2)
= 2; //mark - 0.03% (2)
as path if(print) - 0.03% (2)
output2d_vector(field); return true; - 0.03% (2)
} //if wall - 0.03% (2)
been found. c++ - 0.03% (2)
hit if(field[y_pos][x_pos] == - 0.03% (2)
1) return false; - 0.03% (2)
//mark path as - 0.03% (2)
int main(){ string - 0.03% (2)
y) || (field[y_pos][x_pos] - 0.03% (2)
i < input.size(); - 0.03% (2)
c; if(!isalpha(c)) //check - 0.03% (2)
has been added - 0.03% (2)
= 0; //use - 0.03% (2)
check_steps(vector > field,int - 0.03% (2)
= true; if(input.size() - 0.03% (2)
x_pos, int y_pos,bool - 0.03% (2)
only characters error - 0.03% (2)
if c contains - 0.03% (2)
print = false){ - 0.03% (2)
//check that coords - 0.03% (2)
|| (y_pos >= - 0.03% (2)
appears cin >> - 0.03% (2)
until new line - 0.03% (2)
getline(cin,input); //read input - 0.03% (2)
error = false; - 0.03% (2)
if( (x_pos < - 0.03% (2)
int counter; bool - 0.03% (2)
0) || (x_pos - 0.03% (2)
(y_pos < 0) - 0.03% (2)
free field } - 0.03% (2)
//use 1 for - 0.03% (2)
wall else field[i][j] - 0.03% (2)
the special cases - 0.03% (2)
for better precision - 0.03% (2)
int in; cin - 0.03% (2)
>> in; if(in - 0.03% (2)
> 1000000) return - 0.03% (2)
0; for(int i - 0.03% (2)
<= in; i++){ - 0.03% (2)
+ (1/pow(i,2)); } - 0.03% (2)
cout << setprecision(15) - 0.03% (2)
<< sqrt(pi*6) << - 0.03% (2)
double pi = - 0.03% (2)
and check only - 0.03% (2)
endl; //setprecision to - 0.03% (2)
also use isalpha - 0.03% (2)
code. we could - 0.03% (2)
output 15 digits - 0.03% (2)
based on ascii - 0.03% (2)
contains valid character - 0.03% (2)
north to south - 0.03% (2)
//check if string - 0.03% (2)
0.0; //long double - 0.03% (2)
int main(){ long - 0.03% (2)
the smallest path - 0.03% (2)
cin >> in; - 0.03% (2)
– sudoku lio - 0.03% (2)
cout << counter - 0.03% (2)
and outputs the - 0.03% (2)
using namespace - 0.03% (2)
long double pi - 0.03% (2)
= 0.0; //long - 0.03% (2)
double for better - 0.03% (2)
precision int in; - 0.03% (2)
"there was an - 0.03% (2)
such as the - 0.03% (2)
white space. error - 0.03% (2)
if(in > 1000000) - 0.03% (2)
return 0; for(int - 0.03% (2)
i++){ pi = - 0.03% (2)
pi + (1/pow(i,2)); - 0.03% (2)
setprecision(15) << sqrt(pi*6) - 0.03% (2)
<< endl; //setprecision - 0.03% (2)
to output 15 - 0.03% (2)
digits return 0; - 0.03% (2)
dimensions of the - 0.03% (2)
<= 122 ))) - 0.03% (2)
second_d); //call the - 0.03% (2)
characters error = - 0.03% (2)
100) error = - 0.03% (2)
input >> x - 0.03% (2)
>> y; getline(input,in_tmp); - 0.03% (2)
//switch to the - 0.03% (2)
first line of - 0.03% (2)
the field field.resize(y,vector(x)); - 0.03% (2)
true; if(input.size() > - 0.03% (2)
//resize vector to - 0.03% (2)
c contains only - 0.03% (2)
a free field - 0.03% (2)
[y][x] for(int i - 0.03% (2)
if(!isalpha(c)) //check if - 0.03% (2)
cin >> c; - 0.03% (2)
< y; i++){ - 0.03% (2)
new line appears - 0.03% (2)
getline(input,in_tmp); for(int j - 0.03% (2)
< x; j++){ - 0.03% (2)
if((int)in_tmp[j]-48 == 1) - 0.03% (2)
field[i][j] = 1; - 0.03% (2)
} } input.close(); - 0.03% (2)
true; for(int i - 0.03% (2)
97 && (int)input[i] - 0.03% (2)
counter++; if(!(((int)input[i] == - 0.03% (2)
v2; //tmp vector - 0.03% (2)
(int)input[i] <= 90) - 0.03% (2)
field(0,v2); //2d vector - 0.03% (2)
//tmp vector for - 0.03% (2)
> field(0,v2); //2d - 0.03% (2)
if(input.is_open()){ input >> - 0.03% (2)
getline(input,in_tmp); //switch to - 0.03% (2)
32) || ((int)input[i] - 0.03% (2)
if(input[i] == c) - 0.03% (2)
//use 0 for - 0.03% (2)
field.resize(y,vector(x)); //resize vector - 0.03% (2)
to [y][x] for(int - 0.03% (2)
i++){ getline(input,in_tmp); for(int - 0.03% (2)
j++){ if((int)in_tmp[j]-48 == - 0.03% (2)
1) field[i][j] = - 0.03% (2)
1; //use 1 - 0.03% (2)
for wall else - 0.03% (2)
field[i][j] = 0; - 0.03% (2)
< input.size(); i++){ - 0.03% (2)
if the text - 0.03% (2)
solution found, terminate - 0.03% (2)
& second_d); //call - 0.03% (2)
== 'a'){ cout - 0.03% (2)
continue; //skip if - 0.03% (2)
starting field is - 0.03% (2)
a wall for(int - 0.03% (2)
b < field[0].size(); - 0.03% (2)
b++){ //check every - 0.03% (2)
possible end position - 0.03% (2)
y-1 if(field[y_g][b] == - 0.03% (2)
return 0; if(t - 0.03% (2)
< field[0].size(); a++){ - 0.03% (2)
if goal is - 0.03% (2)
a wall continue; - 0.03% (2)
if(field[y_g-1][b] == 1) - 0.03% (2)
t == 'g'))) - 0.03% (2)
not reachable from - 0.03% (2)
above continue; x_g - 0.03% (2)
= b; check_steps(field,a,0); - 0.03% (2)
if(((iterp+iterm) < min_steps) - 0.03% (2)
if(field[0][a] == 1) - 0.03% (2)
don’t need to - 0.03% (2)
== 'a') || - 0.03% (2)
found, terminate //check - 0.03% (2)
>> t; //check - 0.03% (2)
t; //type cin - 0.03% (2)
= 2; iterp++; - 0.03% (2)
the repetitions char - 0.03% (2)
//check south if(check_steps(field,x_pos,y_pos+1,print) - 0.03% (2)
i,c,n; //first number, - 0.03% (2)
true; //if solution - 0.03% (2)
using namespace std; - 0.03% (2)
east if(check_steps(field,x_pos+1,y_pos,print) == - 0.03% (2)
q++){ i += - 0.03% (2)
} 12345678910111213141516171819202122232425262728 #include - 0.03% (2)
//check west if(check_steps(field,x_pos-1,y_pos,print) - 0.03% (2)
true; //unmark, path - 0.03% (2)
} return 0; - 0.03% (2)
*= c; cout - 0.03% (2)
if(t == 'g'){ - 0.03% (2)
3; iterm--; return - 0.03% (2)
from north to - 0.03% (2)
&& (iterp+iterm != - 0.03% (2)
100) && ((t - 0.03% (2)
if(field[y_pos][x_pos] == 1) - 0.03% (2)
(the ! at - 0.03% (2)
!= 1)){ bxs - 0.03% (2)
= b; min_steps - 0.03% (2)
= iterp+iterm; } - 0.03% (2)
the beginning) if(!((i - 0.03% (2)
iterp = 1; - 0.03% (2)
iterm = 0; - 0.03% (2)
available on github. - 0.03% (2)
tuned, lyinch c++lio - 0.03% (2)
december 24, 2015 - 0.03% (2)
check_steps(field,a,0); if(((iterp+iterm) < - 0.03% (2)
#include using - 0.03% (2)
main(){ int i,c,n; - 0.03% (2)
//first number, the - 0.03% (2)
constant and the - 0.03% (2)
repetitions char t; - 0.03% (2)
values is false - 0.03% (2)
//type cin >> - 0.03% (2)
t; //check if - 0.03% (2)
min_steps) && (iterp+iterm - 0.03% (2)
from above continue; - 0.03% (2)
1)){ bxs = - 0.03% (2)
field[0].size(); b++){ //check - 0.03% (2)
b; min_steps = - 0.03% (2)
iterp+iterm; } iterp - 0.03% (2)
= 1; iterm - 0.03% (2)
a < field[0].size(); - 0.03% (2)
a++){ if(field[0][a] == - 0.03% (2)
1) continue; //skip - 0.03% (2)
if starting field - 0.03% (2)
&& (abs(n) <= - 0.03% (2)
every possible end - 0.03% (2)
if not reachable - 0.03% (2)
position on y_g - 0.03% (2)
= y-1 if(field[y_g][b] - 0.03% (2)
(abs(c) <= 100) - 0.03% (2)
(int)n) && (abs(i) - 0.03% (2)
(c == (int)c) - 0.03% (2)
== (int)i) && - 0.03% (2)
field if goal - 0.03% (2)
continue; if(field[y_g-1][b] == - 0.03% (2)
return false; //mark - 0.03% (2)
//if wall hit - 0.03% (2)
2 as checked - 0.03% (2)
we got earlier - 0.03% (2)
dimensions we got - 0.03% (2)
> field,int x_pos, - 0.03% (2)
vectors to the - 0.03% (2)
//we resize both - 0.03% (2)
int y_pos,bool print - 0.03% (2)
//determine somehow the - 0.03% (2)
= false){ //check - 0.03% (2)
to the dimensions - 0.03% (2)
< second_d.size(); i++){ - 0.03% (2)
resize both vectors - 0.03% (2)
the dimensions you - 0.03% (2)
b; //determine somehow - 0.03% (2)
is the first - 0.03% (2)
a vector which - 0.03% (2)
and as datatype - 0.03% (2)
that coords are - 0.03% (2)
the size 0 - 0.03% (2)
access the elements - 0.03% (2)
= 3; iterm--; - 0.03% (2)
need a gap - 0.03% (2)
void output_vector(vector> second_d); - 0.03% (2)
field[y_pos][x_pos] = 2; - 0.03% (2)
iterp++; //check south - 0.03% (2)
if(check_steps(field,x_pos,y_pos+1,print) == true) - 0.03% (2)
return true; //if - 0.03% (2)
input is correct, - 0.03% (2)
content void output_vector(vector> - 0.03% (2)
//check east if(check_steps(field,x_pos+1,y_pos,print) - 0.03% (2)
//modifies the original - 0.03% (2)
true; //check west - 0.03% (2)
second_d[i].size();j++){ cout << - 0.03% (2)
if(check_steps(field,x_pos-1,y_pos,print) == true) - 0.03% (2)
return true; //unmark, - 0.03% (2)
& second_d); //keeps - 0.03% (2)
void output_vector(const vector> - 0.03% (2)
<< second_d[i][j] << - 0.03% (2)
< second_d[i].size();j++){ cout - 0.03% (2)
i < second_d.size(); - 0.03% (2)
second_d[i][j] << " - 0.03% (2)
second vector with - 0.03% (2)
in range if( - 0.03% (2)
if input is - 0.03% (2)
== x_g) && - 0.03% (2)
1) ) return - 0.03% (2)
&& (abs(c) <= - 0.03% (2)
(abs(i) <= 100) - 0.03% (2)
== (int)n) && - 0.03% (2)
(int)c) && (n - 0.03% (2)
reached if( (x_pos - 0.03% (2)
if(!((i == (int)i) - 0.03% (2)
at the beginning) - 0.03% (2)
(y_pos == y_g)){ - 0.03% (2)
|| (field[y_pos][x_pos] >= - 0.03% (2)
reached = true; - 0.03% (2)
//mark that a - 0.03% (2)
false (the ! - 0.03% (2)
wheter one of - 0.03% (2)
found field[y_g][x_g] = - 0.03% (2)
correct, by checking - 0.03% (2)
2; //mark as - 0.03% (2)
path if(print) output2d_vector(field); - 0.03% (2)
100) && (abs(n) - 0.03% (2)
((t == 'a') - 0.03% (2)
the first vector - 0.03% (2)
//we need a - 0.03% (2)
vector which is - 0.03% (2)
as datatype a - 0.03% (2)
size 0 and - 0.03% (2)
vector with the - 0.03% (2)
create a second - 0.03% (2)
(x_pos < 0) - 0.03% (2)
> second_d(0,one_d); //we - 0.03% (2)
gap between the - 0.03% (2)
normal vector without - 0.03% (2)
'g'))) return 0; - 0.03% (2)
|| (x_pos >= - 0.03% (2)
endl; } return - 0.03% (2)
'g'){ cout << - 0.03% (2)
} if(t == - 0.03% (2)
+= c; cout - 0.03% (2)
x) || (y_pos - 0.03% (2)
if(t == 'a'){ - 0.03% (2)
(y_pos >= y) - 0.03% (2)
maximum subarray problem - 0.03% (2)
"correct" << endl; - 0.03% (2)
0;} c++lio c++, - 0.03% (2)
y = (int)input[1]-int('0')-1; - 0.03% (2)
0; //exit ;) - 0.03% (2)
i++){ file >> - 0.03% (2)
input; //reads until - 0.03% (2)
whitespace //cout << - 0.03% (2)
input << endl; - 0.03% (2)
//debuggingy if(((int)input[0]-(int)'a' == - 0.03% (2)
-17)) //skip if - 0.03% (2)
piece is 00 - 0.03% (2)
continue; //converts chars - 0.03% (2)
x = (int)input[0]-int('a'); - 0.03% (2)
//increment the size - 0.03% (2)
<< "could not - 0.03% (2)
of the list - 0.03% (2)
for a new - 0.03% (2)
piece p_pos.resize(p_pos.size()+1); tmp_size - 0.03% (2)
= p_pos.size()-1; //position - 0.03% (2)
every piece on - 0.03% (2)
save it to - 0.03% (2)
the list p_pos - 0.03% (2)
(vector) switch(i){ case - 0.03% (2)
0: p_pos[tmp_size].x = - 0.03% (2)
king; chess[x][y] = - 0.03% (2)
read from file!" - 0.03% (2)
bishop; break; } - 0.03% (2)
1: p_pos[tmp_size].x = - 0.03% (2)
switch(i){ case 0: - 0.03% (2)
integer positions x - 0.03% (2)
= (int)input[0]-int('a'); y - 0.03% (2)
= (int)input[1]-int('0')-1; //increment - 0.03% (2)
the list for - 0.03% (2)
a new piece - 0.03% (2)
p_pos.resize(p_pos.size()+1); tmp_size = - 0.03% (2)
p_pos.size()-1; //position every - 0.03% (2)
piece on the - 0.03% (2)
it to the - 0.03% (2)
list p_pos (vector) - 0.03% (2)
p_pos[tmp_size].piece = king; - 0.03% (2)
bishop; chess[x][y] = - 0.03% (2)
chess[x][y] = king; - 0.03% (2)
break; case 1: - 0.03% (2)
p_pos[tmp_size].piece = queen; - 0.03% (2)
chess[x][y] = queen; - 0.03% (2)
break; case 2: - 0.03% (2)
case 3: p_pos[tmp_size].x - 0.03% (2)
= rook; chess[x][y] - 0.03% (2)
= rook; break; - 0.03% (2)
case 4: case - 0.03% (2)
5: p_pos[tmp_size].x = - 0.03% (2)
king; break; case - 0.03% (2)
queen; chess[x][y] = - 0.03% (2)
is 00 continue; - 0.03% (2)
y,int piece){ //horizontal - 0.03% (2)
//horizontal & vertical - 0.03% (2)
rook) || (piece - 0.03% (2)
== queen)){ //right - 0.03% (2)
mark_los(chess,x,y,1,0); //left mark_los(chess,x,y,-1,0); - 0.03% (2)
//up mark_los(chess,x,y,0,-1); //down - 0.03% (2)
mark_los(chess,x,y,0,1); } //diagonal - 0.03% (2)
bishop) || (piece - 0.03% (2)
== queen)){ mark_los(chess,x,y,1,1); - 0.03% (2)
mark_los(chess,x,y,-1,1); mark_los(chess,x,y,1,-1); mark_los(chess,x,y,-1,-1); - 0.03% (2)
} return false; - 0.03% (2)
& vertical checks - 0.03% (2)
(&chess)[8][8] ,int x, - 0.03% (2)
if((piece == rook) - 0.03% (2)
queen)){ //right mark_los(chess,x,y,1,0); - 0.03% (2)
//left mark_los(chess,x,y,-1,0); //up - 0.03% (2)
mark_los(chess,x,y,0,-1); //down mark_los(chess,x,y,0,1); - 0.03% (2)
} //diagonal checks - 0.03% (2)
if((piece == bishop) - 0.03% (2)
queen)){ mark_los(chess,x,y,1,1); mark_los(chess,x,y,-1,1); - 0.03% (2)
mark_los(chess,x,y,1,-1); mark_los(chess,x,y,-1,-1); } - 0.03% (2)
direction the piece - 0.03% (2)
then check if - 0.03% (2)
int y,int piece){ - 0.03% (2)
according the the - 0.03% (2)
queen; break; case - 0.03% (2)
file!" << endl; - 0.03% (2)
2: case 3: - 0.03% (2)
p_pos[tmp_size].piece = rook; - 0.03% (2)
chess[x][y] = rook; - 0.03% (2)
break; case 4: - 0.03% (2)
case 5: p_pos[tmp_size].x - 0.03% (2)
= bishop; chess[x][y] - 0.03% (2)
= bishop; break; - 0.03% (2)
} } }else{ - 0.03% (2)
cout << "could - 0.03% (2)
not read from - 0.03% (2)
return 0; //exit - 0.03% (2)
to mark the - 0.03% (2)
//call for every - 0.03% (2)
piece in the - 0.03% (2)
list the function - 0.03% (2)
p_pos.size(); i++) call_mark_los(chess,p_pos[i].x,p_pos[i].y,p_pos[i].piece); - 0.03% (2)
every piece in - 0.03% (2)
the list the - 0.03% (2)
function for(int i - 0.03% (2)
<= p_pos.size(); i++) - 0.03% (2)
board with a - 0.03% (2)
and the value - 0.03% (2)
the appropriate function - 0.03% (2)
//converts chars to - 0.03% (2)
//skip if piece - 0.03% (2)
sight with the - 0.03% (2)
parts of the - 0.03% (2)
= tmp[i] + - 0.03% (2)
input[i]; } for - 0.03% (2)
tmp.length; i++) { - 0.03% (2)
tmp.length; j++) { - 0.03% (2)
if (tmp[j]-tmp[i-1] > - 0.03% (2)
tmp[j]-tmp[i-1]; } } - 0.03% (2)
. this means - 0.03% (2)
completely in the - 0.03% (2)
solution is completely - 0.03% (2)
know that the - 0.03% (2)
int maxcrossingsum(int arr[], - 0.03% (2)
i for (int - 0.03% (2)
m, int r) - 0.03% (2)
{ // suffix - 0.03% (2)
sums int sum - 0.03% (2)
suffix_sum = integer.min_value; - 0.03% (2)
>= l; i--) - 0.03% (2)
suffix_sum) suffix_sum = - 0.03% (2)
sum; } // - 0.03% (2)
prefix sums sum - 0.03% (2)
prefix_sum = integer.min_value; - 0.03% (2)
<= r; i++) - 0.03% (2)
i++) { tmp[i+1] - 0.03% (2)
from 0 to - 0.03% (2)
sum; } return - 0.03% (2)
for (int j - 0.03% (2)
static int naive(int[] - 0.03% (2)
int s; for(int - 0.03% (2)
{ for (int - 0.03% (2)
j < input.length; - 0.03% (2)
j++){ s = - 0.03% (2)
k<=j; k++){ s - 0.03% (2)
+= input[k]; } - 0.03% (2)
return m; } - 0.03% (2)
int naive(int[] input) - 0.03% (2)
s; for(int i - 0.03% (2)
< input.length; j++){ - 0.03% (2)
= 0; //precompute - 0.03% (2)
for (int k - 0.03% (2)
= i; k<=j; - 0.03% (2)
k++){ s += - 0.03% (2)
input[k]; } if - 0.03% (2)
the sum of - 0.03% (2)
int precompute(int[] input) - 0.03% (2)
{ int[] tmp; - 0.03% (2)
tmp = new - 0.03% (2)
int[input.length+1]; tmp[0] = - 0.03% (2)
0; int max - 0.03% (2)
prefix_sum) prefix_sum = - 0.03% (2)
suffix_sum + prefix_sum; - 0.03% (2)
if(((int)input[0]-(int)'a' == -17)) - 0.03% (2)
pieces {empty = - 0.03% (2)
that we need - 0.03% (2)
to check every - 0.03% (2)
item at least - 0.03% (2)
lio 2005 preliminary - 0.03% (2)
2016 lyinch leave - 0.03% (2)
h and the - 0.03% (2)
the input file - 0.03% (2)
of sight of - 0.03% (2)
each piece and - 0.03% (2)
if the line - 0.03% (2)
0, king = - 0.03% (2)
element  , we simply - 0.03% (2)
1, queen = - 0.03% (2)
2, rook = - 0.03% (2)
3, bishop = - 0.03% (2)
struct t_pos{ int - 0.03% (2)
x; int y; - 0.03% (2)
i <6; i++){ - 0.03% (2)
file >> input; - 0.03% (2)
//reads until whitespace - 0.03% (2)
//cout << input - 0.03% (2)
<< endl; //debuggingy - 0.03% (2)
rendering our optimal - 0.03% (2)
optimal sum useless. - 0.03% (2)
} private static - 0.03% (2)
max = border; - 0.03% (2)
int divideandconquer(int[] input, - 0.03% (2)
{ return math.max(0,input[l]); - 0.03% (2)
= (l+r)/2; return - 0.03% (2)
math.max(divideandconquer(input,l,m), math.max(divideandconquer(input,m+1,r),maxcrossingsum(input,l,m,r))); } - 0.03% (2)
that we have - 0.03% (2)
static int induction(int[] - 0.03% (2)
int border = - 0.03% (2)
i++) { border - 0.03% (2)
+= input[i]; if - 0.03% (2)
(border > max) - 0.03% (2)
if (border < - 0.03% (2)
thus rendering our - 0.03% (2)
0) border = - 0.03% (2)
0; } return - 0.03% (2)
max; } 1234567891011121314 - 0.03% (2)
induction(int[] input) { - 0.03% (2)
0; int border - 0.03% (2)
border += input[i]; - 0.03% (2)
if (border > - 0.03% (2)
border; if (border - 0.03% (2)
< 0) border - 0.03% (2)
if we compute - 0.03% (2)
a result which - 0.03% (2)
//mark line of - 0.03% (2)
number 5 on - 0.03% (2)
cout << terms.back() - 0.03% (2)
cout << "correct" - 0.03% (2)
10; i++) if(check[i] - 0.03% (2)
= true; fill_array(check); - 0.03% (2)
//check 3*3 for(int - 0.03% (2)
3){ for(int x - 0.03% (2)
3; y++){ check[sudoku[a+x][y+b]]++; - 0.03% (2)
} } for(int - 0.03% (2)
i++) if(check[i] > - 0.03% (2)
true; fill_array(check); } - 0.03% (2)
cout << "error" - 0.03% (2)
<< endl; else - 0.03% (2)
<< endl; 1234 - 0.03% (2)
3){ for(int b - 0.03% (2)
"error" << endl; - 0.03% (2)
the whole code - 0.03% (2)
lio 2003 preliminary - 0.03% (2)
the numbers of - 0.03% (2)
the fibonacci sequence - 0.03% (2)
numbers of the - 0.03% (2)
reads the number - 0.03% (2)
the first m - 0.03% (2)
a loop which - 0.03% (2)
in a loop - 0.03% (2)
check[sudoku[a+x][y+b]]++; } } - 0.03% (2)
on the same - 0.03% (2)
main(){ int n, - 0.03% (2)
file.close(); }else cout - 0.03% (2)
9; x++){ cout - 0.03% (2)
github. stay tuned, - 0.03% (2)
– sudoku december - 0.03% (2)
you receive a - 0.03% (2)
number of a - 0.03% (2)
if one of - 0.03% (2)
cin >> input; - 0.03% (2)
ifstream file(input); if(file.is_open()){ - 0.03% (2)
x++){ file >> - 0.03% (2)
sudoku[y][x]; } } - 0.03% (2)
<< "error opening - 0.03% (2)
;x++) check[sudoku[x][y]]++; for(int - 0.03% (2)
input; ifstream file(input); - 0.03% (2)
if(file.is_open()){ for(int y - 0.03% (2)
9; x++){ file - 0.03% (2)
>> sudoku[y][x]; } - 0.03% (2)
} file.close(); }else - 0.03% (2)
opening file" << - 0.03% (2)
//check line for(int - 0.03% (2)
check[sudoku[y][x]]++; for(int i - 0.03% (2)
check[sudoku[x][y]]++; for(int i - 0.03% (2)
;x++) check[sudoku[y][x]]++; for(int - 0.03% (2)
#include using - 0.03% (2)
to; //n: number - 0.03% (2)
found missing number - 0.03% (2)
terms.push_back(tmp); } cin - 0.03% (2)
index of term - 0.03% (2)
to show int - 0.03% (2)
tmp; vector terms; - 0.03% (2)
int ans = - 0.03% (2)
0; cin >> - 0.03% (2)
n; for(int i - 0.03% (2)
< n; i++){ - 0.03% (2)
//reads in the - 0.03% (2)
first n terms - 0.03% (2)
cin >> tmp; - 0.03% (2)
>> to; vector::iterator - 0.03% (2)
//n: number of - 0.03% (2)
to-n; j++){ // - 0.03% (2)
loop until to-n - 0.03% (2)
because we have - 0.03% (2)
digits for (int - 0.03% (2)
q++){ //go to - 0.03% (2)
and add the - 0.03% (2)
q previous terms - 0.03% (2)
ans += *(it-q); - 0.03% (2)
} terms.push_back(ans); ans - 0.03% (2)
= terms.end(); } - 0.03% (2)
first terms; to: - 0.03% (2)
int n, to; - 0.03% (2)
of first terms; - 0.03% (2)
terms.end(); for(int j - 0.03% (2)
to: index of - 0.03% (2)
term to show - 0.03% (2)
int tmp; vector - 0.03% (2)
terms; int ans - 0.03% (2)
>> n; for(int - 0.03% (2)
i++){ //reads in - 0.03% (2)
terms cin >> - 0.03% (2)
tmp; terms.push_back(tmp); } - 0.03% (2)
cin >> to; - 0.03% (2)
vector::iterator it = - 0.03% (2)
< to-n; j++){ - 0.03% (2)
using namespace - 0.03% (2)
// loop until - 0.03% (2)
to-n because we - 0.03% (2)
n digits for - 0.03% (2)
n+1; q++){ //go - 0.03% (2)
to the last - 0.03% (2)
term in the - 0.03% (2)
vector and add - 0.03% (2)
the q previous - 0.03% (2)
terms ans += - 0.03% (2)
*(it-q); } terms.push_back(ans); - 0.03% (2)
terms.back() << endl; - 0.03% (2)
x++){ cout << - 0.03% (2)
val; } //end - 0.03% (2)
mark_los(int (&chess)[8][8],int x, - 0.03% (2)
sight chess[x][y] = - 0.03% (2)
is on another - 0.03% (2)
piece if((x > - 0.03% (2)
0) || (chess[x][y] - 0.03% (2)
chess[x][y] < 5 - 0.03% (2)
)) return false; - 0.03% (2)
//check if hits - 0.03% (2)
the king if(chess[x][y] - 0.03% (2)
== 1){ counter++; - 0.03% (2)
//mark the position - 0.03% (2)
as line of - 0.03% (2)
5; //recursive call - 0.03% (2)
is out of - 0.03% (2)
to continue in - 0.03% (2)
the initialised direction - 0.03% (2)
<< "checks: " - 0.03% (2)
endl; the whole - 0.03% (2)
2006 preliminary problem - 0.03% (2)
statement: you receive - 0.03% (2)
goal is to - 0.03% (2)
in a row, - 0.03% (2)
8 numbers are - 0.03% (2)
the idea is - 0.03% (2)
range or it - 0.03% (2)
dir_y; //check position - 0.03% (2)
by reading in - 0.03% (2)
if(chess[x][y] == 1){ - 0.03% (2)
int y,int dir_x, - 0.03% (2)
int dir_y){ x - 0.03% (2)
+= dir_x; y - 0.03% (2)
+= dir_y; //check - 0.03% (2)
position is out - 0.03% (2)
of range or - 0.03% (2)
another piece if((x - 0.03% (2)
(chess[x][y] > 1 - 0.03% (2)
&& chess[x][y] < - 0.03% (2)
5 )) return - 0.03% (2)
counter++; return true; - 0.03% (2)
dir_x; y += - 0.03% (2)
} //mark the - 0.03% (2)
position as line - 0.03% (2)
of sight chess[x][y] - 0.03% (2)
= 5; //recursive - 0.03% (2)
call to continue - 0.03% (2)
in the initialised - 0.03% (2)
direction mark_los(chess,x,y,dir_x,dir_y); return - 0.03% (2)
(&chess)[8][8],int x, int - 0.03% (2)
y,int dir_x, int - 0.03% (2)
dir_y){ x += - 0.03% (2)
then look for - 0.03% (2)
the sudoku c++ - 0.03% (2)
} sudoku[t_x][t_y] = - 0.03% (2)
} //end found - 0.03% (2)
true; //search for - 0.03% (2)
the empty pos. - 0.03% (2)
in the 3*3 - 0.03% (2)
grid for(int x - 0.03% (2)
3; y++){ if(sudoku[a+x][y+b] - 0.03% (2)
== 0){ t_x - 0.03% (2)
= a+x; t_y - 0.03% (2)
} } //search - 0.03% (2)
value for(int i - 0.03% (2)
sudoku[t_x][t_y] = val; - 0.03% (2)
missing number fill_array(check); - 0.03% (2)
if 3*3 is - 0.03% (2)
} } 12345678910111213141516171819202122232425 - 0.03% (2)
//check if 3*3 - 0.03% (2)
8 numbers if(check[0] - 0.03% (2)
= true; //search - 0.03% (2)
pos. in the - 0.03% (2)
3*3 grid for(int - 0.03% (2)
if(sudoku[a+x][y+b] == 0){ - 0.03% (2)
t_x = a+x; - 0.03% (2)
t_y = b+y; - 0.03% (2)
missing value for(int - 0.03% (2)
filled with 8 - 0.03% (2)
block. c++ //check - 0.03% (2)
ifstream input("sudo_in.txt"); if(input.is_open()){ - 0.03% (2)
is a column - 0.03% (2)
cout << "original - 0.03% (2)
sudoku" << endl; - 0.03% (2)
x++){ input >> - 0.03% (2)
sudoku[y][x]; cout << - 0.03% (2)
"error reading file" - 0.03% (2)
if we find - 0.03% (2)
;x++) check[sudoku[y][x]]++; //check - 0.03% (2)
a line with - 0.03% (2)
if(sudoku[y][x] == 0) - 0.03% (2)
i; } sudoku[y][pos] - 0.03% (2)
;x++){ if(sudoku[x][y] == - 0.03% (2)
two outer loops - 0.03% (2)
sudoku[pos][y] = val; - 0.03% (2)
by line for(int - 0.03% (2)
check[sudoku[y][x]]++; //check if - 0.03% (2)
line with 8 - 0.03% (2)
9 ;x++){ if(sudoku[y][x] - 0.03% (2)
} sudoku[y][pos] = - 0.03% (2)
;x++) check[sudoku[x][y]]++; //check - 0.03% (2)
a column with - 0.03% (2)
if(sudoku[x][y] == 0) - 0.03% (2)
i; } sudoku[pos][y] - 0.03% (2)
fill_array(check); } the - 0.03% (2)
2013 preliminary problem - 0.03% (2)

Here you can find chart of all your popular one, two and three word phrases. Google and others search engines means your page is about words you use frequently.

Copyright © 2015-2016 hupso.pl. All rights reserved. FB | +G | Twitter

Hupso.pl jest serwisem internetowym, w którym jednym kliknieciem możesz szybko i łatwo sprawdź stronę www pod kątem SEO. Oferujemy darmowe pozycjonowanie stron internetowych oraz wycena domen i stron internetowych. Prowadzimy ranking polskich stron internetowych oraz ranking stron alexa.