uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5ecc4ac5-c7aa-4cea-95c8-98250cb11e66
TeamCarbonXtremeARMv6/frameworks_av
media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/int_lsf.c Date: 04/20/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Put file into template and first pass at optimization. D...
ALGO
0.99816
6.208364
f0fc59ac-94ab-439b-86c1-cd95e9cb3632
rahul152-ai/DSA
easy/lastWN.cpp
#include <iostream> #include <string.h> using namespace std; int numberofstring(string s) { int ans = 0; for (int i = s.length(); i >= 0;i--) { if (s[i]!=' ') { ans++; } if (s[i] == ' ' && ans != 0) break; } return ans; } int main() { strin...
ALGO
0.997814
3.472076
803701c5-3f20-4e35-ad7f-e9c4e9f16ede
singhveer001/Data-Structure
Binary_Search/First_and_Last_occurense.cpp
#include<iostream> using namespace std; int firstOcc(int arr[], int n, int key) { int s = 0, e = n-1; int mid = s + (e-s)/2; int ans = -1; while(s<=e) { if(arr[mid] == key){ ans = mid; e = mid - 1; } else if(key > arr[mid]) {//Right me jao s ...
ALGO
0.999824
4.764121
d73137b5-710c-4ac4-8f10-aac1ac4d7651
seaify/poj-codes
3191/6697492_AC_16MS_156K.cpp
#include<stdio.h> #include<stdlib.h> int n; void dfs(int n) { int t=(abs(n)&1); if(n==0) return ; n-=t; dfs(n/(-2)); printf("%d",t); } int main() { while(EOF!=scanf("%d",&n)) { if(n!=0) dfs(n); else printf("0"); printf("\n"); } }
ALGO
0.999995
3.752014
6f24ec95-ce14-4696-97c6-57c61f29b65d
GDieser/Ejercicios-C-1C
C++ U6 VECTORES/EJE19.CPP
#include <iostream> #include <locale.h> using namespace std; /*19) Dadas dos listas de 10 números cada una y sin números repetidos, cargarlas en dos vectores. Generar un tercer vector que contenga solamente aquellos elementos que están repetidos en ambos vectores. Mostrar en pantalla el nuevo vector. Vector 1: [8, ...
ALGO
0.998754
4.49211
433fc1b4-2651-4bb5-a7b7-2028ca6924b3
harsh-quare/LeetRoad
2000-minimum-speed-to-arrive-on-time/2000-minimum-speed-to-arrive-on-time.cpp
class Solution { public: bool isValid(int mid, vector<int>& nums, double hr){ int n = nums.size(); double calc = 0; for(int i = 0; i < n-1; i++){ // calc = calc + ceil(nums[i] / mid); // use this instead of ceil function if(nums[i] % mid == 0) calc += nums...
ALGO
0.999966
5.773503
6ffd3a3f-16e6-42b5-8b40-94293510d99f
LuchoBazz/icpc-notebook
src/03-graph/tree_difference_array_technique_on_trees.cpp
int diff[mxN]; // Difference Array int answer[mxN]; // Array after propagation of differences void dfs(int node, int parent) { answer[node] = diff[node]; for(int &child: adj[node]) { if(child == parent) continue; dfs(child, node); answer[node] += answer[child]; } } // main() for(in...
ALGO
0.999958
4.976743
bfc79aa4-e61c-472d-b767-4785c05938a0
Lingnik/learning-cpp
exercises/c3/3-10.cpp
#import "../../std_lib_facilities.h" int main() { cout << "Enter an operator (+, -, * /, plus, minus, mul, div) and two operands (floating points) and I will calculate the result:\n"; string op = ""; double num1 = 0, num2 = 0; cin >> op >> num1 >> num2; double result = 0; if (op == "plus") op = "+"; if (...
TOOL
0.931059
4.468514
725c6135-2d08-4be8-9fe8-0fb1b5ec2d0c
18-RAJAT/ONLINE-JUDGE
A_Make_it_Increasing.cpp
#pragma GCC optimize("unroll-loops") #pragma GCC optimize("Ofast") #include <iostream> #include <cmath> #include <iomanip> #include <set> #include <algorithm> #include <fstream> #include <vector> #include <string> #include <climits> #include <ctime> #include <queue> #include <map> #include <stack> #include <unordered_s...
ALGO
0.999971
3.650479
366ab79f-20e9-4bb5-9f8a-1c204b28fece
FabioVL/Treinamento---Maratona
IME++ Homeworks/IME++ - Homework 4/f.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define mp make_pair #define pb push_back #define db(x) cerr << #x << " == " << x << endl; #define _ << " " << typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; const long double EPS = 1e-9; const int N=1e5+5; cons...
ALGO
0.99987
3.824108
d339fd34-e269-4659-9a55-230c8d0558c2
betairylia/evolutionSandbox
PerlinNoise.cpp
#include "PerlinNoise.h" #include <cmath> #include <random> #include <algorithm> #include <numeric> // I ADDED AN EXTRA METHOD THAT GENERATES A NEW PERMUTATION VECTOR (THIS IS NOT PRESENT IN THE ORIGINAL IMPLEMENTATION) // Initialize with the reference values for the permutation vector PerlinNoise::PerlinNoise() { ...
ALGO
0.999754
6.419148
12f5bbbe-f037-4906-96fa-f974535c0b6f
WinstonLy/Job
TestProject/data_structure/线性表/循环链表/Cyclelist.cpp
#include <iostream> #include "Cyclelist.h" using namespace std; Cyclelist::Cyclelist() { head = new Node(1); head->next = NULL; } Cyclelist::~Cyclelist() { clearList(); delete head; head = NULL; } void Cyclelist::clearList() { Node * temp = head->next; while(temp != temp->next) { Node * t = temp->next; ...
ALGO
0.999475
3.323397
effa1ef2-9b0a-482c-b518-4e9e5decc393
hemanth171/CPP_Programs
overload_operators.cpp
//Operator Overloading #include<iostream> using namespace std; class Complex { public: int a,b; void input(string s) { int v1=0; int i=0; while(s[i]!='+') { cout << s[i] << "\n"; v1=v1*10+s[i]-'0'; i++; cout << v1 << "\n"; ...
ALGO
0.905936
4.401101
6cb3feaa-4241-499e-a3e4-457b67833afd
ningning772669569/algorithm
HDU5494.cpp
#include "cstdio" #include "cstring" #include "iostream" #include "algorithm" #include "set" #include "vector" #include "queue" using namespace std; int a[550]; int b[550]; int n,m; int main () { int T; scanf("%d",&T); for(int t=1;t<=T;t++){ scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) ...
ALGO
0.999907
3.097176
0a6bcc0a-9622-4564-b375-a84662489323
tinywolf3/flutter_icons_viewer
IconsViewer/icons_viewer/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.997804
6.797273
02791919-9191-4f59-90c2-54696ed4826c
solanki018/DSA_WINTER_ARC
DAY_1/for-while.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; for(int i = 1; i <= n; i++){ cout << i << "\n"; } return 0; while(n > 0){ cout << n << "\n"; n--; } } //now we have to implement this in a different problem //fiboncci series //Problem: Give...
ALGO
0.999774
3.88395
0b923aa6-e4c7-4e68-9624-d5bbcd1d5a21
MikelEiza/Cocos2d-x-Game-Structure
cocos2d/cocos/base/CCConfiguration.cpp
#include "base/CCConfiguration.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN extern const char* cocos2dVersion(); Configuration* Configuration::s_sharedConfiguration = nullptr; Configuration::Configuration() : _maxTextureSize(0) , _maxModelviewStackDepth(0) , _supportsPVRTC(false) , _supportsETC1(false) , _supp...
CONFIG
0.927092
6.219219
e38ece48-289c-4023-855b-6c066e4b5f8d
KunalJoshi15/DSA
Algo/Heap/k_closest.cpp
#include<bits/stdc++.h> using namespace std; void printKClosest(int arr[], int n, int k, int x) { // here the visited array is used to tell whether the particular element is already visited or not. bool visited[n]={false}; for(int i=0;i<k;i++){ // k times we will be finding the values which has ...
ALGO
0.999999
4.575239
daeb77b4-6a6d-4128-8d5c-b75b03a6c811
jzhangtx/PalindromePartitioning2
PalindromePartitioning2/PalindromePartitioning2.cpp
// PalindromePartitioning2.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> bool IsPalindrome(const std::string& s, size_t index, size_t length) { if (length == 1) return true; size_t end = index + length; for (; index...
ALGO
0.99898
5.506312
785709b9-066f-4b4f-94d9-729d5719ebfc
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_13260_1.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 100000000; const int N = 1000005; char s[N]; int dp[N][2]; int one_cnts[N]; int main() { while (cin >> (s + 1)) { int len = strlen(s + 1); dp[0][0] = 0; dp[0][1] = 2; for (int i = 1; i <= len; ++i) { if (s[i] == '0') { dp[i][0...
ALGO
0.999847
3.871851
8b553502-56a9-4cdb-9697-d9ddbeca3a84
dantrag/moleqcage
CGAL-4.7/examples/Arrangement_on_surface_2/edge_insertion.cpp
//! \file examples/Arrangement_on_surface_2/edge_insertion.cpp // Constructing an arrangement using the simple edge-insertion functions. #include <CGAL/Simple_cartesian.h> #include <CGAL/Arr_segment_traits_2.h> #include <CGAL/Arrangement_2.h> #include "arr_print.h" typedef int ...
ALGO
0.993652
5.302024
179588f3-6534-4149-a964-72323b92b8dd
NickLennonLiu/cpp
dsa/PA/PA2a/2-4-2/final/kidd.cpp
#include <stdio.h> #define maxn 12000000 int n, m; char op; int lo, hi; int lazy[maxn]; // 懒惰标记 int lc[maxn]; // 左右子树 int rc[maxn]; long long flipped[maxn]; // 节点值 int root; int applied = 1; // 新申请的节点在数组中的位置 // 节点v向下传播lazytag并更新翻转次数 void pushdown(int v, int len) { if(lazy[v]) { int la = laz...
ALGO
0.999843
4.249604
ad6e62d8-05ec-4e89-bafd-48d0fd5b1e11
finch185277/leetcode
001-025/021.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { ListNode *dummy = new ListNode(0); ListNode *lhs = l1, *rhs = l2, *cur =...
ALGO
0.999986
5.906328
95963834-efe9-43d1-9598-99dcb9692fe2
aceyan/UE4.18.3_release
Engine/Source/ThirdParty/ICU/icu4c-53_1/source/i18n/stsearch.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION #include "unicode/stsearch.h" #include "usrchimp.h" #include "cmemory.h" U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(StringSearch) // public constructors and destructors ----------------------------------- StringSearch::...
TOOL
0.970372
6.293441
afb48fbd-2fb5-49f9-adc2-d7bc5423bf49
alexandraback/datacollection
solutions_5688567749672960_0/C++/MRoizner/main.cpp
#include <stdio.h> #include <iostream> #include <vector> #include <string> #include <math.h> #include <algorithm> #include <bitset> #include <set> #include <sstream> #include <stdlib.h> #include <map> #include <queue> #include <stack> #include <assert.h> // #include <unordered_set> #include <iomanip> using namespace s...
ALGO
0.99956
4.809235
6cb5556d-2459-415c-aaf7-7895005bc2ff
sahnamm/storage_encryption
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
8f7f52c6-919e-4fc0-bce9-884889d8f769
hyjwpk/USTC_2022_Principles-and-Techniques-of-Compiler
src/cminusfc/cminusfc.cpp
#include "Dominators.h" #include "GVN.h" #include "Mem2Reg.hpp" #include "PassManager.hpp" #include "cminusf_builder.hpp" #include "logging.hpp" #include <fstream> #include <iostream> #include <memory> using namespace std::literals::string_literals; void print_help(std::string exe_name) { std::cout << "Usage: " ...
TOOL
0.94209
4.568527
e4260c8c-4641-4832-9cab-5912ce69f61e
rahuldutta/CompetitionCodes
CHRL3.cpp
#include <stdio.h> #include <set> #include <iostream> using namespace std; set<int> endv; set<int>::iterator it; #define NMAX 111111 int N, i, x; int main() { scanf("%d", &N); for (i = 1; i <= N; i++) { scanf("%d", &x); if (i == 1) endv.insert(x); else { it = endv.lower_bound(x); if (it == endv.b...
ALGO
0.999795
3.685521
3adbdb21-e011-4b74-b83e-6f5c553a96db
oigomezz/Retos
Hackerearth/Codemonk/Level-08/Little-Monk-and-Flip-Operations/solution.cpp
#include <bits/stdc++.h> using namespace std; bool visited[100005]; vector<int> g[100005]; int a[100005], ans[100005][33]; void dfs(int u) { visited[u] = 1; for (int i = 0; i < g[u].size(); i++) { int v = g[u][i]; if (!visited[v]) { dfs(v); for (int j = 0; j < 32; j++) ans[u][j] =...
ALGO
0.999944
4.155141
d986dc96-d238-4f9e-96b0-10e061082660
divyadhimaan/leetcoding
342-power-of-four/342-power-of-four.cpp
class Solution { public: bool isPowerOfFour(int n) { if(n==0) return false; while(n%4==0) n /= 4; return n==1; } };
ALGO
0.999209
5.892953
f021c1ed-db0a-41c2-a2a0-191915ba506c
ANU-HPC/tuning-hints-with-aiwc
codes/cpu-loop-blocking.cpp
#include <iostream> #include <cstring> #include <cassert> #include <fstream> #include <ctime> #include <cstdlib> #include <random> #include <liblsb.h> #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #ifdef __APPLE__ #include <OpenCL/cl.h> #else #include <CL/opencl.h> #endif const float EPSILON = 0.00001f; inline ...
ALGO
0.975271
4.864164
283fadaa-a91e-431a-9d0e-acafb6696cb7
RE2105A23/CSE256
HackerRank Notes/20231102/BSTInorder.cpp
/* Write a program to create the Binary Search Tree of N elements. Number of elements in the BST should be greater than 2 and less than equal to 10. If the number of elements will not be in the range then display the message “Invalid Size” and elements should not be inserted. After insertion your program should display...
ALGO
0.99987
6.358047
910c012c-15b0-4c58-a19a-35ed99cdf946
User-DK/DSA
math/SieveOfEratothenes.cpp
// used to find the prime numbers till n // time complexity = o(n*log(log(n))) // space complexity = o(n) #include <iostream> #include <vector> #include <cmath> using namespace std; int main() { int n; cout << "Enter n: "; cin > vector<int> arr(n + 1, 1); for (int i = 2; i * i <= n; i++) { if (arr[i] ...
ALGO
0.999925
4.810818
42b5f8c1-acb9-467a-8049-fa1782ff0b55
Dedicate-labors/Cplusplus-Review
C++算法/LeetCode/蓝桥杯/3-1286.cpp
//#include<vector> //#include<iostream> //#include<cmath> //#include<cstdio> //#include<set> //using namespace std; // ////ѡһPathPathֻ5 //int table[10]; //int ans = 0; // // ////5,ͨģѡһӣߵһ //bool test(int step) { // set<int> walk;//ģ· // walk.insert(table[0]); // int k, max; // for (int i = 1; i < step; i++) { // //жwa...
ALGO
0.999955
3.674489
5cbbf15f-3954-4b15-80a0-b10c56ac927b
saursuri/DSA
LeetCode_Questions/Trees/2872. Maximum Number of K-Divisible Components/Code.cpp
/* Problem Link: https://leetcode.com/problems/maximum-number-of-k-divisible-components/?envType=daily-question&envId=2024-12-21 Time Complexity: O(n) Space Complexity: O(n) */ class Solution { private: int k; long nodeSum[30000]; long dfs(vector<int> adjList[], int node, vector<int> &visited, int &splits,...
ALGO
0.999938
6.372972
d3126abd-9863-45d8-bb94-0162025e08c1
topwuther/lockzhiner-rk2206-openharmony3.0lts
foundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/libs/distributeddb/common/src/platform_specific.cpp
#include "platform_specific.h" #include <ctime> #include <cstdlib> #include <cstring> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <linux/limits.h> #include <sys/time.h> #include <fcntl.h> #include <dirent.h> #include "securec.h" #include "db_errno.h" #include "log_print.h" namespace Dis...
TOOL
0.91473
5.694697
4ca350e2-612e-41c2-a339-b6945fd5aa5f
verorpl/grouping_navigation_drawer
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.998733
6.76775
0ac325e5-645e-4e71-b0f1-a13eac856f71
sw1ft747/Server-side-Auto-Bunnyhop
memory_utils.cpp
#include "memory_utils.h" //----------------------------------------------------------------------------- // CMemoryUtils implementation //----------------------------------------------------------------------------- CMemoryUtils::CMemoryUtils() : m_ModuleInfo(), m_ModuleInfoTable(15) { } CMemoryUtils::~CMemoryUtils...
TOOL
0.956557
5.202233
f57d19c8-160b-4785-9a8f-b497865b34af
astronaut-goose/projects
arkanoid/collision.cpp
#include "collision.h" template<class T1, class T2> bool isIntersecting(T1& mA,T2& mB) { return mA.right() >= mB.left() && mA.left() <= mB.right() && mA.bottom() >= mB.top() && mA.top() <= mB.bottom(); } void testCollision(Paddle& mPaddle, Ball& mBall) { if(!isIntersecting(mPaddle, mBall)) return; ...
TEST
0.986616
6.220354
3299d1a2-a494-4147-8c02-7310f27dccf2
s-yagi1998/gpu-tensor-public
main.cpp
#include <opencv2/opencv.hpp> #include "bilateralFilter_simd.hpp" #include "GaussianCPU.hpp" #include <cuda_runtime.h> #include <opencv2/cudaimgproc.hpp> #include "tensor_sample.h" #include "BilateralCuda_naive.cuh" #include "GaussianCuda.cuh" #include "utils.hpp" #include "RealtimeO1CPU.hpp" #define CV_LIB_PREFIX com...
ALGO
0.944149
5.522277
2f37b8c0-e843-4abc-82f2-a973f1d7b536
H-Shen/MyCodeCollection
Kattis/speedlimit.cpp
// https://open.kattis.com/problems/speedlimit // #include <bits/extc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); int n; int sum; int val; int currentTime; int lastTime; while (true) { cin >> n; if (n == -1) { break; } ...
ALGO
0.982058
4.909241
a26cc14b-1da2-4d1a-9623-ae1127585ab7
YuvrajSahni/DSA-Practice
Recursion/nto1_recursion.cpp
#include <iostream> using namespace std; int fun(int n) { if(n==0) { return 0; } cout<<n<<" "; fun(n-1); return 0; } int main() { int x; cin>>x; fun(x); return 0; }
ALGO
0.999965
4.535267
0c094c3d-35a0-4808-b741-9bda4c5a9ce9
HEltim7/cpcode
Archive/AcWing/algorithm_1/154.cpp
#include<iostream> using namespace std; const int N=1e6+10; int a[N],q[N]; int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0);//IO optimize int n,size; cin>>n>>size; for(int i=1;i<=n;i++){ cin>>a[i]; } int hh=0,tt=-1; for(int i=0;i<=n;i++){ //判断对头是否已经滑出窗口 ...
ALGO
0.999999
3.018438
e9a1ef7d-56a4-4665-8326-bd91a13eb7bd
kishantalekar/shop_app
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
d8683b11-0c60-4b3b-a2de-f6369be12549
AlbertWang0116/KrwlngsACMFile
ACM-2011-practise/POJ/[easy]3522.cpp
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<cstdlib> #include<ctime> #include<cmath> #include<algorithm> #include<map> using namespace std; struct edge { int st, ed, len; }; #define N 110 #define M 10010 const int MAX = 1000000000; int root[N]; edge e[M]; int n, m; int cmp(const ed...
ALGO
0.99992
3.741455
b440c6ed-5595-4838-b549-f860e896480a
gopoma/competitive-programming
UVa/Graph01/GraphConnectivity.cpp
//* sometimes pragmas don't work, if so, just comment it! //? #pragma GCC optimize ("Ofast") //? #pragma GCC target ("avx,avx2") //! #pragma GCC optimize ("trapv") //! #undef _GLIBCXX_DEBUG //? for Stress Testing #include <bits/stdc++.h> //? if you don't want IntelliSense using namespace std; #ifdef LOCAL #incl...
ALGO
0.999654
5.273768
1a48db47-5f70-462e-9c67-4428270e1886
coderun13/Cpp
DSA_Concepts/Stack/Creation_Deletion_methods/stack_using_array.cpp
/** * Stacks -> LIFO data * insert at top -> push * remove from top -> pop * time complexity -> with array-> O(1) * Stack implememtation using array -> top index = -1(underflow condition), top index= arr.size()-1; * Stack using linkedlist -> push-> insertAtHead and pop-> removefromHead * overflow condition -> st...
ALGO
0.999502
4.800295
2910f81b-0424-4ca2-848c-180b52fb306c
rockysingh2003/-GFG-Mastery-Blueprint
Array/Largest element/Optimal approach for second largest .cpp
#include <bits/stdc++.h> using namespace std; void largest(int ar[], int size) { int largest = ar[0]; int slargest = INT_MIN; //This is i'm doing becoz i am assuming may there be negative elements present ..... for (int i = 1; i < size;i++) { if(ar[i]>largest) { slargest = l...
ALGO
0.999708
3.960511
6415ebea-6b29-4c3b-8f57-eccd95c0e725
sadramanouch/leetcode
1365-how-many-numbers-are-smaller-than-the-current-number/1365-how-many-numbers-are-smaller-than-the-current-number.cpp
class Solution { public: vector<int> smallerNumbersThanCurrent(vector<int>& nums) { int n = nums.size(); vector<int> result(n, 0); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if (i != j && nums[j] < nums[i]) { result[i]++; ...
ALGO
0.999992
6.134443
a931fa82-b5cf-400c-84a3-a8381b9657ee
xymelon/leetcode
C++/Remove Duplicates from Sorted List1.cpp
#include<iostream> #include<set> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; void printList(ListNode* head){ while(head){ cout<<head->val<<"->"; head = head->next; } cout<<"NULL"<<endl; } class Solution { public: ...
ALGO
0.999917
4.992291
67f65983-ce00-4481-941f-a70ce886dfe9
Tanjeem29/CSE108
Offlines/Offline-3/Final/1805006(2).cpp
#include<iostream> #include<cstring> using namespace std; char* itos(int n) { char *a; int l=0, temp; temp=n; while(temp) { l++; temp/=10; } a=new char[l+1]; temp=n; a[l]='\0'; if(n<0) { cout<<"Error, n is negative\n"<<endl; a[0]='\0'; ...
TOOL
0.991936
4.351544
0cb08241-9a65-4c03-9be5-a8486d30eacc
torus/ipad-app-practice
Classes/Box2D/Dynamics/Joints/b2LineJoint.cpp
#include <Box2D/Dynamics/Joints/b2LineJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Linear constraint (point-to-line) // d = p2 - p1 = x2 + r2 - x1 - r1 // C = dot(perp, d) // Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // = -dot(perp...
ALGO
0.999058
5.718181
b1e13b42-6715-4358-9360-68366df58cdd
ruds18/DSA-Practice
0070-climbing-stairs/0070-climbing-stairs.cpp
class Solution { public: int dpSol(int n , vector<int>&dp){ //base case if(n<=2) return n; if(dp[n] != -1) return dp[n]; dp[n] = dpSol(n-1 , dp) + dpSol(n-2 , dp); return dp[n]; } int climbStairs(int n) { if(n<=2) ...
ALGO
0.999974
6.002058
389ca0a5-33a1-41fc-a2d8-ac730b6076b2
jer22/OI
ContestHunter/mutualTest/round0/B/B.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <string> #include <set> using namespace std; const int MOD = 1000000007; int n, m; string a, b; set<string> suba, subb; set<string> hha, hhb; int solve(set<string> a, set<string> b) { for (set<string>::iterator it = b.begin(); i...
ALGO
0.99995
3.454039
2f871745-2374-4cb4-a958-e2a1bfea4f85
younghyunlee22/cpp-programming-assignments
Week5/M05 Programming Assignment 1 Acceleration/main.cpp
/* Program name: main.cpp * Author: Younghyun Lee * Date last updated: 4/22/2024 * Purpose: Acceleration */ #include <iostream> #include <iomanip> #include <string> using namespace std; double speedDueToAcceleration(double acceleration, int time) { double speed = 0.0; speed = acceleration * time; retur...
ALGO
0.928686
4.666075
3b3e65f1-8eaf-4f8d-af73-85606b1684ae
mvancompernolle/ai_project
data/CBesselYn.cpp
/* CBESSELYN.CPP: IMPLEMENTS calculus::unary_operators::bessel_operators::bessel_yn * calculus-cpp: Scientific "Functional" Library * * This software was developed at McGill University (Montreal, 2002) by * Olivier Giroux in the course of his studies in Mechanical Engineering. * It was presented, along with an accom...
TOOL
0.919156
5.271151
9aacfe39-62b2-4c01-98e5-db09bc9fcb29
ishandutta2007/codeforces
keyid/normal/1503/C.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define sc second #define mp make_pair typedef long long LL; const int MAXN=100005; struct city { int a,c; }p[MAXN]; int main() { #ifdef KeyID freopen("read.txt","r",stdin); #endif int n; scanf("%d",&n); for (int i=0;i<n;i++) ...
ALGO
0.999945
3.453827
3b15b56f-5bc9-491d-9fcd-785f4acbae51
BuvinduS/TestRepo
CoinProblem.cpp
#include <bits/stdc++.h> using namespace std; /* Greedy Algorithm Only works if the coin system is canonical i. e. like {1,2,5,10,20,50,100,200} For systems like {1,3,4} this might fail */ vector<int> coinProb(vector<int> &coins, int target){ if(!is_sorted(coins.begin(),coins.end())){ sort(coi...
ALGO
0.999961
5.451235
8cce4bf5-5f91-4723-b2d5-c27269ea389d
kyeokabe/crackingCodingInterview
code/LeetCode/17_LetterCombinationsOfAPhoneNumber.cpp
class Solution { public: vector<string> letterCombinations(string digits) { vector<string> ans; if(digits=="") return ans; map<char,set<char>> m; set<char> s2,s3,s4,s5,s6,s7,s8,s9; s2.insert('a'); s2.insert('b'); s2.insert('c'); ...
ALGO
0.999909
6.592253
0edc6182-7902-4b58-bb15-9b3bd7ead17f
Macavitycode/aoc2024
7.cpp
#include "utils.h" #include <string> #define LL long long using namespace std; void printProc(pair<LL, vector<LL>> a) { cout << a.first << ": "; printVec1T(a.second); } vector<pair<LL, vector<LL>>> getRules(string f) { ifstream file(f); string line; vector<pair<LL, vector<LL>>> op; while (getline(file, l...
ALGO
0.999277
4.260331
0b5bc653-ff37-49bc-9d7a-7e83dfbbd57d
Dangornushi/vielfalt
run.cpp
#include "vielfalt.hpp" #include <stdio.h> #include <iostream> #include <fstream> #include <sstream> vector<int> VirtualMachine::open(vector<int> bytes) { std::string fileName = "a.all"; //ファイル名 //ファイル名からバイナリファイルで読み込む std::ifstream ifs(fileName, std::ios::binary); //読込サイズを調べる。 ifs.seekg(0, std::...
TOOL
0.923192
3.310701
5c16aabf-d474-4a02-8659-00284f036661
AbduElturki/advent_of_code_2021
day_15/day_15.cpp
#include <iostream> #include <fstream> #include <vector> #include <unordered_map> #include <queue> #include <tuple> struct IntPairHasher { size_t operator()(const std::pair<int, int> &s) const { return std::hash<int>()(s.first) ^ (std::hash<int>()(s.second) << 1); } }; bool isValidLocation(std::ve...
ALGO
0.999606
6.352898
937ab529-c48d-4221-9d9e-917b5e7f9dc0
SaarChaffee/2020zhbit-ACM-SummerActivity
shortest path/dijkstra.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #define INF 0x3f3f3f3f using namespace std; int maps[155][155]; int dis[155], vis[155]; int n, m; void dijkstra() { for (int i = 1; i <= n; i++) { dis[i] = maps[1][i]; } dis[1] = 0; vis[1] = 1; for (int i = 2; i <= n; i++) { int tmp = ...
ALGO
0.999934
3.95092
3533cf7f-f6b6-46fb-87bf-6c726929f2e2
Yycode76/oss25
250521/입력받은 수의 합과 평균/sum-and-average-of-the-inputs.cpp
#include <iostream> using namespace std; int main() { int n,a; int sum = 0; cin >> n; for( int i=0;i<n;i++ ){ cin >> a; sum += a; } double avg= (double)sum/n; cout << fixed; cout.precision(1); cout << sum << " " << avg; return 0; }
ALGO
0.998456
4.030083
fe6208b3-4c34-432b-87e2-47773fc65442
vitthalnamdev/icpc
C_Bakry_and_Partitioning.cpp
// Don't look the rank , if you want a good rank #include<bits/stdc++.h> using namespace std; #define ll long long #pragma GCC optimize("O3") #pragma GCC target("avx,avx2,sse,sse2,sse3,sse4,popcnt,fma") #pragma GCC optimize("unroll-loops") ////--------- DEBUG START---------//// #define debug(x) cerr << #x <<" "; _pr...
ALGO
0.999956
5.284275
945926fe-534e-42be-aaaa-b5c287884915
Geeteshsood/leetcode
670-maximum-swap/670-maximum-swap.cpp
class Solution { public: int maximumSwap(int num){ string str=to_string(num); string s(str); sort(s.begin(),s.end(),greater<int>()); int n=s.length(); int index=0; char ch; for(int i=0;i<n;i++){ ...
ALGO
0.999927
6.175349
a034d0aa-c024-4dc3-a58a-402dde894493
Amaan-Kazi/Advent-Of-Code-2024
Day 03/Problem 01/solution.cpp
#include <iostream> #include <fstream> #include <cctype> using namespace std; int main () { ifstream file("inputs.txt"); string instruction; char ch; bool secondNum = false; unsigned long long sum = 0; int commas = 0; while(file.get(ch)) { if (instruction.empty()) { if ...
ALGO
0.999884
3.940732
c82ec202-0d2a-4892-bced-a97f9e4b8af1
VanDung104/OnThiHocKy
OOP/de2019_06/bai2.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define fi first #define se second using namespace std; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<pi> vii; class QLH { private: string ma, ten, xx; int loai, sl; public: void nhap(){ cout << "Nhap ma: "; cin >> ma;...
ALGO
0.983094
3.397107
654903d3-99ae-4a97-ab11-f85f55f4874e
ihaagrawal/Daily-Coding-Practice
Graphs/Minimum Spanning Tree/947. Most Stones Removed with Same Row or Column.cpp
// 947. Most Stones Removed with Same Row or Column (MEDIUM) // https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/description/ class Solution { public: void unionBySize(vector<int>& parent, vector<int>& size, int v, int u) { int pv = findParent(parent, v); int pu = findParen...
ALGO
0.999708
6.202063
01f155f3-5ba0-463c-9971-5757d48d5c7a
ishandutta2007/codeforces
sutaner/normal/1419/D2.cpp
#include <bits/stdc++.h> #define rep(i, l, r) for (register int i = l; i <= r; i++) #define per(i, r, l) for (register int i = r; i >= l; i--) #define srep(i, l, r) for (register int i = l; i < r; i++) #define sper(i, r, l) for (register int i = r; i > l; i--) #define erep(i, x) for (register int i = h[x]; i; i = e[i]....
ALGO
0.999995
3.01608
33700fbf-0f58-4f3a-889c-e1f59ae7b846
ShyamendraHazra/ju-programming-lab
CPP/CLASS-II/assignments/05_prog.cpp
#include <iostream> #define PI 3.14159 using namespace std; class Circle { private: float radius; public: Circle(float r) : radius(r) {} class Area { public: static float compute(Circle c) { return PI * c.radius * c.radius; } }; }; int main() { float r; cout <<...
TOOL
0.924131
5.972853
83d25ebe-2ebe-4f7f-9019-bffa62088454
Booodyahmed23/udemy_task
network/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.997411
6.76775
45d8be37-1caa-44ca-8473-b181b4b21f12
aniruddh-joshi/GeeksforGeeks
Maximum Sum Combination - GFG/maximum-sum-combination.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> maxCombinations(int N, int K, vector<int> &A, vector<int> &B) { // code here sort(A.begin(),A.end()); sort(B.begin(),B.end()); vector<...
ALGO
0.999978
5.319606
d3e77c94-0aef-495f-8647-bbe7b304f78b
hellocomrade/happycoding
leetcode/LongestValidParentheses.cpp
#include <cassert> #include <stack> #include <string> #include <algorithm> #include <vector> using namespace std; //https://leetcode.com/problems/longest-valid-parentheses/ /* 32. Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) p...
ALGO
0.999003
5.6453
3cb8041e-72cd-4b50-9b46-499e2b563230
DominikaBakalarz/ConfocalMicroscopy
stemscan.cpp
#include "lodepng.h" #include <bits/stdc++.h> #define MAXCELLS 1048576 using namespace std; vector <unsigned char> image; float cells[MAXCELLS*3]; int cStatus[MAXCELLS]; int cSize[MAXCELLS]; int cTypes[MAXCELLS]; int numberOfCells; int numberOfTrials; long imageLen; double matchPercent; double interPercent; double ce...
ALGO
0.923678
3.40335
07eec452-bce9-473f-9d6c-60f0c862dc5e
ishandutta2007/codeforces
olphe/normal/871/A.cpp
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "iomanip" #include "random" using namespace std; const long long int MOD = 1000000007; const long double EPS = 0.00000001; const ...
ALGO
0.999886
3.575193
ba1ccb41-fc1d-4354-b097-051b706bbf68
adarshv2403/Practice
C++/DSA/Array/wavearray.cpp
#include<iostream> #include<vector> using namespace std; class Solution{ public: void wavearray(vector<int> &nums){ int n=nums.size(); for(int i=0;i<n;i+=2){ if(i>0 && nums[i]>nums[i-1]){ swap(nums[i],nums[i-1]); } if(i<n-1 && nums[i]> nums[...
ALGO
0.999977
4.903276
691281ac-c937-4dcd-9c68-88c0233ad551
hnikaein/aryana
convert_genomes.cpp
#include <iostream> #include <fstream> #include <string.h> #include <stdlib.h> #include <map> #include <vector> using namespace std; vector<long long> chromPos, chromLen; unsigned long gs; map<string, int> chromIndex; map<int, string> chromName, fullName; // char chromName[maxChromosomeNum][100]; char *genome; int ch...
DATA
0.893872
3.583534
b3bb630c-e8f2-400f-87ec-bf3e20bae2dd
mariapasheva1/NG_2022_mariapasheva
Lesson1/task4/main.cpp
#include <iostream> using namespace std; int main() { cout << "Motherboard price:" ; int pr1; cin >> pr1; cout << "Videocard price:" ; int pr2; cin >> pr2; cout << "CPU price:" ; int pr3; cin >> pr3; cout << "Discount:" ; int disc; cin >> disc; cout << "Your PC will cost:" ;...
ALGO
0.858372
3.195256
4af8a9bc-20f7-4a4b-a83e-9efca058ac73
A666AHL/writeLeetcode
cpp/leetcode51.cpp
class Solution { public: bool enableFun(int row, int j, string* chess2, int n) { for(int i = 0; i < n; ++i) { if(chess2[i][j] == 'Q') return false; } // top left for(int i=row,k=j;i>=0&&k>=0;i--,k--) { if(chess2[i][k] == 'Q'...
ALGO
0.999721
5.128117
8525dfb1-7729-496d-9b27-25143fbf79c9
MURFYEXP/CLRS
C10-Elementary-Data-Structures/binary_Tree/postorderTraver0.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; struct treeNode { int data; treeNode *left; treeNode *right; treeNode(int data): data(data) { //新结点的左右孩子必须初始化为空 left = nullptr; right = nullptr; } }; vector<int> postorderTraversal(treeNode* roo...
ALGO
0.999905
4.753138
84011308-5f4a-4b89-89be-9d7a4772a427
persona7548/BaekjoonAlgo
9012.cpp
#include <iostream> #include <stack> #include <string> using namespace std; string VPSCheck(string PS) { stack<char> s; for (int i = 0; i < PS.length(); i++) { if (PS[i] == '(') s.push(PS[i]); else if (s.empty()) return "NO"; else s.pop(); } if (s.empty()) return "YES"; else return "NO"; } int...
ALGO
0.999757
4.83231
d52b9a1a-5a1d-4be0-ae04-52da274abc41
NitchayaninT/Microprocessors
LAB5-1/LAB5-1/main.cpp
#define F_CPU 20000000 #include <avr/io.h> #include <util/delay.h> void set_direction(){ //uint8_t dir = DDRB; asm volatile( "ldi r16, 0xFF \n\t" "out %0, r16 \n\t" "ldi r17, 0x00 \n\t" "out %1, r17 \n\t" : : "I" (_SFR_IO_ADDR(DDRB)), "I" (_SFR_IO_ADDR(DDRD)) : "r16", "r17" ); } void toggling(uint8_t count){...
TOOL
0.979246
4.020165
1bbeb031-c4f5-46e2-a607-115cf4009dca
alexandraback/datacollection
solutions_2749486_0/C++/twinkle/b.cpp
#include <iostream> using namespace std; int T,x,y,Case; int main(){ //freopen("test.in","r",stdin); //freopen("test.out","w",stdout); scanf("%d",&T); for(int Case = 1; Case <= T ;Case ++){ printf("Case #%d: ",Case); cin >> x >> y; if(x > 0){ for(int i = 1; i <= x; i ++){ printf("WE"); } } if(...
ALGO
0.999755
3.12365
d991a3ff-3493-4433-beec-380abd976d13
abaran803/DSA-by-Narsimha
Tree/TreeNonRecursive.cpp
#include<iostream> #include<stack> using namespace std; struct Node { int data; Node* left; Node* right; }; Node* CreateNewNode(int data) { Node* temp = new Node(); temp->data = data; temp->left = temp->right = NULL; return temp; } Node* Insert(Node* curr,int data) { if(curr) { if(data > curr->data) cu...
ALGO
0.999956
4.835347
d8e2460f-eba4-46c7-bbd0-b5afbb2df911
Harshkant87/SDE_sheet_180
1.Arrays/calculate_pow.cpp
// You are given two numbers ’x’(it’s a float), and ’n’(it’s a integer). // Your task is to calculate ‘x’ raised to power ‘n’, and return it. // The expected time complexity is ’O(logn)’, and the expected space complexity is ’O(1)’, where ‘n’ is the power to which the number should be raised. // Note: // In the outp...
ALGO
0.999796
5.362419
8a7e2a34-7f12-46f2-b91d-27ded21fc55e
muchenhen/MyRayTracing
eigen/doc/examples/TutorialLinAlgExSolveLDLT.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A, b; A << 2, -1, -1, 3; b << 1, 2, 3, 1; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the right hand side b:\n" << b << endl; Matrix2f x = A.ldlt().solve(b); cout << "...
ALGO
0.999917
3.807622
1a588510-65b4-470c-b631-86b5052c70fb
codingpotato/algorithm-cpp
leetcode/binary_search/median.cpp
#include <doctest/doctest.h> #include <vector> // 4. Median of Two Sorted Arrays class Solution { public: struct ArrayInfo { const std::vector<int>* nums; int left; int right; }; double findMedianSortedArrays(const std::vector<int>& nums1, const std::vector<int>& nu...
ALGO
0.999868
7.442616
e527acdc-d394-4746-ae36-df3f0d0171e4
Tiger1994/LeetCode
Q135.cpp
#include<vector> #include<numeric> using namespace std; class Solution { public: int candy(vector<int>& ratings) { int num = ratings.size(); vector<int> candies(num, 1); for (int i = 0; i < num - 1; i++){ if (ratings[i] < ratings[i + 1]) candies[i + 1] = candies[i] + 1; } for (int i = num - 1; i > 0;...
ALGO
0.999997
6.066408
00d2966f-62d7-496e-a3d2-2e3c0814b9f6
Sandeep-Sanwale/Data-Structure-CPP
LinkedLIst/Creation Deletion And Insertion In LInked List/Circularly Singly Linked List Insertion and Deletion of Nodes.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; }; struct Node *addToEmpty(struct Node *last, int data) { // This function is only for empty list if (last != NULL) return last; // Creating a node dynamically. struct Node *temp = (struct...
ALGO
0.999619
4.674603
ad06537e-55e4-4c6e-b032-a9c46b0534cf
revantg/shittycoders
1B - Square Difference/B - Square Difference.cpp
/* 1 B - Square Difference author : ltra_golu | submitted at : 2018-10-07 20:46:23 time taken : 31 ms | memory consumed : 8 KB */ #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fs first #define ...
ALGO
0.999906
4.912621
c0da5ba3-3ac3-4b85-80ad-5aa5f1c10565
deepakkasera/Algorithms
Maze.cpp
#include <bits/stdc++.h> using namespace std; int maze(std::vector<std::vector<int> > &v,int rows,int cols){ if(v[0][0] == -1) return 0; for(int i=0;i<rows;i++){ if(v[i][0] == 0) v[i][0] = 1; else break; } for(int i=1;i<cols;i++){ if(v[0][i] == 0 ) v[0][i] = 1; else break; } for(int i=1;i<rows;i++)...
ALGO
0.999916
4.657829
70927e6d-e55e-4a80-a7d4-855da6712042
tankbattle/algorithm_practice
zoj/1196Depot_ok.cpp
#include <iostream> using namespace std; int Rest[200]; int DepotCount; int RestCount; int Input() { cin>>RestCount>>DepotCount; if(RestCount==0) return 0; for(int i=0;i<RestCount;i++) cin>>Rest[i]; return 1; } int Abs(int a) { if(a<0) return -a; return a; } int PlaceDepot() { int MinCost[200][30]; i...
ALGO
0.999344
3.547124
1e825ba2-e627-4eeb-9471-9fe90e4e2cab
Biditmangal/CompetitiveProgramming
CodeForces/CodeForces ProblemSet/D-700/1207A.cpp
#include <math.h> #include <time.h> #include <ctype.h> #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <string> #include <vector> #include <iostream> #include <algorithm> using nam...
ALGO
0.995473
3.200292
11f9d082-a186-44c0-9f46-d3c0b53e18db
joaovmeyer/ML
neural network/nn-example.cpp
#include <iostream> #include <cmath> #include <memory> #include "graph.h" #include "nn-layered.h" #include "dataset.h" #include "rng.h" #include "vector.h" using namespace std; #define PI 3.1415926535 int main() { Graph graph; // make a small neural network with one hidden layer with 5 neurons Network nn; nn....
DATA
0.979931
5.18031
cf393775-f69e-4124-b2cc-435a17bd87a4
AnitSarkar123/My_All_Practice_in_GFG
Difficulty: Basic/Implement Queue using Linked List/implement-queue-using-linked-list.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; struct QueueNode { int data; QueueNode *next; QueueNode(int a) { data = a; next = NULL; } }; struct MyQueue { QueueNode *front; QueueNode *rear; void push(int); int pop(); MyQueue() {front = rea...
ALGO
0.997477
5.454345
f56f9d15-6a10-4c06-9758-99f6cc58a845
AnikDas-Stack/HackerEarth-Problem-Solution
Binary Matrix.cpp
#include <stdio.h> #include <math.h> #include <stdlib.h> int main() { int N, M,power, index; double sum, Max; scanf("%d %d", &N, &M); int ara[N][M]; char s[M]; for(int i=0; i<N; i++) { scanf("%s", s); for(int j=0; j<M; j++) { ara[i][j]=s[j]; } ...
ALGO
0.999893
3.642052
7faf06d4-4a36-4140-aadb-837f8b4f9664
nvbangg/CodePTIT
Cpp/CPP0220_BIEN_CUA_MA_TRAN.cpp
#include <bits/stdc++.h> using namespace std; void TestCase() { int n; cin >> n; int a[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> a[i][j]; } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { ...
ALGO
0.998428
3.719203
dfc913a7-6cad-476c-a1be-f81a87751ffa
hashoak/CPP-programs
22-1-1@insert_search_print_in_linked_list.cpp
#include<bits/stdc++.h> using namespace std; class node { public: int data; node* next; node(int val) { data=val; next=NULL; } }; void insertAtTail(node* &head, int val) { node* n=new node(val); if(head==NULL) { head=n; return; } node* temp...
ALGO
0.999857
4.483225
ec11cb10-fd30-472e-8416-af15a7600a8b
leogomes/Tesseract3-iPhone-Demo
tesseract-3.00/dict/permdawg.cpp
/*---------------------------------------------------------------------- I n c l u d e s ----------------------------------------------------------------------*/ #include "context.h" #include "conversion.h" #include "cutil.h" #include "dawg.h" #include "freelist.h" #include "globals.h" #include "ndminx.h...
ALGO
0.993743
5.04877