This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2012 Mgr. Simon Toth ([email protected]) | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
#include <stdio.h> | |
#define STATE_BAD 1 | |
#define STATE_FINAL 2 | |
/** \brief Kodovaci funkce pro zakodovani expandovaneho stavu do unikatniho cisla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2012 Mgr. Simon Toth ([email protected]) | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) | |
{ | |
FILE *input = stdin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2012 Mgr. Simon Toth ([email protected]) | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
union multipole | |
{ | |
int pole1[35]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
int search(char **bludiste, int y, int x) | |
{ | |
/* cil */ | |
if (bludiste[y][x] == 'C') return 1; | |
/* policko neni volne, ani start */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unordered_map> | |
#include <algorithm> | |
#include <iterator> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
unordered_map<int,int> freq; | |
istream_iterator<int> input(cin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int x[][3] = { { 1, 2, 3}, {1, 2, 3}}; | |
int (*xptr)[3] = x; | |
for (int i = 0; i < 2; i++) | |
for (int j = 0; j < 3; j++) | |
printf("%d ",xptr[i][j]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <atomic> | |
using namespace std; | |
// int notify; | |
// volatile int notify; | |
atomic<int> notify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
int main() | |
{ | |
istream_iterator<int> in(cin); | |
istream_iterator<int> eof; | |
long suma = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
int main() | |
{ | |
int pole[] = { 10, 20, 30 }; | |
ostream_iterator<int> out(cout,", "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iterator> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
istream_iterator<double> in(cin); | |
istream_iterator<double> eof; |
OlderNewer