This is supposed to be superscript and this is subscript .
Contributors | Github | Year |
---|---|---|
Harsh Raj | harshraj22 | 2018-2022 |
#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(){ |
// 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[]){ |
This is supposed to be superscript and this is subscript .
Contributors | Github | Year |
---|---|---|
Harsh Raj | harshraj22 | 2018-2022 |
#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: |
// 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 |
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.
#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; |