Skip to content

Instantly share code, notes, and snippets.

@yakk512
yakk512 / a.cpp
Created July 16, 2014 12:59
Atcoder Beginer Contest#012
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
using namespace::std;
@yakk512
yakk512 / CatchTheBeatEasy.cpp
Created July 11, 2014 18:08
SRM#623Div2Easy
class CatchTheBeatEasy {
public:
string ableToCatchAll(vector <int> x, vector <int> y)
{
vector< pair<int,int> > p(x.size());
for(int i = 0; i < p.size(); i++)
{
p[i].first = y[i];
p[i].second = x[i];
@yakk512
yakk512 / CostOfDancing.cpp
Created July 11, 2014 17:35
SRM#624Div2Easy
class CostOfDancing {
public:
int minimum(int K, vector <int> danceCost)
{
long long sum = 0;
sort(danceCost.begin() , danceCost.end());
for(int i = 0; i < K; i++)
{
sum+= danceCost[i];
@yakk512
yakk512 / AddMultiply.cpp
Created July 11, 2014 17:09
SRM#625Div2Easy
class AddMultiply {
public:
vector <int> makeExpression(int y)
{
vector<int> v(3);
for(int i = -1000; i <= 1000; i++)
{
if(i == 0 || i == 1)
{
continue;
@yakk512
yakk512 / ManySquares.cpp
Created July 11, 2014 16:54
SRM#627Easy
class ManySquares {
public:
int howManySquares(vector <int> sticks)
{
int check[1001];
int ans = 0;
for(int i = 0; i < 1001; i++)
{
check[i] = 0;
}
@yakk512
yakk512 / SumOfPower.cpp
Last active August 29, 2015 14:03
SRM#626Easy
class SumOfPower {
public:
int findSum(vector <int> array)
{
int sum = 0;
for(int i = 0; i < array.size(); i++)
{
for(int j = i+1; j <= array.size(); j++)
{
@yakk512
yakk512 / b.cpp
Created July 8, 2014 13:39
codeforces#253
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
#include<stdlib.h>
#include<string.h>
@yakk512
yakk512 / a.cpp
Created July 6, 2014 06:13
codeforces#253
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
using namespace::std;
@yakk512
yakk512 / a.cpp
Created May 3, 2014 11:04
Atcoder Regular Contest#021 Problem A
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
#include<stdlib.h>
@yakk512
yakk512 / c.cpp
Created April 6, 2014 03:03
Atcoder Beginner Contest#006 Problem C
#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<math.h>
using namespace::std;