Skip to content

Instantly share code, notes, and snippets.

View viliml's full-sized avatar

Vilim Lendvaj viliml

  • Popovača, Hrvatska
View GitHub Profile
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300000;
int color[MAXN];
vector<int> edges[MAXN];
long long cnt[MAXN][5];
long long cnt2[MAXN][5][5];
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n, k;
int arr[MAXN];
vector<int> edges[MAXN];
int cost[MAXN];
@viliml
viliml / friend.cpp
Created July 4, 2016 13:24
IOI 2014. day 2
#include "friend.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int take[MAXN], dont[MAXN];
@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);
@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 / 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 / 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()
{
#include <bits/stdc++.h>
using namespace std;
typedef long long llint;
int A, B, L;
llint f(int dy)
{
#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;
const int MOD = 10007;
int fact[MOD], inv[MOD];
int r[10], c[10];