uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d04d4bc3-5b59-486a-8bbd-2421f6be129a
codetatvaacademy/GU-Technical-Training-2026
NikhilKumarGupta/Binary search/Koko Eating Bananas.cpp
class Solution { public: int maxEl(vector<int>& piles) { int maxi = INT_MIN; for (int i = 0; i < piles.size(); i++) { maxi = max(maxi, piles[i]); } return maxi; } long long totEl(vector<int>& piles, int mid) { long...
ALGO
0.999892
6.041774
6406bdf8-8939-4e7c-8724-8d2d63d81f73
Aditya5498/simple-problems
BLIND75_LeetCode/Blind75-2ndQuestion.cpp
//https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ //121. Best Time to Buy and Sell Stock int maxProfit(vector<int>& prices) { int curr_profit=0,min_price=INT_MAX,max_profit=0; for(int i=0;i<prices.size();i++){ curr_profit=prices[i]-min_price; max_prof...
ALGO
0.992224
6.253011
ea5f3025-1e9b-4eb3-aafe-e5d3d2045ac4
lc-3-2/llvm
clang-tools-extra/clang-doc/HTMLGenerator.cpp
#include "Generators.h" #include "Representation.h" #include "clang/Basic/Version.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/JSON.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h"...
TOOL
0.902083
7.330012
d7ee6490-faa7-4f81-9354-dd2e2c7d504c
ZeroNeroIV/Primis-SDATSS
Front-end/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.998747
6.76775
fb978279-057e-4c8e-873b-7447a35747bb
Dai-Wenxun/Algorithm-Adventure
链表/876. 链表的中间结点.cpp
class Solution { public: ListNode* middleNode(ListNode* head) { ListNode *p1 = head, *p2 = head->next; while(p2 != NULL) { p1 = p1->next; for (int i = 0; i < 2; ++i) if (p2 != NULL) p2 = p2->next; } return p1; } };
ALGO
0.99987
5.9206
7b326a8d-e2ca-4170-8bde-749aa577e167
Shahid-Fahad/Online-Judge-Solution
Codeforces+Others/8078_Bracket_Sequence.cpp
///Bismillahir Rahmanir Rahim //ShzFahad #include<bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define pb push_back #define ff first #define ss second #define case_(tc) cout << "Case " << tc << ":"; #define mem(a,b) memset(a,b,sizeof(a)) #define all(qz) qz.begin(),qz.end() #define...
ALGO
0.999834
3.903982
dadafb31-a206-44d1-9cec-b77d0f03bf88
PRIME3015/Cses-Sorting-and-searching
Movie_Festival.cpp
// राधाकृष्ण राधाकृष्ण राधाकृष्णराधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्ण राधाकृष्णराधाकृष्ण राधाकृष्ण राधाकृष्ण // राधाकृष्ण राधाकृष्णराधाकृष्ण राधाकृष्णराधाकृष्णराधाकृष्ण राधाकृष्ण राधाकृष्णराधाकृष्ण राधाकृष्ण राधाकृष्णराधाकृष्ण र...
ALGO
0.999936
4.707376
9c4f5e4c-9cbe-45d2-9402-ef5ad5610b90
szmybs/PhysIKA_Cloud
Extern/OpenSceneGraph-3.6.5/src/osg/glu/libtess/render.cpp
/* ** Author: Eric Veach, July 1994. ** */ // #include "gluos.h" #include <assert.h> #include <stddef.h> #include "mesh.h" #include "tess.h" #include "render.h" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif /* This structure remembers the information we need about a primitive * to be able ...
ALGO
0.999179
4.548695
91364448-ef6e-4a00-9e4e-f244ea187635
Aritrajeet/DSA_practice
Leetcode/Binary Search/Search a 2D Matrix.cpp/solution.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int n = matrix.size(), m = matrix[0].size(); int low = 0, high = n*m; while(low < high){ int mid = low + (high - low)/2; int row = mid/m; int col = mid%m; //c...
ALGO
0.999936
5.970044
32358806-6f65-41c2-a08e-af3061da2d77
Saltykub/CP
codeforce/1994B.cpp
#include<bits/stdc++.h> #define ll long long #define st first #define pii pair<ll,ll> #define nd second #define pb push_back using namespace std; void solve (){ int n; cin >> n; string s,t; cin >> s >> t; if(s[0] == '0' && t[0] == '1') cout << "no" << "\n"; else { if(s[0] == '0' && t[0] ...
ALGO
0.999655
4.239347
f0ea3cbf-f7c8-4660-b246-4be00da02fbe
shash04/General_Coding
Leetcode/Arrays/121_Best_time_to_buy_sell_stock.cpp
// Say you have an array for which the ith element is the price of a given stock on day i. // If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), // design an algorithm to find the maximum profit // Note that you cannot sell a stock before you buy one. // Exa...
ALGO
0.999745
6.389536
6c64649d-e5fb-4f0e-9521-d5e5c1a9abd4
priyanshuanandd/Code_Submissions
C_Yarik_and_Array.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #incl...
ALGO
0.999382
5.106954
261052b1-27b0-41fc-8f92-b24ba516ab40
mukundkansara24/CodeForces
A/1380A_Three_Indices.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 1; i < n - 1; i++) { if (v[i - 1] < v[i] && v[i + 1] < v[i]) { cout << "YES" << endl; ...
ALGO
0.999886
3.526814
89676d5d-15ec-436a-9436-0fbc7a381971
Grandres/ScriptDev2
base/follower_ai.cpp
/* ScriptData SDName: FollowerAI SD%Complete: 60 SDComment: This AI is under development SDCategory: Npc EndScriptData */ #include "precompiled.h" #include "follower_ai.h" const float MAX_PLAYER_DISTANCE = 100.0f; enum { POINT_COMBAT_START = 0xFFFFFF }; FollowerAI::FollowerAI(Creature* pCreature) : ScriptedAI(...
ALGO
0.97144
5.07798
39eb3f5c-9450-4748-a876-fe16b9ca5e98
dmaddalone/CrapSim
src/Die.cpp
#include "Die.h" // Setup random number generator, using Mersenne Twister 19937. Assign it to // function rollDie(). /** * Construct a Die. * * Set the random number generator to a uniform distribution of 1..nFaces; * bind rollDie to the distribution and generator; set up array / pointer to * nFaces number...
TOOL
0.857946
6.864282
b65f6d6f-7306-4a46-929d-b8ec80b89eb4
ishandutta2007/codeforces
miraclefafa/normal/1635/E.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; typedef long long l...
ALGO
0.99999
3.354823
300c7fd7-9cab-45ee-a502-9deef580c398
Chris-lyc/GAMES202-pa
pa2/prt/ext/tbb/examples/parallel_reduce/primes/main.cpp
#include "primes.h" #include <cstdlib> #include <cstdio> #include <cstring> #include <cctype> #include <utility> #include <iostream> #include <sstream> #include "tbb/tick_count.h" #include "../../common/utility/utility.h" struct RunOptions{ //! NumberType of threads to use. utility::thread_number_range thread...
ALGO
0.99233
5.724278
29382a14-dc9d-47dc-aaf8-a6f2746e78a9
FardinShafi/leet
palindromenumber.cpp
#include<iostream> #include<vector> #include<string> using namespace std; class Solution { public: bool isPalindrome(int x) { if(x<0 || (x%10 == 0 && x!= 0)){ return false; } int reverse; while(x>reverse){ reverse = reverse *10 + x % 10; x=x/10;...
ALGO
0.999828
5.306806
d6dba97e-90d5-43c1-82ea-24ce8ad7ecf2
SudhanshuPatel1707/Leetcode
3379-score-of-a-string/score-of-a-string.cpp
class Solution { private: int absOf(int n) { if(n < 0) return n*-1; return n; } public: int scoreOfString(string s) { int score= 0; for(int i = 1; i < s.length(); i++) { int n = absOf(s[i] - s[i-1]); score += n; } r...
ALGO
0.999974
5.116918
8d07d693-eeb6-4146-b9c5-efd223c29b18
kunj-bhuva/Codeforces
July-2024/11-Thursday/1992A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<long long int> vii; typedef vector<int> vi; // Macro definitions #define sort(t) sort(t.begin(),t.end()) #define pb(x) push_back(x) #define ppb(x) pop_back(x) #define fi(i, a, b) for (ll i = a; i < b; i++) #define Na cout << "NO" << end...
ALGO
0.999983
5.329113
f177bb9c-eaa0-48ea-832b-1f6f1db43283
saunptit97/reception_application
smart_robot/android/cpp/rkai/thirdparty/eigen3/unsupported/doc/examples/MatrixFunction.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; std::complex<double> expfn(std::complex<double> x, int) { return std::exp(x); } int main() { const double pi = std::acos(-1.0); MatrixXd A(3,3); A << 0, -pi/4, 0, pi/4, 0, 0, 0, 0, 0; std::...
ALGO
0.999341
4.353816
6819f480-f346-42f1-88dc-2824e0e57214
teetangh/competitive-programming-and-dsa
CodeZen/Random Programs/SplitSequence.cpp
#include <iostream> using namespace std; int main() { // Write your code here int n; cin >> n; int arr[10000]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int incFlag = 0; int decFlag = 0; int i = 1; int changeSeq = 0; if (arr[0] < arr[1]) { incFla...
ALGO
0.999989
4.301051
5b80a92d-6f22-4abb-a149-0940f913d720
dongchaoanderuni/DEV_Cpp_Primer
Exec_C09/E0928.cpp
#include <iostream> #include <fstream> #include <sstream> #include <typeinfo> #include <vector> #include <string> #include <list> #include <deque> #include <forward_list> // #include "Sales_data.h" #include "Variable.h" using namespace std; void insertStringBeforeTarget(forward_list<string> &fListStr, const string &t...
ALGO
0.993434
4.962015
41abf5cf-07f4-4c57-81f8-417d4474f1c5
ishandutta2007/codeforces
dummy/normal/932/B.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 6; int g[N]; int sum[N][10]; int f(int n) { int r = 1; while (n) { int d = n % 10; n /= 10; if (d) r *= d; } return r; } int main() { for (int i = 1; i < 10; ++i) g[i] = i; for (int i = 10; i < N; ++i) { g[i] = g...
ALGO
0.999887
4.211756
9192aa07-6be7-41ab-b4a5-de16a731c7e7
mjyplusone/CppPrimer
cpp/ch10/10_2/10_2/Source.cpp
#include <iostream> #include <string> #include <list> #include <fstream> #include <algorithm> using namespace std; int main() { ifstream file("1.txt"); if (!file) { cout << "Error!" << endl; return -1; } list<string> slist; string word; while (file >> word) { slist.push_back(word); } cout << "Enter ...
ALGO
0.983916
4.088859
b7553262-d561-4a2f-8d34-3e3e9d5a4bc4
ohmpatel46/DSA-Revision
Arrays/selectionsort.cpp
#include<iostream> using namespace std; void selection_sort(int a[], int n){ for(int i=0;i<=n-1;i++){ int min_index=i,temp; for(int j=i+1;j<n;j++){ if(a[j]<a[min_index]){ min_index=j; } } temp=a[i]; a[i]=a[min_index]; a[min_ind...
ALGO
0.999894
4.25655
011d384e-d511-4f8d-bafe-b31f398fdb49
MirazShahin/Graph-Algorithm-
Course Schedule.cpp
#include <bits/stdc++.h> #define FastIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespace std; using ll = long long; bool is_cycle(int node, vector<vector<int>> &adj, vector<int> &vis, vector<int> &pathvis) { vis[node] = 1; pathvis[node] = 1...
ALGO
0.999997
4.503576
acd7a635-acbe-479a-a2ac-529baa6eb7bc
alexandraback/datacollection
solutions_5769900270288896_0/C++/smShaheen/B.cpp
///========================================================================== /// /// Bismillah ir-Rahman ir-Rahim /// /// ========================================================================== /// /// S.M.SHAHEEN SHA /// /// Dept. of Computer Science and Engi...
ALGO
0.999518
3.726408
ef8163f8-ca24-4aac-bd4c-b553c59d9c86
Simjiyong/Algorithm
Programmers/programmers_17681.cpp
#include <string> #include <vector> #include <iostream> using namespace std; vector<string> solution(int n, vector<int> arr1, vector<int> arr2) { vector<string> answer; vector<int> arr; for (int i = 0; i < n; i++) arr.push_back(arr1[i] | arr2[i]); string str; for (int i = 0; i < n; i++) { str = ""; int t =...
ALGO
0.999831
4.54661
398af54b-1610-4c75-b46e-16b4e628c805
krishangmain/C-_Codes
c to f functions.cpp
// functions for celcius and farenhiet #include<iostream> using namespace std; // int main(){ // int init , fval , step , cel; // cin >> init >> fval>> step; // int far=init; // while(far<=fval){ // cel=(far-32)*(5/9.0); // cout <<far<<" "<<cel<<endl; // far=far+step; // } ...
ALGO
0.992736
4.235262
1103f2e0-3d96-408a-8f20-4baada86be52
OpenGOAL-Mods/OG-Jak2-AugustBuild
common/type_system/TypeFieldLookup.cpp
/*! * @file TypeFieldLookup.cpp * Reverse field lookup used in the decompiler. */ #include <algorithm> #include "TypeSystem.h" #include "common/log/log.h" #include "fmt/core.h" namespace { // debug prints for the reverse lookup bool debug_reverse_lookup = false; /*! * Is the actual dereference compatible with...
TOOL
0.888156
7.275517
fd183b8d-df92-4864-95d8-50ddd4544ad5
DbHridoy/Codeforces
Three Pairwise Maximums.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long a[3],t; cin>>t; while(t--){ cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); // cout<<a[0]<<a[1]<<a[2]<<endl; if(a[1]!=a[2]){ cout<<"NO"<<endl; } else{ cout<<"YES"<<endl; cout<<a[0]<<" "<<a[0]<<" "<<a[2]<<endl; } } return 0; }
ALGO
0.999811
3.4561
32b9e19a-c235-4e76-968d-f4cb5549fd95
zurkiyeh/FeedbackTracker
Tracker/main.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <iostream> #include <chrono> #include <thread> #include <unistd.h> #include <vector> #include "opencv2/objdetect.hpp" #include "opencv2/videoio.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "mySerial.h" #include "updateS...
TOOL
0.974352
4.308622
27011bbc-ad76-427d-b9f0-ef77a497eaf1
PolygonTek/BlueshiftEngine
Source/ThirdParty/Bullet/Extras/ConvexDecomposition/float_math.cpp
#include "float_math.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> // http://codesuppository.blogspot.com // // mailto: <EMAIL> // // http://www.amillionpixels.us // void fm_inverseRT(const float *matrix, const float *pos, float *t) // inverse rotate translate t...
ALGO
0.992937
6.145365
42f76c12-32b3-4eed-8502-782879d2c15c
LakshyaDuhoonISU/Lakshya46_23-27_Sem-I_cpp100
015ReverseString.cpp
// including required header files #include <iostream> #include <string> using namespace std; // function to reverse string void reverseString(string &str) { int start = 0; int end = str.length() - 1; while (start < end) { char temp = str[start]; str[start] = str[end]; str[end] =...
ALGO
0.859361
5.469346
1e25cc81-731c-4171-ab94-2ca04af6c9f8
devwilliamhardy/DeepNeuralNetwork
DeepNeuralNetwork/DeepNeuralNetwork/ThirdParty/Libraries/eigen-3.4.0/eigen-3.4.0/demos/mix_eigen_and_c/binary_library.cpp
// This C++ file compiles to binary code that can be linked to by your C program, // thanks to the extern "C" syntax used in the declarations in binary_library.h. #include "binary_library.h" #include <Eigen/Core> using namespace Eigen; /************************* pointer conversion methods **************************...
TOOL
0.855167
6.259336
98db431e-06b4-4ba1-b1c1-f5dca3ce1cba
santi3223/PreseleccionIOI
Codeforces/Problemas/Otros/Yet_Another_Problem_About_Pairs_Satisfying_an_Inequality.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vl vector<ll> #define pb push_back #define pll pair<ll, ll> #define vs vector<string> #define vb vector<bool> #define all(aaa) aaa.begin(), aaa.end() #define rall(aaa) aaa.rbegin(), aaa.rend() #define ff(aa, bb, cc) for(ll aa = bb; aa < cc; aa++...
ALGO
0.99987
4.319533
80790805-697f-4842-b47f-d7d772b3facd
joshualass/CP
Solutions/Contests/CodeForces/CF1717/E1717.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; const ll MOD = 1e9 + 7; /* ************************************* need to build sieve --> sieve() ************************************* */ const int N = 1e5 + 1; int prime_factor[N]; //stores a prime factor of the number. If i...
ALGO
0.999996
4.990317
06f25b64-4299-472a-9648-0e03832a16d6
Spdwal/StudySTL
Chapter_7/map/mapfind1.cpp
#include<map> #include<iostream> #include<algorithm> #include<utility> using namespace std; int main() { map<float,float>coll = {{1,7},{2,4},{3,2},{4,3},{5,6},{6,1},{7,3}}; auto posKey = coll.find(3.0); if(posKey != coll.end()) { cout << "key 3.0 foud (" << posKey->first << ":" << posKey->second << ')' <...
TOOL
0.993012
4.195621
cbf1acf9-25ca-4c34-b064-eca7a0890f0f
LViniciusk/CPP
Estrutura de Dados/Tópico 3. Structs, Ponteiros e Ponteiros para Ponteiros no C++/[struct] Maior Nota/L12.cpp
#include <iostream> #include <iomanip> using namespace std; struct Aluno{ char nome[100]; int mat; char disciplina[120]; double nota; void ler(){ cin.getline(nome, 100); cin >> mat; cin.ignore(); cin.getline(disciplina, 120); cin >> nota; cin.ign...
TOOL
0.905475
4.09234
fa3152ef-3584-4d7d-8833-aacc7b48be0d
MehveshIbrahim/labstreaminglayer
Apps/Embarcadero XE/GazeStream/TOutline.cpp
//--------------------------------------------------------------------------- #pragma hdrstop #include "TOutline.h" //--------------------------------------------------------------------------- #pragma package(smart_init) //if the outline is a circle, this will give a good estimate of the parameters //to feed int...
ALGO
0.935673
4.188061
39f3540f-0569-41b3-9e05-f6bf62e40726
migodev42/cppStart
leetcode/leetcode-extension/46.全排列.cpp
/* * @lc app=leetcode.cn id=46 lang=cpp * * [46] 全排列 */ #include <vector> using std::vector; // @lc code=start class Solution { public: vector<vector<int>> result; vector<int> path; vector<bool> used; // 当前树枝中使用过的数字不能再用 void backtrack(vector<int>& nums) { if (path.size() == nums.size()) { resul...
ALGO
0.99996
6.512671
a3d60d1d-af17-4bdf-ad04-bc12a4112d8a
devyansh-sargam/Strivers
Array/hashing.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i = 0; i<n; i++){ cin>>arr[i]; } int hash[13] = {0}; for(int i=0; i<n; i++){ hash[arr[i]]+=1; } int q; cin>>q; while(q--){ int number; cin>>number; ...
ALGO
0.999766
4.233422
23835459-66c1-4fac-9656-a16af2c7def1
PrashantSingh2618/Competitive-Programming
Check Loop in Directed Graph.cpp
// call checkLoop(adj) bool findLoop(ll v,vector<vector<ll>>&adj,vector<bool>&visited) { if(visited[v]==1) return 1; if(visited[v]==2) return 0; visited[v]=1; for(auto it:adj[v]) { if(findLoop(it,visited)) return 1; } visited[v]=2; return 0; } bool checkLoop(vector<vt<ll>>&adj) ...
ALGO
0.999439
4.722089
ba0221ae-e36e-4c74-84ae-a196fde0c4e9
Debasish1610/Leetcode-solution
417-pacific-atlantic-water-flow/417-pacific-atlantic-water-flow.cpp
class Solution { public: void checkReachToOcean(vector<vector<bool>> &reachOcean, vector<vector<int>>& heights, queue<pair<int,int>>qu) { int fx[] = {0, 0, -1, +1}; int fy[] = {-1, +1, 0, 0}; int n = heights.size(); int m = heights[0].size(); while(!qu.empty()) { ...
ALGO
0.99992
6.383225
71f80090-e9dd-4669-92c0-c9f3c9a49526
bignontohounkpo/tp_Ines-AGBOZO-Prisca-TOHOUNKPO
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
a8c4ced3-06c3-40c9-95c8-82f1b7c2f5a8
agraef/purr-data
externals/tb/sc4pd/source/LFDNoise1.cpp
#include "sc4pd.hpp" /* ------------------------ LFDNoise1~ -------------------------------*/ class LFDNoise1_ar: public sc4pd_dsp { FLEXT_HEADER(LFDNoise1_ar,sc4pd_dsp); public: LFDNoise1_ar(int argc, t_atom *argv); protected: virtual void m_signal(int n, t_sample *const *in, t_sample *cons...
TOOL
0.903774
4.30325
c48a0e06-7e12-4378-8165-2234612e3896
joaobnetto/CompetitiveProgramming
C/1038C.cpp
#include <bits/stdc++.h> using namespace std; int v1[100010], v2[100010]; long long int resposta(int i, int j, bool player){ if(i <= 0 && j <= 0) return 0; // cout << i << " " << j << endl; if(!player){ if(v1[i] >= v2[j]){ return v1[i] - resposta(i-1,j,!player); } else return -resposta(i, j-1, !player); ...
ALGO
0.999986
3.459482
438e6f6e-1f99-4d29-9ccc-3f8cb9383520
ishman04/DSA-QUESTIONS-2
graphs/Minimize_cash_flow.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int getMin(vector<int> &a){ int mini=INT_MAX; int idx = -1; for(int i=0;i<a.size();i++){ if(a[i]<m...
ALGO
0.999518
6.122334
d4f97faa-6645-4e62-9a36-3d57049b83ae
zongy17/Cage_AutoGen
include/igl/cr_vector_laplacian.cpp
#include <vector> #include "orient_halfedges.h" #include "doublearea.h" #include "squared_edge_lengths.h" template <typename DerivedV, typename DerivedF, typename DerivedE, typename DerivedOE, typename ScalarL> IGL_INLINE void igl::cr_vector_laplacian( const Eigen::MatrixBase<DerivedV>& V, const Eigen::MatrixBas...
ALGO
0.998879
5.850656
0d39da3f-5588-429b-b336-37c49fd7b027
kem85/beginning
.history/project/calculator_20240809232814.cpp
#include <iostream> #include <vector> #include "functions.cpp" #include <iomanip> #include <fstream> using namespace std; string allinone(string eq,bool hasbracket) { if(!hasbracket) { return calc(eq); } int count = 0; string g; vector<vector<int>> checked = sorter(check(eq)); if(ch...
ALGO
0.999791
3.999496
f0a8d03f-ceec-4fe5-b76c-74c1a628cb0a
jingweixi233/OnlineJudge_SJTU
1013.cpp
/* volumn[N] value[N] sum[N] for(i = 0; i < ; i++){ for(j = volumn[i]; j < ; j++){ sum[j] = max(sum[j], sum[j - volumn[i]] + value[i]); } } */ #include <iostream> using namespace std; const int N = 1005; int volumn[N]; int value[N]; int sum[10005]; int maxx(int a, int b){ if(a > b){ retur...
ALGO
0.999727
4.4462
be76ac81-2ed0-4c63-9bb4-464d4e6c76e6
Abhijit25Mishra/code-forces
Practise/1400/C_Qpwoeirut_And_The_City.cpp
// Aur Bhai Dekhne aagaye ;) // Author: Abhijit Mishra #pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") #pragma GCC optimize("fast-math") #pragma GCC optimize("Ofast") #pragma GCC optimize(...
ALGO
0.999623
4.675466
c25a48c9-feff-4c28-967a-0c740ac7d8d1
tiwariprateek/CppPrograms
Selectionsort.cpp
#include<iostream> using namespace std; class Methods{ public : void Enterelements(int A[],int n){ for (int i=0;i<n;i++){ cout<<"Enter elements :"<<endl; cin>>A[i]; } } void Showelements(int A[],int n){ for (int i=0;i<n;i++){ cout<<A[i]<<" "; } } void Selectionsort(int A[],int n){ for (i...
ALGO
0.999483
3.901443
a4e57b59-2c2a-4681-a70b-6d5b0c9be9fc
Felle33/Competitive-Programming
usaco/gold/sparseTable/rmq.cpp
#include <algorithm> #include <iostream> #include <cmath> #include <vector> #include <queue> #include <cstring> #include <unordered_map> #include <map> #include <set> #include <iomanip> #define all(x) (x).begin(), (x).end() #define mp make_pair #define pb push_back #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #d...
ALGO
0.99999
4.886576
b472091b-cdbd-4f55-801e-9f4c22ae1625
divyanshgaba/Competitive-Coding
XOR with Subset/main.cpp
/************************************ * AUTHOR: Divyansh Gaba * * INSTITUTION: ASET, BIJWASAN * ************************************/ #include<bits/stdc++.h> #define fast ios_base::sync_with_stdio(0); cin.tie(0); #define F first #define S second #define PB push_back #define MP make_pair #define REP(i,a,b) for (in...
ALGO
0.999885
3.813817
043f2a26-3123-4aa8-ad2c-092eef950023
nopia727/algorithm
tessoku_book/a8.cpp
#include <iostream> #include <vector> #include<algorithm> using namespace std; int main(){ int h,w,q; int x[1509][1509],z[1509][1509]; int a[100009],b[100009],c[100009],d[100009]; cin>>h>>w; for(int i=1;i<=h;i++){ for(int j=1;j<=w;j++)cin>>x[i][j]; } cin>>q; for(int i=1;i<=q;i+...
ALGO
0.999628
3.638951
1b6ae64e-b660-4098-afa9-5651200e326e
PENZII/my-homework
2112080128_王冲/Chapter05/T5_24.cpp
/*FileName:T5_.cpp *Author Chong Wang *E-mail : <EMAIL> *Date : Aprial 2nd.2022 *College: He Nan University *Funtion: Just print something to screen */ #include <iostream> using namespace std; int main() { int m = 0; cin >> m; for (int i = 0; i <= (m - 1) / 2; i++) { for (int ...
ALGO
0.999965
3.82686
d031cc2c-acab-46ed-8611-fb082c2cebff
cjm571/Mu-Man
lib/boost_1_55_0/libs/graph/example/graph-property-iter-eg.cpp
#include <boost/config.hpp> #include <string> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/property_iter_range.hpp> int main() { using namespace boost; typedef adjacency_list < listS, vecS, directedS, property < vertex_name_t, std::string > >graph_t; graph_t g(3); co...
TOOL
0.955601
4.995707
6e1c86f3-0e11-433f-9446-95c3519a9459
yasin-arafat-05/lCProblem
codeforces/C_Odd_Even_Increments.cpp
#include<iostream> #include<vector> #define ya ios_base::sync_with_stdio(0); #define si cin.tie(0); #define in cout.tie(0); typedef long long int ll; using namespace std; void solve(ll n){ while(n--){ ll k;cin>>k; vector<ll> v(0,0); for(ll i=0,b;i<k;i++){ cin>>b;v.push_back(b); ...
ALGO
0.999062
3.418553
27db2373-3576-4dda-8f4c-2f363824ea2c
prakhal-gupta/leetcode
3618-find-the-original-typed-string-ii/find-the-original-typed-string-ii.cpp
class Solution { public: int possibleStringCount(string word, int k) { int n = word.size(), cnt = 1; vector<int> freq; for (int i = 1; i < n; ++i) { if (word[i] == word[i - 1]) { ++cnt; } else { freq.push_back(cnt); cnt ...
ALGO
0.999987
6.195756
36ffaebe-b2f0-4826-a701-7af6e45a0bf3
SohagMollik/LeetCode
1669-merge-in-between-linked-lists/1669-merge-in-between-linked-lists.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* mergeInBetw...
ALGO
0.999987
4.939496
ea76fb8e-4d7d-4fc4-877d-3c9a66d237bb
fmoralesh/domino-svm
main.cpp
/********************************************* * FILE NAME: main.cpp * * DESCRIPTION: main function for our * * domino recognizing algorit * * AUTHORS: Diego Peña, Victor García, * * Fabio Morales, Andreina Duarte * *************************************...
ALGO
0.999163
5.472752
80eca9a6-e1fc-4696-8cf5-87eaec9f2861
wang12d/ProgrammingPractices
ProjectEuler/pe435.cpp
/** * Project Euler Problem 435 Polynomials of Fibonacci numbers * @author: Heng * @date: 2018/08/29 * @modified: 2019/08/6 * Use polynominal of fibnocacc and q-matrix **/ #include <cstdio> #include <vector> using std::vector; #include <cstdint> #include <sys/time.h> #include <cassert> typedef uint64_t ULong; ty...
ALGO
0.999857
4.514762
2548ec54-21ac-4ac3-a827-a074c1fa28c8
cassinimeow/CPP-Programs-During-College
CP2-ACT2-250312/CPP-ACT2-Q10-6.cpp
#include <iostream> using namespace std; int main() { // VARIABLE DECLARATION AND INITIALIZATION int num1 = 0, num2 = 0; // USER INPUT - get two numbers cout << "Enter a number: "; cin >> num1; cout << "Enter another number: "; cin >> num2; // DISPLAY USER INPUT cout << "Original...
ALGO
0.955617
5.8911
c724aceb-c908-4f74-9805-1e1daac2aafa
CPS-Academy/cpc-contest-solutions
Module-03/Leetcode/06.Policy-Based Data Structure/05.Count of Range Sum.cpp
#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; class Solution { public: tree<pair<long long, int>, null_type,less<pair<long long, int>>, rb_tree_tag,tree_order_statistics_node_update> s; int countRangeSum(vector<int>& nums, int lower, int upper) { s.insert({0, -1}); long long...
ALGO
0.999965
5.825733
5adb1710-1790-45d7-b758-a41c3361b1dc
Keyu-He/Enhancing-Debugging-Skills-of-LLMs-with-Prompt-Engineering
solutions_correct/algorithms/P/Palindrome Pairs/Palindrome Pairs.cpp
// Runtime: 2661 ms (Top 8.68%) | Memory: 415.7 MB (Top 73.21%) class Solution { public: // Maybe I should learn trie! :'( this code just beats the time limit ! pair<bool,bool> dp[5001][301]; long long mod = 1011001110001111 , base = 31; pair<long long,long long> Hashes[5001]; vector<vector<int>> ans...
ALGO
0.999945
5.971185
8ec0f2d7-25bf-45a3-83a0-ac07027b0dbb
Gurpreet3131/competitiveProgramming
others/c.cpp
// C++ Implementation of Kosaraju's algorithm to print all SCCs #include <iostream> #include <list> #include <stack> using namespace std; class Graph { int V; // No. of vertices list<int> *adj; // An array of adjacency lists // Fills Stack with vertices (in increasing order of finishing // ti...
ALGO
0.999803
5.26626
277821ae-57f7-4adb-81a4-3ac3c789c160
Bossixd/competitive-programming
codeforces/242B-big-segment/242B-big-segment.cpp
#include <iostream> using namespace std; int main() { #define int long long int int N; cin >> N; int mxl = 0; int S, E; int mni, mxi; int mn = 1000000001, mx = 0; int index = 0; for (int n = 0; n < N; ++n) { cin >> S >> E; if (E - S + 1> mxl) { mni = S;...
ALGO
0.99994
4.630308
dad298eb-147f-4878-82ba-86b823b03eea
RebUT/REBUT
resource/lib/OpenCV-2.2.0/samples/cpp/brief_match_test.cpp
/* * matching_test.cpp * * Created on: Oct 17, 2010 * Author: ethan */ #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <vector> #include <iostream> using namespace cv; using std::cout;...
ALGO
0.93279
5.854881
d844c26a-b2e1-4dbf-8c6b-5f304a522b47
Ephurin/Ptit_code_DSA
DSA06021.cpp
#include <bits/stdc++.h> using namespace std; void testCase() { int n, x, ans; cin >> n >> x; for (int i = 1; i <= n; ++i) { int num; cin >> num; if (num == x) ans = i; } cout << ans; } int main() { int T = 1; cin >> T; while (T--) { testCase(); cout << "\n"...
ALGO
0.999166
4.742363
b70b07a1-61db-4fe7-95a6-6bd8e9f9a2bb
OversizedSunCoreDev/ArtilleryEco
Barrage/Source/JoltPhysics/Jolt/Physics/Collision/NarrowPhaseQuery.cpp
#include <Jolt/Jolt.h> #include <Jolt/Physics/Collision/NarrowPhaseQuery.h> #include <Jolt/Physics/Collision/CollisionDispatch.h> #include <Jolt/Physics/Collision/RayCast.h> #include <Jolt/Physics/Collision/AABoxCast.h> #include <Jolt/Physics/Collision/ShapeCast.h> #include <Jolt/Physics/Collision/CollideShape.h> #inc...
ALGO
0.954816
6.292699
e5538767-1dc5-48e1-ba95-263d933a793c
Shubby98/algo-CodingBlocks
hackerblocks/data structure/heap/hostelvisit.cpp
#include<iostream> #include<queue> #include<math.h> using namespace std; int caldistance(int x ,int y) { return pow(abs(x),2) + pow(abs(y),2); } int main() { int k ,q; cin>>k>>q; priority_queue <long long int> maxheap; while(k--) { int t; cin>>t; if(t==1) { ...
ALGO
0.99953
3.482371
705acc1a-df5b-4e52-8241-d4dc2009ed0c
tuntdeveloper/flutter_template_bloc_pattern
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
5f118a41-bc8c-44c9-a779-bfbf977ac824
schooldev49/CompetitiveProgramming
hackerrank/cpp/intro/funcs.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; /* Add `int max_of_four(int a, int b, int c, int d)` here. */ int max_of_four(int a, int b, int c, int d){ vector<int> ok = {a,b,c,d}; sort(ok.begin(),ok.end()); return ok[ok.size() - 1]; } int main() { int...
ALGO
0.998989
4.076608
5a780db0-eae1-4bab-b780-bb74d6d52e72
fengbingchun/PyTorch_Test
src/pytorch/aten/src/ATen/native/Repeat.cpp
#include <ATen/ATen.h> #include <ATen/Parallel.h> #include <ATen/native/Repeat.h> #include <c10/util/irange.h> template <typename index_t> static void compute_cpu( index_t* repeat_ptr, int64_t* cumsum_ptr, index_t* result_ptr, int64_t size, int64_t result_size) { TORCH_CHECK( (result_size =...
TOOL
0.992112
7.013466
3bd507b8-fed2-4180-9fb0-7bea212976e7
d-mironov/competitive-programming
HackerRank/apple-and-orange/C++/src/main.cpp
#include <iostream> #include <sstream> #include <string_view> #include <vector> using namespace std; void countApplesAndOranges(int s, int t, int a, int b, vector<int> apples, vector<int> oranges); int main() { vector<int> apples = {2, 3, -4}; vector<int> oranges = {3, -2, -4}; countApplesAndOranges(7, 1...
ALGO
0.997448
5.764768
be0d9bae-efb8-4ab6-8b7c-47f980b294d4
ojasvishaklya/competitive
4.Tree/lec023/left_view.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.999716
6.1293
82bf0f94-b935-4dd0-ace5-b2738e49e065
sharmadeepak1999/leetcode-problems
0003-longest-substring-without-repeating-characters/0003-longest-substring-without-repeating-characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { if(s == "") return 0; unordered_set<char> st; int i = 0; int maxi = 0; st.insert(s[0]); for(int k = 1; k < s.length(); k++) { if(st.find(s[k]) != st.end()) { while(s[i] != s[...
ALGO
0.999969
6.067142
b1d85125-914e-4524-8185-adb878c6bbfb
ishandutta2007/codeforces
wxhtzdy/normal/1151/A.cpp
/** * author: milos * created: 25.02.2021 09:38:10 **/ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; string s; cin >> s; auto Solve = [&](char x, char y) { int ans = abs(x - y); return min(ans, 26 - ans); ...
ALGO
0.999449
4.6033
0fea3a22-a532-4ea7-9dee-ce667bcb4d1f
Karanpratap20/LeetCode-DSA
3225-length-of-longest-subarray-with-at-most-k-frequency/length-of-longest-subarray-with-at-most-k-frequency.cpp
class Solution { public: int maxSubarrayLength(vector<int>& nums, int k) { unordered_map<int,int> mp; int mx=0; int n=nums.size(),i=0,j=0; while(i<n && j<n){ mp[nums[j]]++; while(mp[nums[j]]>k){ mp[nums[i]]--; i++; ...
ALGO
0.999925
6.208618
b399d670-d758-42a2-9445-207f2fd0ec5d
Armaan42/Summer-Training-2025
Day_1/problems/exp_2.cpp
// largest element in vector #include<iostream> #include<vector> #include<algorithm> #include<limits.h> using namespace std; int main(){ vector<int> v = {1,4,5,2,3}; int max = INT_MIN; for(int i=0; i<v.size(); i++){ if(v[i] > max){ max = v[i]; } } cout << max; r...
ALGO
0.996203
4.026048
f97f46de-e4e7-4064-88bf-19e173ee5b32
pratishthasaini/Striver_sde_sheet
10_findDuplicateNumber.cpp
class Solution { public: int findDuplicate(vector<int>& nums) { int fast = nums[0]; int slow = nums[0]; do{ slow = nums[slow]; fast = nums[nums[fast]]; } while(slow != fast); fast = nums[0]; while(fast != slow){ slow = nums...
ALGO
0.999951
6.193775
a632a79a-83b6-4d00-b683-12013c0b0368
KunalRSangalge/DSA
Codeforces/R1028C.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> #define ll int64_t //2312182 kunal #define gc getchar_unlocked #def...
ALGO
0.999703
3.736407
db665ec8-42e1-460f-9602-800a59d9f2e3
xpic-toolchain/xpic_toolchain
llvm-2.8/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
using namespace llvm; STATISTIC(NumEdgesInserted, "The # of edges inserted."); namespace { class OptimalEdgeProfiler : public ModulePass { bool runOnModule(Module &M); public: static char ID; // Pass identification, replacement for typeid OptimalEdgeProfiler() : ModulePass(ID) {} void getAnalysis...
TOOL
0.933705
7.299842
644ac039-9d7f-4936-9726-3719d11660ee
52North/IlwisObjects
core/geos/src/operation/IsSimpleOp.cpp
#include <geos/operation/IsSimpleOp.h> //#include <geos/operation/EndpointInfo.h> #include <geos/algorithm/BoundaryNodeRule.h> #include <geos/algorithm/LineIntersector.h> #include <geos/geomgraph/GeometryGraph.h> #include <geos/geomgraph/Edge.h> #include <geos/geomgraph/EdgeIntersection.h> #include <geos/geomgraph/inde...
ALGO
0.936675
6.49989
8c0194c1-3f76-4e8b-9186-4f87651412b6
mickael-al/GeometrieAlgorithmique
GeomAlgo/ThirdParty/Bullet3/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
#include "btPersistentManifold.h" #include "LinearMath/btTransform.h" #include "LinearMath/btSerializer.h" #ifdef BT_USE_DOUBLE_PRECISION #define btCollisionObjectData btCollisionObjectDoubleData #else #define btCollisionObjectData btCollisionObjectFloatData #endif btScalar gContactBreakingThreshold = btScalar(0....
ALGO
0.949441
3.03496
2be427d8-5d61-488e-ac34-96ed86256e63
Negationist/Negationst-Codeforces
Codeforces Practice/A. Doremy's Paint 3 crf/main.cpp
#include <bits/stdc++.h> #define int long long #define pb push_back #define ff first #define ss second #define pii pair<int,int> #define vi vector<int> #define vii vector<pair<int,int>> using namespace std; void solve(){ int n; cin >> n; map<int,int>m; for(int i=0;i<n;i++){ int a; cin ...
ALGO
0.999959
4.08289
81ba3155-b151-46c1-8e8d-2e6eb6531689
LEEYOONJONG/Algorithm_mac
pattern/floydwarshall/1956_운동.cpp
#include <algorithm> #include <iostream> #define INF 987654321 using namespace std; int v, e; int cost[401][401]; int a, b, c; void initCost(){ for (int i=1; i<=v; i++){ for (int j=1; j<=v; j++){ cost[i][j] = INF; } } } int main(){ cin.tie(0); ios_base::sync_with_stdio(0); ...
ALGO
0.999678
4.040667
e4ad2a28-e38e-44f0-ae62-510414e59d8d
codulluiandrei/pbinfo
pbinfo-698/main.cpp
#include <fstream> #include <iostream> #include <vector> #include <stack> using namespace std; ifstream fin("nrpits.in"); ofstream fout("nrpits.out"); int m, n, k, p, cnt, c; int a[1000001]; stack<int> stk; int poz1[1000001]; // poz1[i] = k poz cel mai apropiat k din stanga, pt care a[k] > a[i] int poz2[1000001]; // //...
ALGO
0.999908
3.816701
6b39e8e6-4acb-47d7-8d49-18ab619546ab
tdnguyen6/hacker-earth
kth-character/solution.cpp
// #pragma GCC optimize("Ofast") // -fopt-info, -fopt-info-loop, -fopt-info-loop-missed, -fopt-info-vec, -fopt-info-vec-missed // #pragma GCC optimization("unroll-loops") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include <bits/stdc++.h> using namespace std; // using std::cout // namespace c...
ALGO
0.999989
4.61596
27b479a7-1d36-4873-aba3-5da695ac0318
KoceVrachev/work
work/Arrays, binary search/Source.cpp
#include<iostream> using namespace std; int main() { int A[10] = { 2,4,6,8,10,12,14,16,18,20 }; int l = 0, h = 9, mid, key; cout << "Enter key " << endl; cin >> key; while (l <= h) { mid = (l + h) / 2; if (key == A[mid]) { cout << "Found at " << mid << endl; return 0; } else if (key < A[mid]) ...
ALGO
0.999752
3.763486
5b3da8f2-4ec8-4e32-b055-12c81693c355
ApolloAuto/apollo-model-centerpoint
deploy/pointpillars/cpp/custom_ops/iou3d_cpu.cpp
#include "iou3d_cpu.h" #include <cuda.h> #include <cuda_runtime_api.h> #include <math.h> #include <stdio.h> #include <vector> #include "paddle/include/experimental/ext_all.h" inline float min(float a, float b) { return a > b ? b : a; } inline float max(float a, float b) { return a > b ? a : b; } const float EPS =...
ALGO
0.996519
6.384355
2626aade-352c-409e-b21a-ad3c2dab87af
rsullivan00/labelRecognizer
helpers/levenshteinDistance.cpp
#include <vector> #include <algorithm> #include <string> #include <iostream> /* Iterative Levenshtein Distance calculation. Calculates the number of edits needed to change string s1 into s2. Edits include substitutions, insertions, and deletions. Algorithm from http://en.wikipedia.org/wiki/Levenshtein_dista...
ALGO
0.96534
4.710831
8c4672a2-3c06-4d4a-a14f-ab96ed6af91a
KJLdefeated/UIUC_Applied_Parallel_Programming
Project/project/third_party/eigen/failtest/jacobisvd_int.cpp
#include "../Eigen/SVD" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { JacobiSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
ALGO
0.863385
3.327923
55c049c3-4939-47d9-85b6-90b7de2f8f7b
sarvex/leetcode-clojurescript
solution/2400-2499/2453.Destroy Sequential Targets/Solution.cpp
class Solution { public: int destroyTargets(vector<int>& nums, int space) { unordered_map<int, int> cnt; for (int v : nums) ++cnt[v % space]; int ans = 0, mx = 0; for (int v : nums) { int t = cnt[v % space]; if (t > mx || (t == mx && v < ans)) { ...
ALGO
0.999992
5.476096
610d8db4-d2a7-49a1-801c-853c93e3edc2
deepakasu67/leetcode
Old Leetcode/21. Merge Two Sorted Lists.cpp
//https://leetcode.com/problems/merge-two-sorted-lists/ #include "LinkedList.h" #include<iostream> class Solution { public: struct ListNode* mergeTwoLists(struct ListNode* l1, struct ListNode* l2) { if (l1 == NULL) return l2; if (l2 == NULL) return l1; if (l1->val <= l2->val) { l1->next = mergeTwoLists...
ALGO
0.999512
5.395062
a66db5e7-915b-4f94-a2c9-293d51e9dc70
Feroz455/Fundamentals-Of-Computer-Algorithms
Chapter_03/Exercises_3.5/05.cpp
/* Page 198 Given a file of n records that are partially sorted as x1 x1 <= x2 < .... <= Xm and xm+1 <= .. < xn is its possible to sort the entire file in time O(n) using only a small fixed ammound of additional storage */ #include <iostream> #include <ctime> using namespace std; void insertionSort(int a[], int low, in...
ALGO
0.999964
4.771254
de1cff92-1ad4-4dcd-83bf-2bae92c62767
ngdp-trinity/wowemu
src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
/* ScriptData SDName: Boss_Sartura SD%Complete: 95 SDComment: SDCategory: Temple of Ahn'Qiraj EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "temple_of_ahnqiraj.h" enum Sartura { SAY_AGGRO = 0, SAY_SLAY = 1, SAY_DEATH = 2, SPELL_WHIRLWIND...
TOOL
0.964285
7.486376
8ee03b8c-9b18-47ae-beea-34921a701e63
prathampithalia/CP
Codeforces/A_We_Need_the_Zero.cpp
// #include <iostream> #include<bits/stdc++.h> using namespace std; #define all(a) a.begin(),a.end() #define fi first #define se second #define pb push_back #define pyes cout<<"YES"<<endl #define pno cout<<"NO"<<endl #define ce cout<<endl #define forr(i,n) for(int i=0 ; i<n ; i++) #define pvec(x) for(auto &a : x){cou...
ALGO
0.999948
4.614961