Skip to content

Instantly share code, notes, and snippets.

View viliml's full-sized avatar

Vilim Lendvaj viliml

  • Popovača, Hrvatska
View GitHub Profile
@viliml
viliml / snaga.cpp
Last active April 21, 2016 10:20
HONI '13
#include <bits/stdc++.h>
using namespace std;
#define double long long
double gcd(double a, double b)
{
double tmp;
while (b)
#include <bits/stdc++.h>
using namespace std;
using llint = long long;
int divisors[37];
map<int, pair<llint, llint>> rems;
@viliml
viliml / pin.cpp
Created May 28, 2016 05:38
CEOI 2010, day 2, task PIN
#include <bits/stdc++.h>
using namespace std;
map<string, int> num1[4], num2[6], num3[4];
string get1(string str, int type)
{
str.erase(type, 1);
return str;
#include <bits/stdc++.h>
using namespace std;
const int MOD = 10007;
int fact[MOD], inv[MOD];
int r[10], c[10];
#include <bits/stdc++.h>
using namespace std;
vector<int> sols(1, 1), curr;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#include <bits/stdc++.h>
using namespace std;
typedef long long llint;
int A, B, L;
llint f(int dy)
{
@viliml
viliml / bal.cpp
Created June 13, 2016 15:37
CEOI 2011 day 1
#include <bits/stdc++.h>
using Ldouble = long double;
using namespace std;
stack<pair<int, Ldouble>> balloons;
int main()
{
@viliml
viliml / hot.cpp
Created June 15, 2016 11:17
CEOI 2011 day 2, hotel
#include <bits/stdc++.h>
using namespace std;
multiset<pair<int, int>> rooms;
multiset<pair<int, int>, greater<pair<int, int>>> offers;
vector<int> profits;
int main()
{
@viliml
viliml / friends.cpp
Created June 21, 2016 06:08
BOI 2014 day 1
#include <bits/stdc++.h>
using namespace std;
#define llint long long
const int MAXN = 2000100;
const llint A = 29;
const llint B = 31;
const llint MOD1 = 1000000007;
@viliml
viliml / gondola.cpp
Created June 28, 2016 12:50
IOI 2014 day 2
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
void fix(int n, int inputSeq[])
{
auto mn = min_element(inputSeq, inputSeq + n);