Skip to content

Instantly share code, notes, and snippets.

#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
scanf("%d" , &t);
while(t--)
{
/*
Welcome!
/\_/\ (
( ^.^ ) _)
\"/ (
( | | )
(__d b__)
*/
#include<bits/stdc++.h>
using namespace std;
/*
Welcome!
/\_/\ (
( ^.^ ) _)
\"/ (
( | | )
(__d b__)
*/
#include<bits/stdc++.h>
using namespace std;
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin>>n;
map<int , vector<int> > mp;
for(int i = 1 ; i<=n ; i++){
int x;
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
vector<string> v;
string s;
getline(cin , s);
string st = "";
for(int i = 0 ; i<s.length() ; i++){
const currentTime = document.getElementById('timerCircle');
const currentSessionDuration = document.getElementById('sessionDuration');
const decreaseSessionTimeButton = document.getElementById('decreaseSessionTime');
function appendZeroIfNeeded(){
let currentMinutes = parseInt(currentTime.innerText.split(':')[0]);
if(currentMinutes<11){
currentSessionDuration.innerText = '0'+currentSessionDuration.innerText;
}
@zarc1411
zarc1411 / quicksort3.cpp
Created June 20, 2020 13:57
Quick sort 3 partition
#include<bits/stdc++.h>
using namespace std;
pair<int , int> partition3(int arr[] , int l , int r){
pair<int , int> p;
int pivot = arr[l];
int high = l;
for(int i = l+1 ; i<=r; i++){
if(arr[i]<=pivot){
high++;
swap(arr[i],arr[high]);
@zarc1411
zarc1411 / knapsack.cpp
Last active October 12, 2020 12:20
knapsack 0/1
#include<bits/stdc++.h>
using namespace std;
int dp[1001][1001];
int knapsack(int val[] , int wt[] , int n , int w){
if(dp[n][w]!=-1){
return dp[n][w];
}
if(n==0 || w == 0){