uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
4927b8f7-712a-4a45-b487-69f601887ce2
10luo/Leetcode
70.Climbing Stairs.cpp
class Solution { public: int climbStairs(int n) { if (n==0){ return 0; } int res1 = 0,res2 = 1, res3 = 1; for (int i=0;i<n;i++){ res3 = res1 + res2; res1 = res2; res2 = res3; } return res2; } };
ALGO
0.999982
5.852221
0c9429a0-3cab-4def-99aa-20dec8aee47b
hemantshirsath/C-practice
reversenumberusingstack.cpp
#include<iostream> using namespace std; struct node { int size; int top; int *arr; }; int isempty(struct node *sp) { if(sp->top==-1) { return 1; } return 0; } int isfull(struct node *sp) { if(sp->top==sp->size-1) { return 1; } return 0; } void push(struct node...
ALGO
0.999941
4.148741
10feebc5-aa8a-4401-ab65-972d6cc7d980
PodlesnovYakov/task_6_sem_3
task_63_sem_3.cpp
#include <iostream> #include <map> #include <string> #include <locale.h> #include <Windows.h> using namespace std; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); int n; cin >> n; string eng_word,rus_word,dop_word; map<string, string> engrus; for (int i = 0; i < n; i++) { ...
ALGO
0.997076
4.311663
973a3ea4-9437-4c6f-8480-723a8d7047d2
VitorCostaF/CompetitiveProgramming
Codeforces/C++/Problemas A/NextRound_158A.cpp
#include<iostream> #include<vector> using namespace std; int main() { vector<int> pontos; int n,k; cin>>n>>k; for(int i=1;i<=n;i++) { int aux; cin>>aux; pontos.push_back(aux); } int count=0; if(n>1){ int corte; corte=pontos[k-1]; for(int i=0;i<n;i++){ if(pontos[i]>=corte && pontos[i]>0) coun...
ALGO
0.999966
3.740994
6cc0aa7a-2024-478d-9125-002bd5e98ec7
SaiTp/LeetCode-Codes
15. Count More than n/k Occurences - GFG/15.-count-more-than-nk-occurences.cpp
// { Driver Code Starts // A C++ program to print elements with count more than n/k #include <iostream> #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find all elements in array that appear more than n/k times. int countOccurence(int arr[], int...
ALGO
0.999729
5.68928
ecfd4f1f-0479-4161-9fa3-7bb8e76f19a2
lzyrapx/Codeforces
2A(map).cpp
#include <bits/stdc++.h> using namespace std; string s[1010]; int num[1010]; map<string, int> p, t; int main() { int maxx = 0, n; cin >> n; for (int i=0 ;i < n; i++) { cin >> s[i] >> num[i]; p[s[i]] += num[i]; } for (int i = 0; i < n; i++) { if ( p[s[i]] > maxx) maxx = p[s[i]]; } int i = -1; while...
ALGO
0.999909
3.796481
bef40f5f-906b-47e7-83f3-7c7541d97ee7
jrzanol/rsa_dec
src/aesdec/aesdec.cpp
#include <stdio.h> #include <string.h> #include <openssl/pem.h> #include <openssl/rsa.h> #include <openssl/aes.h> int main(int argc, char* argv[]) { if (argc == 2 && strcmp(argv[1], "getpublickeys") == 0) { FILE* publicFile = fopen("pub.key", "r"); EVP_PKEY* publicKey = PEM_read_PUBKEY(publicFile, NULL, NULL, N...
ALGO
0.952938
3.986132
4381a05d-dcab-4cee-ace7-a6dd813c7fb0
MariaChrysafis/CompetitiveProgramming
Codeforces/1538C.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; vector<long long> v; long long binSearch(long long target){ //find the index of the first element than is greater target long long l = 0; long long r = v.size() - 1; long long ans = -1; while(l <= r){ ...
ALGO
0.999956
4.018692
025313b8-1383-4937-9c71-559b8d414466
ProjectGhostOS/frameworks_native
cmds/lshal/utils.cpp
#include "utils.h" namespace android { namespace lshal { std::string toHexString(uint64_t t) { std::ostringstream os; os << std::hex << std::setfill('0') << std::setw(16) << t; return os.str(); } std::vector<std::string> split(const std::string &s, char c) { std::vector<std::string> components{}; ...
TOOL
0.87133
6.185769
8b10493b-b31e-4b44-ab79-1447e0cee210
abarret/AdvDiffSolvers
src/level_set/LSFromLevelSet.cpp
#include "ibtk/config.h" #include "ADS/LSFromLevelSet.h" #include "ADS/app_namespaces.h" #include "ADS/ls_functions.h" IBTK_DISABLE_EXTRA_WARNINGS #include <boost/multi_array.hpp> IBTK_ENABLE_EXTRA_WARNINGS namespace ADS { LSFromLevelSet::LSFromLevelSet(std::string object_name, Pointer<PatchHierarchy<NDIM>> hierarch...
TOOL
0.877434
6.661386
62af4479-e3ec-481b-96d7-285329d8982e
Hedjerford/VystavkinResume
Algorithms/C++/VariousSummands.cpp
#include <bits/stdc++.h> //find the maximum number k for which n can be represented as the sum of k different natural summands int main() { int n; std::cin >> n; std::set<int> ans; int i = 1; while (n) { if (n - i < 0) { auto it = ans.end(); --it; n += *...
ALGO
0.999978
4.535972
18b325c0-7143-40da-9fac-1d1dd6580633
joshua-dgeang/Thesis_code
thirdYear/January_18/discrete/asCash/discreteAlgorithm/otherTarget/zeroNine/Hermite.cpp
#include "Hermite.hpp" #include <cmath> #include <iostream> #include <vector> using namespace std; Hermite :: Hermite (double mean, double std):Demand_mu(mean),Demand_sigma(std){ pi = 3.14159265359; double xi_initial[9] = {-3.19099,-2.26658,-1.46855,-0.723551,0,0.723551,1.46855,2.26658,3.19099}; x_vec.res...
ALGO
0.999676
4.982247
b8671626-8e7f-4473-92e3-31ef7db8d87d
omargawdat/B-Tree-Files-C-
src/BTree.cpp
#include <iostream> #include <vector> #include <fstream> #include "Node.cpp" using namespace std; class BTree { fstream wrTree; string file = R"(..\Data\BinaryFile.txt)"; int recordsCount; int m; public: BTree(int recordsCount, int m) : recordsCount(recordsCount), m(m) { wrTree.open(file,...
ALGO
0.998808
3.992682
f9dccf51-2ccf-4ef3-84f8-b692639a5bd1
etileyli/Algorithms
C++/basicRecursion.cpp
#include <iostream> using namespace std; void printDigit(int x){ int y; cout << x % 10; } void printOut(int x){ if (x >= 10) printOut(x/10); printDigit(x % 10); } int main(int argc, char const *argv[]) { /* code */ printOut(765234); return 0; }
ALGO
0.999762
5.537549
f757f94d-b579-4908-9d94-b66859f4b54c
gcli7/UVaCode
568/568.cpp
#include <iostream> #include <iomanip> #define N 10000 using namespace std; int main(int argc, char *argv[]) { long long base[10005] = {0}; base[0] = 1; for(int i = 1; i <= N; i++) { base[i] = base[i-1] * i; while(base[i] % 10 == 0) base[i] /= 10; if(base[i] > 1000000) base[i] %= 1000000; } int inpu...
ALGO
0.999677
3.64548
a64f1d9b-a343-40bd-bf94-48b16cb158ad
sacomplex/notesbook
计算机基础课程/数据结构/算法竞赛入门经典 第2版 第01遍/02/exercises/2.6.cpp
/******************************* * 用1,2,3,...,9组成3个三位数abc,def和ghi,每个数字恰好使用一次, * 要求abc: def: ghi = 1: 2: 3 * 按照"abc def ghi "的格式输出所有解,每行一个解 * * 注: * 是否有不借助数组的方法? * 按照书本的安排,还没有介绍数组的概念 * * 分析 * 要求1,2,3,...,9组成3个三位数abc,def和ghi,每个数字恰好使用一次 * 因此abc最小为123, 最大为3开头的三位数 * ****************************/ # include<...
ALGO
0.999833
3.175693
e6a5bbbc-b24b-472a-855e-c291d21284dc
ANMsingh/CSE303-Data-Structure-
Stack.cpp
#include<stdio.h> #include<process.h> #include<stdlib.h> #define MAX 5 //Maximum number of elements that can be stored int top=-1,stack[MAX]; void push(); void pop(); void display(); int main() { int ch; while(1) //infinite loop, will end when choice will be 4 { printf("\n\ Stack Me...
ALGO
0.992521
3.725091
8b0be554-25af-48bf-be6f-ad72628dd6a3
VC6378/Codeforces
A_Nastia_and_Nearly_Good_Numbers.cpp
#include <bits/stdc++.h> using namespace std; //Speed #define fastio() ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); int32_t main() { int t; cin>>t; while(t-->0){ int a,b; cin>>a>>b; if(b==1){ cout<<"NO"<<endl; } else{ ...
ALGO
0.999107
3.906297
48a32398-76b3-4433-97a9-f97856e7be52
karunsehwag/leetcode_daily
0134-gas-station/0134-gas-station.cpp
class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { int n=gas.size(); int total=0,totalgas=0,totalcount=0,in=0; for(int i=0;i<gas.size();i++) { totalgas+=gas[i]; totalcount+=cost[i]; total+=gas[i]-cos...
ALGO
0.999997
5.836009
150b3061-9276-4838-9a4e-2bc25dfabb87
Chandan017/Coder-s-Byte
2421-number-of-good-paths/2421-number-of-good-paths.cpp
class Solution { public: int find(vector<int>& y,int i) { if(i==y[i]) return i; y[i]=find(y,y[i]); return y[i]; } int numberOfGoodPaths(vector<int>& vals, vector<vector<int>>& edges) { int n = vals.size(),m=edges.size(),ans=0; vector<vector<int>> x(n); vector<int> y(n); for(int i=0;i<n;i++){ y...
ALGO
0.999994
5.29612
39eacdb5-4c44-4429-afae-5bb9f2285916
lucky3156/LEETCODE
94-binary-tree-inorder-traversal/binary-tree-inorder-traversal.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.999989
6.512537
b0f7406b-ab6f-4bb4-90a3-7447e954d1ef
Havingworld/Less13.6Task1
Less13.6Task1.cpp
/* Пользователь вводит с клавиатуры число n, далее -- n целых чисел, которые нужно записать в вектор. Потом пользователь вводит ещё одно значение. Нужно удалить из вектора все элементы, которые равны данному значению, и вывести итоговое состояние вектора Пример: Пользователь ввёл 5, потом числа 1, 3, 3, 5, 1. И потом...
ALGO
0.999389
5.052547
06ea75cb-ca23-4236-96cc-4df2b4cd8253
aayush751/Geeksforgeeks
Difficulty: Medium/Implement Pow/implement-pow.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: double power(double b, int e) { // code here double ans = b, odd = 1.0; long long power = e; // phle po...
ALGO
0.999579
5.644348
16fc49da-9a75-4aa7-af4b-ad31956adbfd
SingularDuo/C-COMPETITIVE-TRAINING
TUYEN TDN C3/Number_Theory/Modular/CRT.cpp
/* _.-- ,.--. .' .' / @ |'..--------._ / \._/ '. / .-.- \ ( / \ \ \ '. | # \ \ -. / :\ | )._____.' \ " | / \ | \ ) Kduckp ...
ALGO
0.999975
4.926158
784b1b60-38cb-4124-8e8a-c414de02422b
VoidK2/sync_code
ecf48div2b.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> using namespace std; int main(){ freopen("input.txt","r",stdin); int alen,blen,p; scanf("%d%d%d",&alen,&blen,&p); string a,b; cin>>a>>b; // cout<<a<<b<<endl; int ans,l,r; for(int i=1;i<=p;i++){ ans=0; ...
ALGO
0.999486
3.168205
9550b289-caa3-46f6-b0e5-73caf7678333
Sovol3d/SV01-Source-Code-no-BL
Marlin/src/module/delta.cpp
/** * delta.cpp */ #include "../inc/MarlinConfig.h" #if ENABLED(DELTA) #include "delta.h" #include "motion.h" // For homing: #include "planner.h" #include "endstops.h" #include "../lcd/ultralcd.h" #include "../Marlin.h" #if HAS_BED_PROBE #include "probe.h" #endif #if ENABLED(SENSORLESS_HOMING) #include "../...
ALGO
0.977874
6.981141
68e7ca3d-bc8f-4f34-9506-dfb9a5e1200a
zieduvija/50_cpp
code/burti4.cpp
#include <iostream> int main() { std::string word; int count = 0; char x; std::cin >> word>> x; for(int i = 0 ; i<word.length(); i++) if(word[i] == x) count++; std::cout << count; }
ALGO
0.999581
3.903909
3d332ae4-5626-4228-a1a4-3a5e94e78b2d
ZopharsDomain/SNES-WINDOWS-Lunar-SNES
src/LunarSNES/processor/lr35902/algorithms.cpp
auto LR35902::ADD(uint8 target, uint8 source, bool carry) -> uint8 { uint16 x = target + source + carry; uint16 y = (uint4)target + (uint4)source + carry; CF = x > 0xff; HF = y > 0x0f; NF = 0; ZF = (uint8)x == 0; return x; } auto LR35902::AND(uint8 target, uint8 source) -> uint8 { target &= source; C...
TOOL
0.987183
6.435295
e5417b19-262e-4c38-814c-cb3d3254a9ca
chagelo/Multithreading-Practice
basic/mutex.cpp
#include <atomic> #include <iostream> #include <mutex> #include <thread> std::mutex mtx; int globalVariable = 0; // std::atomic<int> globalVariable = 0; // complex, may throw out error void callAFunc() {} void task1() { for (int i = 0; i < 1000000; ++i) { mtx.lock(); // RAII // std::lock_guard<std::m...
ALGO
0.866556
4.634682
02f44e76-6566-479e-9a7d-67b33f21faa3
315386775/VideoRecognitionTracking
Main/Tracking.cpp
#pragma once #include "stdafx.h" #include "Tracking.h" #include <fstream> using namespace std; using namespace cv; Tracking::Tracking(){ nscore = 0.f; } /* ܣƵеĿ٣ͼܹЧ 룺ǰ֡ͼ񣬵ĿϢ滭ͼ ĿλãͼбǸٵ֡ */ FrameHandleWay Tracking::trackFaces(Mat frame, TrackState *target, Mat &result) { if (target->framecount % 4 == 0 || target-...
ALGO
0.909679
3.682326
dff1b04c-61dc-43cc-aaa3-abf5ecce3d64
Kunalgarg108/CP
CP Lab/Week5/Lab5Q1.cpp
#include<bits/stdc++.h> using namespace std; void Heapify(vector<int>& arr,int n,int i){ int largest=i; int l=2*i+1; int r=2*i+2; if(l<n && arr[l]>arr[largest]){ largest=l; } if(r<n && arr[r]>arr[largest]){ largest=r; } if(largest!=i){ swap(arr[i],arr[largest]); ...
ALGO
0.999989
3.218078
6e461793-5a4d-42e3-8dd0-25f7297bc8b2
NikhilK06/Leet
solutions/2250. Count Number of Rectangles Containing Each Point/2250.cpp
class Solution { public: vector<int> countRectangles(vector<vector<int>>& rectangles, vector<vector<int>>& points) { vector<int> ans; vector<vector<int>> yToXs(101); for (const auto& r : rectangles) yToXs[r[1]].push_back(r[0]); for (auto& xs : yToXs) sort(b...
ALGO
0.999956
6.465518
dfac784d-7fd3-4b3c-8c5a-ec9708c2354b
NishantA9/CPlusPlus-Codes-SmallProjects
C++ Projects/projects/hypotenuseCalculator.cpp
#include <iostream> #include <cmath> int main(){ double a; double b; double c; std::cout << "Enter the value of a: " << '\n'; std::cin >> a; std::cout << "Enter the value of b: " << '\n'; std::cin >> b; c = sqrt(a*a + b*b); //or // c = sqrt(pow(a,2) + pow(b,2)); std::cout << "The hypotenuse of the right angled tr...
ALGO
0.995644
3.884274
96d21655-3b67-4629-9a4e-f59530d1cb9f
itkingnb/cf-atc-and-so-on
luogu/P1135.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long ll jc(ll n){ if(n==1||n==0) return (ll)1; else return n*jc(n-1); } void yes(){ cout<<"Yes\n"; } void no(){ cout<<"No\n"; } int gcd(int a,int b){ return b?gcd(b,a%b):a; } int lcm(int a,int b){ return (a*b)/gcd(a,b); } ll qp...
ALGO
0.999973
3.502987
a4449656-6c3e-4bf9-b2ee-297f45a8147c
CrazysCodes/algorithm
old/Competition/Every/336.cpp
#include <iostream> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <stack> #include <queue> #include <utility> #include <algorithm> using namespace std; class Solution { /** * 实际上贪心策略 是需要对题目做一定判断 与验证是否能使用得归纳/证明不同 是对题目暗含的要求解读 从而解答 * 区间问题中,考虑...
ALGO
0.999882
5.130445
a5435c28-8a33-4330-bde9-59446697dac3
GlodonOpenSrc/Qt5.5.1_Glodon
qttools/src/linguist/shared/simtexth.cpp
#include "simtexth.h" #include "translator.h" #include <QtCore/QByteArray> #include <QtCore/QString> #include <QtCore/QList> QT_BEGIN_NAMESPACE typedef QList<TranslatorMessage> TML; /* How similar are two texts? The approach used here relies on co-occurrence matrices and is very efficient. Let's see with an...
ALGO
0.997009
6.057095
44e695df-cfe3-4fad-b7da-3f68961af3a9
hieu-ln/IT82-09
CodeC6/DoThiTrang_C6_Bai5.cpp
// chuong 6 bai 5 #include <iostream> #include <stdio.h> #include <fstream> #include <iomanip> using namespace std; //khai bao ma tran bang mang hai chieu # define MAX 20 int a[MAX][MAX]; int n;// so dinh cua do thi char vertex[MAX]; // ten dinh void InitGraph() { n=0; } void inputGraphFromText() { string line; ...
ALGO
0.999613
3.637231
8df39e97-f7f3-4725-9ab1-e61ab809f733
H2Z20Str/ardupilot4.5.1
ardupilot/ArduSub/commands.cpp
#include "Sub.h" // checks if we should update ahrs/RTL home position from the EKF void Sub::update_home_from_EKF() { // exit immediately if home already set if (ahrs.home_is_set()) { return; } // special logic if home is set in-flight if (motors.armed()) { set_home_to_current_loca...
TOOL
0.978264
6.364691
529da6b0-7bf6-4344-8e96-6bcf81006873
NoviceCoderInfinity/DSA_CP
leetcode/1283.Find_the_Smallest_Divisor_Given_a_Threshold.cpp
class Solution { public: int sum_arr (vector<int>& nums, int divisor) { int sum = 0; for (int i = 0; i < nums.size(); ++i) { sum += ceil((double)nums[i] / divisor);} return sum; } int smallestDivisor(vector<int>& nums, int threshold) { int low = 1; int high = *max...
ALGO
0.999961
6.072324
46341e30-ee19-4a04-9f10-3fec7c25e453
AshishKhatkar/Codeforces
VK_Cup_2015_Round2_Div_1/C.cpp
/* ID: ashish1610 PROG: LANG: C++ */ #include<bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<int> #define vl vector<ll> #define pii pair<int,int> #define pil pair<int, ll> #define pll pair<ll, ll> #define pli pair<ll, int> #define pb(v, a) v.push_back(a) #define mp(...
ALGO
0.995556
3.625151
b0a956e3-6f64-460e-a4c8-e8bf847410da
ZhitingHu/DITREE
tools/generate_syn_data.cpp
#include <fstream> #include "gflags/gflags.h" #include "glog/logging.h" #include "ditree.hpp" #include <cmath> using namespace std; using namespace ditree; DEFINE_string(path, "", "Path of the dataset"); DEFINE_string(docs, "", "Filename of the docs"); int main(int argc, char** argv) { FLAGS_logtostderr = 1; gf...
DATA
0.912493
5.440176
4a2bef81-b050-4d18-a112-be51db9a0eab
eduardomuchak/shopping_list
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
03a64ff3-9151-472c-97ea-00032eaf9ef9
ishandutta2007/codeforces
purplecrayon/normal/1257/A.cpp
#include "bits/stdc++.h" using namespace std; template<class T> using min_pq=priority_queue<T, vector<T>, greater<T>>; #define sz(v) (int)v.size() #define ar array // #define f first // #define s second typedef vector<int> vi; typedef long long ll; typedef long double ld; typedef unsigned int ui; const int MAXN = 7...
ALGO
0.999484
4.875337
1e55cee7-ba09-43bd-bd32-324da7b4f22a
Pixelneery/competitive-programming
shohagmod.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> seq; for (int i = 0; i < n; ++i) { seq.push_back(2 * i + 1); } for (int i = 0; i < n; ++i) { cout << seq[i] << "...
ALGO
0.999685
4.543563
5565e686-7d20-4245-973f-fe77a86af6d0
stopmin/Algorithmic-Problem-Solving-Strategies
stopmin/barkingdog/0x0C/1182.cpp
// // Created by 정지민 on 8/17/24. // #include <bits/stdc++.h> using namespace std; int N, S; int ans = 0; int arr[30]; void func(int cur, int tot) { if (cur == N ) { if(tot==S) ans++; return; } func(cur+1, tot); func(cur+1, tot+arr[cur]); } int main(void) { ios::sync_with_stdio(0)...
ALGO
0.999934
3.743419
adef4f23-6384-4174-a132-5a7def8499b7
icinghuan/Con-oj
RE0/16.7.23 BestCoder Round #84/1002z.cpp
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<cmath> #define FOR(i,a,b) for(int i=a;i<=b;++i) #define FORR(i,a,b) for(int i=a;i>=b;--i) using namespace std; const int MAXN = 100005; int n,ma; int a[MAXN],b[MAXN]; void solve(int i) { int k = 1; FORR(j,i-1,1) { if ...
ALGO
0.999819
3.475356
af551e70-4a6a-4032-bfe5-44fd5a1c2041
falcaoanderson/CompetitiveProgramming
CSES/cses-1740.cpp
// 25/11/20 // xx:xx PM // #include <bits/stdc++.h> using namespace std; #define endl "\n" #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) #define pb push_back #define mp make_pair #define ll long long typedef pair<int, int> pii; const int INF = 0x3f3f3f3f; const int MAXN = (2e5); int n; vector<tu...
ALGO
0.999124
3.722816
e45caccd-08c2-47eb-b0e1-908dc6051c83
Chandrapalumath/LeetCode
1636-sort-array-by-increasing-frequency/1636-sort-array-by-increasing-frequency.cpp
class Solution { public: vector<int> frequencySort(vector<int>& nums) { vector<int>freq(202,0); for(int i=0;i<nums.size();i++) freq[nums[i]+100]++; sort(nums.begin(),nums.end(),[&](int a,int b){ if(freq[a+100]==freq[b+100]) return a>b; return freq[a+100]<freq[b+100]; ...
ALGO
0.999964
5.852138
a6d506e7-0c24-4239-b76b-4a53d1603be0
sld-columbia/esp
accelerators/stratus_hls/sinkhorn_stratus/hw/src/sinkhorn.cpp
#include "sinkhorn.hpp" //#include "sinkhorn_directives.hpp" // Functions #include "sinkhorn_functions.hpp" // Inputs: inputX[m*p], inputY[m*q], p, q, m, gamma, maxiter // Outputs: P[p*q], CP_sum // Memories: P[q*p], C[q*p], K[q*p], x_a[p], y_b[q], inputX[m*p], inputY[m*q] // Config Registers: Inputs dimensions - ro...
ALGO
0.966854
6.106509
4d8917cc-4f33-44ab-a37e-75dc6d10c802
kidclone3/CP
OnlineJudge/vnoi/data_structure/gss.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define vl vector<long long> #define vb vector<bool> #define ll long long #define pii pair<int, int> #define all(x) x.begin(), x.end() #define FORIT(i, s) for (auto it=(s.begin()); it!=(s.end()); ++it) #define F_OR(i, a, b, s) fo...
ALGO
0.999949
4.385372
f8b3a9ca-a5d5-4acd-a11e-db99a0ffc293
chirag-singhal/Coding-Interview-101
Miscellaneous/LeetCode/April30DayChallenge/countingElements.cpp
#include <bits/stdc++.h> class Solution { public: int countElements(std::vector<int>& arr) { std::sort(arr.begin(), arr.end()); int n = arr.size(); int prevNum = arr[0]; int prevCount = 0, count = 0; for(int i = 0; i < n; i++) { if(prevNum == arr[i]) { ...
ALGO
0.999947
5.776422
4ed5ced8-b0f4-4994-869b-71d97d92e377
TEJAS-SAI-PRASHAD-K/To-do-List-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.998733
6.76775
13fffe5a-cb28-44da-ab21-a958c030d9e3
vineethkumart/snippet
dp/bus_pass.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; // dpass to complete the journed from i'th day // answer is when called with 0 int dpass(vector<int>& days, vector<int>& pass, int i, int dp[]) { if (i >= days.size()) return 0; auto isSafe = [&](int i ) -> bo...
ALGO
0.999751
4.482714
e46214fb-0c71-4148-a99f-ebe7b07768bf
Nakib-Arman/CSE314---OperatingSystem
3.IPC/.history/main_20250627005153.cpp
#include <iostream> #include <chrono> #include <pthread.h> #include <random> #include <vector> #include <unistd.h> using namespace std; #define MAX_PHASE1_TIME 20 #define MAX_PHASE2_TIME 20 #define SLEEP_MULTIPLIER 1000 auto start_time = chrono::high_resolution_clock::now(); long long get_time() { auto end_time ...
ALGO
0.995019
5.052036
2c5d2a47-63a1-4c33-883a-d2e38dcbfd54
gold-4N/problem-solving
uva/406 - Prime Cuts.cpp
#include<bits/stdc++.h> using namespace std; int binarySearch(vector<int> arr, int l, int r, int x) { int mid = l + (r - l) / 2; if (r >= l) { if (arr[mid] == x){ return mid; } if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x); return ...
ALGO
0.999637
3.568246
4a7eb6b8-40ed-48c2-b3be-3b99b9f9c06a
ishandutta2007/codeforces
gisp_zjz/normal/1252/J.cpp
#include<bits/stdc++.h> #define F first #define S second #define pb push_back using namespace std; typedef long long ll; typedef pair<ll,ll> pi; const int maxn=100005; ll n,p1,p2; int main(){ cin >> n; for (ll i=2;i*i<=n;i++){ if (n%i==0){ while (n%i==0) n/=i; if (!p1) p1=i; els...
ALGO
0.999993
3.982144
d8ac3566-1701-4857-a62b-839c8a7f4754
NumanAnees/Leetcode-Solution
Binary Search Trees/Balance a Binary Search Tree(AVL)/index.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.999992
6.191411
9ff4f81f-30da-4989-968f-db3187d37890
ishandutta2007/codeforces
ei133333/normal/1475/C.cpp
#include<bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; //const int mod = 998244353; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10);...
ALGO
0.999895
4.560939
e93e4742-4dcb-4413-a57d-ded899a53e8f
Rifqi121/mobiledev-intern-test
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
0cb1d5cc-5553-4f88-af53-a943035ab51c
LamChiho/Codeforces_exp
25Apr/ABC401/a.cpp
using namespace std; #include <iostream> #include <string.h> #include<vector> #include<unordered_map> #include<unordered_set> #include <queue> #include <algorithm> #include <array> #include <functional> #include <string_view> #include<cmath> #include<set> #include<map> typedef long long ll; constexpr ll mod=998244353...
ALGO
0.99842
3.704505
779c2ec9-9d1b-40f2-bce6-3827bb2c2f8a
paul-nema/hackerrank
ProblemSolving/easy/GridChallenge/gridChallenge.cpp
// https://www.hackerrank.com/challenges/grid-challenge/ #include <bits/stdc++.h> using namespace std; // Complete the gridChallenge function below. std::string gridChallenge( std::vector< std::string > &grid ) { unsigned long x{ 1 }, y{ 0 }; std::sort( grid[ 0 ].begin(), grid[ 0 ].end() ); for( ; x <...
ALGO
0.999982
5.412095
c64f85f8-269d-4bf4-adf3-cfcef5c24264
Divi0921/cpp_programming
pattern28.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; int row=1; while(row<=n) { int j=1; while(j<=n-row+1) { cout<<j; j++; } int star=1; // cout<<star; while(star<=row-1) { cout<<"*"...
ALGO
0.999957
3.335464
334613fb-91be-40c5-a789-f827210c494d
groverinho/competitive-programming-solutions
RPC14-2016/dwarves.cpp
#include<iostream> #include <list> #include <limits.h> #include <map> #include <vector> using namespace std; typedef pair<int, int> ii; class Graph { int V; // No. of vertices list<int> *adj; // Pointer to an array containing adjacency lists bool isCyclicUtil(int v, bool visited[], bool *rs); // used...
ALGO
0.999961
3.954657
b416395e-e8a5-4709-a44e-e933e3199f15
SrayanBhattacharyya/CP_SolvedProblems
codeforces/1334/C.cpp
//Srayan Bhattachrayya JU EE #include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define rep(i,n) for(ll i=0;i<n;i++) #define rev(i,n) for(ll i=n;i>=0;i--) #define rev_a(i,a,n) for(ll i=n;i>=a;i--) #define rep_a(i,a,n) for(ll i=a;i<n;i++) typedef pair <ll, ll> pll; typedef vector <l...
ALGO
0.999956
4.192169
59e26528-e481-40f7-bf15-72a0de832f7c
XxFiEnDxX/DSA
Stacks/practice/02_stack_vector.cpp
#include<iostream> #include<vector> using namespace std; template<typename T> class stack{ vector<T> v; public: T size(){ return v.size(); } bool isempty(){ if (v.size()==0) { return 1; } return 0; } void push(T d){ v.push_back(d);...
ALGO
0.987888
4.373429
92231673-fefc-4ade-8b40-11daf7f98642
alissonbernadino/Estruturas-de-Dados
searchBotton/programa.cpp
#include <iostream> #include "matrizAdj.cpp" using namespace std; int main() { int max, valorarestanula; cout << "Digite a quantidade maxima de vertices:\n"; cin >> max; cout << "Digite o valor para representar a ausencia de aresta:\n"; cin >> valorarestanula; MatrizAdj grafo1(max); string item1, item2;...
ALGO
0.982296
4.01707
26c94883-942e-448d-9f53-7383098f9c00
fhp-transient/sweepSurface
include/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(4); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0,1,2,3; //add v to each row of m mat.rowwise() += v.transpose(); std::cout << "Broadcasting result: " << std::...
ALGO
0.998818
4.296038
ee1f40d8-a040-4b1c-b345-23fc888255fa
r-d-s-l-w/competitive-programming
SPOJ/1510.cpp
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(0); int t, l, xd, j; string x, y, txt; cin >> t; while (t--) { cin>>txt; xd=txt.length(); int tab[xd]; tab[0]=0; j=0; for(int i=1; i<xd; i++) { while(j>0&&txt...
ALGO
0.999642
3.620574
32f941a2-8117-451b-abde-27c6cff5a901
olanti-p/BNMT
src/explosion.cpp
#include "explosion.h" // IWYU pragma: associated #include "fragment_cloud.h" // IWYU pragma: associated #include <algorithm> #include <array> #include <cmath> #include <cstddef> #include <limits> #include <map> #include <memory> #include <queue> #include <random> #include <set> #include <utility> #include <vector> #...
TOOL
0.921012
5.773008
c167dcdd-30de-4bd5-87ea-42155cab4d72
wastadtlander/leetcode
cpp/m_1962.cpp
class Solution { public: int minStoneSum(vector<int>& piles, int k) { priority_queue<int> pq; for (int n : piles) pq.push(n); while (k > 0) { int n = pq.top(); pq.pop(); n -= floor(n / 2); pq.push(n); k--; } int minS...
ALGO
0.999829
5.815976
6457acfb-43c6-40bb-9920-65cd0622d4d3
tsteenbe/boost
libs/bimap/example/repetitions_counter.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.926214
6.444149
4a093aa9-3dc8-4f05-a332-4c9101f036fa
ashikari/MarbleFlow
test/flow.cpp
#include <opencv2/opencv.hpp> #include <iostream> int main(int argc, char** argv){ //create video capture and open appropriate camera cv::VideoCapture cap; if(argc>1){ cap.open(std::stoi(argv[1])); } else{ cap.open(-1); } //create a window cv::namedWindow("Flow", cv::WINDOW_AUTOSIZE); cv::namedWindow("Tr...
ALGO
0.95554
4.111042
156734ec-200a-4c1c-9e18-16fe4234a289
ishine/fastcorrect_
fastcorrect/fairseq/clib/libbleu/libbleu.cpp
#include <map> #include <array> #include <cstring> #include <cstdio> typedef struct { size_t reflen; size_t predlen; size_t match1; size_t count1; size_t match2; size_t count2; size_t match3; size_t count3; size_t match4; size_t count4; } bleu_stat; // left trim (remove pad) vo...
ALGO
0.987212
5.350801
fc7f9c83-6b9c-4023-acca-15713ba2fd81
Shivansh-Gaur2/Leetcode_Problems
1895-minimum-number-of-operations-to-move-all-balls-to-each-box/1895-minimum-number-of-operations-to-move-all-balls-to-each-box.cpp
class Solution { public: vector<int> minOperations(string boxes) { vector<int> ans; vector<int> idex; for (int i = 0; i < boxes.size(); i++) { if (boxes[i] == '1') { idex.push_back(i); } } for(int i = 0 ; i < boxes.size(); i++){ ...
ALGO
0.999989
5.823339
87e9347a-98f0-48cb-b295-841ff7637755
hal-uw/gpu_variability_sc22_artifact
sec5c_lammps/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp
/* ---------------------------------------------------------------------- Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include "pair_lj_cut_dipole_cut_gpu.h" #include "atom.h" #incl...
ALGO
0.998342
5.990278
b318c7f8-6770-40ff-b3b1-6b97a88beeab
Gnaroshi/practice-algorithm-solvedac
With_Levels/Silver/Silver_5/8892.cpp
// problem: 팰린드롬 // id: 8892 // tag: // time taken: #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; using ll = long long; u...
ALGO
0.999975
4.528406
97e84381-3f5d-4796-af99-9d8d27e3959b
vishal1844/leetcode
0019-remove-nth-node-from-end-of-list/0019-remove-nth-node-from-end-of-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* removeNthFr...
ALGO
0.999978
5.773809
8ca1fc6e-1615-49f9-a7d2-187986e65700
MyYaYa/leetcode
src/problem150/Solution.cpp
class Solution { public: int evalRPN(vector<string>& tokens) { if (tokens.empty()) return 0; stack<int> stk; for (int i = 0; i < tokens.size(); i++) { if (isdigit(tokens[i][0])) stk.push(stoi(tokens[i])); else { int v2 = stk.top(); stk....
ALGO
0.999841
6.321876
80428303-aa70-4972-b787-43c6b3271a5e
Vaibhav6200/DSA_Practice
graph/basics/list_implementation.cpp
#include<bits/stdc++.h> using namespace std; // adds and edge between node u and v void addEdge(int u, int v, vector<int> adj[]){ adj[u].push_back(v); adj[v].push_back(u); } void printGraph(int n, vector<int> adj[]){ for(int i=0; i<n; i++) { int n = adj[i].size(); cout << i << " -> "; ...
ALGO
0.999833
4.297911
5629b6df-829d-4ea5-9ec2-3bf403973060
TruelyKorosenai/MH
aieBootstrap-master/dependencies/glm/test/core/core_func_integer_bit_count.cpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
ALGO
0.997814
4.93878
206a1659-3f40-4310-8087-c4713e1852d3
whtjdejr0824/practices
c++/chapter.02/ex19_multi_arrat.cpp
#include<iostream> using namespace std; #define WIDTH 9 #define HEIGHT 3 int main() { int table [HEIGHT][WIDTH]; int r, c; for(r = 0; r < HEIGHT; r++) { for(c=0; c < WIDTH; c++) { table[r][c] = (r+1)*(c+1); } } for(r = 0; r < HEIGHT; r++) { for(c=0; c < WID...
ALGO
0.999223
3.332156
bb122661-261d-46b0-9d17-c83654d67dc5
alexandraback/datacollection
solutions_2749486_0/C++/MurthyP/B.cpp
#include <QFileInfo> #include <QFile> #include <QString> #include "QStringList" #include <iostream> #include <QTextStream> #include <QList> #include <QMap> #include <QSet> #include "QVector" #include <cmath> #include <QtAlgorithms> using namespace std; int x, y; QString minPath; void findPath(int currentX, int curren...
ALGO
0.999955
4.5556
955cf76b-bc83-4476-bef2-1706c8f4e2d2
mahfuz840/leetcode
string/reverseWordsInAStringIII.cpp
class Solution { public: string reverseWords(string s) { int count = 0; for(int i = 0; i < s.length(); i++) { count = 0; while(s[i] != ' ' && i < s.length()) { count++; i++; } reverse(s.b...
ALGO
0.999971
6.113225
eb846c3d-c9b8-43bc-ad5c-b8b0d81d8b99
krishna-raj007/BodhiTree-Annotation
CS101_Spring2020-21 /LAB4_L1/categorized/euclidean_distance/all_passed/51_euclidean_distance.cpp
#include<simplecpp> main_program{ int q; cin >>q; repeat(q){ float sum=0.0; int n; cin >>n; repeat(n){ float a,b; cin >> a >>b; sum = sum+ (a-b)*(a-b); } float rt; rt= sqrt(sum); printf("%.2f\n",rt); } }
ALGO
0.999157
3.11889
42f96001-33c0-4976-a905-2543caed3c6b
rvgpu/rvgpu-llvm
libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
// <algorithm> // template<InputIterator Iter, Predicate<auto, Iter::value_type> Pred> // requires CopyConstructible<Pred> // constexpr Iter // constexpr after C++17 // find_if(Iter first, Iter last, Pred pred); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" #include "...
TEST
0.993305
7.073208
fdf1e9f5-9e5b-4f0b-8992-44f256e83600
sanketpathak64/cses.fi-problem-solutions
sorting and searching/stick lengths.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll n; cin>>n; ll a[n]; double avg=0; for(ll i=0;i<n;i++) { cin>>a[i]; } sort(a,a+n); ll mid; if(n%2 == 0) mid = (n/2)-1; else mid = n/2; ll ans=0; for(ll i=0;i<n;i++) { ans+=abs(a[mid]-a[i]); } cout<<ans; }
ALGO
0.999861
4.079438
1a548421-0375-43b1-830e-e55983610eb0
deep-astaad/CSES
Sum_of_Two_Values.cpp
/* Code by : Aman Deep (deep_aman) */ #include <bits/stdc++.h> using namespace std; #define deep_aman ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define int long long int void solve() { int n, x; cin>>n>>x; vector<pair<int, int>> v; for (int i = 0; i < n; ++i){ int x; cin>>x; v.push_back({...
ALGO
0.999945
4.152025
4671e73f-0a00-4183-a5c4-832661d42010
ljz/exercise
MissZhangCDoublePlus/MissZhangCDoublePlus/script/Chapter 5/bigstep.cpp
// bigstep.cpp -- count as directed #include <iostream> int main() { using std::cout; // a using declaration using std::cin; using std::endl;; cout << "Enter an integer: "; int by; cin >> by; cout << "Counting by " << by << "s:\n"; for (int i = 0; i < 100; i = i + by) cout << i <...
TOOL
0.974647
3.579707
cc136f4e-c0d7-4321-b2f2-1e3845655424
VASANTH3105/Placementprep
DAYWISE/07112023/secondLargest_CN.cpp
int getSecondLargest(vector<int> arr, int n) { int largest = arr[0]; int secondLargest = -1; for(int i = 1 ; i < n ; i++) { if(arr[i] > largest) { secondLargest = largest; largest = arr[i]; } else if (arr[i] < largest && arr[i] > secondLargest) { secondLar...
ALGO
0.999916
5.434907
061c383e-30e9-4951-8e69-58a623597ee6
ljcpeixoto/destini
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
8146156d-56da-42f2-845b-d6555ada751c
JJH-Log/BaekjoonOnlineJudgeSolvedList
202104/4M3W/B1074.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <queue> #include <utility> //pair 사용 #include <algorithm> //reverse 사용 #include <math.h> // sqrt 사용 #include <set> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, r, c; long long ...
ALGO
0.999812
3.361902
97d51ff6-9d5e-4ad3-ad16-440baa489b7e
yehui2001/C_code
王道课后习题/Chapter 5/Section 3/5.3.3.cpp
//后序遍历二叉树的非递归算法 #include<iostream> #include <stack> using namespace std; typedef char ElemType; typedef struct BiTNode { ElemType data; struct BiTNode *lchild, *rchild; }BiTNode,*BiTree; typedef struct SNode { struct SNode *next; struct BiTNode *BN; }*LinkStack; //初始化链栈 LinkStack Init_Stack(LinkStack...
ALGO
0.999972
4.219095
1583d446-1f76-4279-a741-7675c26fc8cb
gengtsh/darts-heterogeneous
omp2cd-master3/darts-x86/example/Lulesh/Lulesh_v1/CalcQForElemsTP.cpp
#include "CalcQForElemsTP.h" #include "CalcMonotonicQRegionForElemsTP.h" void CalcMonotonicQGradientsForElemsIterCD::fire(void) { LOAD_FRAME(CalcQForElemsTP); size_t Id = getID(); size_t IdL = 2*Id+2; size_t IdR = 2*Id+3; if(IdL<N_CORES){ FRAME(calcMonotonicQGradientsForElemsIter[IdL])=CalcMonotonicQGradient...
ALGO
0.998765
4.524276
3a6272a2-8647-4aa9-ae01-8244662a04d2
tin10401/CodeForces
E_Tree_with_Small_Distances.cpp
//████████╗██╗███╗░░██╗██╗░░░░░███████╗ //╚══██╔══╝██║████╗░██║██║░░░░░██╔════╝ //░░░██║░░░██║██╔██╗██║██║░░░░░█████╗░░ //░░░██║░░░██║██║╚████║██║░░░░░██╔══╝░░ //░░░██║░░░██║██║░╚███║███████╗███████╗ //░░░╚═╝░░░╚═╝╚═╝░░╚══╝╚══════╝╚══════╝ // __________________ // | ________________ | // || ____ || // ||...
ALGO
0.999142
4.804906
413a5ec9-9d92-4b63-8460-2816de179aee
ishandutta2007/codeforces
boook/normal/754/B.cpp
#include<bits/stdc++.h> #include<algorithm> #include<unordered_set> #include<unordered_map> #include<ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef pair<int,int> PII; typedef long long int LL; #define REP(i,j) for(int i=0;i<j;i++) #define REPNM(i,j,k) for(int i=j;i<k;i++) ...
ALGO
0.999909
3.956236
5828f0b8-81d0-46f5-aabd-19404e973fd3
danyuanwang/XuanWuGame_C
boost/libs/intrusive/example/doc_recursive.cpp
using namespace boost::intrusive; typedef list_base_hook<> BaseHook; //A recursive class class Recursive : public BaseHook { private: Recursive(const Recursive&); Recursive & operator=(const Recursive&); public: Recursive() : BaseHook(), children(){} list< Recursive, base_hook<BaseHook> > children;...
TOOL
0.921639
4.583359
c8517216-a07f-428b-b8bc-5f1b916bbbb3
boguszjelinski/munkres
C/3/hungarian.cpp
/* This is an implementation of the Hungarian algorithm in C++ * The Hungarian algorithm, also know as Munkres or Kuhn-Munkres * algorithm is usefull for solving the assignment problem. * * Assignment problem: Let C be an n x n matrix * representing the costs of each of n workers to perform any of n jobs. * The ...
ALGO
0.999404
5.473875
38455375-9b45-4def-be53-5fec8fc9bd3b
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/time-taken-to-cross-the-door-Solution.timeTaken/177920_nan.cpp
char **XGetFontPath( register Display *dpy, int *npaths) /* RETURN */ { xGetFontPathReply rep; unsigned long nbytes = 0; char **flist = NULL; char *ch = NULL; char *chend; int count = 0; register unsigned i; register int length; _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq (GetFontPat...
ALGO
0.984509
3.538235
0665d030-a2c8-474f-8319-1e5b6e38decc
archanakush900/C-with-DSA
L4.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int i=1; while(i<=n){ cout<<i<<endl; i=i+1; } }
ALGO
0.997441
3.827124
6f4f99f6-9cc3-4103-8c82-b6856d24632b
Khemchand5487/CodeforcesQuestions
general practice/B_Anton_and_currency_you_all_know.cpp
/** Solution By khemchand5487 **/ #include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define debug(x) cout << #x <<" "; _print(x); cout << endl; typedef long long ll; //for debugging template <class T> void _print(T t) {cout << t;} template <class T, class V> void _print(pair <T, V> p)...
ALGO
0.999939
4.40764