Skip to content

Instantly share code, notes, and snippets.

View harshraj22's full-sized avatar
✌️
😋 Integrating Continiously

Harsh Raj harshraj22

✌️
😋 Integrating Continiously
View GitHub Profile
@harshraj22
harshraj22 / UVA11456.cpp
Last active May 29, 2019 17:28
getting WA
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
/*
for each index, dp[0][i] stores length of longest increasing sequence starting at index i, and dp[1][i] stores length
of longest decreasing sequence starting at index i,
*/
int main(){
// https://practice.geeksforgeeks.org/problems/ways-to-sum-to-n/0
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll mx=1e9+7,n,m;
ll dp[1008];
vector<ll> v;
ll compute(ll sum);
int main(){
@harshraj22
harshraj22 / codeforces #493_div2B.cpp
Created June 4, 2019 17:26
Contains details of solution and how to seek for help.
// Your file with changes
#include<bits/stdc++.h>
using namespace std;
//no need to pass the whole array every time as :
// you are not changing the array
// rather make the array global .
int i,j,k,c=0,n,en=0,on=0,b;
int f(int b,int i,int c,int a[]){
@harshraj22
harshraj22 / Testing.md
Last active September 19, 2019 07:16
Testing the working of subscript in markdown.

This is supposed to be superscript and this is subscript .    link to image

Contributors Github Year
Harsh Raj harshraj22 2018-2022
@harshraj22
harshraj22 / Documentatio_bigint.md
Last active June 13, 2019 09:45
A documentation for using the bigint.cpp

this is incomplete documentation

How to use ?

1. Create an instance (object) by either of the following ways :

1.1 Without providing any initial value -
    bigint b;
    cout<<b<<"\n"; 
0
1.2. With a long long int -
@harshraj22
harshraj22 / Matrix_Template.cpp
Created June 13, 2019 10:59
A template for matrix expressions
#include<iostream>
#include<vector>
#include<utility> // for std:: pair
#include<stdbool.h> // for bool datatype
#include<iomanip> // for formatted printing ( padding ) in show()
using namespace std;
template<typename T>
class matrix{
private:
@harshraj22
harshraj22 / simple or palindromes.cpp
Last active June 22, 2019 10:04
For debugging the question
// https://codeforces.com/contest/569/problem/C
/*
on test case 6 4, the value inside if() is false still it is executed, leading to wrong answer.
can be verified by un-commenting line 44. fails when low=152, high = 182
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
@harshraj22
harshraj22 / Logic.md
Last active June 28, 2019 06:46
To discuss about 'xor and insert' problem on HackerEarth

used the same logic described here.I wonder why there is so much diffrence when array of fixed size is used instead of unordered_map. Also, why the later solution gives TLE as well.

@harshraj22
harshraj22 / 10199.cpp
Created June 30, 2019 07:52
Getting weired error in ques 10199 of uva online judge.
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int N=104;
vector<int> g[N],lt,in,ap,vis;
int tim=0;
#define eb emplace_back
void dfs(int node,int par=-1){
vis[node]=1;
@harshraj22
harshraj22 / trial.md
Last active July 23, 2019 12:10
to try markdown supports on github

academic_records_management

A C-program for academic records management. MIT license contributions welcome Open Source Love png2

What does it do ? 🤔❓

It stores academic records of students, instructors and courses in a college.

How is it implemented ? 🤷‍♂️

  • The ideas used are :
    • structure
    • pointers