uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
525076a0-892d-49ce-be1f-f6ad320a8d1e
RulerOfCakes/BOJ
DFS/13016.cpp
#include <bits/stdc++.h> using namespace std; using pi = pair<int,int>; int N; int dist[50505]; int boo,boodist; vector<pi>adj[50505]; void rdfs(int cx, int prt, int cc){ dist[cx]=max(dist[cx],cc); if(dist[cx]>boodist)boodist=dist[cx],boo=cx; for(pi np:adj[cx]){ if(np.first==prt)continue; r...
ALGO
0.999946
4.371568
6cc792de-1f59-454d-9442-193e155b05c5
alex-kity/optimization-Registration
3rdpart/gtsam/gtsam/3rdparty/GeographicLib/matlab/geocentricreverse.cpp
// Compile in Matlab with // [Unix] // mex -I/usr/local/include -L/usr/local/lib -Wl,-rpath=/usr/local/lib // -lGeographic geocentricreverse.cpp // [Windows] // mex -I../include -L../windows/Release // -lGeographic geocentricreverse.cpp #include <GeographicLib/Geocentric.hpp> #include <mex.h> using namespace st...
ALGO
0.997614
6.439635
a8241e06-7393-4548-93af-179eaccfa74a
christian-combine/BlockmanLORD
libs/boost/libs/geometry/test/algorithms/overlay/sort_by_side.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test #include <geometry_test_common.hpp> #include <boost/geometry/algorithms/correct.hpp> #include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp> #include <boost/geometry/algorithms/detail/overlay/overlay.hpp> #include <boost/geometry/geome...
TEST
0.907862
7.261402
6d57dd3d-568f-4b3e-87ac-ba13ed16d667
windcry1/My-ACM-ICPC
SWUST OJ/0240.cpp
//Author:LanceYu #include<iostream> #include<string> #include<cstring> #include<cstdio> #include<fstream> #include<iosfwd> #include<sstream> #include<fstream> #include<cwchar> #include<iomanip> #include<ostream> #include<vector> #include<cstdlib> #include<queue> #include<set> #include<ctime> #include<algorithm> #includ...
ALGO
0.999873
3.135262
755de748-6ec3-4a42-947c-2f336de7bf09
HelloJeong/bojCode
18000/18258(큐2).cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); queue<int> q; int t; cin >> t; while(t--) { string command; cin >> command; cin.ignore(); if(command == "push") { int x; cin >>...
ALGO
0.997987
4.736029
8790df3e-32d7-4b1a-8797-f496275023c2
pinkeshbadjatiya/tTest-on-trust-communities
src/devuni.cpp
#include "devuni.h" using namespace std; DevUni::DevUni(Graph & gr):Quality(gr,"Deviation to Uniformity") { n2c.resize(size); in.resize(size); w.resize(size); // initialization for (int i=0 ; i<size ; i++) { n2c[i] = i; in[i] = g.nb_selfloops(i); w[i] = g.nodes_w[i]; } } DevUni::~DevUn...
ALGO
0.969311
4.036657
17cd71c3-a501-4778-987e-7e1548ec8e2a
KaranSaharan91/CSES_Problem_Sets
Mail_Delivery.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; vector<pair<int, int>> adj[n+1]; vector<int> dg(n+1, 0); for(int i = 0; i<m; i++){ int a, b; cin >> a >> b; dg[a]++; dg[b]++; adj[a].push_back({b, i}); adj[b].push_ba...
ALGO
0.99999
4.156411
521e38e5-b26e-4ba8-8393-95438dfcba4e
Jbernardiss/codeStylometryResearch
data/dataset-v3/tourist/tourist-d1-2022-r3.cpp
/** * author: tourist * created: 04.06.2022 18:14:24 **/ #include <bits/stdc++.h> using namespace std; /*#ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif*/ int main() { ios::sync_with_stdio(false); cin.tie(0); int tt, n, k; cin >> tt >> n >> k; int Q = 0; while (tt-...
ALGO
0.999907
3.628914
d733722c-036a-4de4-ab89-e41677b8978d
SarangVThakare/Web-Dev-A-Cell
X.cpp
#include<iostream> #include<cstring> using namespace std; int main(){ char[10] name; cin>>name; char names[4][10]={"bruise","tony","peter"}; int n=4; arr[4]=name; for(int i=0;i<n;i++){ for(int j=i;j<n;j++){ if(strcmp(names[i],names[j])<=0){ char [] temp=names[i]; names[i]=names[j]; names[j]=temp; } } for(int i...
ALGO
0.999163
3.52223
27ff99d1-d691-4c1f-9d11-efd7435aec40
geekygirl8/Hacktoberfest_2022_DSA
C++/C++/kth-ancestor-of-a-tree-node.cpp
// Time: ctor: O(n * logh) // get: O(logh) // Space: O(n * logh) // binary jump solution (frequently used in competitive programming) class TreeAncestor { public: TreeAncestor(int n, vector<int>& parent) { vector<int> q; for (const auto& p : parent) { parent_.emplace_back(vecto...
ALGO
0.999954
5.458477
685cc69f-7151-4844-bc6d-cd6151a383c7
AI4Robotics/FastDDSWithTSDSIR
src/fastrtps/src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.cpp
/** * @file DiscoveryDataBase.cpp * */ #include <mutex> #include <set> #include <fastdds/dds/log/Log.hpp> #include <fastdds/rtps/common/EntityId_t.hpp> #include <fastdds/rtps/common/GuidPrefix_t.hpp> #include <fastdds/rtps/common/RemoteLocators.hpp> #include <statistics/rtps/GuidUtils.hpp> #include <rtps/builtin/...
TOOL
0.872797
7.218187
a4b165ec-b6f4-4ffb-a80c-ad4a0fba5d52
jang010505/Algorithm
BOJ/12886.cpp
#include<iostream> #include<queue> #include<set> using namespace std; long long int A, B, C; set<pair<pair<long long int, long long int>, long long int> > visit; int main(){ cin >> A >> B >> C; int res=0; queue<pair<pair<long long int, long long int>, long long int> > q; q.push(make_pair(make_pair(A, B)...
ALGO
0.999976
3.726109
3e4448af-4187-49ba-b60c-0412d0f785d3
IcEy-999/MyUESource
Engine/Source/Runtime/SignalProcessing/Private/EQ.cpp
#include "DSP/EQ.h" #include "DSP/Dsp.h" namespace Audio { FEqualizer::FEqualizer() : NumChannels(0) { } FEqualizer::~FEqualizer() { } void FEqualizer::Init(const float InSampleRate, const int32 InNumBands, const int32 InNumChannels) { NumChannels = InNumChannels; WorkBuffer.SetNum(InNumChannels); ...
ALGO
0.900306
6.484901
638ab5a5-aa21-4ff6-8bae-890b974af9de
taoyilee/gem5
src/systemc/tests/systemc/misc/synth/combo/switch3/switch3.cpp
/***************************************************************************** switch3.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /****************************************************************************...
TOOL
0.948328
4.535574
10161896-583e-42bd-b28d-411c30d421ce
MMaitland1/LeetCode
C++/minReorder.cpp
/* There are n cities numbered from 0 to n - 1 and n - 1 roads such that there is only one way to travel between two different cities (this network form a tree). Last year, The ministry of transport decided to orient the roads in one direction because they are too narrow. Roads are represented by connections where con...
ALGO
0.999978
6.663154
458a217b-bcab-4e17-aa0d-2dfd399fd7ed
ishandutta2007/codeforces
dxqwq/normal/1451/B.cpp
#include<bits/stdc++.h> #define mp make_pair #define pi pair<int,int> #define pb push_back using namespace std; inline int read(){ int s=0,w=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();} while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar(); return s*w; } char s[100003]; int mai...
ALGO
0.999929
3.465725
ce678303-9e5a-41e8-878f-3c276e179a7c
directpi/MyProjects
CPP_Yandex_Handbook/4.1.5_tic_tac_toe.cpp
#include <iostream> #include <vector> class TicTacToe { public: const size_t N; // размер игрового поля const size_t K; // сколько фишек нужно поставить в ряд, чтобы выиграть private: // 0 - пусто, 1 - фишка первого игрока (крестик), 2 - фишка второго игрока (нолик) std::vector<std::vector<int>> Tab...
ALGO
0.998963
5.591372
4670f18a-706b-4099-b606-5d4e27fa32e3
ferconde87/Programming-contests
codeforces/486 (Div. 3)/a/a.cpp
#include <bits/stdc++.h> using namespace std; #define cn(x) cout << #x << " = " << x << endl; int main(){ unsigned int n, k; cin >> n >> k; bitset<101> bs; vector<int> ans; for(int i = 1; i <= n; i++){ int x; cin >> x; if(bs[x]) continue; bs.set(x); ans.push_back(i); ...
ALGO
0.999989
3.587762
9baa9012-e69e-4a30-95d2-5e5d463d9837
ishandutta2007/codeforces
kostaskostil/normal/1195/D1.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define int long long //#define double long double #define y0 y___0 #define y1 y___1 #define fi first #define se second #define pb push_back #define timer (clock()*1.0/CLOCKS_PER_SEC) #define e 0.000000000000000001 using namespace std; int a[100500]; int c[15]; i...
ALGO
0.999878
4.084222
b7b7178f-ec22-4fa8-a365-8dccd37ebe6d
DiegoDA04/CodeForces
A_EhAb_AnD_gCd.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int x; cin >> x; if(x == 2) cout << 1 << " " << 1 << endl; else { if(x % 2 == 0) cout << 2 << " " << x - 2 << endl; else cout << 1 << " " << x - 1 << endl; ...
ALGO
0.999559
4.154901
0f55b901-bfd5-4944-a9ee-6ae1bd4fde57
rupav/cp
competitive_coding/contests/630/A.cpp
#include<bits/stdc++.h> using namespace std; #define fr(i,n) for(int i=0; i<n; i++) #define rep(i, st, en) for(int i=st; i<=en; i++) #define repn(i, st, en) for(int i=st; i>=en; i--) #define sq(a) (a*a) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; ll mod = 1e9+7; ll gcdll(ll a, ll b){ ...
ALGO
0.999648
4.22133
cc94cd78-0377-49c0-b2dc-3e328796bca9
Koki-Yamaguchi/competitive-programming
codeforces/1499/b/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; (i) < (int) (n); (i) ++) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define dump(x) cerr << #x << " = " << x << '\n'; using ll = long long; template<typename T, typename U> ostream& operator << (ostream& ...
ALGO
0.999953
4.663249
60790d45-fa14-44df-95e0-5868643b49af
paras-13/CodeForces
CP31/800/1903A.cpp
// 1903 A. Halloumi Boxes #include <iostream> #include <vector> using namespace std; bool checkSort(vector<int>v, int n, int i) { if(i==n-1) return true; if(v[i+1] < v[i]) return false; return checkSort(v, n, i+1); } int main() { int t; cin >> t; while(t--) { int n, k; vector<in...
ALGO
0.999956
4.031799
8297c642-8c9c-4f07-a7a9-c88536558242
github583431183/framework_av
media/module/codecs/amrwb/dec/src/dec_gain2_amr_wb.cpp
/* ------------------------------------------------------------------------------ Filename: dec_gain2_amr_wb.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: --------------------------------------------------------------------...
ALGO
0.999022
4.735946
6679e0fd-6d94-4e89-b8d9-a74a76d59903
kedidoima/Contest1-2
b11.cpp
#include <iostream> #include <string> using namespace std; int n,m; string a; int64_t b[5000],c[5000]; char flip(char x) { return (x=='0')? '1' : '0'; } void xuat() { /*m++; b[m]=0; for (int i=0; i<n; i++) { b[m]=b[m]*10+a[i]; }*/ string g=""; g+=a[0]; for (int i=1; i<a.le...
ALGO
0.999724
4.177671
049d0c6d-2c41-4be7-9985-4f2c2e8d0541
trithucvo010704/Practice_DSA
thuattoansapxeptimkiem/btsapxeptimkiem2.cpp
#include<bits/stdc++.h> using namespace std; //int first ( int a[] , int l,int r , int x){ // // int res = -1 ; // while( l<= r){ // int m = (l+r )/2 ; // if( a[m] == x){ // res = m; // r = m- 1; // } // else if ( a[m] <x) r = m-1; // else l = m+...
ALGO
0.999419
3.096409
6bd15ba0-d517-4c05-a4de-22aa23831791
AnkitShaw-creator/c_c--
test.cpp
#include<bits/stdc++.h> #include<iostream> #include<string> using namespace std; # define ll long long int int main(){ ll t; cin >> t; while(t--){ ll n; string s; cin >> n; cin >> s; auto c = count(s.begin(), s.end(), "1"); cout << (c*(c+1))/2 << endl; ...
ALGO
0.999707
4.271323
23dd6f33-a1e4-48f8-8ae2-3735165b023d
gokulmaran/SDE-Role
1.Tech Questions/2. C++_concepts/virtual_functions.cpp
#include <iostream> using namespace std; class Base { public: // Virtual function virtual void display() { cout << "Display function in Base class" << endl; } // Destructor virtual ~Base() { cout << "Base Destructor called!" << endl; } }; class Derived : public Base { public: ...
TOOL
0.856579
6.493649
d4901afe-3183-46f0-b3a6-d096bc08de57
erroreyes/bluelab-plugins
Libs/bluelab-lib/InfraSynthProcess.cpp
// // InfraSynthProcess.cpp // BL-Infra // // Created by Pan on 20/04/18. // // #include <algorithm> using namespace std; #include <SineSynthSimple.h> #include <FilterIIRLow12dB.h> #include <BLUtils.h> #include <BLUtilsMath.h> #include "InfraSynthProcess.h" #define EPS 1e-15 #define FIX_RESET 1 // Phantom #d...
ALGO
0.934258
4.397126
4592b7c6-7bee-4cb6-8162-7cb304774a70
alaminatcs/Cpp-Programming
03- Practice Day/pp2.cpp
/* Problem Name: Problem Link: */ #include <bits/stdc++.h> using namespace std; class Cricketer { public: int jersey_no; string country; }; int main() { Cricketer* Dhoni = new Cricketer; cin >> Dhoni->jersey_no >> Dhoni->country; Cricketer* Kohli = new Cricketer; Kohli->country = Dhoni->country;...
TOOL
0.92356
4.972651
cbd9b10d-774e-48ff-a575-48dead2f02aa
DionysiosB/CodeForces
0001-0099/25A-IQTest.cpp
#include <cstdio> int main(){ int n; scanf("%d", &n); int temp[3] = {0}; for(int k = 0; k < 3; k++){scanf("%d", temp + k );temp[k] %= 2;} int target = 0, index = 0; bool done = 0; if(temp[0] == temp[1]){ target = 1 - temp[0]; if(temp[2] == target){index = 2; done = 1;} ...
ALGO
0.999863
3.595775
d0e7cb71-dd90-4051-983c-0b4f51b559af
nefrttPrabhu/leetstore
409-longest-palindrome/longest-palindrome.cpp
class Solution { public: int longestPalindrome(string s) { unordered_map<char, int> mp; for (auto it : s) { mp[it]++; } int sum = 0; int oc = 0; for (auto it : mp) { if (it.second % 2 == 0) { sum += it.second; } ...
ALGO
0.999956
6.162118
adf91d30-2416-4864-a79e-c44591401273
liwawil/cpp-data-structures
linked-lists/task-manager.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; struct Task { string description; bool isHighPriority; Task* next; }; class TaskManager { private: Task* head; public: TaskManager() : head(nullptr) {} ~TaskManager() { while (head) { Task* temp =...
TOOL
0.919709
6.583011
0612990c-bdf0-47d7-ae34-d2ee9fdec1f7
cjsoft/inasdfz
d0709/7.9/source/常州一中孔瑞阳/encrypt.cpp
#include <cstdio> #include <cstring> #include <algorithm> #define M 5010 #define FOR(n) for(int i=1;i<=n;i++) using namespace std; char ch[M]; int Sa[M],t1[M],t2[M],C[M],Ra[M],h[M],f[M][M],n; void get_sa(int m){ int *x=t1,*y =t2; FOR(n)C[x[i]=ch[i]]++; FOR(m)C[i]+=C[i-1]; for(int i=n;i;--i)Sa[C[x[i]]--]=i; for(int ...
ALGO
0.999884
3.22787
24c729dc-0ffc-4d0b-aab3-22abb0a5f837
sqoin/xdisk
src/chainparams.cpp
#include <chainparams.h> #include <chainparamsseeds.h> #include <consensus/consensus.h> #include <consensus/merkle.h> #include <poc/poc.h> #include <script/interpreter.h> #include <tinyformat.h> #include <util.h> #include <utilstrencodings.h> #include <cassert> static CBlock CreateGenesisBlock(const char* pszTimestam...
CONFIG
0.939679
6.261535
9322e38f-9cd9-47f6-954a-458725de951b
TengFeiyang01/Algorithm
casual/DP/CF2100/CF1271D.cpp
#include <bits/stdc++.h> const int inf = 0x3f3f3f3f; using i64 = long long; void solve() { int n, m, k; std::cin >> n >> m >> k; std::vector<int> last(n); std::vector<std::array<int, 3>> a(n); for (int i = 0; i < n; ++i) { std::cin >> a[i][0] >> a[i][1] >> a[i][2]; last[i] = i; } ...
ALGO
0.999961
4.155268
5658246b-c2c2-48f2-89f8-7c0684946660
Akrobatik/ps
BaekJoon/13000/13896.cpp
// Title : Sky Tax // Link : https://www.acmicpc.net/problem/13896 // Time : 584 ms // Memory: 9468 KB #include <bits/stdc++.h> using namespace std; struct LCT { struct Node { Node() : l(nullptr), r(nullptr), p(nullptr), rev(0), sz(1), vsz(0) {} Node *l, *r, *p; int rev; int sz, vsz; }; //...
ALGO
0.999977
5.119976
583c2774-6d7c-41ff-8364-e5dbf3c87a47
NikhilK06/Leet
solutions/1518. Water Bottles/1518-2.cpp
class Solution { public: int numWaterBottles(int numBottles, int numExchange) { return numBottles + (numBottles - 1) / (numExchange - 1); } };
ALGO
0.999039
6.055144
11303593-0f36-475f-8f13-aafc6b34c0c0
bill2766/algorithmGo
chapter5/05_04_1_prime.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> using namespace std; bool isPrime(int n){ if(n<=1) return false; int sqr = (int)sqrt(1.0 * n); //һȡ for(int i = 2;i <= sqr; i++){ if(n%i == 0){ return false; } } return true; } //----------------...
ALGO
0.999667
4.179301
9d72cc5d-16da-4029-8d76-31fc58a9d448
wangwssh/nokov_ros_node
src/nokov_ros/src/m3x3.cpp
/*==================================================================== File: m3x3.cpp Functions: M3x3_MulMatrix M3x3_MulVector M3x3_LoadIdentity M3x3_Transpose M3x3_Copy M3x3_RotateX M3x3_RotateY M3x3_RotateZ M3x3_ExtractEulerAngles_ZYX M3x3_ExtractEulerAngles_XYZ M3x3_Ex...
ALGO
0.998531
6.88639
5d65386f-5e27-43be-b126-ff271c7abd54
wrsophia/LeetCode
110. Balanced Binary Tree/my_solution.cpp
/** * 思路就是,检验左子树和右子树是否都是平衡二叉树,并且他们的高度差不超过1 */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isBalanced(TreeNode* root) { if (...
ALGO
0.999994
6.581393
4a86f4bb-a866-4aa6-8eed-8dfc001a3619
ishandutta2007/codeforces
ugly2333/normal/1648/C.cpp
//CF1648C #include<iostream> #include<cstdio> #include<fstream> #include<algorithm> #include<vector> #include<map> #include<set> #include<queue> #include<bitset> #include<cmath> #include<cstring> #include<cstdlib> using namespace std; typedef long long LL; typedef double DB; const int N = 222222; const int MO = 9982443...
ALGO
0.999986
3.624493
f3110b3a-ba21-458b-978e-5983d6efa34a
ShawnTSH1229/XEngine
ThirdParty/boost_1_78_0/libs/graph/example/components_on_edgelist.cpp
/* This example demonstrates the usage of the connected_components_on_edgelist algorithm. This differs from the connect_components algorithm in that the graph object only needs to provide access to the "list" of edges (via the edges() function). The example graphs come from "Introduction to Algorithms",...
ALGO
0.999056
6.622622
133f0277-ec55-4083-b054-5e93b63be6d9
dolphin-li/SewingEditor
algorithm/conv/ImageData.cpp
#include "ImageData.h" #include <iostream> #include <fstream> namespace ldp { //========================================================================== /// bwdist: the same with matlab's // using the linear-time Euclidean distance transform method ////////// Functions F and Sep for the SDT labelling inline in...
ALGO
0.999543
5.185913
d988d303-ea6b-4c72-8f13-d0d6d0d335f3
OldTraveller/RandomCodingProblems
chess.cpp
#include <bits/stdc++.h> using namespace std ; using ll = long long ; enum { BLACK = 1, WHITE , RANDOM } ; class player { private : ll rating ; ll mini , maxi ; ll time ; bool isRated ; int color ; public : bool canBePlayed( play...
ALGO
0.999613
4.290529
c2267643-dd4a-4515-95d7-c185b7954b72
harshleet/leetsolution
2916-check-if-it-is-possible-to-split-array/check-if-it-is-possible-to-split-array.cpp
class Solution { public: bool canSplitArray(vector<int>& nums, int m) { if(nums.size()==1 ||nums.size()==2){ return true; } int low=0,high=1; while(high<nums.size()){ if(nums[low]+nums[high]>=m){ return true; } l...
ALGO
0.999948
5.872225
d04d9bd1-81bf-473a-831a-e0ad7ffe34b7
novak-99/MLPP
MLPP/SoftmaxReg/SoftmaxReg.cpp
// // SoftmaxReg.cpp // // Created by Marc Melikyan on 10/2/20. // #include "SoftmaxReg.hpp" #include "LinAlg/LinAlg.hpp" #include "Regularization/Reg.hpp" #include "Activation/Activation.hpp" #include "Utilities/Utilities.hpp" #include "Cost/Cost.hpp" #include <iostream> #include <random> namespace MLPP{ Soft...
DATA
0.981799
6.271181
23d5403c-3558-4cbe-952b-c2bb1dff3033
cashinqmar/DSALGO
pepcoding/graph/testing.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Edge { public: int v = 0; int w = 0; Edge(int v, int w) { this->v = v; this->w = w; } }; void addEdge(vector<vector<Edge *>> & graph,int u, int v, int w) { graph[u].push_back(new Edge(v, w)); ...
ALGO
0.999901
4.294077
cc7465f6-e82e-4b98-8394-dcc50ab7d1e4
fishy15/competitive_programming
online/cf/polynomial_2022/ice_and_fire.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <numeric> #define ll long long #define ld long double ...
ALGO
0.999912
3.86839
d1b59ee2-1a70-41a6-82e4-1f820ddd2d57
luctsix/pratice-code
vs code/pratice/operator/test01.cpp
#include <iostream> using namespace std; class person{ friend person operator+(const person &p1, const person &p2); friend person operator-(const person &p1, const person &p2); friend person operator*(const person &p1, const person &p2); friend person operator/(const person &p1, const person &p2); ...
TOOL
0.926905
3.852522
5bd7031d-bd13-4979-a530-dd78fa1be27e
shu8Cream/atcoder-archive
atcoder.jp/arc126/arc126_a/Main.cpp
/** * author: shu8Cream * created: 19.09.2021 21:55:25 **/ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define rrep(i,n) for (int i=(n-1); i>=0; i--) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) int((x).size()) using ll...
ALGO
0.999863
5.144928
105d2d13-f263-42e5-a20b-9707bc528e01
ishandutta2007/codeforces
brovko/normal/1420/C1.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int t, n, q, a[300005], Min[300005], Max[300005]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> t; while(t--) { cin >> n >> q; for(int i = 0; i < n; i++) cin >>...
ALGO
0.999928
3.522292
57263ce7-cf67-46e5-87b3-0bc6034e352e
sendoru/ps-cpp-new
source/actoder/abc228_c.cpp
#include <iostream> #include <vector> #include <algorithm> #define MAX_SCORE 300 using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, k; cin >> n >> k; vector<int> p(n); for (int i = 0; i < n; i++) { for (int j = 0; j < 3; j++) { int temp; cin...
ALGO
0.999889
3.606894
77cdff89-c089-493d-a709-c8833bd5a7ef
YashHalwai/Data-Structures-Algorithms
01_Arrays/Day 18/Q_36.cpp
// Q. Median of Two Sorted Arrays // https://leetcode.com/problems/median-of-two-sorted-arrays/ /* class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { for(int i=0; i<nums2.size(); i++){ nums1.push_back(nums2[i]); } sort(nums1.begin()...
ALGO
0.999963
6.526171
f6b786bf-dc55-4416-afb2-a8895d41a83e
codewithaman07/codeforces
A_Counting_Orders.cpp
#include <bits/stdc++.h> using namespace std; #define Aman() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define endl '\n' #define int long long #define pb push_back #define f(x,n) for(int i = x ; i<n ; i++) #define all(x) x.begin(),x.end() const int M = 1e9+7; const int N = 1e6 + 1; void solve()...
ALGO
0.999986
4.509169
de8aba3c-0722-4234-9688-82e3f07850e4
adamap/code-test2
212wordsearchII.cpp
// // //Given a 2D board and a list of words from the dictionary, find all words in the board. // //Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. // //For...
ALGO
0.99982
6.522694
0669f196-cc92-4a86-a394-4753cd8a6fd3
Lamiiine/Competitive-Programming-1
Solutions/UVA/00882 The Mailbox Manufacturers Problem.cpp
#include<bits/stdc++.h> using namespace std; const int INF = 1e9; int memo[12][103][103][2]; /* * having k mailboxes left, what is the minimum number * of crackers you need in order for you to eliminate * all the options in the range [i, j] */ inline int dp(const int k, const int i, const int j, int need_to_check_u...
ALGO
0.999731
3.873488
c29c523c-01c8-4261-b0a6-2543cb214b92
raincross7/code-similarity
codes/train_code/problem478/problem478_62.cpp
#include <cstdio> #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <string> #include <cmath> #include <functional> #include <vector> #include <stack> #include <queue> #include <map> #define rep(i,n) for (int i=0;i<n;i++) using ll = long long; using namespace std; void solve(){ } int main (){...
ALGO
0.999947
3.105287
eee716aa-9622-4176-b334-c0bbb5658952
DewanggaMz/esp8266
stdlib_noniso.cpp
#include "stdlib_noniso.h" // ulltoa() is slower than std::to_char() (1.6 times) // but is smaller by ~800B/flash and ~250B/rodata // ulltoa fills str backwards and can return a pointer different from str char* ulltoa(unsigned long long val, char* str, int slen, unsigned int radix) { str += --slen; *str = 0; ...
TOOL
0.881021
6.195575
9b5b24fd-f632-4765-9023-92a7f1cf39d7
hikarimusic/SiOMICS
SiAGS/test.cpp
#include <iostream> #include <fstream> #include <cstdint> int main() { uint32_t a{1299936}; if (!(a & (uint32_t) 8192)) std::cout << (a % 8192); return 0; }
ALGO
0.991237
3.43941
f549642d-27ae-4266-ad0e-2cda26c94bfe
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3490_4.cpp
#include <bits/stdc++.h> using namespace std; int main() { map<int, int> m; map<int, bool> mb; int n, k, q; cin >> n >> k >> q; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 0; i < q; i++) { int t, id; cin >> t; cin >> id; if (t == 1) { m[v[id - 1]...
ALGO
0.999952
4.312782
ae5dc2af-0fb6-4d12-b363-5b1c08d39a1c
hantwofish/my_leetcode
datastruct_learn/leetcode/2526.cpp
#include"../STLCOMMON.h" #include"../COMMONALO.h" using namespace std; class DataStream { public: DataStream(int value, int k) { VALUE = value; K = k; } bool consec(int num) { vec.push_back(num); if (vec.size() < K) { return false; } //...
ALGO
0.999556
3.674593
a94c702a-433e-4268-97c6-7f5c11f53ad0
yunxiao3/ACM
1474.cpp
#include<iostream> using namespace std; void js(int a,int b) { if(a>=b)js(a/b,b); cout<<a%b; } int main() { int a,b; cin>>a>>b; if(a==100&&b==15)cout<<"6A"; else js(a,b); }
ALGO
0.995148
3.006812
fa54df6e-30eb-483d-972d-8527fae298bb
Spirit599/algorithm
leetcode/cpp/355.cpp
struct tweetInfo { int time; int tweetId; }; struct pqInfo { int time; int tweetId; int index; vector<tweetInfo>* vecPtr; }; bool cmp(const pqInfo& pq1, const pqInfo& pq2) { return pq1.time < pq2.time; } class Twitter { public: unordered_map<int, unordered_set<int>> followList; ...
ALGO
0.999743
5.675488
4a863ad9-28a7-43b5-b7f2-d5c7708f8c55
raincross7/code-similarity
codes/train_code/problem417/problem417_157.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); ++i) #define repr(i, n) for(int i = (n-1); i >= 0; --i) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; ...
ALGO
0.999865
4.05599
88ea6321-719b-4f26-9858-21d83d513562
Ajits1907/Udacity-1st-Open-street-Map
src/route_planner.cpp
#include "route_planner.h" #include <algorithm> RoutePlanner::RoutePlanner(RouteModel &model, float start_x, float start_y, float end_x, float end_y): m_Model(model) { // Convert inputs to percentage: start_x *= 0.01; start_y *= 0.01; end_x *= 0.01; end_y *= 0.01; // TODO 2: Use the m_Model.Fi...
ALGO
0.988191
4.699232
c0765324-dbf9-4a0e-9785-1048c1293be1
userkrunal/postmaker
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.99887
6.783439
d0a61939-6111-4691-9b44-a8760bd19bf4
Lesords/ACM
hdoj/刷题/Balloon Comes!.cpp
#include<iostream>//ac #include<cstdio> using namespace std; int main() { int t; cin>>t; while(t--) { char op; int a,b; cin>>op>>a>>b; if(op == '+') cout<<a+b<<endl; else if(op == '-') cout<<a-b<<endl; else if(op == '*') cout<<a*b<<endl; else { if(a%b==0) cout<<a/b<<endl;//С else printf("%.2f\n",...
ALGO
0.999761
3.298946
f9b2be31-d83a-4ad3-9892-3bd102b9b7ef
Romu-ua/Atcoder
ABC/232/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; set<int> num_set; for (int i = 0; i < s.length(); i++) { int s_num = s[i] - 'a'; int t_num = t[i] - 'a'; int distance = (s_num-t_num + 26) % 26; num_set.insert(distance); } i...
ALGO
0.999997
4.20186
b692507b-8dd5-468a-a46c-a710e33d1c63
LittleYang0531/CQ-CSP-S-2021
CQ-00028/bracket/bracket.cpp
#include<bits/stdc++.h> using namespace std; const long long inf=1e9+7; int n,k; string s; int main() { freopen("bracket.in","r",stdin); freopen("bracket.out","w",stdout); cin>>n>>k>>s; int len=s.length(); if(n==7) { cout<<5; return 0; } cout<<19; return 0; }
ALGO
0.999889
3.066384
afc9ea73-ca74-4feb-9039-102c6f79f337
Fol4/algo-semester1-2020-master
task_2/section_2/2_4/2_4.cpp
#include <iostream> #include <vector> struct Bkt { char type; int number; int value; }; void quickSort(std::vector<Bkt>& array, int low, int high) { int i = low; int j = high; int pivot = array[(i + j) / 2].value; while (i <= j) { while (array[i].value < pivot) i++; wh...
ALGO
0.999549
4.112954
ccc72bc5-5eb0-4067-8102-27b808a0004c
wmrmrx/icpc-notebook
latam/Data Structures/seg_iterative.cpp
// Iterative Segment Tree // 0-indexed // Supports non-commutative operations // // functions: // update(pos, val): set leaf node in pos to val // query(l, r): get sum of nodes in l and r // // Example: Range minimum queries segtree: // struct Node { // using T = int; // T mn; // Node(): mn(numeric_limits<T>::...
ALGO
0.999501
6.682554
5a70821b-d717-472f-9a2c-27abb2da3759
HuangCongQing/pcl-learning
09filters滤波/5从一个点云中提取索引/extract_indices.cpp
/* * @Description: 从一个点云中提取索引 https://www.cnblogs.com/li-yao7758258/p/6473304.html * @Author: HCQ * @Company(School): UCAS * @Email: <EMAIL> * @Date: 2020-10-20 15:00:12 * @LastEditTime: 2020-10-20 15:19:31 * @FilePath: /pcl-learning/09filters滤波/5从一个点云中提取索引/extract_indices.cpp */ #include <iostream> #inc...
DATA
0.880009
3.12377
9e0fe89d-12a4-42d4-8c0c-65dae0deb44a
bjrjk/LeetCode
1-50/7.cpp
class Solution { public: int reverse(int x) { bool flag=false; long long y=0,xx=x; if(x<0){ flag=true; xx=-xx; } while(xx){ y*=10; y+=xx%10; xx/=10; } if(flag)y=-y; if(y<(1<<31)||y>~(1<<31))re...
ALGO
0.999974
5.880614
51b9e8c7-736b-4d93-96b3-77e4a0708e0f
RNGbob/EGP-410-AI
GameAI/pathfinding/Pathfinding/Game/GridPathfinder.cpp
#include <allegro5/allegro.h> #include <allegro5\allegro_primitives.h> #include "GridPathfinder.h" #include "GridGraph.h" #include "GridVisualizer.h" #include "Path.h" #include "Game.h" #include "GameApp.h" #include "Grid.h" #include "GraphicsBuffer.h" GridPathfinder::GridPathfinder( GridGraph* pGraph ) :Pathfinder(pG...
ALGO
0.970089
3.596285
5e91097e-e009-4cc1-a2d6-610814717eac
Ujjwal4CULS/ABCD_Hydro
src/ABCD_V2.cpp
#include<Rcpp.h> using namespace Rcpp; #include <iostream> #include <string> #include <math.h> using namespace std; //' Calculates the monthly water balance using ABCD hydrological model. //' @param para_a describes the amount of runoff and recharge in case the soils are under-saturated. This is dimensionless. This par...
ALGO
0.996926
5.551125
f34a76ce-0534-4698-883f-84a1a96b3b43
anveshi/CodeLib
MOs/powerful_array.cpp
// Anve$hi $hukla // http://codeforces.com/contest/86/problem/D #include <bits/stdc++.h> using namespace std; // Mo's Algorithm const int Maxn = 1000005; inline void fastIO(){ ios_base::sync_with_stdio(false); cin.tie(NULL); } typedef pair <int,int> pii; typedef pair <pii, int> ppii; int BLOCK_SIZE, A[Maxn], cn...
ALGO
0.999793
4.074194
9c147b74-8635-416d-a27d-7d2217cf1eaf
ishandutta2007/codeforces
emiso/normal/1477/C.cpp
#include <bits/stdc++.h> #define MN 1001000 using namespace std; typedef long long ll; ll n, x[MN], y[MN], ans[MN], used[MN]; ll d(int i, int j) { return (x[j] - x[i])*(x[j] - x[i]) + (y[j] - y[i])*(y[j] - y[i]); } int main() { scanf("%lld", &n); for(int i = 0; i < n; i++) { scanf("%lld %lld",...
ALGO
0.999991
3.764307
15e6655d-5d4a-4a68-9779-8760ecdcc07c
Dipesh-Budhiraja/practice
Recursion/tower_of_hanoi.cpp
#include<iostream> using namespace std; void toh(int n, char source, char helper, char dest) { if(n==0) { return; } if(n == 1) { cout << "Move disc " << n << " from " << source << " -> " << dest << endl; return; } // if (n == 2) { // cout << "Move disc " << n-1 << "...
ALGO
0.999974
5.261048
b4d39df2-58f0-47da-859b-32bdecfbd9d0
cececx/leetcode
011_containerWithMostWater.cpp
// Sourse : https://leetcode.com/problems/container-with-most-water/ // Author : Cecilia Chen // Date : 2015-10-28 /*********************************************************************** * * Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). * n vertical lines are...
ALGO
0.999885
6.230225
c676aae6-b125-4016-ac90-881adb56c3ea
MC3297/usaco-solutions-silver
conveyor.cpp
#pragma region #include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll using pii = pair<int,int>; #define vt vector #ifndef LOCAL #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define debug(...) #endif #define fi first #define se second #define pb pu...
ALGO
0.999989
4.860036
f48b8fdf-d220-4b10-b986-a7aaf9129098
GauravKr57/Complete-DSA
09_Strings/02_palindrome_check.cpp
//EFFICIENT bool isPal(string s){ int begin=0, end=s.length()-1; while(begin<end){ if(s[begin] != s[end]){ return false; } begin++; end--; } return true; } bool checkPalindrome(string s){ for(int i=0;i<s.length();i++){ if(s[i] != s[s.leng...
ALGO
0.999614
5.343664
cff29b35-cb28-4b97-8fec-da48f2b70d2a
JeromeTH/CSES
Introductory Problems/TwoSets.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int SIZE = 1e6 + 1; #define int long long bool used[SIZE]; signed main(){ int n; cin >> n; int t = n * (n + 1)/4; if (n * (n + 1) % 4 != 0){ cout << "NO" << endl; return 0; } int cnt= 0; fo...
ALGO
0.999771
3.347039
f356166a-b91d-4393-b2dd-3f4162be5c03
raincross7/code-similarity
codes/train_code/problem444/problem444_415.cpp
// #include <vector> #include <set> #include <map> #include <array> #include <iostream> #include <cstdio> #include <cstdint> #include <algorithm> #include <numeric> #include <bitset> // using ll = long long; using namespace std; #define rep(i,n) for(ll i=0;i<(n);++i) inline void yes(bool cond) { cond ? puts("Yes") : pu...
ALGO
0.999876
3.931059
4c885e7f-9e6b-4935-b5ab-e971118ce3f2
fabrizioromanelli/ORBSLAM2
Thirdparty/fbow/utils/fbow_create_voc_step0.cpp
//First step of creating a vocabulary is extracting features from a set of images. We save them to a file for next step #include <iostream> #include <fstream> #include <vector> #include "fbow.h" // OpenCV #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/features2d/features2d.h...
DATA
0.872574
4.568174
be3cee8e-2834-4476-9028-b9df2f758b2b
loggerJK/BOJ
#207.cpp
#include <queue> #include <vector> #include <iostream> #include <algorithm> #include <queue> using namespace std; class Solution { public: queue<int> q; bool canFinish(int numCourses, vector<vector<int>> &prerequisites) { vector<vector<int>> edge; int indegrees[2001]; bool visit[200...
ALGO
0.999682
5.324779
de182147-afe2-4d39-a2a0-cbae4b90cdd1
bindaldhara/DSA-Practice
1696-jump-game-vi/1696-jump-game-vi.cpp
class Solution { public: int maxResult(vector<int>& nums, int k) { int n=nums.size(); priority_queue<pair<int,int>>pq; pq.push({nums[0],0}); int large = nums[0]; for(int i=1;i<n;i++){ large = 1; while(!pq.empty()){ while(pq...
ALGO
0.999955
5.451255
9f4bf1e2-7989-4c72-8a8d-47d70211f74d
spgvieira/CSP
Assignment1/indep_core_aff_1.cpp
//this core affinity script pins every thread to the corresponding core nr //comment out print statments when running the experiment! // Code made by Su Mei Gwen Ho (<EMAIL>), Sara Vieira (<EMAIL>) & Sophus Kaae Merved (<EMAIL>) #include <iostream> #include <cmath> #include <thread> #include <vector> #include "tuple...
ALGO
0.958528
4.013693
f8054b6f-7599-402c-8ca4-0c0d3b7dc707
ishandutta2007/codeforces
piyushsethia1999/normal/1075/D.cpp
#include <bits/stdc++.h> #define pb emplace_back #define mp make_pair using namespace std; int askB(int v) { cout << "B " << v << endl; int y; cin >> y; return y; } int askA(int v) { cout << "A " << v << endl; int y; cin >> y; return y; } int dfsnearest(std::vector<std::vector<int> >...
ALGO
0.999861
3.899878
02472b90-7107-48ef-9246-bd45da418094
rajanraj2/DSA
Step 3/Hard/SubarrayWithMaxProduct.cpp
#include <bits/stdc++.h> using namespace std; int subarrayWithMaxProduct(vector<int> &arr){ int result = INT_MIN; int pre = 1, suff = 1; int n = arr.size(); for (int i = 0; i < n; i++) { if (pre == 0) pre = 1; if (suff == 0) suff = 1; pre *= arr[i]; suff *= arr[n - i - 1]; result = max(result, max(pre, s...
ALGO
0.999991
5.342985
c4307f6f-d3e3-4eb9-9029-f19c90fbc590
cjsoft/inasdfz
d0710/attachments/source/首师大附中-LazyJazz/skyfall.cpp
#include<iostream> #include<cstdio> #include<cmath> #define INF 2147483647 #define LL long long const int MOD=(1<<30); using namespace std; inline int read() { int x=0,t=1,c; while(!isdigit(c=getchar()))if(c=='-')t=-1; while(isdigit(c))x=x*10+c-'0',c=getchar(); return x*t; } int d(int x) { int sqr=sqrt(x+0.5),ans=...
ALGO
0.99995
4.171787
e845ce3d-ce1b-4775-9453-c7e0f5459af5
sarah21392773/Mycode
zerojudge/TOI/新手同好會/k514. P2.解藥 (Medicine).cpp
#include<bits/stdc++.h> using namespace std; int main(){ int TheRate[4],N,need[4]; //TheRate是製藥比例,分成N包,need製藥所需包數 while(cin >> TheRate[0] >> TheRate[1]>> TheRate[2] >> TheRate[3] >> N){ int ingredient[4][N]; //ingredient為整個材料資訊 bool maked=false; //maked為是否製藥成功 for(...
ALGO
0.999597
3.033001
2e5081b2-f901-4850-ba10-0167d512fb98
xobe19/HiteshIsBack
Number_Spiral.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define lll __int128_t #define F first #define S second #define pb push_back #define si set <int> #define msi multiset<int> #define vi vector <int> #define...
ALGO
0.999699
4.358067
08d10437-c4d0-4d81-9d93-72fe7264ea51
atharvat733/hpc
HPC/4_Merge_Sort.cpp
#include <iostream> #include <omp.h> #include <vector> using namespace std; // Merge two sorted subarrays void merge(vector<int> &arr, int l, int m, int r) { int n1 = m - l + 1; int n2 = r - m; vector<int> L(n1), R(n2); for (int i = 0; i < n1; i++) L[i] = arr[l + i]; for (int j = 0; j < n2...
ALGO
0.999961
6.261024
c10bc2f1-f9d0-4645-8e5e-81fc8dfc69b2
Berkays/ReflowPlate
Firmware/lib/QuickPID/QuickPID.cpp
#include "QuickPID.h" #include "constrain.h" QuickPID::QuickPID() {} /* Constructor ******************************************************************** The parameters specified here are those for for which we can't set up reliable defaults, so we need to have the user set them. *******************************...
TOOL
0.906169
6.427454
8deac3d4-31b8-4375-a2c5-3a5d277a8938
a6cenna/osninfor
codefest/round1/j.cpp
#include <bits/stdc++.h> using namespace std; #define suffering_leaves_suffering_leaves ios::sync_with_stdio(false); cin.tie(nullptr); #define ll long long #define pll pair<ll, ll> #define pii pair<int, int> #define fs first #define sc second #define pb push_back void solve(int num) { cout << "Case " << num << ":...
ALGO
0.99958
4.15184
b531fa49-ff57-4ad4-a3fa-d8378d65e197
Rohan3011/DSA
BitManipulation/Determining_numbers.cpp
#include <stdio.h> #include <map> int main() { int n , x ; scanf("%d" , &n); std::map<int, int> mp ; for (int i = 0 ; i < n ; i++) { scanf("%d" , &x); mp[x]++ ; } for (auto[x , y] : mp) { if (y == 1) printf("%d ", x); } puts(""); }
ALGO
0.999966
3.130363
8ab902d0-ed5d-43b6-afa4-0f807745012f
Sherifelgendy2027/Codsoft
student graing system.cpp
#include <iostream> #include <string> using namespace std; int main() { string highst , lowst , temps; double snums , highnum = -1 , lownum = 100000 , tempnum , avr = 0 ,sum = 0; cout << "Enter the number of the students " << endl ; cin >> snums ; for(int i = 1 ; i <= snums ;i++) { cout ...
TOOL
0.978928
3.721823
960ada4f-7cb3-4889-a637-9a43b9fc69eb
alex-narrator/xp-dev_xray
3rd party/MagicSoftware/FreeMagic/Source/Containment2D/MgcCont2DCircleScribe.cpp
#include "MgcCont2DCircleScribe.h" #include "MgcLinearSystem.h" using namespace Mgc; //---------------------------------------------------------------------------- bool Mgc::Circumscribe (const Vector2& rkV0, const Vector2& rkV1, const Vector2& rkV2, Circle2& rkCircle) { Vector2 kE10 = rkV1 - rkV0; Vector2...
ALGO
0.998429
5.354856
2179582a-b1f1-46ae-973d-73a35726fffd
Vinit-28/POTD-Leetcode
Year=2024/Month=01/Date=05/Solution.cpp
// Problem Link : https://leetcode.com/problems/longest-increasing-subsequence/description/ // Solution // class Solution { public: int lengthOfLIS(vector<int>& nums) { int n = nums.size(), ans = 0; int dp[n]; for(int i=n-1;i>=0;i--){ dp[i] = 1; for(int j=n-1;j>i;j--...
ALGO
0.999996
6.330573