uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
f82d8503-831a-4c25-9eff-6754e2b13003
YDWWYD/MECH552-Project
KalmanFilterinCPP/KalmanFilterinCPP/xzgetrf.cpp
/* Include Files */ #include "rt_nonfinite.h" #include "butterBandpassOnly.h" #include "xzgetrf.h" #include "colon.h" /* Function Definitions */ /* * Arguments : int m * int n * emxArray_creal_T *A * int lda * emxArray_int32_T *ipiv * ...
ALGO
0.999965
4.695419
31c19ee0-1e55-4095-ac8b-737a9b8dff3c
xi-3259-priyasingh/flutter_app_assignment
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
30b00903-5f4e-4602-ba06-b6e3ac2fe3cc
animishtripathy24/DATA-STRUCTURES-Cpp
PATTERN QUESTIONS/pattern_9.cpp
#include<iostream> using namespace std; int main() { int n; cout<<"enter the number of rows"<<endl; cin>>n; int row=1; while(row<=n) { int col=1; int count=row; while(col<=row) { cout<<count<<" "; count=count+1; col=col+1; ...
ALGO
0.998153
3.977305
2001b008-4bbd-48a3-9ee9-2e08efe6b4bf
Sean0628/competitive_programming
atcoder/abc/abc162/b.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair<int, int>; void chmax(ll& a, ll b) { a = max(a, b); } void chmin(ll& a, ll b) { a = min(a, b); } int main() { int n; cin >> n; ll ans = ...
ALGO
0.999927
4.30473
f8cfd4ff-66fc-4de7-95b9-bcd7b76be0ee
ishandutta2007/codeforces
rivalq/normal/1163/B1.cpp
//https://codeforces.com/problemset/problem/1163/B2 #pragma GCC optimize "trapv" #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define rep(i,a,n) for(int i=a;i<n;i++) #define rep3(n) for(int i=0;i<n;i++) #define inarr(arr,n) rep(i,a,n)cin>>arr[i] #de...
ALGO
0.999972
4.184705
85b74071-4959-4b87-a358-655921aae076
harsh0045/CP31-Sheet
Ratings-1500/D_Lunar_New_Year_and_a_Wander.cpp
#include <bits/stdc++.h> using namespace std; #define pi (3.141592653589) #define mod 1000000007 #define pb push_back #define is insert #define mp make_pair #define ff first #define ss second #define all(x) x.begin(), x.end() #define min3(a, b, c) min(c, min(a, b)) #define min4(a, b, c, d) min(d, min(c, min(a, b))) #de...
ALGO
0.999995
4.421617
650c5e53-6a09-4584-ac6a-3873596c4ecc
zrdagdelen/-_-
1 zadanie/1 zadanie/1 zadanie.cpp
#include <iostream> #include <sstream> #include <vector> #include <algorithm> #include <climits> // Структура TreeNode для представления узлов бинарного дерева struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; // Функция для постро...
ALGO
0.999984
6.383744
f989886e-13df-4551-b1ec-f9e263066665
saifur-rahman0/Competitive-Problem-Solving
Beecrowd/1116- Dividing X by Y Beecrowd.cpp
#include <iostream> using namespace std; int main() { int x, y, t; cin >> t; while(t--) { cin >> x >> y; if(y == 0) cout << "divisao impossivel" << endl; else printf("%.1f\n", (float)x/(float)y); } }
ALGO
0.999524
3.68602
d9df2a61-b045-4630-ae9a-fe368e66719d
zxok365/mandrake
contest/2015-08-06-Shanghai-2004/B.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define GG pair<int, pair<int, int> > using namespace std; const int N = 100; const int inf = 12343210; char mat[N][N]; const int dx[5] = {-1, 0, 1, 0, 0}; const int dy[5] = {0, 1, 0, -1, 0}; int movement[N][N], sumx[N][N], sumy[N][N], moved...
ALGO
0.999826
3.404729
fa83a3cc-2b3d-40ae-9838-5de5e42c064a
HolicKW/codetree-TILs
240728/palindrome 여부 판단하기/determine-whether-palindrome-is-present.cpp
#include <iostream> #include <string> using namespace std; int main() { // 여기에 코드를 작성해주세요. string str; cin >> str; int len = str.length(); for(int i = 0; i<(len/2);i++){ if(str[i] != str[len-i-1]){ cout << "No"; return 0; } } cout << "Yes"; return...
ALGO
0.99993
4.458703
bf4ab18a-79bd-4574-89d2-f129d4de9660
by-student-2017/lammps-14May16
src/GPU/pair_lj_cut_coul_dsf_gpu.cpp
/* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include "pair_lj_cut_coul_dsf_gpu.h" #include "atom.h" #include "atom...
ALGO
0.999168
6.329962
6abb5c7d-5caa-4014-bf14-ffe6fb2d0b3c
jiiink/DataStructure
DS_2023_STL_Part_1_1a/STL_1300___Generic_algorithms_1e/___New_ready/Generic_algo_12_generic_generate.cpp
// Illustrating the generic generate algorithm #include <iostream> #include <cassert> #include <algorithm> #include <vector> using namespace std; template <typename T> class calc_square { T i; public: calc_square(): i(0) {} T operator()() { ++i; return i * i; } }; int main() { cout << "Illustrating the gener...
TOOL
0.974642
4.726807
ef12f66f-a107-4408-8964-2713da9e2a3a
Chan531/BaekJoon_Online_Judge
N-Queen.cpp
#include <iostream> using namespace std; int n, ans = 0, visited[16], uvisited[31], dvisited[31]; // xǥ 湮, ´밢 湮, ϶밢 湮 void nqueen(int cnt) { if (cnt == n + 1) { ans++; return; } for (int j = 1; j <= n; j++) // (cnt, j) 湮 õ { if (visited[j] || uvisited[cnt + j] || ...
ALGO
0.999898
4.192966
0e6ab037-387d-4fb0-812c-391284a623dc
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/cmap/distance_search/train/a0fbf417-c2f4-4348-a797-6f68fe6e87aa.cpp
#include <fstream> #include <algorithm> #include <cmath> #include <set> #include <iomanip> using namespace std; ifstream fin("cmap.in"); ofstream fout("cmap.out"); const int N = 1e5 + 7; const double INF = 1e10; struct Point { double x, y; bool operator < (const Point &a) const { if (x == a...
ALGO
0.999776
4.359804
f43c39ba-757e-4798-ae98-8858807b9844
ishandutta2007/codeforces
unstoppablechillmachine/normal/805/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; int const INF = 1e9 + 7; ll const BINF = 1e18 + 10; int const MAXN = 1e6 + 10; ld const EPS = 1e-9; #define f first #define sec second #define pb push_back #define pii pair<int, int> #define p...
ALGO
0.999789
3.749015
fcab3e5f-e074-491e-a283-80e6b21dc6c1
vansh-codes/Complete-Interview-Preparation-GFG
2_Data-Structures-(Basics)/6_Searching/Problems/3_count1sBinary.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // Function to count number of Ones // arr: input array // N: size of input array int countOnes(int arr[], int N) { // Your code here int l = 0; i...
ALGO
0.999561
6.31983
e27784ae-6ace-4fb0-842d-e1d2cd878958
Adish03101/backig
node-v22.14.0/deps/icu-small/source/common/ucharstrie.cpp
#include "unicode/utypes.h" #include "unicode/appendable.h" #include "unicode/ucharstrie.h" #include "unicode/uobject.h" #include "unicode/utf16.h" #include "cmemory.h" #include "uassert.h" U_NAMESPACE_BEGIN UCharsTrie::~UCharsTrie() { uprv_free(ownedArray_); } UStringTrieResult UCharsTrie::current() const { ...
ALGO
0.962336
7.54039
7f5e3a72-9dc8-4789-8b4c-5987eb57188a
FrankyWish/game_dev
Flappy_Bird/Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include <fcntl.h> #include <io.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call m...
TOOL
0.973169
6.933585
48791514-2276-47ec-a885-4572400e84d7
216k155/luxcore-luxcoin
src/rpcdump.cpp
#include <iostream> #include <fstream> #include "init.h" // for pwalletMain #include "rpcserver.h" #include "ui_interface.h" #include "base58.h" #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/variant/get.hpp> #include <boost/algorithm/string.hpp> using namespace json_spirit; using namespace std...
TOOL
0.935756
6.122885
44a6fde1-62f5-4160-8f6c-af95631d3de0
nanamikato/celo
packages/flutter-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.998528
6.786404
4fad373a-9e1b-4bbb-99d6-921990423c79
ShadyGamal10798/LeetCode-Solutions
1351-count-negative-numbers-in-a-sorted-matrix/1351-count-negative-numbers-in-a-sorted-matrix.cpp
class Solution { public: int first_ng(vector<int>arr){ int a=0 , b=arr.size()-1 , ans=-1; while(a<=b){ int mid = (a+b)/2; if(arr[mid] < 0){ ans=mid; b=mid-1; } else{ a=mid+1; } } return ans; } int countNegative...
ALGO
0.999993
6.156562
f68201f1-96d2-44a7-9d2d-d79ca2f15d4f
khhitish/Leetcode-GFG
630-course-schedule-iii/630-course-schedule-iii.cpp
class Solution { // https://youtu.be/Z-jQUO07dm0 private: static bool compare(vector<int>& v1, vector<int>& v2) { return v1[1]<v2[1]; } public: int scheduleCourse(vector<vector<int>>& courses) { priority_queue<int> pq; int totalduration=0; sort(courses.begin(), course...
ALGO
0.999842
6.311068
6c7e8ce6-08a9-43c5-8357-462eee49eeef
marcutudor79/performance_analysis
invertBits/main.cpp
#include <iostream> #include <chrono> // used for time measurement #include <cstdlib> #include <bitset> #include <omp.h> #include <thread> using namespace std::chrono; #define ONE_MILLION (100000000) // Done in 588 ms naive with interleaved std::thread 12 Threads // Done in 616 ms naive with chunked std::thread 12 T...
ALGO
0.999771
5.374791
afc8327d-0431-4d8e-b148-3351e63ef9b5
wkddbwls801/baekjoon
17219.cpp
// йȣ ã #include<iostream> #include<unordered_map> using namespace std; int N; int M; string addr; string pw; string find_addr; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); unordered_map<string, string> notepad; cin >> N >> M; for (int i = 0; i < N; i++) { cin >> addr >> pw; ...
ALGO
0.99756
3.966955
156ae9e0-f1d8-470e-8423-30131061cf59
Vinay-Yadav01/CrackYourInternship
2502-sort-the-people/2502-sort-the-people.cpp
class Solution { public: vector<string> sortPeople(vector<string>& names, vector<int>& heights) { vector<string> ans; vector<pair<int, string>> temp; int n = names.size(); for (int i = 0; i < n; i++) { temp.push_back({heights[i], names[i]}); } sort(temp.rb...
ALGO
0.99998
6.417557
ed4f0db7-ee29-4cd5-8ad7-47e760967b9e
anurag211824/C-PLUS-PLUS
L-29_RECUSION_ON_STRING/2_palindrome_num_check.cpp
#include <iostream> using namespace std; bool palindrome_check(int num, int reverse, int m) { // base case if (num == 0) { return reverse == m; } int remainder = num % 10; reverse = reverse * 10 + remainder; return palindrome_check(num / 10, reverse, m); } bool palindrome(int num, ...
ALGO
0.999723
4.447779
073ef373-4f56-4c8e-89e7-24dc10bcfe77
ahmad-zaid99/CP_C-
CF_Global_19/B_MEX_and_Array.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double const ll MOD = 1e9 + 7; const ll INF = 1e9; const ld EPS = 1e-9; void solve() { ll n; cin>>n; ll arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } ll dp[n][n] = {0}; for(int len = 1;len<=n;len++){...
ALGO
0.999713
4.94216
e09538f6-5455-4da4-b0a3-ee37e8a96282
fuzuoyi/dataStruct
Bitmask/Bitmask/main.cpp
#include <stdio.h> #include <stdlib.h> #include "bitmask/bitmask.h" int main () { int s = 75; printf_bin (s); checkBit (s, 2); s = clearBit (s, 0); s = clearBit (s, 1); leastSignificantBit (s); printf_bin (s); system ("pause"); return 0; }
ALGO
0.956011
5.485932
fb4cb2ce-99e4-494e-babb-cdfaaf70a568
amitk0091/LeetCode-daily-problem
514-freedom-trail/freedom-trail.cpp
class Solution { public: // int dp[101][101]; // int help(int i, int pre_j, string ring, string key) { // if (i == key.length()) // return 0; // if (dp[i][pre_j] != -1) // return dp[i][pre_j]; // int cost = INT_MAX; // for (int j = 0; j < ring.length(); j+...
ALGO
0.999981
5.666775
739a6cbe-e1f6-4a38-a699-175681eabdc3
Himansh38/rohit-negi
Lecture_14_03.cpp
#include<iostream> using namespace std; void Swap( int &x, int &y ) // parameter { int z ; z=x; x=y; y=z; } void Swap ( float &x , float &y) // Function overloading { float z; z=x; x=y; y=z; } int main() { // Swap two numbers int a, b; cout<< " Enter two numbers "<<endl ; ...
ALGO
0.966223
4.165817
9a123eb7-d507-4e53-a889-c469a3082c25
h3136514/Algorithm
baekjoon/랜덤 마라톤/2485.cpp
// 수학, 유클리드 호제법 #include <iostream> #include <vector> using namespace std; int N, num[100000], add; vector<int> v; // 유클리드호제법 int gcd(int a, int b){ if(!b) return a; return gcd(b, a%b); } // 가로수 int main(){ cin >> N; for(int i = 0; i < N; i++){ cin >> num[i]; if(i == 0) ...
ALGO
0.999961
3.926848
be0ff8d1-b9be-4074-a14b-3a38832f185c
Beisenbek/PL2016_G1_W8_D2
3.cpp
#include <iostream> using namespace std; int s(int x){ return x * x; } bool insideF1(int x,int y){ return y >= 2*x + 2 && y >= -x && s(x+1) + s(y-1) <=4; } bool insideF2(int x,int y){ return y <= 2*x + 2 && y <= -x && s(x+1) + s(y-1) >=4; } bool IsPointInArea(int x, int y){ return insideF1(x,y) || insideF2(x,y...
ALGO
0.999754
3.827965
793ac320-7398-481c-a1a2-e070c2f25d5a
jakaria0499/XPSC
week-20/day_2/a.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int t;cin>>t; while(t--){ double x,y,z;cin>>x>>y>>z; int tm1 = ceil(x/z), tm2 = ceil(y/z); cout<<max(2*tm1-1,2*tm2)<<endl; } return 0; }
ALGO
0.999298
3.821517
f10d6eb7-d7a8-42aa-9c20-8501faa8d0a4
SparshJain2000/Codeforces_solutions
A/1230A.cpp
/*David and bag of candies*/ #include <algorithm> #include <cstdio> #include <vector> int main() { std::vector<long> a(4); for (long p = 0; p < 4; p++) { scanf("%ld", &a[p]); } sort(a.begin(), a.end()); bool possible(false); if (a[3] == a[0] + a[1] + a[2]) { possible = ...
ALGO
0.999896
3.792485
eb928cce-5745-40b6-b7aa-766a579b2216
zshangGEO/gmsh
contrib/mpeg_encode/pframe.cpp
/*===========================================================================* * pframe.c * * * * Procedures concerned with generation of P-frames * * * * EXPORTED PROCEDURES: * * GenPFrame * * ResetPFrameStats * * ShowPFrameSummary ...
ALGO
0.96591
5.890893
c851998f-2391-4559-ab59-18fe64158855
vermagaurav8/Algo-DS-Notes
AmazonTestSeries/Queue/QueueReversla.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //function Template for C++ //Function to reverse the queue. class Solution { public: queue<int> rev(queue<int> q) { // add code here. stack<int> s; while(!q.empty(...
ALGO
0.999851
5.717993
8869e7e0-ec6f-4632-9dd0-1d6283dbe32d
StormLight14/godot-4.3-freebsd
modules/mono/utils/path_utils.cpp
/**************************************************************************/ /* path_utils.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
TOOL
0.927826
4.762822
51d7e0fb-fe79-415f-bb41-6d5db33d8509
ishandutta2007/codeforces
andreasyan/normal/19/B.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2003; const long long INF = 2003000000009; int n; int t[N]; int c[N]; long long dp[N][N * 2]; int main() { cin >> n; for (int i = 1; i <= n; ++i) cin >> t[i] >> c[i]; for (int i = 0; i <= n; ++i) { for (int j = 0; j <= n + n;...
ALGO
0.999863
3.267678
e850ed04-cd84-4e9d-acbe-4fa090a3c042
EscalanteRivas/ClaseFundamento
Soluciones/IF/exercise10.cpp
// numero mas cercano a 100 #include <iostream> #include <cmath> // Para usar la funcion abs using namespace std; int distancia(int numero); int main() { int num1, num2; cout << "Ingrese dos numeros: " << endl; cin >> num1 >> num2; if (distancia(num1) < distancia(num2)) { cout << num1 << "...
ALGO
0.997666
4.396452
c2e127c0-8eaf-4b31-86db-6048770c50d6
rajanpatel5577/cpp-learning
06_templates.cpp
#include <iostream> #include <string> using namespace std; // Template class template <typename T> class vector{ public: vector(T size):size(size),arr (new T(size)){}; ~vector() { delete[] arr; }; T getSize() const { return size; }; T dotProduct(vector &other) const { ...
ALGO
0.979522
5.273322
f90b5c84-1483-4642-b8dd-0c219e04fb15
ishandutta2007/codeforces
shik/normal/700/C.cpp
// {{{ by shik #include <bits/stdc++.h> #include <unistd.h> #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x),end(x) #define REP(i,n) for ( int i=0; i<int(n); i++ ) #define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ ) #define FOR(it,c) for ( auto it=(c).begin(); it!=(c).end(); it++ ) #define MP make_pair #define...
ALGO
0.999912
3.694549
19ec92df-4928-4c21-8eb4-4bbdf09f11de
TETEURYAN/TheHuxleyQuestions
Huxley_2511.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; const int N1 = (int)2e5 + 100; #define PI 3.14159265358979323846264338327 #define forn for(int i=0;i<n;i++) #define fornn for(int i=1;i<=n;i++) #define each(i,c) for(__typeof((c).begin()) i=(c)...
ALGO
0.996221
3.73274
92fdc9e2-ffde-4ebb-bc9a-ea8f7c955ef7
THonour99/LPR_2
tesseract-main/src/arch/intsimdmatrix.cpp
#include "intsimdmatrix.h" #include "matrix.h" // for GENERIC_2D_ARRAY #include "simddetect.h" // for SIMDDetect namespace tesseract { const IntSimdMatrix *IntSimdMatrix::intSimdMatrix = nullptr; // Computes a reshaped copy of the weight matrix w. void IntSimdMatrix::Init(const GENERIC_2D_ARRAY<int8_t> &w, std::...
ALGO
0.992706
6.317689
c62f9a54-d38b-4404-8c71-2eb6c4ac7839
junest66/algorithm-practice
baekjoon-cpp/silver/silver2/1699.cpp
// Baekjoon - 1699번 제곱수의 합 #include <iostream> using namespace std; int n; int d[100010]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for(int i=1; i<=n; i++) { d[i] = i; for(int j=1; j*j<=i; j++) { d[i] = min(d[i],d[i-j*j]+1); } } cout << ...
ALGO
0.99982
4.054657
db452d3b-1fdf-4ad8-ab73-132e1d1a67fa
tijiH/FLUTTER-421
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.998762
6.786404
8a59e10d-88fa-49de-8eb7-ed08f4738d06
rofi93/Codeforces
C. Hacking Cypher.cpp
/* -------------------------------- */ /* Name: MD. Khairul Basar */ /* Institute: HSTU */ /* Dept: CSE */ /* Email: <EMAIL> */ /* -------------------------------- */ #include <bits/stdc++.h> /* all header files included */ #define fs first #define sc ...
ALGO
0.999929
3.287927
2cef4ba1-a4e4-44f5-9ae7-3d950f36fd1b
nandrehetan/AI-Lab
CSP.cpp
#include <iostream> #include <vector> using namespace std; vector<int> use(10); // set 1, when one character is assigned previously struct node { char letter; int value; }; int isValid(node* nodeList, const int count, string s1, string s2, string s3) { int val1 = 0, val2 = 0, val3 = 0, m = 1,...
ALGO
0.99988
5.062511
2176cb11-4b43-48db-b4eb-50269adf4c41
AhmedKrimi/self-driving-car-nanodegree-udacity
nd013-c5-planning-starter-master/project/starter_files/eigen-3.3.7/test/eigensolver_complex.cpp
#include "main.h" #include <limits> #include <Eigen/Eigenvalues> #include <Eigen/LU> template<typename MatrixType> bool find_pivot(typename MatrixType::Scalar tol, MatrixType &diffs, Index col=0) { bool match = diffs.diagonal().sum() <= tol; if(match || col==diffs.cols()) { return match; } else { I...
TEST
0.85543
6.804839
dfe5d535-6f89-4019-b722-4d387988f068
golaced/OmniBotSeries-Tinker
OmniBotHub/Linux/control_task2/eigen/doc/examples/TemplateKeyword_flexible.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; template <typename Derived1, typename Derived2> void copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src) { /* Note the 'template' keywords in the following line! */ dst.template triangularView<Upper>() = src.template...
TOOL
0.987045
5.804369
3a6ed9f8-dd93-44da-8bd6-a9b9a686d688
ishandutta2007/codeforces
marckess/normal/1236/E.cpp
#include <bits/stdc++.h> #define endl '\n' #define fi first #define se second #define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k)) #define forn(i,n) for (int i = 0; i < n; i++) #define forr(i,a,b) for (int i = a; i <= b; i++) #define all(v) v.begin(), v.end() #define pb push_back using namespace std; typedef long long...
ALGO
0.999981
3.804955
9864ee32-40aa-4bb8-a508-018bf7e3531c
omarfaruk-k/CnCpp
LCS.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ld long double #define ull unsigned long long #define pb push_back #define pop pop_back typedef vector<int> vec; typedef pair<int,int> pr; typedef vector<pr> vecpair; int32_t main(){ string str1, str2; cin>>str1>>str2; int n = ...
ALGO
0.999991
4.381314
ef00a93f-e897-4d97-90a4-90b22459ad24
ngkore/OAI-bpf-upf
Core-NFs/NFs/oai-cn5g-nssf/src/nssf_app/nssf_config.cpp
/*! \file nssf_http2-server.h \brief \author Rohan Kharade \company Openairinterface Software Allianse \date 2021 \email: <EMAIL> */ #include "nssf_config.hpp" #include "if.hpp" #include <nlohmann/json.hpp> #include "nssf_config_types.hpp" using namespace std; using namespace oai::config::nssf; using namespac...
CONFIG
0.906292
5.711606
a83baab8-416e-4e21-8e85-3d3dedff4073
Iuly2000/Projects
Structuri de Date(C++)/Tema1/prob7/prob7/Source.cpp
#include <iostream> using namespace std; int nivele(int &n) { cout << "Introduceti un numar:"; cin >> n; if (n % 2 == 0) return n / 2; else return n / 2 + 1; } void construirespirala(int n, int**& matrice, int nivel) { matrice = new int* [n]; matrice[0] = new int[n * n]; for (int index = 1; index < n; index+...
ALGO
0.999699
3.33034
5ea51b9c-b5a4-4636-b3d9-d38cfc3a715c
ishandutta2007/codeforces
syury/normal/554/A.cpp
#include<stdio.h> #include<string> #include<iostream> #include<map> #include<utility> using namespace std; map<string,int>mp; int cnt=0; int main(){ string s; cin>>s; for(char c='a';c<='z';c++){ string s1=c+s; if(!mp.count(s1)){mp.insert(make_pair(s1,1));cnt++;} s1=s+c; if...
ALGO
0.999308
3.050186
59cca348-9a5a-4939-9334-7f8ee6ae4508
AmanPant9026/DSA
Arrays/2_Medium/10_longest_consecutive_sequence.cpp
/* //Better approach #include <bits/stdc++.h> using namespace std; int longestSuccessiveElements(vector<int>&a) { int n = a.size(); if (n == 0) return 0; //sort the array: sort(a.begin(), a.end());//O(NlogN) int lastSmaller = INT_MIN; int cnt = 0; int longest = 1; //find longest seque...
ALGO
0.999919
5.202527
745e0048-e74a-4c31-b3b3-e3eda3cebe89
haokai-xuan/Competitive-Programming
LeetCode/Easy/FindSpecialSubstrOfLenK.cpp
class Solution { public: bool hasSpecialSubstring(string s, int k) { int len = s.size(); if (k > len) return false; if (len == 1 && k == 1) return true; for (int i = 0; i <= len - k; i++) { char c = s[i]; bool maybe = true; ...
ALGO
0.99987
5.832459
2f07d6ca-d7c1-4635-8532-47e7de762ea4
hjhj97/ProblemSolving
BOJ/BFS & DFS/6603-로또.cpp
#include<stdio.h> int k; int num[15], arr[15]; void recur(int cur, int last) { if (cur == 6) { for (int i = 0; i < 6; i++) printf("%d ", num[arr[i]]); printf("\n"); return; } for (int i = last + 1; i < k; i++) { if (6 - cur <= k - i) { arr[cur] = i; recur(cur + 1, i); } } return; } int main() ...
ALGO
0.999574
3.533616
f4e8e705-d9d4-46cc-8342-2905949f256a
nya3jp/icpc
camp/2008russia/src/upsolving/fence.cpp
#include <iostream> #include <vector> #include <complex> #include <map> #include <set> #include <cstdio> #include <cmath> #include <cassert> using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); i++) #define FOR(i,c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define ALLOF(c) (c).beg...
ALGO
0.99962
4.043305
6aa7a55a-59ad-48d6-80ed-776164cce2cc
Ganesh9949/CSA0619-DAA
exp8 bubblesort.cpp
#include <stdio.h> void bubbleSort(int arr[], int n) { int temp; int swapped; for (int i = 0; i < n - 1; i++) { swapped = 0; for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; ...
ALGO
0.999951
5.593723
48824c9e-f0ce-4c89-898d-c8547e14fe1d
Prakharsahu10/DataStructure_Algorithms
BINARY TREES/Levelorder_Traversal.cpp
/* Levelorder Traversal in Binary Tree */ #include <iostream> #include <vector> #include <queue> using namespace std; // TreeNode struct represents // a node in a binary tree struct TreeNode { int val; TreeNode *left; TreeNode *right; // Default constructor for TreeNode TreeNode() : val(0), left...
ALGO
0.999997
7.155814
f05ba774-62ac-4d3a-8235-530822a685fe
kunal-004/DSA_Practice
Q.Array3/longestSubArrSum.cpp
#include<bits/stdc++.h> using namespace std; //brute force approach int maxLength(vector <int> &arr, int n, int k){ int maxLen = 0; int sum = 0; for(int i=0; i<n; i++){ sum = 0; for(int j=i; i<n; j++){ sum+=arr[j]; if(sum == k){ maxLen = max(maxLen, j-i+1); } else if(sum ...
ALGO
0.999941
4.968438
6e676f17-295a-45a9-9e32-78563d73c10f
Aashu1303/GfG
Medium/Optimal Strategy For A Game/optimal-strategy-for-a-game.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //Function to find the maximum possible amount of money we can win. class Solution{ long long solve(int n , int arr[] , int i , int j , int count , bool first, vector<vector<long long>> &dp){ if(count == n) return 0...
ALGO
0.999877
5.979882
e6efcd19-5513-4634-852f-11739d0e222d
Groot616/ProgrammersBasic
프로그래머스/2/76502. 괄호 회전하기/괄호 회전하기.cpp
#include <string> #include <vector> #include <stack> using namespace std; int solution(string s) { int answer = 0; for (int i = 0; i < s.length(); ++i) { stack<char> st; for (int j = 0; j < s.length(); ++j) { if (st.empty()) st.push(s[j]); e...
ALGO
0.998285
4.753243
3a506c7b-6578-4928-b58e-9c9bb38d9655
plucchesic/myURIsolutions
C++/URI 1044.cpp
#include <iostream> #include <iomanip> #include <locale> using namespace std; int main() { setlocale(LC_ALL, "Portuguese"); //sempre comentar nome de variveis! //sempre dar ctrl+shift+f ao terminar o cdigo. int X,Y; cin >> X >> Y; if(X%Y==0 || Y%X==0) cout << "Sao Multiplos" << endl; else cout << "Na...
ALGO
0.999898
3.874046
7f3d43a5-f89b-4e0a-a211-601a93bcee53
minmarg/gtalign_alpha
src/libmymp/mpstage1/MpStageFrg3.cpp
#include <omp.h> #include <math.h> #include <string> #include "libutil/cnsts.h" #include "libutil/macros.h" #include "libutil/templates.h" #include "libutil/CLOptions.h" #include "libgenp/gproc/gproc.h" #include "libgenp/gdats/PM2DVectorFields.h" #include "libgenp/gdats/PMBatchStrData.h" #include "libmymp/mpproc/mppr...
ALGO
0.998381
5.734732
bda30702-4980-48c6-8b80-a7a441153322
ShahdMohammedSamir/Data-Structures
sort.cpp
#include <iostream> # include <vector> #include <algorithm> using namespace std; bool f = true;//to check if the array is sorted if it already sorted we will terminate the loop void buble_s(vector<int>& s, int n) { for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - i - 1; j++) { if (s[j] > s[j + 1]) { ...
ALGO
0.999912
3.712316
91055953-a5fc-4877-b16a-e0d302efaba3
Kumarsanj1v/C--Programing
Practice/AllAboutVector.cpp
#include <iostream> #include <vector> using namespace std; int main() { //Initialization of vector type vector <int> vec = {1,2,4,2,6,7,8}; vector <int> vec1(5,10); vector <int> vec2(vec1); //initialization from an array int array[] = {2,5,1,7,3,5,8,9,10}; vector <int> vec3(array,array...
ALGO
0.937714
3.228493
6fba56f4-eba8-471d-914e-fcce33f72866
anindya028/Programming-Contest-Problems
regional/2191.cpp
#include<stdio.h> #define SIZE 600005 int A[SIZE],M[SIZE]; void initialize(int node,int b,int e) { if(b==e) { M[node]=A[b]; return; } initialize(2*node,b,(b+e)/2); initialize(2*node+1,(b+e)/2+1,e); M[node]=M[2*node]+M[2*node+1]; } int query(int node,int b,int e,int i,int j) { int p1,p2; if(i>e || j<b) r...
ALGO
0.99977
3.587977
faf956b7-254d-40fb-97f5-a6293f72df5c
YJL65/Cpp-study
STL/vector存放内置数据类型.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void myPrint(int val) { cout << val << endl; } void test01() { vector<int> v; v.push_back(10); v.push_back(20); v.push_back(30); v.push_back(40); v.push_back(50); //第一种 //vector<int>::iterator ibegin = v.begin();//起始迭代器,指向容器中第一个元素 ...
ALGO
0.895327
3.625557
b5a6097e-1e27-4007-bc45-dca7259dfa10
Ironblade1/coding-question
2316-count-unreachable-pairs-of-nodes-in-an-undirected-graph/2316-count-unreachable-pairs-of-nodes-in-an-undirected-graph.cpp
class Solution { public: int dfs(int node,vector<bool> &visi, vector<vector<int>>& adj){ visi[node]= true; int cnt =1; for(auto ngbr:adj[node]){ if(!visi[ngbr]){ cnt+= dfs(ngbr,visi,adj); } } return cnt; } long long co...
ALGO
0.999967
5.793967
6c5a343b-7906-4202-9a8c-70d2edb3c61d
QinHongZhe/hongzhe-leetcode
solution/0400-0499/0423.Reconstruct Original Digits from English/Solution.cpp
class Solution { public: string originalDigits(string s) { vector<int> counter(26); for (char c : s) ++counter[c - 'a']; vector<int> cnt(10); cnt[0] = counter['z' - 'a']; cnt[2] = counter['w' - 'a']; cnt[4] = counter['u' - 'a']; cnt[6] = counter['x' - 'a']; ...
ALGO
0.999167
5.629677
fc487ad7-d85a-4aa3-9bf7-8694aa30f6d3
jonathanshangrila/Codecademy-C-plus-plus
temperature.cpp
#include <iostream> using namespace std; int main() { // New York City 31 degrees F on 02/07/2021 at 06:20 PM double tempf; double tempc; cout << "This program converts the temperature in Fahrenheit to Celsius.\n"; cout << "What is the temperature in Fahrenheit?\n"; cin >> tempf; tempc = (tempf - 32)/1.8; cout ...
TOOL
0.942846
4.49186
8176b513-be24-44af-ac38-58ccae9801b9
jki14/competitive-programming
legacy/tc.f/FiringEmployees.cpp
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <climits> #include <algorithm> #include <vector> #include <string> #include <queue> #include <list> #include <bitset> #include <set> #include <map> #include <functional> #include <nu...
ALGO
0.999788
4.361166
7ec301ca-1bfb-4766-b72e-c8d1dba85021
jyc/gecko
modules/fdlibm/src/s_atan.cpp
/* @(#)s_atan.c 5.1 93/09/24 */ /* atan(x) * Method * 1. Reduce x to positive by atan(x) = -atan(-x). * 2. According to the integer k=4t+0.25 chopped, t=x, the argument * is further reduced to one of the following intervals and the * arctangent of t is evaluated by the corresponding formula: * * ...
ALGO
0.999844
6.395678
81aa32cd-65fe-4bcd-96a3-3e328089f157
cheny1uan/beginer-c
7-b1.cpp
/* 2351892 11 */ #define _CRT_SECURE_NO_WARNINGS //ʹVSΪunsafeĺ #include <iostream> #include <iomanip> #include <cstdio> #include <ctime> #include <conio.h> //getch˲Ҫ֧Linux #include <string.h> //Dev/CBstrlenҪ using namespace std; struct tj_time { int tj_year; //ʾ int tj_month; //ʾ(1-12) int tj_day; //ʾ(1-28/29/30/...
TOOL
0.970423
3.112304
c6070b85-9587-4509-9e45-6995a67d9673
OpenDigitalTwin-Dev/FENGSim
toolkit/Geometry/cgal/examples/Min_sphere_d/min_sphere_3.cpp
#include <CGAL/Simple_cartesian.h> #include <CGAL/Min_sphere_of_points_d_traits_3.h> #include <CGAL/Min_sphere_of_spheres_d.h> #include <CGAL/Random.h> #include <iostream> #include <cstdlib> typedef CGAL::Simple_cartesian<double> K; typedef CGAL::Min_sphere_of_points_d_traits_3<K,double> Traits; typedef CGA...
ALGO
0.998847
6.310374
dbf5c98b-bada-423f-bb51-521d9ed6e039
delowarsikder/Coding-Ground
Online Judge solution/LightOj/1202 - Bishops.cpp
#include<bits/stdc++.h> using namespace std; int main() { int tc,x1,y1,x2,y2; // cin>>tc; tc=GetInt(); for(int i=1; i<=tc; i++) { int d1,d2; cin>>x1>>y1>>x2>>y2; d1=abs(x1-x2); d2=abs(y1-y2); if(d1==d2) { printf("Case %d: %d\n",i,1); } ...
ALGO
0.999579
3.951546
61f3b9d4-db3b-4101-9306-1196b2fa1bc0
vrinda22/DS-ALGO
BST/delete_nodes_greater_than_k.cpp
/*Given a BST and a value x, the task is to delete the nodes having values greater than or equal to x. Input Format: The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. The first line of each test case consists of an integer N. Then in the next line are N space separa...
ALGO
0.99997
5.340925
5d973b53-dcc4-43c3-b62b-4767dc2cf543
Xilinx/Vitis_Libraries
data_analytics/L1/tests/text/edit_distance/test.cpp
#include <iostream> #include "xf_data_analytics/text/editDistance.hpp" #define N 35 #define M 35 #define BIT 6 void dut(hls::stream<ap_uint<BIT> >& len1_strm, hls::stream<ap_uint<64> >& query_strm, hls::stream<ap_uint<BIT> >& len2_strm, hls::stream<ap_uint<64> >& input_strm, hls::s...
ALGO
0.997608
3.857069
6f08203e-76c8-479d-8488-c8347793a4fa
troyastorino/dcba
materials/6.838/a1/libs/meshlab/src/plugins_unsupported/filter_mutualinfo/parameters.cpp
#include <iostream> #include "common/meshmodel.h" #include "parameters.h" using namespace std; using namespace vcg; Parameters::Parameters(bool _use_focal, Shot &_reference, int w, int h, Box &_box, CMeshO &mesh): use_focal(_use_focal), max_norm(false), reference(_reference), box(_box) { srand(1); rx = w/(doubl...
TOOL
0.935634
5.242084
d3ad3dde-c0ef-4f08-8995-f0cd7a9b0b13
joshbird98/Wildlife_Monitor
Wildlife_Monitor_v2/Middlewares/Third_Party/EdgeImpulse_joshbird98-project-1_MachineLearning/edgeimpulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/maximum_minimum.cpp
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/maximum_minimum.h" #include "edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h" #include "edge-impulse-sdk/tensorflow/lite/c/common.h" #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/common.h" #include "edge-impulse-sdk/tensorflow/lit...
ALGO
0.995638
7.674602
fae1e196-5f8d-4c77-bcd9-ae40c494d571
Aman913k/DSA-Problems
1671-minimum-number-of-removals-to-make-mountain-array/1671-minimum-number-of-removals-to-make-mountain-array.cpp
int dp[1001][1001][3]; int helper(vector<int>& nums, int prev, int indx, int seenPeak){ if(indx>=nums.size()){ if(seenPeak==2) return 0; return -1e9; } if(dp[prev+1][indx][seenPeak]!=-1) return dp[prev+1][indx][seenPeak]; int pick=-1e9, nonpick=-1e9, setPeak=-1e9; i...
ALGO
0.999996
5.407946
462011d8-412d-42e1-a803-7faa8f132649
ishandutta2007/codeforces
yukihana0416/normal/1528/C.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <cmath> #include <climits> #include <cassert> #include <iostream> #include <vector> #include <queue> #include <list> #include <stack> #include <deque> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #inc...
ALGO
0.999919
4.02974
2275be85-284f-4613-9fcf-76c0aff7a5a7
AnmolSingla23/DSA
0101-symmetric-tree/0101-symmetric-tree.cpp
/** * 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, TreeNode *right) : val(x), l...
ALGO
0.99999
6.549674
823fe168-0985-49d2-add2-cfcc8e56f961
Prasanthi-Peram/DSA-OOPS
Day6.cpp
#include <bits/stdc++.h> using namespace std; class node{ public: int data; node* previous; node *next; node(int a){ data=a; previous=NULL; next=NULL; } }; int length(node *head){ node* temp=head; int count=0; while(temp!=NULL){ count++; temp=...
ALGO
0.999774
4.828312
b9cd46fa-7e79-4eab-8b96-1ae2a284de7f
asmhozyain/Galerkin
galerkin/eigen-3.4.0/unsupported/doc/examples/BVH_Example.cpp
#include <Eigen/StdVector> #include <unsupported/Eigen/BVH> #include <iostream> using namespace Eigen; typedef AlignedBox<double, 2> Box2d; namespace Eigen { Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point } struct PointPointMinimizer //how to compute squa...
ALGO
0.999855
6.52624
0acae769-49f8-41ce-8557-c8c9702f4cc9
Jafkrim/TLX-toki-Submissions
Pemrograman Dasar dengan C++/05/A.cpp
#include <iostream> using namespace std; int main() { for (int i = 121; i <= 125; i++) { cout << (i * i) << endl; } }
ALGO
0.99473
3.26313
5acf76c3-26ee-4724-8318-4e57f020d21c
immortalmin/ZOJ
1712.cpp
#include<iostream> #include<string> #include<cmath> using namespace std; int main() { string s; while(cin>>s) { if(s[0]=='0') break; int l=s.size(),a,sum=0; for(int i=0;i<s.size();i++) { a=s[i]-48; sum=sum+a*(pow(2,(l-i))-1); } cout<<sum<<endl; } return 0; }
ALGO
0.999662
3.24908
e2a26ff5-a34b-4d91-9f7e-c8e48a9727aa
shahishree03/codingaDays
Day37/pallindrome.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: bool isPalindrome(Lis...
ALGO
0.99987
6.209595
2242fa4e-1895-4d52-a8cb-85f72a4a5436
enthought/enable
kiva/agg/agg-24/src/ctrl/agg_polygon_ctrl.cpp
#include "ctrl/agg_polygon_ctrl.h" namespace agg24 { polygon_ctrl_impl::polygon_ctrl_impl(unsigned np, double point_radius) : ctrl(0, 0, 1, 1, false), m_polygon(np * 2), m_num_points(np), m_node(-1), m_edge(-1), m_vs(&m_polygon[0], m_num_points, false), m_st...
ALGO
0.944321
6.188685
a0a3df49-a6f9-491b-8e4c-3ff5e796b89b
yeasinrafee/cpp_practice
sum_of_all_subarrays.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int current = 0; for (int i = 0; i < n; i++) { current = 0; for (int j = i; j < n; j++) { current += arr[j];...
ALGO
0.99986
3.873088
3a27da21-4ef6-48fd-851a-8e762b49d901
ghembo/ImageOptimizer
src/image_optimizer.cpp
#include "iopt/image_optimizer.hpp" #include "iopt/logger.hpp" #include "jpeg.hpp" #include "iopt/optimization_result.hpp" #include "image_processor.hpp" #include <regex> #include <future> #include <numeric> namespace fs = std::filesystem; const std::string ImageOptimizer::s_version = "0.0.0"; std::string ImageOpt...
TOOL
0.914091
6.956594
9f26f0ed-329d-4004-b051-4c9ce55a9b80
Edemolt/CrackYourInternship
day24/77. Combinations.cpp
class Solution { public: void solve(int ind, int n, int k, vector<int> &temp, set<vector<int> > &ans){ if(ind > n + 1) return ; if(temp.size() == k){ ans.insert(temp); return; } temp.push_back(ind); solve(ind + 1, n, k, temp, ans); temp.pop_ba...
ALGO
0.999967
5.75014
0fad3ef1-8fc9-42f7-8ab3-d58443ded9c8
andrewmw94/llvm_clang_GSoC
lib/Transforms/Utils/CloneFunction.cpp
#include "llvm/Transforms/Utils/Cloning.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DebugInfo.h...
TOOL
0.959422
5.514937
f2dad24f-d08a-42dd-b1c6-29d19b465a41
LadderLay/Data-Structure
cpp_classExercise/9/9-1.cpp
#include <iostream> #include <string> using namespace std; template <class T> bool isSorted(T arr[], int n){//Ascending order int i; for(i=1; i<n; i++){ if(arr[i] <= arr[i-1]){ break; } } return i == n; } int main() { int arr1[4] = {1, 2, 3, 4}; cout << isSorted(ar...
ALGO
0.996646
4.910275
dc1f811b-d0a8-4b7f-ba2c-29e66f6a60db
srinathdivate123/DSA
Arrays/S_33_Find_missing_and_repeating_number.cpp
// You are given a read-only array of N integers with values also in the range [1, N] both inclusive. Each integer appears exactly once except A which appears twice and B which is missing. The task is to find the repeating and missing numbers A and B where A repeats twice and B is missing // Better is using hashSet #...
ALGO
0.999898
4.789223
294d86bc-efae-4798-ada3-f1be3f55c48e
OxLearnC/LearnC
code/Program9.cpp
#include <iostream> // Functions // Functions can have any number of arguments int add(int a, int b, int c) { return a + b + c; } // Functions don't have to return a value (we say they return `void`) void printGreeting(std::string name) { std::cout << "Hello, " << name << "!" << std::endl; // No return statem...
TOOL
0.927211
5.998659
43d6506a-a220-46dd-b7d6-1fe7ae8b2a75
DFabric/browser-tools
apps/audioconverter/ffmpeg.js/libfdk-aac/libSBRenc/src/ton_corr.cpp
/* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Frderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION T...
ALGO
0.997569
3.40128
18e063df-1ea9-4dac-b9fe-7f1092c48b95
binay0607/cpp
dp/12_unboundedsubsetcount1D.cpp
#include<bits/stdc++.h> using namespace std; #define vi vector<int> #define pii pair<int,int> #define vii vector<pii> #define li list<int> #define nl "\n" #define ff first #define ss second #define pb push_back #define pf push_front #define mp make_pair #define ppc __builtin_popcount #define rep(i,a,b) for(int i=a;i<b...
ALGO
0.999967
3.682718
7dfd5ef3-334f-4ede-afa5-419fce7a9444
yashgarg2107/Evolutionary_tsp
tsp_brute.cpp
#include "tsp_incl.h" void find_path(int low, int high, double &disti) { if(disti > min_dist) return; if(low==high) { disti += distances[idx[low-1]][idx[low]]; disti += distances[idx[low]][idx[0]]; // if instead of this distance at runtime, if we calculate distance at end, then we get if(min_...
ALGO
0.999986
3.950843