uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ecd5c7ab-dc44-4c94-9f5f-de1f9f932b06
fdzwon/model-predictive-control
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); m << 1,-2, -3,4; cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff() << " == " << m.colwise().lpNorm<1>().maxCoeff() << endl; cout << "infty-norm(m...
ALGO
0.999486
4.076589
d3ad5369-2754-42e3-a2c0-0a5a19fd6509
Talu001/DATA-STRUCTURE-LAB-03
Ex2.cpp
#include <iostream> using namespace std; int main() { const int size = 3; int matrix[size][size] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }; cout << "The given matrix is:" << endl; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { cout << ma...
ALGO
0.979589
3.93412
b000588b-2f65-4d20-9dba-e967fb8e1691
ishandutta2007/codeforces
74traktor/normal/1427/C.cpp
#include<bits/stdc++.h> using namespace std; int const maxn = 1e5 + 5; int t[maxn], x[maxn], y[maxn]; int dp[maxn]; int pref[maxn]; main() { #ifdef HOME freopen("input.txt", "r", stdin); #endif // HOME ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int r, n; cin >> r >> n; for (in...
ALGO
0.999958
4.480565
57db2b4c-ce17-4467-8d99-cda878fe9dbe
FahimFBA/CodeMarshal-Solution
Point_Inside_Circle.cpp
#include<iostream> #include<cmath> using namespace std; int main() { // In this example, it is declared that - No float or double types of variable is not allowed, but using normal int n, we can't get the exact proper solutions for all cases. So I'm taking long long int for all of the values here. long long ...
ALGO
0.998961
3.955477
5d51eeb0-aae0-456f-add9-42b8c8b84d44
KaranGulve4342/DSA
strings/Validate IP Address.cpp
// LEETCODE 468 class Solution { public: string validIPAddress(string queryIP) { int n = queryIP.length(); // Check for IPv4 if (queryIP.find('.') != std::string::npos) { int dot = 0; for (int i = 0; i < n; ++i) { string temp = ""; ...
ALGO
0.999464
6.696877
7adec95d-106c-4506-8408-e47e9548d676
firiexp/contest_log
AOJ/2825.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::nu...
ALGO
0.999707
3.682344
852f75a2-48ff-4fea-8e4c-d20222db6d7e
bitrig/bitrig-xenocara
lib/mesa/src/glsl/ir_hv_accept.cpp
#include "ir.h" /** * \file ir_hv_accept.cpp * Implementations of all hierarchical visitor accept methods for IR * instructions. */ /** * Process a list of nodes using a hierarchical vistor. * * If statement_list is true (the default), this is a list of statements, so * v->base_ir will be set to point to each...
ALGO
0.929141
6.247004
940730d1-90e1-44d1-8e65-7d51a2310437
scalyvladimir/algorithms_and_data_structures
contests/3sem/1st/quick_sort.cpp
#include <iostream> #include <vector> using namespace std; void readArray(vector<int> &array, const int &size); void printArray(const vector<int> &array); void quickSort(vector<int> &array, const int &left, const int &right); int main() { int n; cin >> n; vector<int> array; array.reserve(n); r...
ALGO
0.999976
5.312663
314d2485-b0fe-4b10-9f72-2b0cb1a46f29
yujinrobot/minsu_pcl
src/extract_sphere.cpp
#include <ros/ros.h> #include <sensor_msgs/PointCloud2.h> #include <pcl_ros/point_cloud.h> #include <pcl/ros/conversions.h> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/ModelCoefficients.h> #include <pcl/filters/voxel_grid.h> #include <pcl/filters/passthrough.h> #include <pcl/filters/extract...
ALGO
0.970951
4.949083
04b1b085-03cd-4643-881a-9be7e8dfb6fe
jkim971201/SkyPlace
src/skyline/skyplace/src/InitialPlacer.cpp
#include <cstdio> #include <vector> #include <map> #include <random> #include <memory> #include <chrono> #include "gpulouvain.h" #include "InitialPlacer.h" namespace skyplace { std::shared_ptr<ndarray<int,1>> nint(const std::vector<int> &X) { return new_array_ptr<int>(X); } std::shared_ptr<ndarray<double,...
ALGO
0.999216
5.04754
1067f32c-0e69-4c86-9dc0-aec1c2249f17
adityaraj0109/Competitive-Programming-DSA
LeetCode/Merge Sorted Array.cpp
#include <bits/stdc++.h> #include <unordered_set> using namespace std; void debugMode() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif } //approach 1 // void merge(vector<int> &nums1, int m, vector<int> &nums2, int n) // { // for (int i = m; i < nums1.s...
ALGO
0.999979
5.265603
c1e0b0c0-11b4-4d53-9272-b4b98f99507a
Anik-Modak/CSE4Y1S_Lab
Simmulation and Modeling/Runs Up-Down/Runs Up-Down 1st Segment.cpp
//Anik_Modak #include<bits/stdc++.h> using namespace std; int main() { int n, opt; cout<<"Enter the number of random numbers to generate : "; cin>>n; cout<<"Enter '1' to chose LCM, '2' to chose built-in function : "; cin>>opt; if(opt==1) { int seed, a, c, mod, temp; cout<<...
ALGO
0.98458
3.407774
55ccce6d-630c-4916-a82f-7f50b59533aa
watchpoints/daily_read_coding
oceanbase-master/src/storage/ob_partition_group_lock.cpp
#include "ob_partition_group_lock.h" #include "lib/stat/ob_latch_define.h" #include "lib/utility/utility.h" namespace oceanbase { using namespace common; namespace storage { ObPartitionGroupLock::ObPartitionGroupLock() : locks_() {} ObPartitionGroupLock::~ObPartitionGroupLock() {} int64_t ObPartitionGroupLock::l...
TOOL
0.950065
6.375214
5915429d-4dde-45a0-a804-17554f3db592
boshishuoshuo/cppprimer
ch1/e1-4.cpp
#include <iostream> int main(){ int v1 = 0, v2 = 0; std::cin >> v1 >> v2; std::cout << "The produce of " << v1 << " and " << v2 << " is " << v1 * v2 << std::endl; return 0; }
ALGO
0.999512
5.094145
4c88da6f-7099-406d-9f60-466fda2e2e5c
ishandutta2007/codeforces
lul____sepled1305/normal/1555/D.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; string s; cin>>s; //only 6 possibilities //Pre-process the string int dp[n+1][6]; dp[0][0] = 0; //abc dp[0][1] = 0; //acb dp[0][2] = 0; //bac dp[0][3] = 0; //bca dp[0][4] = 0; //cab dp[0][5] = 0; //cba for(int i=0;i<n;i++) { f...
ALGO
0.999752
3.949563
139a63ba-9c00-418a-bcb4-9720f5b4178c
thebird-/ts-stream-server-client
boost_1_61_0/libs/numeric/odeint/examples/elliptic_functions.cpp
#include <iostream> #include <fstream> #include <cmath> #include <boost/array.hpp> #include <boost/numeric/odeint/config.hpp> #include <boost/numeric/odeint.hpp> #include <boost/numeric/odeint/stepper/bulirsch_stoer.hpp> #include <boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp> using namespace std; using...
ALGO
0.999991
5.535803
85848da9-8858-4509-9e6b-ac2ffdcff0b7
slightperturbation/Cobalt
ext/emsdk_portable/emscripten/tag-1.34.1/tests/box2d/Box2D/Dynamics/Joints/b2WheelJoint.cpp
#include <Box2D/Dynamics/Joints/b2WheelJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Linear constraint (point-to-line) // d = pB - pA = xB + rB - xA - rA // C = dot(ay, d) // Cdot = dot(d, cross(wA, ay)) + dot(ay, vB + cross(wB, rB) - vA - cross(wA, rA)) // = -dot(ay, vA) -...
ALGO
0.948942
6.978952
72906300-c7bd-4e9b-92da-30018168da01
Marice26/2progra.1
Examen corto de patidos politicos 21-2-2025/programa del examen corto.cpp
#include <iostream> #include <iomanip> using namespace std; // Funcin para ingreso del funcionamiento del codigo void ingresarNotas(int notas[5][4]) {// se establece el numero de partido y el bumero de rondas que se va utilizar for (int i = 0; i < 5; i++) { cout << "Ingrese las notas del partido " << i + ...
ALGO
0.999002
4.861974
1616269c-8532-4dba-b48f-6cce0d8f3a3a
rajobasu/IOI-Prep
POI/TetrisAttack.cpp
/* SOLUTION : map the numbers according to the ordering of each number's first occurance. Now number of swaps required is the number of inversions in the second occurance. we can now simulate the swaps, swapping each a and b are adjacent and b < a. Keep track of all the info in a segtree, or possibly in O(1) time. */
ALGO
0.999861
4.95858
421697bc-99ef-48a0-9f07-25b366bec0e6
yester31/GaussianFilter_EX
Gaussian_filter_gpu/Gausian_cpu.cpp
#include "Gaussian.h" // cpu gaussian filtering using OpenCV library extern "C" void blurring_gaussian(Mat src, float sigma, int ksize) { if (src.empty()) { cerr << "Image load failed!" << endl; return; } //imshow("src", src); Mat dst; uint64_t total_time = 0; for (int iIdx =...
TOOL
0.879752
4.115217
e6ee9c75-442a-4919-b426-5fc405780f6c
umerrfarooq/DSA-LAB
LAB 10/TASK_01_56154_UMER_FAROOQ.cpp
#include<iostream> using namespace std; struct Node { int data; Node* left; Node* right; }; // Function to create a new node Node* createNode(int value) { Node* newNode = new Node(); newNode->data = value; newNode->left = newNode->right = NULL; return newNode; } // Function to insert a n...
ALGO
0.999962
6.70858
4bb043e3-dd18-485d-b12d-4829f47950d7
codeshuttler/CodeGenCangjie
data/transcoder_evaluation_gfg/cpp/MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_2.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int arr [ ], int n ) { int * jumps = new int [ n ]; int min; jumps [ n - 1 ] = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( arr [ i...
TEST
0.999747
5.170598
f842ccb1-1f77-4c95-9b8e-d00f22f400a8
CyberBoyAyush/Data-Structures-And-Algorithms
26_graphs/Floyd_Warshall_Algorithm/floydWarshallAlgo.cpp
// Floyd Warshall Algorithm #include<bits/stdc++.h> using namespace std; #define fo(i,n) for(int i = 0 ;i<n ;i++) // TC : O(N^3) SC : O(N^2) class Solution { public: void shortest_distance(vector<vector<int>>&matrix){ int n = matrix.size(); // size of the matrix or nodes present // Converting all t...
ALGO
0.999986
5.257706
4697dd62-2ace-4e3d-bcad-659e5b827553
logsol/SilverbirdApp
Plugin/JuceLibraryCode/modules/juce_audio_devices/native/juce_android_Midi.cpp
#define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD) \ METHOD (getJuceAndroidMidiInputDevices, "getJuceAndroidMidiInputDevices", "()[Ljava/lang/String;") \ METHOD (getJuceAndroidMidiOutputDevices, "getJuceAndroidMidiOutputDevices", "()[Ljava/lang/String;") \ METHOD (openMidiInputPortWithJuceIndex, "op...
TOOL
0.878589
6.982456
d99338c8-eb69-49aa-90b1-ee40fe140a12
leverimmy/Codes
比赛/学校/2019-11-11测试/source/PC33_HB-马杰成/matrix.cpp
#include<bits/stdc++.h> using namespace std; int n,m; int sum[1050][1050]; int ans; int main(){ freopen("matrix.in","r",stdin); freopen("matrix.out","w",stdout); scanf("%d%d",&n,&m); for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ char ch; cin>>ch; int num=ch-'0'; sum[i][j]=sum[i][j-1]+num; } } // i...
ALGO
0.999779
3.272715
9b299594-b8f5-433d-bcc0-694694fc2db1
asv018/CP-Algo-Templates
Graphs/Cycle_in_Directed_Graph.cpp
#include<bits/stdc++.h> #include<algorithm> #include<unordered_map> #include<vector> #include<unordered_set> #include<set> #include<map> #include<queue> #include<stack> #include<map> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 9...
ALGO
0.999949
4.69867
82a56a5b-64de-4457-8b53-f7891206c68b
AniKouDev/CodeChef
0-1000 Beginner Level/Chef_and_Contest.cpp
#include <iostream> using namespace std; int main(){ int t; cin >> t; while(t--){ int a,b,c,d; cin >> a >> b >> c >> d; if(a+(10*c) < b+(10*d)) cout << "Chef"; else if(a+(10*c) == b*(10*d)) cout << "Draw"; else cout << "Chefina"; ...
ALGO
0.997856
3.510734
8fe90d24-5a9c-47a7-8516-c1f6107126b8
cxxxin/LeetCode
478.cpp
#include <iostream> #include <vector> #include <random> using namespace std; /* 在圆内随机生成点 */ /* 思路: 拒绝采样,随机生成正方形内的点,不符合就重来 */ class Solution { public: double radius, x_center, y_center; mt19937 gen{random_device{}()}; uniform_real_distribution<double> dis; Solution(double radius, double x_center, ...
TOOL
0.91297
4.137234
8f3164d5-b46c-45d7-8fe4-36099cc3daa1
emaanuelsilvaa/EDB-2016.2
Insertion Sort.cpp
#include <iostream> using namespace std; struct vetor{ int tam; int* elementos; }; /** ----------------------------------------------------------- * Dado um vetor de tamanho n, após a execução desta função, * os elementos do vetor estarão ordenados em ordem crescente. * * @param v - uma struct contendo um vetor e...
ALGO
0.999577
4.496449
b5edccb2-4140-413a-b3ac-48a06cd664b5
satylogin/HACKEREARTH
Joseph and Array.cpp
#include <bits/stdc++.h> using namespace std; #define mkp make_pair #define pb push_back #define scan(x) scanf("%d", &x) #define ll long long int #define MOD 1000000007 #define pii pair<int, int> ll prime[1000008], mark[1000008], fact[10000008]; ll inv(ll a) { ll ans = 1, b = MOD - 2; while (b) { if (b & 1) { ...
ALGO
0.999969
3.992474
7a088a34-6c2b-49b7-a760-3a7f7bea747c
adi01012002/Cpp-Programming
Dynamic Programming 1/fibonacci_Tabulation.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n = 13; vector<int> dp(n + 1); dp[0] = 0; dp[1] = 1; for (int i = 2; i < n; i++) { dp[i] = dp[i - 1] + dp[i - 2]; } for (int i = 0; i < n; i++) { cout << dp[i] << " "; } }
ALGO
0.999954
4.061901
336cdbe3-7c29-4211-98c6-503f8e1482a4
mohan120105/leetcode
0383-ransom-note/0383-ransom-note.cpp
class Solution { public: bool canConstruct(string ransomNote, string magazine) { unordered_map<char, int> freq; // Count frequency of each character in magazine for (char c : magazine) { freq[c]++; } // Check if ransomNote can be constructed for ...
ALGO
0.99969
7.150959
53affb68-4c59-429f-995d-6b4553d66949
Gayathri5678/CSA0611-DAA
insert num.cpp
#include <stdio.h> int main() { int size, position, number; printf("Enter size, position, and number: "); scanf("%d %d %d", &size, &position, &number); int arr[size + 1]; printf("Enter %d elements: ", size); for (int i = 0; i < size; scanf("%d", &arr[i++])); for (int i = size; i > posit...
ALGO
0.999833
4.239645
dd3eed01-2cdd-4ae4-8e26-d18cfcd49785
ryanlockman333/UCDenver_School_Projects
DataStructHW/hw3/hw3functions.cpp
/* Ryan Lockman: 101430670 CSCI 2421:001 Fall 2013 hw3functions.cpp Description: Global function definitions for Polynomial. */ // Headers #include "hw3functions.h" // Global Functions
TOOL
0.927229
3.613394
d85a5f4a-c19b-4229-9f01-a4071e1db09e
mauroberto/maratona
prova/numeromg.cpp
#include<stdio.h> #include<iostream> #include<string> #include<vector> using namespace std; string n1, n2; vector<int> resposta; int r; int main(){ cin >> n1 >> n2; while(n1 != "0" || n2 != "0"){ resposta.clear(); int a = 0; int pos1, pos2; for(int i = n1.size()-1, j = n2.size()-1; i >= 0 && j >= 0; i--, ...
ALGO
0.999951
3.407799
a4f78387-d4a9-42b4-bff8-7eaf1f82d3eb
ashutoshongithub25/COMPETITIVE-PROGRAMMING-CODECHEF-CODEFORCES-HACKERRANK-
kana_and_dragon_quest_game.cpp
/* Kana was just an ordinary high school girl before a talent scout discovered her. Then, she became an idol. But different from the stereotype, she is also a gameholic. One day Kana gets interested in a new adventure game called Dragon Quest. In this game, her quest is to beat a dragon. The dragon has a hit point of...
ALGO
0.999849
4.260582
f0b4a0fd-42d4-43b5-8502-38f1f064b849
TheKingAAV7/leetcode
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp
class Solution { public: int isPrefixOfWord(string sentence, string searchWord) { string tmp=""; unordered_map<string, int>mp; int pos=1; for(char c: sentence){ // cnt++; if(c==' '){ tmp=""; pos++; } el...
ALGO
0.999956
5.285741
d235644d-d17b-45e9-afa9-2d0341abe5cf
llvm-mirror/libcxx
test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp
// <list> // template <class Compare> void merge(list& x, Compare comp); // If (&addressof(x) == this) does nothing; otherwise ... #include <list> #include <functional> #include <cassert> #include "test_macros.h" #include "min_allocator.h" int main(int, char**) { { int a1[] = {10, 9, 7, 3, 1}; int a2[] ...
TEST
0.913747
4.658856
5d847e09-f3b0-4e64-83b0-ade496646861
Thrinaria/Codebase
boost_1_34_1/boost_1_34_1/libs/graph/test/dag_longest_paths.cpp
#include <boost/graph/adjacency_list.hpp> #include <boost/graph/dag_shortest_paths.hpp> #include <boost/vector_property_map.hpp> #include <boost/test/minimal.hpp> using namespace boost; #include <iostream> using namespace std; int test_main(int, char*[]) { typedef adjacency_list<vecS, vecS, directedS, no_propert...
TEST
0.987991
5.220096
889bfea7-940c-4ce3-bb05-d2f0b3ff8741
pradeep-kumar-1705807/Data-structure-and-Algorithms
candies.cpp
#include<iostream> using namespace std; int main() { int i; int sum=0; ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; int A[n],B[n]; for(i=0;i<n;i++) { cin>>A[i]; } if(A[0]<A[1]) { B[0]=1; B[1]=2; } else { B[1]=...
ALGO
0.9999
3.46948
1ec8fbea-fafe-41cd-94b5-a8f145b683ac
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_8368_13.cpp
#include <bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; int n; char s[209]; int main() { gets(s); n = strlen(s); int l = n; for (int i = 1; i < n; i++) { s[l] = '0'; s[++l] = 0; } n = l; reverse(s, s + n); long long t = 2, ans = 0; if (s[0] == '1') ans = 1; for (int i = ...
ALGO
0.999985
4.514326
325e54a1-c064-4fe5-9fbe-06d60ea08012
thacanh/DSA
DSA01026.cpp
#include<bits/stdc++.h> using namespace std; int n; vector<int> x; int s[2]={6, 8}; void Print() { if(x[0]!=1 or x[n-1]!=0) return; for(int i=0; i<n-1; ++i) { if(x[i]==x[i+1] and x[i]==1) return; } for(int i=0; i<n-3; ++i) { if(x[i]==0 and x[i+1]==0 and x[i+2]==0 and x[i+3]==0) r...
ALGO
0.999936
3.684321
7273cd27-cc79-4544-8d09-fd41c70fa23a
milmillin/comp-prog
GoogleKickStart/2020_F/atm.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; void f() { int n, x; scanf("%d%d", &n, &x); vector<pair<int, int>> tbl; int k; for (int i = 0; i < n; i++) { scanf("%d", &k); tbl.push_back({k / x, i}); } sort(tbl.begin(), tbl.end()); for (auto& t : tbl) { print...
ALGO
0.999028
3.190461
cc8a6284-2b69-40ff-abf9-382d9c88d842
ahmdmnt/codeRepositories
cppWorkspace/session02/task04.cpp
/* * Task 04: * Create a function to merge two arrays together. */ #include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> numList_1{10, 20, 1000, 2, -5, 100}; std::vector<int> numList_2{30, 50, 3000, 300}; std::vector<int> merged_numList(numList_1.size() + numList_2.size()); s...
ALGO
0.999634
5.9101
1e80b4cd-a5dd-4874-8dfc-a9d33a4aa17e
HekpoMaH/Olimpiads
Shumen AiB/trainings/vyzstanoviMnogoygylnika.cpp
#include<bits/stdc++.h> using namespace std; const int nmax=1e3+9; int a[nmax][nmax]; int n,m; int h[nmax][nmax],v[nmax][nmax]; string ans[nmax]; void read(){ cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } } void solve(){ for(int i=1;i<=n;i++){ for(int ...
ALGO
0.999974
3.08544
4e4c3c4f-4ca8-41c0-b821-15c17919bc39
tyz7000/C-languge
C++程序/模板类 - 栈和队列/mainapp.cpp
#include <iostream> #include "mylist.h" // C++ кջʹ÷ using namespace std; class point { public: point(int a=0, int b=0) {x = a; y = b;} int x, y; }; int main() { char i; char ch; queue<char> q; // в for (i='a'; i<='z'; i++) q.push(i); cout << "дС: " << q.size() << endl; while (!q.empty()) { ch =...
TOOL
0.862629
3.307802
25f0f8bf-4a81-402a-be49-ddaf1a42bfa2
bijoybiswas21/GFG-160-Day-s
GeeksforGeeks-POTD-main/GeeksforGeeks-POTD-main/October 2024 GFG SOLUTION/October-09.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; Node *right, *down; Node(int x) { data = x; right = NULL; down = NULL; } }; // } Driver Code Ends /*structure of the node of the linked list is as struct Node { int data; Node...
ALGO
0.999547
6.317685
271aedaa-9ba1-4b0e-8d30-6e5d622fbeb4
abcdmyz/leetcode
pascal triangle.cpp
class Solution { public: vector<vector<int> > generate(int numRows) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<vector<int>> pascal; pascal.clear(); if ( numRows==0 ) return pascal; vector<int> ...
ALGO
0.999829
5.423857
d44643f6-e829-4eb8-bf7c-b3a826052068
pradeep-kumar-1705807/Mytest
maya.cpp
#include <bits/stdc++.h> using namespace std; int binomialCoeff(int n, int k) { int res = 1; if ( k > n - k ) k = n - k; for (int i = 0; i < k; ++i) { res *= (n - i); res /= (i + 1); } return res; } int main() { int t; cin>>t; while(t--){ int n; cin>>n; vector<in...
ALGO
0.999918
4.30911
c5cb4ab4-b319-484d-8e05-10a3bb7b8a38
rlawlwhs/history_blog
cpp/beakjoon/28702.cpp
#include <iostream> #include <string> #include <cctype> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); std::string fb[3]; int nnum=0; std::string ans = ""; cin >> fb[0]; cin >> fb[1]; cin >> fb[2]; for (int i=0; i<3; i++) { if (isdigit(char(fb[i][0]))) { nnum = ...
ALGO
0.999754
4.857684
1800e358-1eb7-46fc-8137-e9af7a4afc66
hjr265/sport-programming
Codechef/ACM-ICPC Asia-Kanpur Site First Round Online Contest 2012/PRESTI.cpp
// In the name of Allah, Most Gracious, Most Merciful // / // // // // // ?? #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> #include <deque> #include <functional> #include <iostream> #include <list> #include <map>...
ALGO
0.99966
4.015636
30fcf7c9-c405-445a-8160-f6b4982ced8f
Ayushkumar48/128DaysofCodeStreak
Day26.cpp
//LeetCode //31. Next Permutation class Solution { public: void nextPermutation(vector<int>& nums) { int n=nums.size(); int index=-1; for(int i=n-2;i>=0;i--){ if(nums[i]<nums[i+1]){ index=i; break; } } if(index==-1){ ...
ALGO
0.999986
5.550018
255f7f7f-9307-458c-8c7e-417b58a34043
Revaiowo/DSA-Problems
stack/11-next-greater-element.cpp
#include <iostream> #include <vector> #include <stack> #include <algorithm> std::vector<int> nextGreaterElement(std::vector<int>& arr){ std::stack<int> s; std::vector<int> nge { }; int size { arr.size() }; for (int i = 2*size-1; i>=0; i--){ while (!s.empty() && arr[i%size] >= s.top()) ...
ALGO
0.999827
5.222177
c8b80966-f868-4772-80d0-54d2b60a7926
chengshunzhang/my_leetcode
201-300/209_Minimum_Size_Subarray_Sum/209_Minimum_Size_Subarray_Sum.cpp
#include <vector> #include <iostream> using namespace std; class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { int result = nums.size() + 1, sum = 0, start = 0; for(int i = 0; i < nums.size(); i++) { sum += nums[i]; if(sum >= s) { while(su...
ALGO
0.999921
4.879247
04469588-567a-4b5a-814c-485e1acb45dd
vikashkr1512/DAA-PCS-505
Week8/W8_Q2.cpp
#include <bits/stdc++.h> using namespace std; struct edge { int wt, src, dest; edge(int weight, int source, int destination) { wt = weight; src = source; dest = destination; } }; bool cmp(struct edge a, struct edge b) { return a.wt < b.wt; } int findParent(int node, vector...
ALGO
0.999972
4.68442
318d3161-0561-4381-97d5-9d8dee42e0da
mjmj930/iLearning
CPlusPlus/Algorithm/leetcode/leetcode_20.cpp
#include<iostream> #include<string> #include<stack> class Solution { public: bool isValid(std::string s) { std::stack<char> st; for(char c : s) { if(c == '(' || c == '{' || c == '[') { st.push(c); } else { if(st...
ALGO
0.999442
6.699812
22d44c7c-5955-4f87-8be0-14a9a0b38462
habeebvk/BMI
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
73a432d6-0731-4ee2-90fc-76b4c0fc8120
Ubaid-Manzoor/Interview_Practice
Data Structures Problems/Search_and_sort/Searching/Easy/search_in_a_rotated_array/main.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; int pivotIndex(vector<int> &arr, int l, int r){ if(l > r) return 0; int mid = l + (r - l)/2; if(arr[mid] > arr[mid+1]) return mid; if(arr[mid] < arr[0]) return pivotIndex(arr, l, mid - 1); else retur...
ALGO
0.999929
5.754817
aadf23fb-961b-47e0-ba7a-b5a43d91fcb7
Vishal-Gande/Code-for-fun
lc_452.cpp
// lc_452 // There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where points[i] = [xstart, xend] denotes a balloon whose horizontal diameter stretches between xstart and xend. You do not know the exact y-coordinates of the ba...
ALGO
0.999893
5.786618
bd39f461-443b-4c09-a2a8-c9cc87838c3a
EnTiKayyyyy/Tin_Hoc_Co_So_2_PTIT
C04029.cpp
/* NGUYEN TUAN KIET B21DCCN472 D21CQCN04-B NHOM 26 */ #include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> #include<stdbool.h> #include<stdlib.h> #define test long long t; scanf("%lld", &t); while (t--) int main() { int n; scanf("%d",&n); int a[n]; for ( int i = 0 ; i < n ; i++) scanf...
ALGO
0.99991
3.437739
dadaf5a8-0fd9-43d1-aa05-347eefe19791
aquadrop/Face-Expression-Recognition
opencv-2.4.5/modules/features2d/src/features2d_init.cpp
#include "precomp.hpp" #include "fast_score.hpp" using namespace cv; Ptr<Feature2D> Feature2D::create( const string& feature2DType ) { return Algorithm::create<Feature2D>("Feature2D." + feature2DType); } /////////////////////// AlgorithmInfo for various detector & descriptors //////////////////////////// /* NOT...
ALGO
0.926832
6.899909
167bf6c9-15ae-4150-bb9d-11d7dfe7cbe8
gaoxiang12/rgbd-slam-tutor2
Thirdparty/g2o_modified/g2o/apps/g2o_cli/g2o.cpp
#include <signal.h> #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <sstream> #include <algorithm> #include <cassert> #include "dl_wrapper.h" #include "output_helper.h" #include "g2o_common.h" #include "g2o/config.h" #include "g2o/core/estimate_propagator.h" #include "g2o/core/spa...
ALGO
0.95883
6.434689
cb89474c-3eec-4b8b-9b6e-0425de0faa22
fyrsta7/LLM_on_ASAC
result_api_backup/en_without_annotation_mzn/deepseek-coder_loop10/Numeration_Problem-5.cpp
#include <iostream> #include <vector> int countDigit(int num, int digit) { int count = 0; while (num > 0) { if (num % 10 == digit) count++; num /= 10; } return count; } int main() { int n, x; std::cin >> n >> x; int ans = 0; for (int i = 1; i <= n; ++i) { a...
ALGO
0.999861
5.236513
85dcbf05-5cc4-4611-80e6-fae12f756c70
s-spillias/EMs-with-LLMs
POPULATION_NPZ/CULLED/INDIVIDUAL_R9QYS5N0/model.cpp
#include <TMB.hpp> template<class Type> Type objective_function<Type>::operator() () { // Data DATA_VECTOR(Time); // Time points (days) DATA_VECTOR(N_dat); // Nutrient observations (g C m^-3) DATA_VECTOR(P_dat); // Phytoplankton observations (g C m^-3) DATA_VECTOR(Z_dat); // Zooplankt...
ALGO
0.999391
6.308155
dd06a7a1-96da-48a2-8df1-6693ee5608e8
SojebSikder/dsa-practice
codeforces/cpp/gcd-partition.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int n; cin >> n; } int main() { int t; cin >> t; while (t--) { solve(); } return 0; }
ALGO
0.998193
3.428525
02980e1a-8074-43f4-a2b1-53e2d8013c71
GiantPay/GiantCore
src/core_read.cpp
#include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "serialize.h" #include "streams.h" #include <univalue.h> #include "util.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string/classification.hpp> #include <boost/...
TOOL
0.869135
7.183883
0ad2bcac-17b6-4fef-a2ed-1accea570b22
Simon-Fuhaoyuan/LeetCode-100DAY-Challenge
Possible Bipartition/main.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Solution { public: bool possibleBipartition(int N, vector<vector<int>>& dislikes) { vector<vector<int>> relation(N, vector<int>()); for (int i = 0; i < dislikes.size(); ++i) { relation[dislikes[i][0] - 1]...
ALGO
0.999812
5.624461
8f17dac5-01e6-4445-8440-8da0fa21ca51
germanohn/competitive-programming
uri/t.cpp
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define mp make_pair #define debug (args...) fprintf (stderr, args) using namespace std; typedef long long ll; typedef pair<int, int> pii; const int MAX = 2005; int n, m, tempo, sn; int d[MAX], low[MAX], comp[MAX], st[MAX]; bool seen[MAX...
ALGO
0.999937
4.134905
0c476f76-3e4e-4918-bc67-9db5f3b91c93
0xYashwanth/dsa-learning
graphs/dfs.cpp
#include<bits/stdc++.h> using namespace std; void dfsRec(vector<int>adj[],int s,bool visited[]) { visited[s]=true; cout<<s<<" "; for(int u:adj[s]){ if(visited[u]==false) dfsRec(adj,u,visited); } } void dfs(vector<int>adj[],int v,int s) { bool visited[v]; for(int i=0;i<v;i++) ...
ALGO
0.999987
5.031507
8da39050-863e-4575-b55f-c824da986756
dexter30/first-node-based-engine
dep32/include/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp
///This file was written by Erwin Coumans #include "btMultiBodyPoint2Point.h" #include "btMultiBodyLinkCollider.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include "LinearMath/btIDebugDraw.h" #ifndef BTMBP2PCONSTRAINT_BLOCK_ANGULAR_MOTION_TEST #define BTMBP2PCONSTRAINT_DIM 3 #else #define BTMBP2PCONSTRAINT...
TOOL
0.852116
6.842563
8e772b80-c0ae-40cc-8964-b251fe409354
alexandraback/datacollection
solutions_5631989306621952_1/C++/bimaoe/A.cpp
#include <stdio.h> #include <algorithm> #include <vector> #include <string.h> using namespace std; int main (void) { int t, c; scanf ("%d", &t); for (c = 1; c <= t; c++) { char s[1001]; scanf ("%s", s); int len = strlen(s); char beg = s[0]; int b = -1, e = 1; vector<pair<int, char> > ans; ans.push_ba...
ALGO
0.999972
3.616594
db2970c5-e1ce-4c58-b051-b87c2516c265
okpiyush/LearningCPP
Array/insertionsort.cpp
#include <iostream> using namespace std; int main(){ int n; cout<<"length of array ?"; cin>>n; int arr[n]; for (int i=0;i<n;i++){ cin>>arr[i]; } for (int i=1;i<n;i++){ int current =arr[i]; int j=i-1; while(arr[j]>current){ arr[j+1]=arr[j]; ...
ALGO
0.99994
3.854357
182b898a-6425-4cfb-9802-2ef0260a7cb4
NgoHao280403jr/C
ConsoleApplication7/ConsoleApplication7/tuan3bai3.cpp
#include <stdio.h> #include <conio.h> #include<stdlib.h> #include<time.h> #include<math.h> #include<string.h> struct Node{ char info; Node* next; }; struct Stack{ Node* top; }; void initStack(Stack &l){ l.top = NULL; } Node* createNode(char value){ Node* p = new Node; if (p == NULL){ printf("Khong du bo nho"...
ALGO
0.999099
3.06509
d6b789e3-924a-48a3-a591-f78b83b15b16
piter27061971/shablon_functor3
ConsoleApplication37.cpp
// ConsoleApplication37.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> # include <vector> class simple_funktor { private: unsigned long summa, kol; public: simple_funktor() :summa{ 0 }, kol{0} {} void operator ()(std::vector <int> b) ...
ALGO
0.986839
5.355272
c04934a0-3f2b-44b1-8388-74e94d0cbc07
harshgondaliya/turing-gpu-matrix-multiplication
src/cmdLine.cpp
#include <assert.h> #include <getopt.h> #include <stdlib.h> #include <stdio.h> #include <iostream> #include <iomanip> #include <string.h> #include <float.h> // For: FLT_EPSILON #include "types.h" using namespace std; void cmdLine( int argc, char *argv[], int &n, int &reps, int &ntx, int &nty,...
CONFIG
0.909551
5.195098
dd25eb8f-42a3-4035-b869-2a8a7931cfca
hong0002/Programmers
Lv.1/문자열 내림차순으로 배치하기.cpp
#include <string> #include <vector> using namespace std; string solution(string s) { string answer = ""; char tmp; for(int i =0; i<s.length(); i++) { for(int j=i; j<s.length(); j++) { if(s[i] < s[j]) { tmp = s[i]; s[i] = s[j]; s[...
ALGO
0.99997
5.205687
36296e24-2728-4c4f-97e2-c3009aa2ed11
eric30/releases-mozilla-central
gfx/angle/src/compiler/ParseHelper.cpp
#include "compiler/ParseHelper.h" #include <stdarg.h> #include <stdio.h> #include "compiler/glslang.h" #include "compiler/preprocessor/SourceLocation.h" /////////////////////////////////////////////////////////////////////// // // Sub- vector and matrix fields // /////////////////////////////////////////////////////...
TOOL
0.929707
3.117551
736eaaea-4a2f-4b56-b496-95af8498356d
isi-nlp/LSTM_PARSER
3rdparty/eigen-eigen-09a8e2186610/doc/examples/tut_arithmetic_scalar_mul_div.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d a; a << 1, 2, 3, 4; Vector3d v(1,2,3); std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; std::cout << "Doing v *= 2;" << std::endl; v *= 2; std::cout << ...
ALGO
0.991696
3.669638
79a312f6-f15c-4d8a-af77-ac2dc3ad0b42
EnriqueLaguna/Practica2_moviles
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.998667
6.789978
860e2fc0-760c-4f02-8227-551d200951ac
Karaya-12/Compiler-Principles
Assignment IV/Top-Down_Non-Recursive_Predictive_Parser/main.cpp
#include "global.h" #include "file_IO.h" #include "proc_production.h" #include "cal_first.h" #include "cal_follow.h" #include "generate_pt.h" #include "non_recursive_parser.h" #include <unistd.h> /* Assumptions * 1. Epsilon Εε is represented by ‘#’ * 2. Grammar is not left recursive * 3. Only upper...
ALGO
0.991098
3.559289
f1b1a923-a10e-4178-a527-470744ca05f7
Human-translation/c-learing
20_8_8/3.cpp
//#include <iostream> //#include <string> //#include <vector> //#include <algorithm> //#include <unordered_map> //using namespace std; // //int run(vector<int> &arr) //{ // vector<int> brr; // int max = 0; // bool flag = true; // while (flag) // { // flag = false; // for (int i = 0; i < arr.size(); i++) // { // i...
ALGO
0.999733
4.207206
07a55668-134a-4985-ac17-2d49902ba4aa
sinian666/codes_41_14
cpp_副本5/chapter_backtracking/permutations_ii.cpp
/** * File: permutations_ii.cpp * Created Time: 2023-04-24 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 回溯算法:全排列 II */ void backtrack(vector<int> &state, const vector<int> &choices, vector<bool> &selected, vector<vector<int>> &res) { // 当状态长度等于元素数量时,记录解 if (state.size() == choices.size...
ALGO
0.999922
5.701356
17a09cd1-bf54-45a9-8a78-d08f1c808f39
greenbeanpie/OI-training
NOIP2023-ZJ/ZJ-0485/run/run.cpp
#include <stdio.h> #include <algorithm> using namespace std; struct xyz{int a,b,c;}h[200000]; bool mcp(xyz n,xyz m) { return n.a<m.a; } long long a[1000][1000],l; int main() { freopen("run.in","r",stdin); freopen("run.out","w",stdout); int b,c,d,e,f,g; scanf("%d%d",&b,&c); while(c--) { scanf("%d%d%d%d",&d,&e,&...
ALGO
0.999733
3.152946
c6ad9aa4-b482-49cd-8e91-9dd6d4ab8d93
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/09/44/7.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <set> #include <map> #include <stack> #include <list> #include <queue> #include <deque> #include <cctype> #include <string> #include <vector> #include <sstream> #include <iterator> #include <numeric> #include <cmath> using namespace std; typedef vecto...
ALGO
0.999819
3.818217
be624503-15ba-4c8a-aa72-a4f2a9ef979c
Gary050613/Competitive-Programming
Physics Stuff/SaveTheEarth.cpp
#include <bits/stdc++.h> using namespace std; // double rMass = 100000, vel = 4.32e8, d = 984000000, t = 0; double G = 6.67e-11, M = 5.97e24, R = 6371000; double GM = G*M; // Loses 2578 kg of mass for 6770000 N of thrust each second double rMass = 48343508610, vel = -130, d = 984000000, t=0, aMass = 3.323e11; double nO...
ALGO
0.999854
3.763523
1e4e8cde-f24e-41bb-8eac-85d13ca9aa20
TotoroCodingDojo/leetcode-cpp
1359/sol0.cpp
long mod = 1e9+7; class Solution { public: int countOrders(int n) { // 1 - 0 // 2 - 1 - 3 // 3 - 2 - 5 // 4 - 3 - 7 // n - n-1 - 2(n-1) + 1 // for spaces long ans = 1; for(int i=2;i<=n;i++){ long spaces = 2 * i - 1; ...
ALGO
0.999981
5.32422
ec865f23-05b4-49f6-b044-8c42b44da2e9
feralforreal/Server_Programming
Web_Proxy_Server_Programming/utils.cpp
#include "utils.h" /** @brief Change all characters in a string to lowercase @param[in] str Input string @return std::string Lowercase string **/ std::string lower(const std::string &str) { std::string ret = str; for (auto &c : ret) { c = std::tolower(c); } return ret; } /** @brief Replace a...
TOOL
0.966658
6.166156
93fed9df-37b1-4748-b436-ef6616546861
MahmoudZaytoni/learning
data-structures/DSU/Quick-Find.cpp
#include <bits/stdc++.h> using namespace std; class UnionFind { vector<int> root; public: UnionFind(int sz) : root(sz){ for (int i = 0; i < sz; i++) root[i] = i; } int find(int x) { // O(1) return root[x]; } void unionSet(int x, int y) { int rootX = find(x); int rootY = find(y); ...
ALGO
0.998694
4.791251
db28b6ad-f8c2-43ba-9670-d057ebd12488
pritamnikam/CodingInterviewPreparation
SlidingWindow/LongestSubstringWithWithoutRepeatingCharacters.cpp
#include <iostream> #include <unordered_map> #include <vector> #include <string> #include <queue> using namespace std; // Longest Substring Without Repeating Characters int LongestSubstringWithoutRepeatingCharacters(string& text) { int i = 0, j = 0, n = text.length(), maxLength = 0; unordered_map<char, int> mp; i...
ALGO
0.999563
5.816201
58486fb4-53e3-44d6-b265-b1422e59f227
dankcoin/dankcoin-old
src/pubkey.cpp
#include "pubkey.h" #include "eccryptoverify.h" #ifdef USE_SECP256K1 #include <secp256k1.h> #else #include "ecwrapper.h" #endif bool CPubKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const { if (!IsValid()) return false; #ifdef USE_SECP256K1 if (secp256k1_ecdsa_verify((co...
TOOL
0.8638
6.359943
73995a68-d5e5-49a4-8de0-bc097b494742
kiwibrowser/src
buildtools/third_party/libc++/trunk/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
// test bitset<N>& operator|=(const bitset<N>& rhs); #include <bitset> #include <cstdlib> #include <cassert> #include "test_macros.h" #if defined(TEST_COMPILER_CLANG) #pragma clang diagnostic ignored "-Wtautological-compare" #elif defined(TEST_COMPILER_C1XX) #pragma warning(disable: 6294) // Ill-defined for-loop: i...
TEST
0.90846
7.726471
0cea7ef2-8bad-403c-810a-9fd214b9fea2
ishandutta2007/codeforces
cirno_9baka/normal/1666/I.cpp
#include<bits/stdc++.h> using namespace std; const int N=105,M=998244353,E=502; const long long inf=5000000000000000000ll; int n,m,t,x[2],y[2],s1,s2,u1,u2,p1,p2; bool DG(int x,int y){ cout<<"DIG "<<x<<' '<<y<<endl; cin>>x; return x; } int main(){ // #ifndef ONLINE_JUDGE // freopen("input.txt","r",stdin)...
ALGO
0.999791
3.647034
509731dd-2cbe-4271-b285-0762f95f2fa5
jayeshpatel8/Coding-Practise-using-Leetcode-Coding-Platform
problems/design_a_stack_with_increment_operation/solution.cpp
class CustomStack { public: vector<int> st; //priority_queue<array<int,2>> pq; int cur=0, N ;//, sum = 0; CustomStack(int maxSize) { N = maxSize; st.resize(maxSize); } void push(int x) { if (cur == N) return; st[cur++] = x; } int pop() { if...
ALGO
0.999766
5.543447
10aa815d-983e-456e-8a00-4e4225f17a90
dzungpng/material-point-method-jello-simulation
Deps/libigl/include/igl/slice_tets.cpp
template < typename DerivedV, typename DerivedT, typename DerivedS, typename DerivedSV, typename DerivedSF, typename DerivedJ, typename BCType> IGL_INLINE void igl::slice_tets( const Eigen::MatrixBase<DerivedV>& V, const Eigen::MatrixBase<DerivedT>& T, const Eigen::MatrixBase<DerivedS> & S, Eige...
ALGO
0.963014
5.416856
97871d68-ce5c-4356-a801-2032c2e53b3a
madhvendrasingh007/LeetCode-GFG
0061-rotate-list/0061-rotate-list.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: ListNode* rotateRight...
ALGO
0.999993
5.723273
8266e366-d306-4a17-8425-35e07c798074
cieslarmichal/chimarrao-platformer
src/utils/src/StringHelper.cpp
#include "StringHelper.h" #include <algorithm> #include "boost/algorithm/string.hpp" namespace utils { std::string StringHelper::join(const std::vector<std::string>& contentWithLines, const std::string& joinWith) { return boost::algorithm::join(contentWithLines, joinWith); } std::vector<std::string> StringHelp...
TOOL
0.969797
5.972735
2b9ffd28-b8ab-4cc0-baa0-3434557e790b
abhi-s-03/CrackYourPlacement
CircularTour.cpp
/* The structure of petrolPump is struct petrolPump { int petrol; int distance; };*/ /*You are required to complete this method*/ class Solution{ public: //Function to find starting point where the truck can start to get through //the complete circle without exhausting its petrol in between. ...
ALGO
0.999849
5.262495
1f55e11e-1ac1-4ccf-8a9d-1d3626a2bc4c
ayush-kumar774/Competitive-Programming
Codechef/ProcessingAString.cpp
//https://www.codechef.com/problems/KOL15A #include<bits/stdc++.h> using namespace std; #define aakriti long long int int main() { ios_base::sync_with_stdio(false); cin.tie(0); aakriti testcase; cin >> testcase ; while(testcase--) { string s; ...
ALGO
0.99913
4.897283
6ad69a32-7aa7-48ff-80e2-306e621712bc
vishnevskyi95/Calculator
Calc.cpp
#include <iostream> char getUserOperator() { char userOperator; do { std::cout << "Enter operator(+,-,* or /): "; std::cin >> userOperator; if (std::cin.fail()) { std::cin.clear(); std::cin.ignore(32767, '\n'); } else { std::cin.ignore(32767, '\n'); } } while (userOperator != '+' && userOpe...
ALGO
0.928264
4.391589
f547650d-4348-44cc-b13a-4c4c346e52c6
jiezhoujenny/facedetect
app/examples/face_recognition_evaluation.cpp
/*! * \ingroup cli * \page cli_face_recognition_evaluation Face Recognition Evaluation * \ref c_face_recognition_evaluation "C Equivalent" * \code * $ br -algorithm FaceRecognition -path ../data/MEDS/img/ \ * -enroll ../data/MEDS/sigset/MEDS_frontal_target.xml target.gal \ * -enroll ../data/MEDS/sigset...
ALGO
0.962922
6.004791