Skip to content

Instantly share code, notes, and snippets.

View puchka's full-sized avatar

A. Marius Rabenarivo puchka

View GitHub Profile
@puchka
puchka / keybase.md
Created March 3, 2023 06:30
Keybase proof

Keybase proof

I hereby claim:

  • I am puchka on github.
  • I am puchka (https://keybase.io/puchka) on keybase.
  • I have a public key ASA0gKJdpKypREbu1klmTtRU7sfNqv1H37gIuPcWvgcWIQo

To claim this, I am signing this object:

@puchka
puchka / main.cpp
Created July 22, 2021 23:36
Solution for Harbour.Space Scholarship Contest 2021-2022 - C - Penalty http://codeforces.com/contest/1553/problem/C
#include <bits/stdc++.h>
using namespace std;
int remaining_kicks(int n, int p) {
int s = 0;
for (int i = n; i < 10; i++) {
if (i % 2 == p)
s++;
}
@puchka
puchka / main.cpp
Created July 22, 2021 23:23
Solution for Harbour.Space Scholarship Contest 2021-2022 - A - Digits Sum - http://codeforces.com/contest/1553/problem/A
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
long n;
cin >> t;
while (t--) {
cin >> n;
#include <bits/stdc++.h>
using namespace std;
vector<int> minv;
// map<int, vector<int>> m {
// {1, {1, }},
// {2, {1, 1}},
// {3, {2, 1, }},
// {4, {3, 1, }},
#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<string, int>& a,
pair<string, int>& b) {
return a.second > b.second;
}
vector<string> split(string s) {
#include <bits/stdc++.h>
using namespace std;
std::vector<std::string> Split(const std::string& str, int splitLength)
{
int NumSubstrings = str.length() / splitLength;
std::vector<std::string> ret;
for (auto i = 0; i < NumSubstrings; i++)
#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<string, int>& a,
pair<string, int>& b) {
if (a.second == b.second)
return a.first < b.first;
return a.second > b.second;
}
@puchka
puchka / main.cpp
Last active June 8, 2020 11:31
TechZara WCC 2020 week 3 day 2
#include <bits/stdc++.h>
using namespace std;
#define arrSize 100
#define maxSum 1000000
#define MAX 1000
#define inf INT_MAX
// Variable to store states of dp
@puchka
puchka / main.cpp
Last active June 11, 2024 16:21
Weekly Coding Contest TechZara 2020 - week3 - day 1
#include <bits/stdc++.h>
using namespace std;
// Compute score
int score(vector<vector<char>> board) {
int h = board.size();
int w = board[0].size();
map<char, int> m;
m['R'] = 0;
@puchka
puchka / main.cpp
Created May 2, 2020 21:06
MAT 2020 - fanoronaXYValidator
#include <iostream>
#include <climits>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <algorithm>
#include <tuple>
#include <string>
#include <cstdlib>