uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
febe4069-4765-419c-a43c-cbee96f01563
EmonSikder121/ZHSUST
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.998859
6.785645
a9aa35e7-8c57-4101-8af5-746611c906e2
AsHuToShSiNgH02/DSA-QUES
Graph/GraphImplementation/AdjacencyMap.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; vector<unordered_map<int,int>>graph; int v; void add_edge(int src, int dest,int wt, bool bi_drct = true){ graph[src][dest] = wt; if(bi_drct){ graph[dest][src] = wt; } } void display(){ for(int i = 0;i<graph.si...
ALGO
0.999684
4.981066
d7cdcb6f-d88d-4561-bc47-ed5877855022
Ajay-Chaudhari01001/DSA
Recursion/Say_word.cpp
#include<iostream> using namespace std; void sayHello(string *arr, int n){ // base case... if(n == 0) return; // processing ... int digit = n%10; n = n/10; // recursive call... sayHello(arr, n); cout<<arr[digit]<<" "; } int main(){ string a[]={"Zero", "One","Two","Three","...
ALGO
0.999779
4.731497
52aa1bff-ff31-40d6-aedd-865400019043
dhkim6956/Problem_Solving
Mincoding/starter_08·5_06.cpp
#include <iostream> using namespace std; int main() { char ch; int num; cin >> ch >> num; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { cout << ch; } cout << endl; } return 0; }
ALGO
0.999283
3.166368
c22e1ae4-42ca-44ba-a6c5-7b2605355936
SuihanGu/c-c-
work/youchongqpl.cpp
#include <iostream> using namespace std; char strToChar[100]; int total; bool duplicate(char charList[],int k,int i)//第i个元素是否在前面的元素[k...i-1]中出现过 { if(i>k){ for(int j=k;j<i;j++){ if(charList[j] == charList[i]) return false; } } return true; } void swapList(char c...
ALGO
0.99999
4.303199
887855b9-dca6-4a38-9b01-4928d0a79892
MakinoRuki/Codeforces
ER96/1430C.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <deque> #include <cmath> #include <queue> #define eps 1e-7 #define M 20005 #define N 200005 #define SZ 200000002 using namespace std; t...
ALGO
0.999722
3.796011
bd5c2d5b-81f1-4179-89cc-0ce0fef225da
yzzupgo/MFTCG
Data/abc123_b/rip_nk/ac/4862125.cpp
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { int times[5] = {0,0,0,0,0}; for(int i = 0; i < 5; i++){ cin >> times[i]; } int mintime = 124; int pastTime = 0; for(int i = 0; i < 5; i++){ if(mintime > times[i] % 10 && times[i] % 10 != ...
ALGO
0.999143
3.633532
7708f3ef-89ea-4b5a-af5a-70598ae6d5b0
AryashYadav0/Practice
0009-palindrome-number/0009-palindrome-number.cpp
class Solution { public: bool isPalindrome(int x) { int r = 0; if (x < 0 || (x % 10 == 0 && x)) return false; while (x > r){ r = r * 10 + x % 10; x /= 10; } return x == r || x == r / 10; // if(x<0 || (x%10 ==0 && x)) return false; //...
ALGO
0.99998
5.87448
57e29692-fb7d-4335-b4ab-6ee0653c3c06
arm/arm-toolchain
libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
// <vector> // template <class InputIter> vector(InputIter first, InputIter last, // const allocator_type& a); #include <vector> #include <cassert> #include <cstddef> #include "test_macros.h" #include "test_iterators.h" #include "test_allocator.h" #include "min_allocator.h" #include...
TEST
0.922231
7.254444
6a3a44a7-f6c2-4e76-87c4-480d82e4f73e
cssl-unist/trust-sec23
rust/src/llvm-project/clang/test/SemaCXX/constexpr-ackermann.cpp
// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s constexpr unsigned long long A(unsigned long long m, unsigned long long n) { return m == 0 ? n + 1 : n == 0 ? A(m-1, 1) : A(m - 1, A(m, n - 1)); } using X = int[A(3,4)]; using X = int[125];
ALGO
0.972732
3.247344
8d683177-96c4-48e6-85f0-44d05d867471
xfurry/ScriptDev2_2010
scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp
/* ScriptData SDName: Ruins of Ahn'Qiraj SD%Complete: 40 SDComment: SDCategory: Ruins of Ahn'Qiraj EndScriptData */ /* ContentData mob_anubisath_guardian EndContentData */ #include "precompiled.h" /*###### ## mob_anubisath_guardian ######*/ enum { SPELL_METEOR = 24340, SPELL_PLAGUE ...
TOOL
0.951387
6.394237
24738473-586a-4fa4-b850-2c22d28fcb34
ngiokweng/Data_Struct_And_Algorithm
排序/排序/選擇排序.cpp
#include <iostream> using namespace std; #define MAXSIZE 20 typedef int KeyType; typedef char InfoType; struct RedType { //Record Type KeyType key; //r InfoType otherinfo; //Lƾڶ }; struct SqList { // wqǪc RedType r[MAXSIZE + 1]; // sxǪVq //r[0]@@LνwR int length; }; //ܱƧ1GܱƧ void SelectSort(...
ALGO
0.999992
4.121168
ae969400-0a5b-47ef-821d-d10467a1efac
ykwongaq/COMP4411_Project1
ImpSkelS20/ScatteredTriangleBrush.cpp
#include "ScatteredTriangleBrush.h" #include "ImpressionistDoc.h" extern int irand(int); extern float frand(); ScatteredTriangleBrush::ScatteredTriangleBrush(ImpressionistDoc *pDoc, char *name) : TriangleBrush(pDoc, name) {} void ScatteredTriangleBrush::BrushMove(const Point source, const Point target) { // Get t...
ALGO
0.980297
5.09475
dd49c81e-7ce4-4b5e-84b6-280c6b01b0e4
akhilsharmaa/Competitive-Programming
CSES Problemset/Dynamic Programming/Coin_Combinations_I.cpp
/* Author - @akhilsharmaa C++ code by Akhilesh Sharma */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define vt vector #define pb push back #define no cout<<"NO"<<endl; #define yes cout<<"YES"<<endl; #define MOD 1000000007; #d...
ALGO
0.99997
4.395222
c0e41746-9d4c-48be-83e0-1033794a1f2c
TeogopK/Data_Structures_and_Algorithms_FMI
Week_01/Practicum/Jewels and Stones.cpp
// https://leetcode.com/problems/jewels-and-stones/description/?fbclid=IwZXh0bgNhZW0CMTEAAR3SN9AhD4-rjbWUJFrszohCxj-tnBVQYb3ZHs7vAIalUpurrw949b1NIgM_aem_TjgNybsvJMudsZwmdB7VFw // O(n^2) solution /* Logic: * For each character in the jewels string, find the number of times the character appears in the stones string. ...
ALGO
0.997745
6.15576
84e52efa-b7d2-4a68-a9b1-07c39ddb215e
Amit3200/codes_algo
Interview Preparations/stack_check_parser_infix.cpp
//author : 'Amit Singh Sansoya @amit3200' //it was all meant to happen as i was all talk! #include<bits/stdc++.h> using namespace std; int numwork(string s){ int n=s.size(); int d=0; n--; //cout<<n<<" "<<s<<" "<<s[0]<<"\n"; for(int i=0;i<s.size();i++){ d+=(s[i]-'0')*(pow(10,n)); n--; } //cout<<"\n"; return ...
ALGO
0.999906
3.648119
1e0baaf5-2a52-489e-824f-dd5ea6eedaed
p0e0o0p0l0e0/Games101-Homework-Win
eigen3x/doc/examples/DenseBase_middleRows_int.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(2..3,:) =\n" << A.middleRows(2,2) << endl; return 0; }
ALGO
0.88895
3.342099
0bf21ff9-1a65-437f-a1e8-4aa2bc82a799
JackJu-HIT/Selfdriving-MPC
polyfit/src/Eigen-3.3/doc/examples/Tutorial_simple_example_fixed_size.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; int main() { Matrix3f m3; m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9; Matrix4f m4 = Matrix4f::Identity(); Vector4i v4(1, 2, 3, 4); std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl; }
ALGO
0.942934
3.129515
a9389ba7-6f83-4a02-aaca-d7121a6621c6
chechna9/Lablab-2.0
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.9988
6.76073
c8f568aa-d191-4667-a942-a433d210a928
louisheery/msc-cs
cpp/soundex/soundex.cpp
#include "soundex.h" char encode_letter(const char surnameLetter) { switch (surnameLetter) { case 'b': case 'f': case 'p': case 'v': return '1'; break; case 'c': case 'g': case 'j': case 'k': case 'q': case 's': case 'x': case 'z': retu...
ALGO
0.994383
3.665025
e9707c70-73eb-4ec8-89b1-d9409fcdb3d6
samyak2405/MY-LeetCoding
Inorder Traversal (Iterative) - GFG/inorder-traversal-iterative.cpp
// { Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = va...
ALGO
0.999886
6.887633
1fc9b035-c366-43fe-936c-1c7f5873df6c
ingaa9/RepoOpencv
modules/tracking/samples/goturnTracker.cpp
//Demo of GOTURN tracker //In order to use GOTURN tracker, GOTURN architecture goturn.prototxt and goturn.caffemodel are required to exist in root folder. //There are 2 ways to get caffemodel: //1 - Train you own GOTURN model using <https://github.com/Auron-X/GOTURN_Training_Toolkit> //2 - Download pretrained caffemode...
ALGO
0.901748
5.683804
a4608150-2edf-4b8c-8cbf-3ad8fd9bed43
NINAD-17/Data_Structures_and_Algorithms
[15] Queues/lib/print.cpp
#include <iostream> #include <queue> using namespace std; void printQueue(queue<int> q) { cout << "\nqueue: (front) "; int size = q.size(); for(int i = 0; i < size; i++) {// i < q.qrear because the rear is always pointing towards last element's next place cout << q.front() << " -> "; q...
ALGO
0.961587
4.411519
f490dbae-aa46-449d-b99e-ce29007226de
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0404/personal_submission/cf386d_tsreaper.cpp
#include <bits/stdc++.h> #define MAXN 70 #define INF ((int) 1e9) using namespace std; int n, X, Y, Z, ans; char MAP[MAXN + 5][MAXN + 5]; int dis[MAXN + 5][MAXN + 5][MAXN + 5]; array<int, 3> from[MAXN + 5][MAXN + 5][MAXN + 5]; void bfs() { for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; ...
ALGO
0.999962
3.932063
98f5f20e-a272-4b16-848d-7741582969c4
MuhammadAmitHasan/Algorithm
M17.5_Practiceday/Floyd_1.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e3 + 7; int d[N][N]; int n, m; const int INF = 1e9 + 7; void dist_initialise() { for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (i != j) d[i][j] = INF; } } } void print_matri...
ALGO
0.999778
3.708685
b57bfe26-6fd1-41e4-9812-08f5ad9200ff
MarkJulian19/cpp_prack_7_sem
2/main_solo.cpp
#include <iostream> #include <vector> #include <algorithm> #include <random> #include <cmath> #include <limits> #include <chrono> #include <memory> #include <fstream> #include <sstream> // Абстрактный класс для представления решения class Solution { public: // Абстрактный метод для получения стоимости текущего реш...
ALGO
0.999978
6.0297
4b6971be-dd72-44a3-aea0-70f9cd46f466
mohitjaisal/LeetCode-Problem-Solutions
MyLeetcodeSolutionsInCPP/0136.single-number.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int ans = 0; for (const int num : nums) ans ^= num; return ans; } };
ALGO
0.999653
6.031394
d34b3461-0e41-49d3-b04c-1eff05ef87a5
ikthap/firmware-mod-kit
src/squashfs-3.0-lzma-damn-small-variant/lzma/C/Common/CRC.cpp
// Common/CRC.cpp #include "StdAfx.h" #include "CRC.h" static const UInt32 kCRCPoly = 0xEDB88320; UInt32 CCRC::Table[256]; void CCRC::InitTable() { for (UInt32 i = 0; i < 256; i++) { UInt32 r = i; for (int j = 0; j < 8; j++) if (r & 1) r = (r >> 1) ^ kCRCPoly; else r >...
ALGO
0.927277
6.396952
2cc980e1-bd5b-4718-b98a-c925179f7864
Camigator/4883-Programming_Techniques
P01/Relational Operators/main.cpp
#include <iostream> using namespace std; int main() { int start, f, s; cin >> start; for( int i = 0; i < start ; i++) { cin >> f >> s; if (f > s) { cout << ">" << endl; } else if ( f < s) { cout << "<" << endl; } else{ cout << "=" ; } } }
ALGO
0.999841
3.277062
7fd7a038-dccf-4e97-a0d8-0ee6899b2066
Welsoon/Problem_solving
cpp_ex_2/main.cpp
//本关任务:编写一个成绩转换程序,对于输入的成绩 n,转换规则如下:A档为 90-100,B 档是 80-89,C 档是 70-79,D 档是 60-69,E 档是 0-59。 #include <iostream> using namespace std; int main() { int x; cin>>x; if(x>=90) cout<<"A"; else if(x>=80&&x<90) cout<<"B"; else if(x>=70&&x<80) cout<<"C"; return 0; }
ALGO
0.997512
3.694005
324982d6-2a83-478e-bdb7-ed6862183ec9
mouparnadebnath/CPlusPlus-DSA
loops/2.cpp
// 3. Print odd numbers from 1 to 100 #include<iostream> using namespace std; int main(){ for (int i = 1; i <= 100; i++) { if (i%2!=0) { cout<<i<<","; } } return 0; }
ALGO
0.987035
3.679619
9f128cad-4261-4c85-9fac-2a3d2d6d78de
nishant-sethi/HackerRank
Data Structures/Binary Search Tree Insertion.cpp
/* Node is defined as typedef struct node { int data; node * left; node * right; }node; */ node* newNode(int value){ node *ptr; ptr=(node*)malloc(sizeof(node)); ptr->data=value; ptr->left=ptr->right=NULL; return ptr; } node * insert(node * root, int value) { if(root==NULL || root->d...
ALGO
0.999855
4.389674
56d09d01-8b6f-4942-90f0-a009231d464d
inikhil/Project-Euler
q17a.cpp
int length_of_number(int n) { static const int smalls[20] = {0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8}; static const int tens[10] = {0,0,6,6,5,5,5,7,6,6}; if (n == 1000) return 11; int count = 0; int low = n % 100; count = (low < 20) ? smalls[low] : tens[low / 10] + smalls[low % 10]; if (n >=...
ALGO
0.997751
6.206995
0d034941-8ce4-40d0-93e6-9d94570c23b6
abuhamid/bd_geonode
geos-3.3.8/src/algorithm/CentroidLine.cpp
#include <geos/algorithm/CentroidLine.h> #include <geos/geom/Coordinate.h> #include <geos/geom/CoordinateSequence.h> #include <geos/geom/Geometry.h> #include <geos/geom/GeometryCollection.h> #include <geos/geom/LineString.h> #include <typeinfo> using namespace geos::geom; namespace geos { namespace algorithm { // ge...
TOOL
0.97688
6.516648
ea451ac4-9e79-4fa0-a574-efe936962226
adi271001/POTD
Day-01_Arrays/merge_intervals.cpp
/* Problem Link: https://leetcode.com/problems/merge-intervals/ */ class Solution { public: vector<vector<int>> merge(vector<vector<int>>& intervals) { vector<vector<int>> results; // sort on the basis of the start value sort(intervals.begin(), intervals.end()); for(aut...
ALGO
0.999999
6.515824
f9fbe286-c8e5-43cd-8536-105a9b9502a5
192110481/OOPS-DAY-3
cube of numbers.cpp
#include<iostream> #include<conio.h> using namespace std; class name { private: int i,n; public: name() { i=1; n=0; } name(int p, int q) { i=p; n=q; } void display() { cout<<"enter the number :"<<endl; cin>>n; for(i...
TOOL
0.97663
3.246074
e877ede4-25d6-441e-8683-cef9881cbae8
suixibing/MyWay
OJ/LeetCode/Int/reverseBits.cpp
#include "Leetcode.h" /* * * 190. ߵλ * * ִʱ: 4 ms, C++ ύл88.77%û * ڴ: 8.1 MB, C++ ύл15.06%û * */ uint32_t reverseBits(uint32_t n) { uint32_t res = 0; for (int i = 0; i < 32; ++i) { if ((1 << i) & n) res |= (1 << (31 - i)); } return res; }
ALGO
0.998712
4.816447
ab4eab4d-5f92-4608-806d-1fef6f8d10ac
SI-Abid/Hello-world
Codeforces/1788B.cpp
#include <bits/stdc++.h> using namespace std; #define nl "\n" #define ll long long void solve() { int n; cin >> n; string a, b; a = b = ""; int flag = 0; while (n) { int x = n % 10; if (x % 2 == 0) { a += '0' + (x / 2); b += '0' + (x / 2); ...
ALGO
0.999855
4.454896
091037ab-5ea1-4a4e-aab4-7c26c3b7c458
rakshit-bhardwaj/DSAsheet
46_textjustification.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<string> fullJustify(vector<string>& words, int maxWidth) { vector<string> ans; int spaces,extra; int i=0,j; while(i<words.size()){ extra = 0; vector<string> cur; cur.push...
ALGO
0.999811
5.595173
618fdc31-3cb0-44e1-acaf-bd71f2b9e95c
Aman-droid/CP_Essentials
CODES/C_Phone_Numbers.cpp
#include<bits/stdc++.h> #define ll long long #define endl '\n' #define rep(i,a,b) for(int i=a;i<=b;i++) #define pll pair<ll,ll> #define pii pair<int,int> #define vpll vector<pll> #define SZ(x) ((int)x.size()) #define FIO ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define watch(x)cout<<(#x)<<" is "<<(x...
ALGO
0.999868
4.107611
925c4b3a-dec0-4e69-b612-9e5bebef8bd4
Rajvansh2003/Leetcode-solutions
2579-count-total-number-of-colored-cells/2579-count-total-number-of-colored-cells.cpp
class Solution { public: long long coloredCells(int n) { return 1 + 4LL * n * (n - 1) / 2; } };
ALGO
0.999947
4.354633
9437d2de-fde3-408b-b7af-9fe3a3e0ff5c
gipb/baekjoon_algorithm
프로그래머스/lv2/1835. 단체사진 찍기/단체사진 찍기.cpp
#include <string> #include <vector> using namespace std; // 전역 변수를 정의할 경우 함수 내에 초기화 코드를 꼭 작성해주세요. int solution(int n, vector<string> data) { int answer = 0; return answer; }
ALGO
0.986673
3.052025
d9140b8e-a82a-43ae-a0bc-008a8abe7ab3
ishandutta2007/codeforces
igori/normal/522/A.cpp
//Updated 29.09.18 #include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <set> #include <cstring> #include <cmath> #include <stdio.h> #include <time.h> #include <iomanip> #include <bitset> using namespace std; #define sqr(z) (z) * (z) #define ch_NO(x) cout << "NO\n"; x = 1...
ALGO
0.999826
3.839909
41dc8f9f-c752-4c22-a3fa-0926a41f7e5c
josuerom/Competitive-Programming
Training/UVa/CP3/Graph/All Pairs Shortest Paths/10171 - Meeting Prof Miguel.cpp
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl #define fori(i,b,e) for (int i = (b); i < (e); ++i) #define mod(x,m) ((((x) % (m)) + (m)) % (m)) #define sq(x) (x) * (x) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef ve...
ALGO
0.999863
3.990886
c579c4c5-9e00-4b31-994a-d583ca260102
rh29152/IBA-CS-Cources
Smester 1/Intro to Programming (ITP)/Labs Taks & Solution/Lab-9/Task1.cpp
#include <iostream> #include <string> using namespace std; int str_to_int(string s) { int result = 0; int sign = 1; int i = 0; if (s[i] == '-') { sign = -1; i++; } else if (s[i] == '+') { i++; } while (i < s.length()) { if (s[i] >= '0' && s[i] <= '9') { ...
ALGO
0.996911
4.654542
0e702281-c5c8-408e-80ff-acacd8e1e973
yungalexxxey/oop_labs
lab4/rhombus.cpp
#include "rhombus.h" #include <math.h> Rhombus::Rhombus():x1(0),y1(0),x2(1),y2(1),x3(0),y3(0),x4(0),y4(0){ } Rhombus::Rhombus(int x1,int x2,int x3,int x4,int y1,int y2,int y3,int y4){ this->x1=x1; this->x2=x2; this->x3=x3; this->x4=x4; this->y1=y1; this->y2=y2; this->y3=y3; this->y4=y4;...
ALGO
0.965868
4.308539
7179cab9-3722-4531-856e-dcd649f32a9d
AlanBinu007/CodeForces-Solutions
63A - Sinking Ship.cpp
//4172301 Jul 27, 2013 5:23:55 AM fuwutu 63A - Sinking Ship GNU C++0x Accepted 30 ms 100 KB #include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; string name, status; vector<string> rats, womenandchildren, men, captain; while (n--) { ...
ALGO
0.995738
3.335094
1c9eb31b-1751-405d-a6d1-d05029e1601f
IIHS-HLDI/visibility_study_v2
dependencies/opencv/modules/dnn/src/layers/flow_warp_layer.cpp
#include "../precomp.hpp" #include "layers_common.hpp" namespace cv { namespace dnn { class FlowWarpLayerImpl CV_FINAL : public FlowWarpLayer { public: FlowWarpLayerImpl(const LayerParams& params) { setParamsFrom(params); String fill_string = toLowerCase(params.get<String>("FillParameter", "ZE...
ALGO
0.92358
6.853844
a2ccb416-7812-489e-847b-cd18082b255f
ymatevva/DSA-FMI
Seminars/Seminar_1/Examples_sem_1/Example_5.cpp
#include<iostream> //Example 5: int smth(int *arr, size_t sizeArr){ unsigned res = 0; for (int i = 1; i <= sizeArr; i+=2) { for (int j = 1; j <= i; ++j) { res++; } } return res; }
ALGO
0.992586
4.055105
6636f25c-293d-40de-bfe4-0b83415b825b
Rachel-3/2024-Algorithm-Study
seongwon/Programmers/Level_1/Lv1_로또의_최고_순위와_최저_순위.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<int> solution(vector<int> lottos, vector<int> win_nums) { vector<int> answer; vector<int> rank = {6,6,5,4,3,2,1}; int max = 0, min = 0; //lottos 랑 win_nums 같은 번호 만큼 ++ + win_nums의 '0'개수 만큼 ++ vector<int> inter; ...
ALGO
0.999914
5.027821
34052171-423c-480d-9894-2e5ea0013da5
Swaraj-Patel/leetcode-codes
May/firstUniqueCharacter.cpp
class Solution { public: int firstUniqChar(string s) { int h[26]; memset(h,-1,sizeof(h)); int index=0; if(s.length()==0) return -1; for(auto i:s){ if(h[i-'a']==-1) h[i-'a']=index; else h[i-'a']=INT_MIN; index++; ...
ALGO
0.999757
5.454837
ec3bd1ba-7187-4bb9-aabf-f258d2c08b25
MohamedAtyyia/RickandMotry
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.9988
6.76073
97a8b339-6ad6-4d53-8d16-c375851a13db
TrellixVulnTeam/ABLER_FG9M
intern/cycles/util/util_transform.cpp
#include "util/util_transform.h" #include "util/util_projection.h" #include "util/util_boundbox.h" #include "util/util_math.h" CCL_NAMESPACE_BEGIN /* Transform Inverse */ static bool transform_matrix4_gj_inverse(float R[][4], float M[][4]) { /* forward elimination */ for (int i = 0; i < 4; i++) { int pivot ...
ALGO
0.996953
6.698006
672eb99a-0fcb-4b7c-b38f-ce72a177e297
edoc0322/ACMProblemSolving
UVa Online Judge/uva10020/main.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; int M; int cover[5010]; struct node { int L,R; }; node arr[100002]; bool cmp(node n1,node n2) { if(n1.L < n2.L) { return true; } return false; } node ansArr[100002]; int main() { int test; cin >> test; ...
ALGO
0.999817
3.602065
dfb021f1-37b7-4e91-82d7-4a4babdf7cac
VisionistInc/advent-of-code-2017
swong/01/part1.cpp
#include <iostream> #include <fstream> using namespace std; int main() { ifstream inputFile("./input.txt"); char first; char curr; char next; int sum; while (inputFile.get(next)) { // need to save the first character for the wrap around if (!first) first = next; if (curr == next) sum += curr ...
ALGO
0.999588
4.656082
0bed8048-f8a7-441f-bd67-171255c57b17
hucancode/cp
leetcode/problems/snakes_and_ladders/solution.cpp
class Solution { public: pair<int,int> idToXY(int u, int n) { int ux, uy; uy = u/n; ux = u%n; if(uy%2==1) { ux = n-1-ux; } uy = n - 1 - uy; return make_pair(ux, uy); } int snakesAndLadders(vector<vector<int>>& board) { const int INF...
ALGO
0.999893
6.214799
be00f122-ea22-4ed9-be52-e351c5c9a6e2
virresh/CompetitiveProgrammingCodes
2015/INOI Workshop/23.10.15/pakupaku graph.cpp
#include <bits/stdc++.h> using namespace std; struct node{ int x,y,indx; }; vector <node> adj[1000002]; vector <node> nodes; int visited[1000002]; char maze[1001][1001]; int bfs(int snode) { queue <node> q; node top; int i; q.push(nodes[snode]); visited[snode]=0; while(!q.empty()) { ...
ALGO
0.999913
3.72618
a86596a8-87ef-49ca-9367-f82db185cb46
zqw-hooper/apollo_and_-autoware_path_planner
Apollo_PiecewiseJerk_algorithm/Ipopt-3.12.7/Ipopt/examples/ScalableProblems/MittelmannDistCntrlNeumB.cpp
#include "MittelmannDistCntrlNeumB.hpp" #ifdef HAVE_CASSERT # include <cassert> #else # ifdef HAVE_ASSERT_H # include <assert.h> # else # error "don't have header file for assert" # endif #endif using namespace Ipopt; /* Constructor. */ MittelmannDistCntrlNeumBBase::MittelmannDistCntrlNeumBBase() : y_d_(NU...
ALGO
0.999683
6.044817
aadf5650-f806-4085-bb50-360d4c9d7cf8
sainthkh/rust-bgfx-pong
lib/bgfx/3rdparty/meshoptimizer/src/overdrawanalyzer.cpp
#include <assert.h> #include <float.h> #include <string.h> // This work is based on: // Nicolas Capens. Advanced Rasterization. 2004 namespace meshopt { const int kViewport = 256; struct OverdrawBuffer { float z[kViewport][kViewport][2]; unsigned int overdraw[kViewport][kViewport][2]; }; #ifndef min #define min(a...
ALGO
0.996936
7.531033
c2325eaf-4aef-4a77-859b-1c9033a2b95e
wisdompeak/LeetCode
Greedy/2234.Maximum-Total-Beauty-of-the-Gardens/2234.Maximum-Total-Beauty-of-the-Gardens.cpp
using LL = long long; class Solution { public: long long maximumBeauty(vector<int>& flowers, long long newFlowers, int target, int full, int partial) { sort(flowers.begin(), flowers.end()); LL ret0 = 0; while (flowers.size()>0 && flowers.back()>=target) { re...
ALGO
0.999882
5.471026
ab6e7329-3c76-4b66-8ae0-b24d63e6308f
Kamal0109/DSA
C++ Course/OOPs/DistanceProblem.cpp
#include <iostream> using namespace std; class feetandinches{ int feet; int inches; public: feetandinches(int a,int b){ feet=a; inches=b; } int getfeet(){ return feet; } int getinches(){ return inches; } friend void sum(int a,int b); }; class ma...
ALGO
0.925617
3.115619
e31e20ad-0df9-48ce-8973-5cd277aa5179
AdrianETP/Algoritmos_avanzados
fuerza_bruta/permutaciones_lexicograficas.cpp
#include <iostream> #include <vector> using namespace std; /* La complejidad de este algoritmo es O(n!) y el peor caso es O(12!). Ya que para n = 12, el número de permutaciones sería 12! = 479,001,600.*/ // Función para invertir el orden de los elementos en un rango de un vector void invertirOrden(vector<int> &permu...
ALGO
0.999731
4.844014
3035f68a-95fa-4803-ae43-742434695bc0
pawan-terdal/Misc
Algorithms/LinearSearch.2016-09-04.cpp
//This is a program to search an element using Linear Search Algorithm. #include<iostream> using namespace std; int Search(int arr[],int n,int v) { for(int i = 0; i < n; i++) { if(arr[i] == v) { return i+1; } } return 0; } int main() { int n , v, pos; cout << "Enter number of elements : "; cin >> n...
ALGO
0.999926
5.022548
5ab147ce-db35-4c1a-83c7-38b9075a79b9
panchanansahoo/cpp
DataStructures_with_C++/CodeChef/Maximum Trio.cpp
// Problem Link : https://www.codechef.com/LTIME103B/problems/MXMTRIO/ #include<bits/stdc++.h> #define ll long long int using namespace std; int main() { ll t; cin >> t; for (ll z = 1; z <= t; z++){ ll n; cin >> n; priority_queue<ll,vector<ll>,greater<ll>> pq; ll mn = LL...
ALGO
0.999975
4.29691
401d5974-f08a-459d-b470-4b11e185eb4a
HarborDong/LeetCode
C++/119.Pascal_Triangle_II.cpp
class Solution { public: vector<int> getRow(int rowIndex) { int i = 2; vector<int> ret(rowIndex + 1, 1); if(rowIndex > 1){ while(i <= rowIndex) { int j = i - 1; while(j > 0) { ret[j] += ret[j - 1]; j--; ...
ALGO
0.999647
6.10433
eff5adb0-c988-4e7f-b130-02d3f167a3fa
spartacus125/Racer_v3
lib/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
#include "btConvexPlaneCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" #include "BulletC...
ALGO
0.999255
7.401257
a59476c5-7a7e-4c92-b6f8-b6c5b4879bdf
Subhadip757/DSA-Journey
CSES Problem Set/Introductory Problems/TwoSets.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; ll total = n * (n + 1) / 2; if (total % 2 != 0) { cout << "NO\n"; return 0; } cout << "YES\n"; vector<ll> set1, set2; ll target = total / 2; for (ll i = n; i >= 1; i...
ALGO
0.99993
4.356422
f7400765-692c-41a3-a457-c276569376d7
Kishore121523/STL_KIshore
STL_FOLDER/Set/STL_Set.cpp
#include<bits/stdc++.h> using namespace std; int main(){ // Stores everything in sorted order // Stores only unique values // Every function happens in log(n) // unordered set<int> ust; is another data structure similar to set but as the name suggests the elements are stored in no particular order. But every...
ALGO
0.981563
4.68028
4283e4b2-91eb-4547-a839-7c0eb34b1ba1
VietHoang-206/Baitapnmlt
Kythuatdem-174/main.cpp
#include <iostream> #define MAX 100 using namespace std; void NhapMang(int arr[], int &n) { cin >> n; for(int i = 0; i < n; i++) { cout << "a[" << i << "] = "; cin >> arr[i]; } cout << endl; } void XuatMang(int arr[], int n) { for(int i = 0; i < n; i++) { cout << "a["...
ALGO
0.998126
4.033852
16676e9f-944a-4e56-a6db-e5c1fdf6b38e
qwertier24/AC
CodeChef/JULY16/CHEFTET.cpp
#include<stdio.h> #include<algorithm> #include<string.h> #include<map> #include<set> #include<vector> #include<string> #include<queue> #define REP(i,n) for(int i=0; i<n; i++) #define FOR(i,n) for(int i=1; i<=n; i++) typedef long long LL; using namespace std; typedef pair<int,int> pii; #define MP make_pair #define N 1...
ALGO
0.999946
3.273382
f7ecc7f6-4b92-440c-96be-859d9df45011
ishandutta2007/codeforces
sakurakoujiruna/normal/514/B.cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; #define double long double const double Eps = 1e-15; const double Pi = 4 * atan(1); int sgn(double a, double b = 0.0) { a -= b; return (a > Eps) - (a < -Eps); } const int N = 1011; struct Point { double x, y; Point operator -(Point p) ...
ALGO
0.999974
3.968102
4ad79e17-921a-4ba2-ae05-02f3e43f23b6
dayakhichadiya/web-development
2.CPP/function_over.cpp
#include<iostream> using namespace std; void sum(){ cout<<3.14*4*4<<endl; } void sum(int sq){ cout<<sq*sq<<endl; } void sum(int width,int length){ cout<<width*length<<endl; } void sum(int height,int base, int div){ cout<<height*base/div<<endl; } int main() { cout<<"The area of a circle is: "<<end...
ALGO
0.977076
3.929391
632496ff-e8b4-4e9d-8264-872c2b6e9da1
Kmalesh/QUEUE-DSA
ARRAY/user_throw_buble_short.cpp
#include <iostream> using namespace std; int main() { int n, i, j; cout << "enter the size of number:"; cin >> n; int arr[n]; for(i=0;i<n;i++) { cin>>arr[i]; } for (i = 0; i < n - 1; i++) { for (j = 0; j < n - 1;j++) { if (arr[j] > arr[j + 1]) { ...
ALGO
0.999911
3.767827
ef2f3755-6b80-4259-b352-64b2b948c7aa
jxzhsiwuxie/cppPrimer
chap09/exercises/ex_9.31.cpp
//练习 9.31:第 316 页中删除偶数值元素并复制奇数值元素的程序不能用于 list 或 forward_list。为什么?修改程序,使之也能用于这些类型。 /* * list 的迭代器不支持 += n 的操作;forward_list 不支持 insert 和 erase 函数。 */ #include <forward_list> #include <iostream> #include <list> #include <vector> using std::cout; using std::endl; using std::forward_list; using std::list; using std::vect...
TOOL
0.93285
5.698077
f4dd71e0-274f-4d0c-83fb-9cdd2cfb7692
lm9204/AlgorithmYeonSeop
baekjoon/1st/1990.cpp
#include <iostream> // #include <bitset> using namespace std; int a, b; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> a >> b; for (long i = a; i <= b && i <= 10000000; ++i) { bool flag = false; int reversed = 0, n = i; while (n > 0) { reversed = reversed * 10 + n % 10; n /...
ALGO
0.999892
4.384
64740dcf-5ad6-4457-811b-95a69192e77d
ishandutta2007/codeforces
hollwoq_pelw/normal/979/D.cpp
/* /+===================================================+\ //+---------------------------------------------------+\\ |.|\\...>>>>>>> Hollwo_Pelw's 2nd template<<<<<<<...//|.| \\+---------------------------------------------------+// \+===================================================+/ */ #include <bits/stdc++.h> u...
ALGO
0.998445
4.213307
20cac96e-3904-44d5-98a6-28ae93c4b2ad
NikhilGante/LeetCode
NeetCode150/Binary Trees/Subtree of Another Tree (172).cpp
#include <bits/stdc++.h> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNo...
ALGO
0.999974
6.582369
25e41991-8ff7-4047-94c6-c8966fba6d67
SilvinWillemsen/FDN_
eigen/bench/geometry.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace std; using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 8 #endif typedef SCALAR Scalar; typedef NumTraits<Scalar>::Real RealScalar; typedef Matrix<RealScalar,Dynamic,Dynamic> A; type...
ALGO
0.930701
5.941502
2d34abff-43ff-4f61-a48e-15e05a8f5153
thinhvip1/28Tech
bai_tap_c++/DSA/sinh/hoan_vi_ke_tiep.cpp
#include <bits/stdc++.h> using namespace std; // cách 1: dùng next_permutation void next1(int a[], int n){ if(next_permutation(a, a+n)){ for(int i = 0; i < n; i++) cout << a[i] << " "; } else{ for(int i = 0; i < n; i++) cout << i + 1 << " "; } cout << endl; } //cach 2: Tự viết hàm ...
ALGO
0.999723
4.465872
edb17c6d-1ed0-4bfb-80cc-cead6250c6a4
tafcosta/SHOCKr
src/EquationsEulerCooling.cpp
/* * EquationsEulerCooling.cpp * * Created on: 13 Feb 2024 * Author: ntc132 */ #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include "EquationsEulerCooling.h" void EquationsEulerCooling::doCooling(std::vector<double>& quantities, double dt){ double dtPhysi...
ALGO
0.970823
3.927886
0113794a-b258-486c-83b1-585587186638
timsinaanup/daily_quotes
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.998859
6.785645
90ec7af2-89b0-46c4-b5e2-ea43b7e44070
genericSpecimen/problem-solving
dsa/strings/7.4_replace-and-remove.cpp
#include <iostream> #include <unordered_map> /* * Two iterations of O(n) time, O(1) space */ int replaceAndRemove(std::string &str, int size) { // remove b's and count a's int write_idx = 0, a_count = 0; for (int i=0; i<size; i++) { if (str[i] != 'b') { str[write_idx++] = str[i];...
ALGO
0.999656
6.169012
4531cbcf-5d8c-4b80-ada0-5286c9706b16
raincross7/code-similarity
codes/train_code/problem264/problem264_354.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(),(a).end() using namespace std; using ll = long long int; using vec = vector<ll>; using P = pair<int,int>; const int INF = 1e9+7; int main() { int n; cin >> n; vec a(n+1), l(n+1), u(n+1), b(n+1); rep (i,n+1) { ...
ALGO
0.999649
3.69247
b3dd041f-b1ca-4bac-8926-312db47041a7
YasserAlmohammad/Distributed_Database_Management_System_Using_PVM_OLD
DBCluster/utils.cpp
#include "utils.h" void wlog(char* message){ FILE* log; //log file to write events to log=fopen("c:\\dblog.txt","a"); if(log!=NULL){ fputs(message,log); fclose(log); } } char* copy(char* str){ char* dup=new char[strlen(str)+1]; strcpy(dup,str); dup[strlen(str)]='\0'; return dup; } int contains(const char...
TOOL
0.966715
3.753772
dc3f00b5-b957-49e6-bab4-68d3f7fa89ad
AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain
code-imitator/data/dataset_2017/dataset_2017_8/mengrao/3264486_5633382285312000_mengrao.cpp
#include <map> #include <unordered_set> #include <unordered_map> #include <set> #include <list> #include <cmath> #include <stack> #include <queue> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <cstdlib> #include <numeric> #include <iostream> #include <iomanip> #include <string> #inclu...
ALGO
0.999614
4.445042
1bce544d-477e-4bfd-9194-8f0809051696
taegun1011/problem-solving-cpp
repos/gold/18116.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define FASTIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define PII pair<int, int> #define ll long long int N, M; vector<int> p; vector<int> s; int find(int x) { if (x == p[x]) return x; return p[x] = find(p[x]); } vo...
ALGO
0.999697
4.3377
473fe17d-f518-403e-bee3-142d1c3fda94
Tekishiro/Laboratory1
LaboratoryWork6/LaboratoryWork6/LaboratoryWork6.cpp
// LaboratoryWork6.cpp: . // // - Stack. : //*- ; / - ; //bool() - , ; == - . #include "stdafx.h" #include <iostream> using namespace std; class Stack { public: int value; Stack *next; Stack *head = 0; Stack(int value = 0) { this->value = value; cout << "created!" << endl; } void Push(int v...
ALGO
0.988871
3.669705
2e68dc3e-acb0-4720-a0cf-c12444a8ff4d
vita-epfl/GEM
pseudo_labeling_pipeline/trajectory_inference/droid_trajectory/droid_slam/thirdparty/lietorch/eigen/doc/examples/Tutorial_BlockOperations_corner.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::Matrix4f m; m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12, 13,14,15,16; cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl; cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << ...
ALGO
0.998513
4.092313
beaa1c90-de00-4776-81b7-ddc68288a0a1
glaubitz/llvm-monorepo
llvm/examples/ParallelJIT/ParallelJIT.cpp
#include "llvm/ADT/APInt.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/IR/Argument.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" #inclu...
TOOL
0.980829
7.169943
27c18798-d953-48c6-834d-a69646812363
Saliq9/Leetcode
my-folder/problems/binary_tree_postorder_traversal/solution.cpp
class Solution { public: void postOrder(TreeNode* root, vector<int>& ans) { if(root == NULL) return ; postOrder(root->left, ans); postOrder(root->right, ans); ans.push_back(root->val); } vector<int> postorderTraversal(TreeNode* root) { vector<int>ans; postOrder(root, ...
ALGO
0.999948
5.985493
526df229-337b-4a53-b1f2-747b20e39dc9
mattyalab2/PCkoshien
2016/F06.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for( int i = 0; i < n; i++) int main(){ string s; cin >> s; int a=0, b=0, c=0, k=0; rep( i, s.size() ){ if( s[i] == '.' ){ k=1; continue; } if( s[i] == '(' ){ while( s[++i] != ')' ) b*=10, c*=10, b+=s[i]-'0', c+=9; } else k*=10,...
ALGO
0.998355
3.431174
1e063315-440e-4434-990b-4c50513656af
tyuownu/codeSnapshot
201510/big_int.cpp
#include<iostream> #include <stdio.h> using namespace std; int main() { int n; int a[201][101] = {0}; a[0][1] = 1; for(int i = 1; i <= 200; ++i) { int tmp = 0; //用于存储进位 for(int j=1; j<100; j++) { a[i][j] = a[i-1][j] * i + tmp; tmp = a[i][j] / 10...
ALGO
0.999797
3.845439
ae3b4b20-3a00-4385-b2c3-8498c47dbd78
ronGeva/algorithms
CompetitiveProgramming/CompetitiveProgramming/atcoder1/main.cpp
#include <iostream> #include <string> #include <vector> #include <map> #define ull unsigned long long #define ul unsigned long void task1() { ull num; std::cin >> num; ul ones = 0, twos = 0, threes = 0; while (num > 0) { ul digit = num % 10; if (digit == 1) ones++; if (digit == 2) twos++; if (dig...
ALGO
0.999656
4.481973
344ae7ca-57c6-4a40-8b22-d6c85577945a
ishandutta2007/codeforces
300iq/normal/425/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 7; ll ind(int a, int b) { return a * (ll) N + b; } vector <int> x[N], y[N]; unordered_set <ll> s; int main() { int ans = 0; int n; scanf("%d", &n); s.rehash(n); while (n--) { int a, b; ...
ALGO
0.99982
4.424646
29ba806e-c9a1-4872-aba1-958e2e85d87b
alkanalperen/WordNetwork
Queue.cpp
// // Created by Alperen Alkan on 10.05.2021. // /** * Title: Balanced Search Trees, Hashing and Graphs * Author: Name Surname * ID: 21803216 * Section: 3 * Assignment: 4 * alperen alkan */ #include "Queue.h" Queue::Queue() : backPtr(NULL), frontPtr(NULL){ } // copy constructor Queue::Queue(const Queue& Q){ // ...
ALGO
0.990163
4.077389
dcd940c7-6bc1-400c-9632-0cf77281017e
iamsubham8/DSA_Leetcode_Problem_75_Days
Week-2 (Two Pointer)/Ques11.cpp
// 392. Is Subsequence // Given two strings s and t, return true if s is a subsequence of t, or false otherwise. // A subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i...
ALGO
0.999868
6.563675
89bc9d81-0614-4b3a-8dc8-2500d66c82d9
AmanJhamb30a/Long-Calculator
Long Calculator/BIgNumber.cpp
#include <cstdlib> #include "BigNumber.h" #include <bits/stdc++.h> using namespace std; namespace zbz { const string ErrorStr = "error"; const int SPACE = 32; const string MaxInt64Str = "9223372036854775807"; int BigNumber::MaxPointNum = 6; /// Fill string to special size with '0' static int fillzero(string& str...
ALGO
0.985454
3.550214
630447c3-9ed7-4ddf-95df-1d921395f0b8
imxinlei/leetcode
28_Implement_strStr().cpp
/* * https://leetcode.com/problems/implement-strstr/description/ * * Implement strStr(). * * Returns the index of the first occurrence of needle in haystack, or -1 if * needle is not part of haystack. * */ #include <iostream> #include <string> #include <vector> #include <unordered_map> #include <stack> #includ...
ALGO
0.999376
6.145452
c1933c62-9162-4b55-85d6-bfb5a349838b
thalesparavela/Wrong-Answer
Q-2965.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Grafo { public: int vertices; int height; int descen; bool use; Grafo(int v) : vertices(v), height(-1), descen(-1), use(false) {} void Set(int h, int idi) { height = h; descen = idi; } ...
ALGO
0.999942
4.289867
e571c02d-fa89-4c3a-8187-86304af3f4c8
Deborah-Digges/SDC-ND-term-2
P5-Model-Predictive-Control/class-notes/CarND-MPC-Quizzes/mpc_to_line/src/Eigen-3.3/test/sparse_solvers.cpp
#include "sparse.h" template<typename Scalar> void initSPD(double density, Matrix<Scalar,Dynamic,Dynamic>& refMat, SparseMatrix<Scalar>& sparseMat) { Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols()); initSparse(density,refMat,sparseMat); refMat = refMat * refMat.adjoint(); for (i...
TEST
0.908805
5.216745