uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
786f7117-f239-4e6e-b35d-7bba51c13bbe
DuongHaoNika/DSA_CodePTIT
DSA01010 - TẬP QUÂN SỰ.cpp
#include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; ++i) #define FORD(i, a, b) for(int i = a; i >= b; --i) #define F(i, a, b) for(int i = a; i < b; ++i) #define FD(i, ...
ALGO
0.999951
3.219516
ebb08d17-865f-4d28-9926-476ad04a10ad
SachinBhawala/Pong-A-Cpp-Game
My_First_Cpp_Game/game.cpp
#define is_down(b) input->buttons[b].is_down #define pressed(b) (input->buttons[b].is_down && input->buttons[b].changed) #define released(b) (!input->buttons[b].is_down && input->buttons[b].changed) float player_1_p, player_1_dp, player_2_p, player_2_dp; float arena_half_size_x = 85, arena_half_size_y = 45; float play...
ALGO
0.959263
6.32382
fdbe3390-36f0-447d-b49c-1e8bc4fdff7c
strn18/cpp_practice
algorithm/Divide and Conquer/1493.cpp
#include <iostream> #include <cmath> #define MAX 20 using namespace std; long long filled = 0; // 채운 총 부피. 이 값이 L*W*H와 같아야 상자를 다 채운 것. int cube_count = 0; int cube[MAX]; void fill_box(long long L, long long W, long long H); int main(){ long long L, W, H; int N; scanf("%lld %lld %lld %d", &L, &W, &H, &N); ...
ALGO
0.999906
4.031261
fe85c55c-b0e7-481d-bd55-79fb30cb721b
ishandutta2007/codeforces
pctprobability/normal/1725/C.cpp
#include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif using ll = long long; using ld = long double; using ull = unsigned long long; #define endl "\n" typedef pair<int, int> Pii; #define REP(i, n) for (int i = 0; i < (n); ++i) #define REP3(i...
ALGO
0.999994
4.866337
c3ce6e57-ca04-45d1-9db7-ffc26cba49ef
masonsbro/fall-2016-contests-solutions
11-04/5/tle/arnav.cpp
#include <iostream> #include <sstream> #include <cstring> #include <string> #include <algorithm> #include <utility> #include <vector> #include <map> using namespace std; int n, m; int q, id, range_start, range_end; map<string, vector<int> > lookup; map<int, vector<pair<int, int> > > intervals; int main() { int ...
ALGO
0.999617
4.202547
1642623f-ec1a-4528-bdf2-a12444768a35
vijaysrajan/SudokuSolver
tmp/SudokuSolver.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <stdio.h> #include <stdlib.h> #include <ctype.h> using std::ifstream; using std::ofstream; using std::string; using std::vector; using namespace std; string numbers; char dot = '.'; int aux; class SudokuBoard; void printB(SudokuBoard...
ALGO
0.995855
4.125983
ba773dc1-0a93-4919-8949-a654d4a9884a
alohner/WhereAmI
libraries/tess-two/jni/com_googlecode_tesseract_android/src/textord/pithsync.cpp
#ifdef __UNIX__ #include <assert.h> #endif #include <math.h> #include "memry.h" #include "makerow.h" #include "pitsync1.h" #include "topitch.h" #include "pithsync.h" #include "tprintf.h" #define PROJECTION_MARGIN 10 //arbitrary #define EXTERN...
ALGO
0.999441
4.26112
5fc103e4-229d-4628-8a15-1c8c6205f1f0
Weijun-H/PAT
AdvancedLevel/second time/1019.Gneral Palindromic Number(20)/main.cpp
#include <cstdio> using namespace std; int main() { int a, b; scanf("%d %d", &a, &b); int arr[40], index = 0; while(a != 0) { arr[index++] = a % b; a = a / b; } int flag = 0; for(int i = 0; i < index / 2; i++) { if(arr[i] != arr[index-i-1]) { printf("No\n"...
ALGO
0.999993
3.023746
d51b4e0f-f0d3-4352-84e7-271d91495203
armando-genis/autonomous_driving_niagara
stanley_control_niagara/pruebas/StanelyControlV4.cpp
#include <rclcpp/rclcpp.hpp> // ROS #include <visualization_msgs/msg/marker.hpp> #include <visualization_msgs/msg/marker_array.hpp> #include <ackermann_msgs/msg/ackermann_drive_stamped.hpp> #include <tf2/LinearMath/Matrix3x3.h> #include <tf2/LinearMath/Quaternion.h> #include <nav_msgs/msg/odometry.hpp> #include <nav_m...
TOOL
0.986279
4.635403
d3f6e52f-c9d0-4c65-862d-4d267957455e
bauner/aosp-frameworks_av
media/libstagefright/codecs/amrnb/enc/src/inter_36.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/inter_36.c Date: 01/31/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: 1. Eliminated unused include files. ...
ALGO
0.999472
5.616278
e4fc3bc5-dd6c-438e-9217-999829575707
fsy-juruo/noip-2021-js-answer
t2021/JS-0178/variance/variance.cpp
#include<cstdio> #include<cctype> #include<cmath> using namespace std; int qr() { int f=1,r=0; char ch; do ch=getchar(); while (!isdigit(ch)&&ch!='-'); if (ch=='-') f=-1; else r=ch-48; ch=getchar(); while (isdigit(ch)) { r=r*10+ch-48; ch=getchar(); } return f*r; } int a[10005]; int main() { freope...
ALGO
0.999891
3.618478
d9b442fd-436d-484a-bd10-42c94a993aa4
koparasy/openmp-rr
clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp
using clang::find_all_symbols::SymbolAndSignals; using llvm::StringRef; namespace clang { namespace include_fixer { namespace { class MemSymbolIndex : public FuzzySymbolIndex { public: MemSymbolIndex(std::vector<SymbolAndSignals> Symbols) { for (auto &Symbol : Symbols) { auto Tokens = tokenize(Symbol.Symb...
TOOL
0.980184
7.289227
5718df1e-8339-4bff-acdf-11136b8b0255
king-yyf/cpcode
nowcode/tongji/b.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ar2 = array<int, 2>; using ar3 = array<int, 3>; using ar4 = array<int, 4>; #define all(c) (c).begin(), (c).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define f0(e) for(int i = 0; i < (e); ++i) #define f1(e) for...
ALGO
0.99886
4.067689
ef553a90-deda-482a-bb2e-c4a8f9c2aa56
CMT-UPV/OpenWAM
Source/Boundaries/TCCRamificacion.cpp
// --------------------------------------------------------------------------- #pragma hdrstop #include "TCCRamificacion.h" //#include <cmath> #include <iostream> #include "TTubo.h" // --------------------------------------------------------------------------- // ------------------------------------------------------...
ALGO
0.993014
4.453238
cdc7b9f1-6d3d-4057-bff8-148b9d361689
buptwjf/Leetcode
0_offer2/search_backtrack/68_i.cpp
// // Created by 86188 on 2023/7/22. // #include "../include/user.h" using namespace std; /* * 问题:给定一个二叉搜索树,找到指定两节点的公共祖先 * 分析:由于 BST 的自身固有属性,所以公共祖先一定满足 * p < res < q * */ class Solution { public: TreeNode *lowestCommonAncestor(TreeNode *root, TreeNode *p, TreeNode *q) { while (true) { ...
ALGO
0.999962
5.834872
5967ba35-98a2-42ae-a7e6-2938514ea5be
moti9/iCode
dsa/LinkedList/LList.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 class Node { public: int data; Node *next; Node(int val) { data = val; next = NULL; } }; void check(Node* head){ head->data=100; head->next->next=NULL; } void printList(Node *head) {...
ALGO
0.998007
3.891551
4dec7f90-f323-4ee9-b947-e58428018aa5
Harshkumar62367/Leetcode_solutions
376-wiggle-subsequence/376-wiggle-subsequence.cpp
class Solution { public: int wiggleMaxLength(vector<int>& nums) { if(nums.size()==1) { return 1; } int prev=nums[1]-nums[0],diff,count=2; if(prev==0) { count=1; } for(int i=1;i<nums.size()-1;i++) { diff=nums[...
ALGO
0.999986
5.521988
3df58c77-c1dd-4cb6-a1f3-651f22d0cbce
balbinopb/CHALLENGE
string_to_array.cpp
//https://www.codewars.com/kata/57e76bc428d6fbc2d500036d #include <iostream> #include <vector> #include <string> #include <sstream> std::vector<std::string> string_to_array(const std::string& s) { std::vector<std::string> myVector; std::istringstream iss(s); std::string word; if (s.empty()) { return {""...
TOOL
0.981486
6.107386
529c4b2f-ab6a-4a1b-8355-6e43a57a9abf
ishandutta2007/codeforces
syury/normal/321/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double dbl; typedef unsigned long long ull; typedef pair<int, int> pii; #define X first #define Y second #define F(i, l, r) for(int i = l; i < r; i++) #define DF(i, l, r) for(int i = l; i > r; i--) #define I(i, a) for(auto i : a) #define pb pu...
ALGO
0.999983
4.412153
c9d92610-be1d-4ad4-8719-001455d177da
CseEngineerAsif/Cpp_Codes
49_vector.cpp
#include<iostream> #include<vector> using namespace std; int main() { vector<int>v; int i; cout<<"size:"<<v.size()<<endl; for(i=0; i<10; i++) { v.push_back(i); } cout<<"size:"<<v.size()<<endl; for(i=0;i<v.size();i++){cout<<v[i]<<" ";} return 0; }
TOOL
0.958293
3.328582
d2b2af2b-1907-4483-8a69-44d56b198609
mumba-org/mumba
third_party/boost/src/libs/graph/example/bfs-example.cpp
#include <iostream> using namespace boost; template < typename TimeMap > class bfs_time_visitor:public default_bfs_visitor { typedef typename property_traits < TimeMap >::value_type T; public: bfs_time_visitor(TimeMap tmap, T & t):m_timemap(tmap), m_time(t) { } template < typename Vertex, typename Graph > vo...
ALGO
0.999892
6.085489
21cc9c12-1e9f-4e4a-9dfc-7248473a9e9d
BlasStr/DAP-2024-Blas-Strambi
TP1-Screens/tp1_screens/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.998662
6.76775
29133b79-02ed-433f-8237-acc3bc67f6da
sudheer0071/dsa
Bit Manipulation/xor_from_l_to_r.cpp
#include <iostream> #include <vector> using namespace std; int Xorr(int n){ if(n%4==1) return 1; else if (n%4 == 2) return 3; else if (n%4 == 3) return 0; else return n; } int findXor(int l, int r){ return Xorr(l-1) ^ Xorr(r); } int main() { cout<<findXor(4,8 ); return 0; }
ALGO
0.999856
3.764013
02eaa8c2-85f4-4c6b-90c5-ba3ac1703849
programacionparaaprender/proyectoscpp
semestre 6/1_programacion_logica/pila.cpp
#include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; const short unsigned int tamanio=10; class pila{ private: //const short unsigned int tamanio=10; int posicion; int items[tamanio]; public: pila(){ this->posicion=-1; } ~pila(){ } void push(int dato); int pop(); int peek(); bool empty(); bo...
ALGO
0.997097
3.713376
8ee321c1-c96f-4714-9179-04a74b7d6144
hugochougt/homework
HDOJ/1045.cpp
#include<stdio.h> int n, cnt, ans; char city[4][4]; bool isValid(int x, int y){ city[x][y] = 'Y'; bool flag = false; for(int j = 0; j < n; j++){ if(city[x][j] == 'Y'){ if(flag == true){ city[x][y] = '.'; return false; } flag = true; } if(city[x][j] == 'X') flag = false; } flag = false; ...
ALGO
0.99992
3.522287
b6d65b8c-2528-4874-a8ac-c9da487086d5
ishandutta2007/codeforces
geothermal/normal/1190/D.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<l...
ALGO
0.999825
4.365928
594bc83e-957d-4648-9d1c-2c32a4b09aef
susTuna/IF2010_Object-Oriented-Programming
Tutor2/Generik.cpp
#include <iostream> using namespace std; template<class T> void func(T param1, T param2){ cout << "Masukan Anda: " << param1 << " dan " << param2 << ", memiliki tipe yang sama" << endl; } template<class T1, class T2> void func(T1 param1, T2 param2){ cout << "Masukan Anda: " << param1 << " dan " << param2 << ...
ALGO
0.951856
5.229165
d5dde122-9e25-4e1e-a9c6-90b92e0c7154
kojea0919/algorithm
리코쳇로봇.cpp
//#include <string> //#include <vector> //#include <queue> // //using namespace std; // //int dRow[] = { 0, 0, 1, -1 }; //int dCol[] = { 1, -1, 0, 0 }; //int boardWidth, boardHeight; // //int solution(vector<string> board) { // int answer = 0; // // boardHeight = board.size(); // boardWidth = board[0].size(); ...
ALGO
0.998852
4.968112
86534a3c-7034-48fe-830b-9d3a5711f3ff
AliiAhmadi/CSES
Palindrome_Reorder.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int a, b; cin >> a >> b; // 4 5 // 3 3 // 1 2 // 0 0 // 10 20 // 9 // 4 4 // 2 3 // 1 1 // NO // if (a > 2 * b || b > 2 * a) { cout << "NO\n"; return; } if ((a...
ALGO
0.999999
4.474346
9de73e28-cbeb-42c2-9f91-7f0a5d52a54e
Foxnatic/platform_external_libcxx
test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter, StrictWeakOrder<auto, Iter::value_type> Compare> // requires ShuffleIterator<Iter> && CopyConstructible<Compare> // void // pop_heap(Iter first, Iter last, Compare comp); #include <algorithm> #include <functional> #include <random> #include <cassert> #includ...
TEST
0.987466
5.396979
8c5ecd5e-36df-4df4-ac20-f3d9faf72dea
rodrigotuna/CAL-ex
TP4/ex6.cpp
#include "exercises.h" int maxSubsequenceDP(int A[], unsigned int n, unsigned int &i, unsigned int &j) { int bestSum = A[0]; int bestLocalSum = A[0]; unsigned locali = 0, localj = 0; i = 0; j= 0; for(unsigned w = 1; w < n; w++){ if(bestLocalSum + A[w] < A[w]){ locali = w; ...
ALGO
0.997874
6.609058
bfbc36ad-f8db-4493-b056-0fae2b6a0868
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1398_11.cpp
#include <bits/stdc++.h> const double pi = 3.1415926535897; using namespace std; int kx[] = {-1, 1, -1, 1, 2, 2, -2, -2}; int ky[] = {-2, -2, 2, 2, -1, 1, -1, 1}; int mark[8][8] = {}; int main() { string r, k; cin >> r >> k; int tot = 64; int rx = r[0] - 97; int ry = stoi(r.substr(1)) - 1; int kxp = k[0] - ...
ALGO
0.999884
3.808264
2aa952c1-9161-4db3-9c62-2d63e7951cb2
ishandutta2007/codeforces
cldp/normal/813/E.cpp
#include <iostream> #include <vector> #include <cmath> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 100010; const int INF = 1000000007; const double PI = acos(-1.0); int x[MAXN], y[MAXN], P[MAXN][22]; int A[MAXN]; vector<int> X[MAXN * 8]; void build(int t, int l, int r) { if (l =...
ALGO
0.999973
4.576905
e87c9aec-8e9a-454c-a9d1-303217b44cc5
hash5771/CSCI-2400
lab4-perflab-hash5771/FilterMain.cpp
#include <stdio.h> #include "cs1300bmp.h" #include <iostream> #include <fstream> #include <stdlib.h> #include "Filter.h" using namespace std; #include "rdtsc.h" // // Forward declare the functions // Filter * readFilter(string filename); double applyFilter(Filter *filter, cs1300bmp *input, cs1300bmp *output); int m...
TOOL
0.961156
3.866686
84cf546c-bbe6-4a51-9033-2eca0b5891ff
NileshSingh56/180-Days-of-code-for-DSA
pattern4.cpp
#include<iostream> using namespace std; int main(){ int i,j; for(i=1;i<=5;i++){ for(j=1;j<=i;j++){ cout<<j<<" "; } cout<<"\n"; } }
ALGO
0.999164
3.414978
0b0b8a55-1eca-41aa-baca-ac3578317bff
Sameer-Pattnaik/leetcode
2998-count-symmetric-integers/2998-count-symmetric-integers.cpp
class Solution { public: int countSymmetricIntegers(int low, int high) { int count = 0; for (int num = low; num <= high; ++num) { string str = to_string(num); int len = str.length(); if (len % 2 != 0) continue; int half = len / 2; int lef...
ALGO
0.999933
6.460007
1d80cd73-c7bb-49da-af41-94bfd3e4d195
gaurav167/competitive-codes
547-div3/e.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define pb push_back #define mp make_pair #define ff first #define ss second #define trace1(x) cout<<#x<<": "<<x<<endl #define trace2(x, y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl #define trace3(x, y, z) cout<<#x<<"...
ALGO
0.999974
4.006602
a9198213-ae96-420f-8a63-f2e7d2d89dbb
Mr-Yavar/OS_Project
HRRN.cpp
#include <iostream> using namespace std; class Process { public: int name; float entrance_Time, Burst_Time, Exit_Time, IntialBurst_Time; Process(int name, float entrance_Time, float Burst_Time) { this->name = name; this->Burst_Time = Burst_Time; this->IntialBurst_Time = Burst_Time...
ALGO
0.999924
3.973835
789912d3-37fd-491c-811f-6fa3b4c5f069
AlejandroFV74/UCA_files
Trabajos por ciclo/Ciclo 02/PED/trabajos c++/Clases/Clase_14_08_ejercicio_2.cpp
#include <iostream> #include <unordered_map> //Necesario para la memorización using namespace std; unordered_map<int, int> memo; int Fibonacci(int n); int main() { int a; cout << "Ingrese un numero: " << endl; cin >> a; cout << "Su Fibonacci es: " << Fibonacci(a) << endl; return 0; } int Fi...
ALGO
0.99985
5.705277
a324ac67-f52c-413b-a2f1-1c3623ec3de3
NguyenVanThanhHust/CPP_Learning
CPP_Project/Boost/Matrix_Multiplication_with_boost_thread.cpp
// https://zhaowuluo.wordpress.com/2011/01/02/cplusplus_threading_matrix_multiplication/ #pragma once #include <boost\thread\thread.hpp> #include <boost\bind.hpp> #include <iostream> using std::cout; using std::endl; using std::cin; #define SIZE 10 // Multiply matrix of SIZE by SIZE of type T class Matrix { // Functi...
ALGO
0.995512
4.697468
e7aa7b82-d067-4bbb-8f95-a5e85b8d930a
Smiling-Owl/cpp_basics
linked list - insert new node given the position.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; }; struct Node* head = NULL; void addNode(int n); void displayNode(); int countNode(); void insertNode(int num, int index); int main() { int num; char choice; bool cont = true; int index; int newNum; do { cout << "Number: "; ...
ALGO
0.999872
5.309037
e0769e6b-c3bd-4e32-8947-d1d5902e31ca
PAC-X-ROM/android_hardware_interfaces
automotive/vehicle/2.0/default/impl/vhal_v2_0/VehicleEmulator.cpp
#define LOG_TAG "VehicleEmulator_v2_0" #include <android/log.h> #include <algorithm> #include <android-base/properties.h> #include <utils/SystemClock.h> #include <vhal_v2_0/VehicleUtils.h> #include "PipeComm.h" #include "SocketComm.h" #include "VehicleEmulator.h" namespace android { namespace hardware { namespace ...
TOOL
0.868031
6.590786
e0d2b0dc-01f9-45fb-92dd-1b271e9d8f16
shubhampathak09/Java-Javascript-C-etc-Codesnippets-
Microsoft preparation/reverse linked list.cpp
// reverse a linked list #include<bits/stdc++.h> using namespace std; struct node{ int data; struct node*next; node(int data){ this->data=data; this->next=NULL; } }; struct node*reverse(struct node*head){ struct node*prev=NULL; struct node*curr=head; struct node*temp=NULL; // ...
ALGO
0.999965
4.923661
c3285d63-4353-43b4-a5ba-ded54972f4e0
tefots/C_plusplus
patterns__/main.cpp
#include <iostream> using namespace std; int main() { cout << "Patterns: " << endl; //using the loop to print different patterns //outer loop for rows for(int i = 1; i<=5; i ++){ //inner loop for the columns for(int x = 1; x<=i; x++){ cout<< " # "; } cout <...
ALGO
0.990018
3.656849
2ba1d38c-b935-432d-be50-d71950428560
krishna3052002/Advance_Problem_Solver_Club
Week 11 (SuperZone)/Day 2/D_Invertible_Bracket_Sequences.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll t; cin>>t; while(t--) { string s; cin>>s; int n=s.length(); int balance=0; int valid_pairs=0; vector<int> balance_cnt(2*n+1,0); balance_cnt[n]=0; for(char c:s...
ALGO
0.99914
3.962729
839a3c8a-1fa6-4a13-8b76-79d8a67b8852
Ambitions0x39e/Luogu
P1102 A-B 数对 STL 二分.cpp
#include <iostream> #include <map> using namespace std; /* STL / 二分 */ typedef long long _int64; _int64 arr[200005]; map<_int64, _int64> mat; int main() { int n; _int64 c; cin >> n >> c; for(int i=0; i<n; i++) { cin >> arr[i]; mat[arr[i]]++; } _int64 ans=0; for(int i=0; i<n...
ALGO
0.999934
3.299029
f6a817d0-d8f9-44c5-9c5a-313122903598
calgagi/leetcode
0141/another_answer.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { if (!head) return false; ListNode* slow = head, *fast = head->next; while (f...
ALGO
0.999867
5.224399
1811224a-a943-429f-a5cc-640c6ce53c6a
SetsunaChyan/OI_source_code
Luogu/P2089.cpp
#include <stdio.h> int i,n,a[10],ans=0; int sum() { int i=0,s=0; for(i=0;i<10;i++) { s+=a[i]; } return s; } int dfs(int l,int fl) { int i; for(i=1;i<=3;i++) { a[l]=i; if(l==9&&sum()==n) { ans++; if(fl) { int j; for(j=0;j<10;j++) printf("%d ",a[j]); printf("\n"); } } ...
ALGO
0.999838
4.766206
b05cb337-de1f-43e6-8849-c20aade07297
cordercorder/HDUOJ
迷宫最短路径(BFS).cpp
# include<iostream> # include<algorithm> # include<cstring> # include<string> # include<cmath> # include<queue> # include<stack> # include<set> # include<vector> # include<cstdio> # include<cstdlib> # include<map> # define deb(x) printf("# x=%d\n",x) # define deb_d(x) printf("# x=%lf\n",x) typedef long long ll; usin...
ALGO
0.999902
3.903516
138cf12e-aead-453c-8a3e-37aa2b0a23a6
SGriv2/DSA_labs
third_sim/lab1/var2/avl_tree.cpp
#include <iostream> #include "lab1/var2/avl_tree.hpp" using namespace std; // Структура узла АВЛ дерева // Функция для вычисления высоты узла int height(AVLNode* node) { if (node == nullptr) { return 0; } return node->height; } // Функция для вычисления балансировочного фактора int balanceFactor...
ALGO
0.999839
6.339168
4c4fd26b-2d0e-42c4-80c1-39db2d8fec42
BAVKKK/ParProg2023
lw1/ex8.cpp
#include <cstdlib> #include <iostream> #include <cstring> #include <pthread.h> #include <chrono> #include <cmath> using namespace std; // Структура, передаваемая в качестве аргумента потока struct thread_params { // Указатель на элемент массива, с которого поток начнёт применять функцию поэлементно float* f...
ALGO
0.997902
4.478565
f0c400b7-3fad-4fe6-b4c5-ed5339834de6
KushagraSinha2002/CodingNinja_DSA_CPP
OOPS 2/Operator Overloading 3/Fraction.cpp
class Fraction { private : int numerator; int denominator; public : Fraction(int numerator, int denominator) { this -> numerator = numerator; this -> denominator = denominator; } void print() { cout << this -> numerator << " / " << denominator << endl; } void simplify() { int gcd = 1; ...
TOOL
0.947631
5.926885
b1c68b34-153b-4969-815c-47d3c4e82e0d
MJaman786/DAA
Knapsack/0-1 knapsack.cpp
#include <iostream> using namespace std; // This function returns the maximum value that can be // put in the knapsack of capacity W int knapsack(int W, int wt[], int val[], int n) { // Create a table to store the results int dp[n + 1][W + 1]; // Initialize the table for (int i = 0; i <= n; i++) { for (in...
ALGO
0.999991
5.736398
1a10fb9d-6880-4167-ba80-10a9e3a9ebf7
arkiny/OSwithMSVC
Module/Lua5/Lua5/lobject.cpp
#define lobject_c #define LUA_CORE #include "lprefix.h" #include "windef.h" #include "memory.h" #include "fileio.h" #include "sprintf.h" //#include <locale.h> #include <math.h> #include <stdarg.h> #include <stdio.h> //#include <stdlib.h> #include <string.h> #include "lua.h" #include "lctype.h" #include "ldebug.h" #...
TOOL
0.893775
6.319065
57a67e50-003e-46a1-bd01-86188aa5c78f
keqhe/leetcode
google_list/leetcode230.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int kthSmallest(TreeNode* root, int k) { stack<TreeNode*> st; int curr = ...
ALGO
0.999995
6.358327
022d70a3-cd6a-4bc1-8a28-d5023b5d1641
StevenEnke/IEEEXtreme-2014--October
sumItUpSansVectors.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; const long MODULUS = 1000000007; const int N_MAX = 100000; const int Q_MAX = 1000000; void cycle(unsigned long numArray[], int cycle, int length); int main() { /* Enter your code here. Read input fr...
ALGO
0.999956
3.845216
957edf04-fdc8-4e88-b4ce-ee817c50ecaa
MATCHA-MIT/DAGguise
src/systemc/tests/systemc/misc/user_guide/chpt7.2/adder_sub.cpp
/***************************************************************************** adder_sub.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.999788
6.387027
af1aa291-f58a-4397-ae35-cc832db05a8b
tum-phoenix/drive_ros_trajectory_tracking_control
IPOPT/source/Ipopt/Ipopt/src/LinAlg/IpMatrix.cpp
#include "IpMatrix.hpp" namespace Ipopt { void Matrix::AddMSinvZ(Number alpha, const Vector& S, const Vector& Z, Vector& X) const { AddMSinvZImpl(alpha, S, Z, X); } void Matrix::SinvBlrmZMTdBr(Number alpha, const Vector& S, const Vector& R, const Vect...
TOOL
0.901221
7.610077
0a227efb-96de-42a0-abda-aa8d53e1aeb7
B0TAlan/5150H_compCode
4 - 22/4.0/4.0Comp 4-12-22/src/Classes/Movement.cpp
#include "vex.h" #include "Classes.h" // Drive control void Movement_Controller::customDrive(float target, float kp, float kd, float ki){ DriveBaseControler DriveMotors; DriveMotors.Reset();// reset all motors encoders to 0 lF.setPosition(0, rotationUnits::deg); rF.setPosition(0, rotationUnits::deg); ...
TOOL
0.882885
3.398442
48b8459f-e634-496f-afef-85ff05bd983e
kevinwu0213/2025aaib
week05-4.cpp
//week05-4.cpp //leetcode 3191.Minimum Operations to Make Binary Array Elements Equal to One I //nX 3Ӽ½P ~ܦ1 class Solution { public: int minOperations(vector<int>& nums) { int ans =0;//n½PX for(int i=0;i<nums.size()-2;i++){ if(nums[i]==0)//J0n½P { ans++;//½P...
ALGO
0.999952
5.853135
28949f0c-b39f-4ed5-8280-ae9f4dd58c53
shoujiaxin/leetcode-solutions-cpp
[1403] Minimum Subsequence in Non-Increasing Order/solution1.cpp
/* * @lc app=leetcode id=1403 lang=cpp * * [1403] Minimum Subsequence in Non-Increasing Order * * https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order/description/ * * algorithms * Easy (72.22%) * Likes: 392 * Dislikes: 402 * Total Accepted: 53.2K * Total Submissions: 73.7K * Tes...
ALGO
0.999982
6.842978
656c39af-9869-4f92-8a28-12cb7a82b6fe
wisamreid/GrFNNMotor
MATLAB/Toolboxes/Granger Toolboxes/GC_clean-mainline/GCcal/getcovzpdhded.cpp
// Copy from prj_GC_clean/test_code // Compile under Matlab: // Windows: // mex COMPFLAGS="$COMPFLAGS -std=c++11" -n getcovzpdhded.cpp // UNIX-like: // mex CXXFLAGS="\$CXXFLAGS -std=c++11" CXXOPTIMFLAGS="-O3 -march=native" getcovzpdhded.cpp // In octave // CXXFLAGS='-O3 -march=native -fopenmp -std=c++11' ...
ALGO
0.99832
3.998576
8cab0583-83c8-4571-b767-99edbd4185b2
IcEy-999/MyUESource
Engine/Source/ThirdParty/hlslcc/hlslcc/src/hlslcc_lib/opt_dead_code_local.cpp
/** * \file opt_dead_code_local.cpp * * Eliminates local dead assignments from the code. * * This operates on basic blocks, tracking assignments and finding if * they're used before the variable is completely reassigned. * * Compare this to ir_dead_code.cpp, which operates globally looking * for assignments to variable...
ALGO
0.970288
7.829749
d893331c-9cf8-4538-858e-14cf5dc4722f
Gisang2923/baekjoon
백준/1260.cpp
#include <iostream> #include <queue> #include <string.h> using namespace std; int n, m, v; int arr[1001][1001] = { 0 }; bool visited[1001] = { false }; queue<int> q; void dfs(int value) { visited[value] = true; cout << value << " "; for (int i = 1; i <= n; i++) { if (!visited[i] && arr[value][i] == 1){ dfs(i...
ALGO
0.999994
4.03286
dba6e701-738e-4ab1-bd28-0ba0f3eac37a
revec/llvm-revec
lib/Analysis/ScalarEvolutionNormalization.cpp
#include "llvm/Analysis/ScalarEvolutionNormalization.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" using namespace llvm; /// TransformKind - Different types of transformations that /// TransformForPostIncUse can do. enum TransformKind { /// Normalize - Normalize accordi...
TOOL
0.858527
6.157917
c81e1eb8-ebf5-4dd8-b0c6-2fa14a8cd22f
sanma-icfpc/icfpc2021
libs/boost_1_76_0/libs/numeric/odeint/examples/bind_member_functions.cpp
#include <iostream> #include <boost/numeric/odeint.hpp> namespace odeint = boost::numeric::odeint; typedef boost::array< double , 3 > state_type; //[ ode_wrapper template< class Obj , class Mem > class ode_wrapper { Obj m_obj; Mem m_mem; public: ode_wrapper( Obj obj , Mem mem ) : m_obj( obj ) , m_mem(...
ALGO
0.909891
7.561692
f5f1bb2e-bd9a-4157-9df7-88c4c1f35a4e
vinnay08/OOPS-Concept
Assignment/Constructor,destructor,encapsulation,abstraction/Q5.cpp
//Q-5. Write a C++ program to create a class called Triangle that has private //member variables for the lengths of its three sides. Implement member //functions to determine if the triangle is equilateral, isosceles, or scalene. #include<iostream> using namespace std; class Triangle{ private: int s1,s2,s3; publ...
ALGO
0.919413
3.541128
cf78fea0-cb9a-4c6e-bd79-84e8efff0821
Karthikvb/paralelismo
matmulopti/dgemm-blocked-unrolling-omp.cpp
/* In case you're wondering, dgemm stands for Double-precision, GEneral Matrix-Matrix multiplication. */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include <float.h> #include <math.h> #include <sys/time.h> const char* dgemm_desc = "Simple blocked dgemm."; #if !defined(BLOCK_SIZE)...
ALGO
0.999589
5.649749
538feb68-1157-473c-813d-29593af847d7
donbasta/leetcode-submissions
Medium/518.cpp
class Solution { public: int change(int amount, vector<int>& coins) { vector<int> dp(amount + 1); dp[0] = 1; int n = coins.size(); for (int i = 0; i < n; i++) { vector<int> ndp(amount + 1); for (int j = 0; j <= amount; j++) { for (int k = 0; k ...
ALGO
0.999955
5.924347
c671427d-3375-48dd-a87b-57b4456a1c52
Dev-RubinJo/AlgorithmCpp
AlgorithmC++/Algorithm/ProblemSolving/week1/2559-1.cpp
// MARK: 누적합을 이용한 문제 #include <bits/stdc++.h> using namespace std; int n, k, temp, maxVal = -1316134911; int temper[100001]; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> k; for(int i = 1; i <= n; i++) { cin >> temp; temper[i] = temper[i - 1] + temp; } ...
ALGO
0.999936
3.41276
8487de87-d017-4f40-a0d7-2fac94e6ec28
myselflabib/SolutionVault
CSES/Introductory_Problems/Repetitions.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; int n = s.size(); int count = 1, ans = 0; for (int i = 0; i < n; i++) { if(s[i] != s[i-1]){ ans = max(count, ans); count = 1; } else{ count++; } }...
ALGO
0.99977
3.640915
76e179a4-2851-4826-b1ef-dda9edef9add
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_1259_14.cpp
#include <bits/stdc++.h> using namespace std; long long qqq = 1; long long n, m, cnt[300]; string second; long double x; void solve() { cin >> n >> second; bool first = 1; for (long long i = 0; i < n / 2; i++) { if (abs(second[i] - second[n - i - 1]) % 2 == 0 && abs(second[i] - second[n - i - 1]) <= 2...
ALGO
0.999925
4.673477
48959239-a8a9-40b6-8562-714e0ddee21d
satyamsb1/LEETCODE-SOLUTIONS-EASY
Problem145.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.999828
6.018724
490af3e0-ad3d-49f0-a875-83cce85c976e
wvu-navLab/Enabling-Robust-State-Estimation-through-Measurement-Error-Covariance-Adaptation
3rdparty/Eigen/bench/bench_gemm.cpp
// g++-4.4 bench_gemm.cpp -I .. -O2 -DNDEBUG -lrt -fopenmp && OMP_NUM_THREADS=2 ./a.out // icpc bench_gemm.cpp -I .. -O3 -DNDEBUG -lrt -openmp && OMP_NUM_THREADS=2 ./a.out // Compilation options: // // -DSCALAR=std::complex<double> // -DSCALARA=double or -DSCALARB=double // -DHAVE_BLAS // -DDECOUPLED // #include...
TOOL
0.966288
5.842831
d372223e-6706-4bad-a70f-6c44e3f65b80
volzkzg/sgu
502.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <fstream> #include <sstream> #include <algorithm> #include <string> #define rep(i,j,k) for (int i = j; i <= k; ++i) #define rrep(i,j,k) for (int i = j; i >= k; --i) using namespace std; long long num[10],len; void d...
ALGO
0.999737
3.874293
27cd0963-62dd-4626-bd46-03f94ffd8695
YuvrajSahni/DSA-Practice
Recursion/permutations.cpp
#include <iostream> using namespace std; void permute(string s, int i=0) { if(i==s.length()-1) { cout<<s<<endl; return; } for(int j=i; j<s.length(); j++) { swap(s[i],s[j]); permute(s,i+1); swap(s[i],s[j]); } } int main() { string str; cin>>str; ...
ALGO
0.99999
4.870037
f085a9fe-4899-46ac-a758-39fb3faa7f94
ppresume/xetex.wasm
xetex/source/libs/icu/icu-55.1/source/i18n/collationcompare.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "unicode/ucol.h" #include "cmemory.h" #include "collation.h" #include "collationcompare.h" #include "collationiterator.h" #include "collationsettings.h" #include "uassert.h" U_NAMESPACE_BEGIN UCollationResult CollationCompare::compareUpToQuaternary(Coll...
ALGO
0.996387
7.196599
21dd2966-b629-4730-9fcb-f7aebd0a728c
Gabyoliver606/POO__CC
11_Agenda/agenda.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Pessoa { private: string nome; int idade; public: Pessoa(string nome, int idade) { this->nome = nome; this->idade = idade; } string getNome(...
TOOL
0.986338
4.956183
7a06776f-b5ad-4540-8e89-0e8c6436c4de
Hugoalv79/Competitive-Programming
Udemy/MinimumDegreeOfAConnectedTrioInAGraph.cpp
#include <vector> #include <algorithm> using std::min; using std::vector; typedef vector<int> vi; typedef vector<vi> MatrixI; typedef vector<bool> vb; typedef vector<vb> MatrixB; class Solution { public: int minTrioDegree(int n, MatrixI &edges) { MatrixB Connected(n+1,vb(n+1)); vi C...
ALGO
0.999705
5.668522
a3770e4c-117c-4722-a036-763a61a93354
IanChen15/ClothSimulation
extern/libigl/include/igl/intrinsic_delaunay_triangulation.cpp
template < typename Derivedl_in, typename DerivedF_in, typename Derivedl, typename DerivedF> IGL_INLINE void igl::intrinsic_delaunay_triangulation( const Eigen::MatrixBase<Derivedl_in> & l_in, const Eigen::MatrixBase<DerivedF_in> & F_in, Eigen::PlainObjectBase<Derivedl> & l, Eigen::PlainObjectBase<Deriv...
ALGO
0.999046
7.559199
a1a788f4-9c37-4628-a544-a6f1a941c650
claraguoguo/ComputerGraphicsProjects
kinematics/libigl/tutorial/404_DualQuaternionSkinning/main.cpp
#include <igl/directed_edge_orientations.h> #include <igl/directed_edge_parents.h> #include <igl/forward_kinematics.h> #include <igl/PI.h> #include <igl/lbs_matrix.h> #include <igl/deform_skeleton.h> #include <igl/dqs.h> #include <igl/readDMAT.h> #include <igl/readOBJ.h> #include <igl/readTGF.h> #include <igl/opengl/gl...
ALGO
0.97326
5.311079
8341ba00-d81e-4e24-8eb4-ff66c7d2c251
DanielAugusto191/Competitive_Programming
Solved/C++/A. Short Substrings.cpp
// https://codeforces.com/contest/1367/problem/A #include <bits/stdc++.h> #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' #define dbg(a) cout << a << " -- DEBUG -- "<< endl; #define Adbg(a) for(auto e: a){cout << e << ' ';};cout << endl; #define all(a) a.begin(),a.end() #define read(arr, n) for(i...
ALGO
0.999776
3.977927
cd15c8d9-a7ff-455d-8a46-ff8509251893
jishu-yadav/CrackYourPlacement
MinimumCharToMakeStringPal.cpp
bool pal(string s){ int i=0,j=s.size()-1; while(i<=j){ if(s[i++]!=s[j--]){ return false; } } return true; } int Solution::solve(string A) { int n = A.size(); int cnt=0; int flag=0; while(A.size()>0){ if(pal(A)){ flag = 1; break;...
ALGO
0.999978
5.185797
44324d28-1f4c-4e3f-a4d3-339e92324e07
raincross7/code-similarity
codes/train_code/problem476/problem476_241.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n,m; cin >> n >> m; ll a[n]; for(ll i=0;i<n;i++){ cin >> a[i]; a[i]/=2; } bool same=true; while(a[0]%2==0){ for(int i=0;i<n;i++){ if(a[i]%2!=0){ cout << 0 << endl; return 0; } a[i]/=2; } m/=2; } for(...
ALGO
0.999999
3.478745
ba4ae45e-95d6-40ed-abb1-586d78034e76
Denver17/Algorithms_Exercise
PAT/乙级/1027_打印沙漏.cpp
#include<iostream> #include<algorithm> #include<vector> #include<map> #include<string> using namespace std; int shalou(int N) { if(N==1) return 1; else { return 1+2*(N-1)*(N+1); } } void sha_print(int num,char c) { for(int i=0;i<num;i++) { for(int j=0;j<i;j++) {...
ALGO
0.999953
3.003167
b6f64b0d-4b0c-45bd-a752-1c0f1d92d216
junewaves/contests
Google/CodeJam_qualification/pA.cpp
#include <bits/stdc++.h> using namespace std; #ifndef _VSCODE_DEBUG #define endl '\n' #endif typedef long long int ll; void solve() { int n; cin >> n; vector<int> m(n * n); unordered_set<int> seen; int d = 0, r = n - 1, trace = 0, rcount = 0; bool repeat_flag = false; for (int i = 0; i < n *...
ALGO
0.999739
3.00832
cf4c3cf8-bc95-4aaa-8d4c-132e8865f437
Giangattt123/DSA_PTIT
Generation algo/XauNhiPhanCoKBit1.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s,n) memset(s,n,sizeof(s)) #define all(a) a.begin(),a.end() #define present(t, x) (t.find(x) != t.end()) #define sz(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i) #define pb push...
ALGO
0.99995
3.309032
a7b28d2a-67bf-461c-82d2-d396051888af
SOKP/system_core
libutils/Unicode.cpp
#include <utils/Unicode.h> #include <stddef.h> #ifdef HAVE_WINSOCK # undef nhtol # undef htonl # undef nhtos # undef htons # ifdef HAVE_LITTLE_ENDIAN # define ntohl(x) ( ((x) << 24) | (((x) >> 24) & 255) | (((x) << 8) & 0xff0000) | (((x) >> 8) & 0xff00) ) # define htonl(x) ntohl(x) # define ntohs(x) ...
TOOL
0.85844
6.972178
e63847aa-2bf4-4e7a-9f0b-8ed3cf100ea0
Meeperbunny/CompetitiveProgramming
archive/CF975D1/_B.cpp
#include <bits/stdc++.h> using namespace std; #define HEADER ios::sync_with_stdio(0);cin.tie(0);if (fopen("file.in", "r")) {freopen("file.in", "r+", stdin);}; #define all(v) v.begin(), v.end() using ll = long long; void dbg_out() { cerr << endl; } template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T...
ALGO
0.999782
4.988941
e16bcdcb-7e76-4a12-9000-eb85d65007fa
HyosoonJeong/codetree-TILs
240430/두 실수의 곱/the-product-of-two-real-numbers.cpp
#include <iostream> using namespace std; int main() { double a=5.26; double b=8.27; cout<<fixed; cout.precision(3); cout<<a*b; return 0; }
ALGO
0.946914
3.320959
bd528d80-6c53-4b4c-84fa-dc8453a7b8cb
GMAP/NPB-CPP
libs/fastflow/tests/layer2-tests-HAL/l2_generic_dag_pinning.cpp
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Author: aldinuc * Layer 2 test: dag of nodes, * e1,e2 = multiple output nodes (ff_monode) * n1,n2,n3,n4,n5,6 = nodes (ff_node) * c1 = multiple input node (ff_minode) * * [e1]----...
TEST
0.914923
5.183645
9a314ef8-9df3-4a33-8570-3b149d463ca7
kdy2640/DataType-Algorithm-cpp
DataType+Algorithm cpp/ArithmeticExpressionEvaluator.cpp
#include"ArithmeticExpressionEvaluator.h" #include <cmath> #include <sstream> namespace DataType { const static int CAPACITY = 1000; enum TAG { NONE, NUMBER, ALPHABET, SYMBOL }; enum OPERATOR { PLUS, MINUS, MULTIPLY, DIVIDE, LEFT_PARENTHESES }; typedef struct AEEitem { double value; TAG...
ALGO
0.993614
3.783808
798667f3-e34d-43f2-9745-a927c37ba037
llvm-pic/llvm-pic
libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // template <class I1, class I2> // struct min_max_result; #include <algorithm> #include <cassert> #include <type_traits> #include "MoveOnly.h" struct A { explicit A(int); }; // no implicit conversion static_assert(!std::is_constructible_v<std::ranges::min_max_result<A>,...
TEST
0.854978
7.491442
b221f0ec-bdd6-4543-94f3-64084336d66b
ojhaChandu/Practice-Codes
Hacker_Rank_Codes/cracking-the-coding-interview-Solutions/sortComparator.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; struct Player { int score; string name; // defining compare function within struct-> work as the property of the struct. // friend bool operator<(struct Player a, struct Player b){ //...
ALGO
0.999823
5.261474
46bbf9d1-f54b-421c-a6da-0794842008a6
emamhasan1804/XPSC
Week -02/day -03/L_Array_Cloning_Technique.cpp
#include<bits/stdc++.h> #define int long long #define float double #define endl '\n' using namespace std; /* When I wrote this code , only Allah and I knew what I did. Now... only Allah knows */ int32_t main () { ios::sync_with_stdio(false); cin.tie(NULL); int t;cin>>t;while(t--) { int n...
ALGO
0.999726
3.785051
74a27c0c-e0ca-4bcf-bd91-2df18b933c76
Ej-zhou/EveryADS
Project5/code/huffman.cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<queue> #include<cstring> using namespace std; const int maxn=400; const int INF=2147483647; int n,m,length; char c[maxn];//store the character int f[maxn];//store the frequency (also the weight) typedef struct Treenode* HuffmanTree; //structure struct Tr...
ALGO
0.999991
3.483119
771aa0d4-62e3-4a7c-93ef-b14486bbc942
teichman/phd-code
ros-pkg/core/dst/src/lib/struct_svm.cpp
#include <dst/struct_svm.h> #define NUM_THREADS (getenv("NUM_THREADS") ? atoi(getenv("NUM_THREADS")) : 40) #define NUM_GC_THREADS (getenv("NUM_GC_THREADS") ? atoi(getenv("NUM_GC_THREADS")) : 8) #define DEBUG_LEVEL (getenv("DEBUG_LEVEL") ? atoi(getenv("DEBUG_LEVEL")) : 0) #define TOL (getenv("TOL") ? atof(getenv("TOL")...
ALGO
0.955427
6.752648
b5e57720-31f2-40c7-8070-66cefa2d7b86
raincross7/code-similarity
codes/train_code/problem469/problem469_46.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i=0; i<(int)(n); i++) using ll = long long; const int M = 1000005; int main() { int n; cin >> n; vector<int> a(n); rep(i,n) cin >> a[i]; vector<int> count(M); for (int x : a) { if (count[x] != 0) { ...
ALGO
0.999822
3.755246
ecd56476-a728-4b8b-b031-2f722b030cce
kishanrajput23/Coding-Buddies-Community-Contributions
Love_Babbar_DSA_busted.c/graph/vertex_cover_problem.cpp
#include <bits/stdc++.h> using namespace std; #define inf INT_MAX typedef pair<int, int> ipair; void addEdge(set<int> adj[], int u, int v) { // undirected graph. adj[u].insert(v); adj[v].insert(u); } // Given an undirected graph // Create a minimum subset of vertices such that all the edges are included...
ALGO
0.999838
4.835928
2e0e88d2-4789-419d-bffe-18ef1f5ebe8c
snull/CTU-CE-BP
5/17.cpp
#include <iostream> using namespace std; int main(){ int a,b,c; cout<<"a = "; cin>>a; cout<<"b = "; cin>>b; if (b<a){ b=a+b ; a=b-a ; b=b-a ; } cout<<"c = "; cin>>c; if (c<b){ c=c+b ; b=c-b ; c=c-b ; } if (b<a){ b=a+b ; a=b-a ; b=b-a ; } cout<<"****************"<<endl<<a<<endl<<b...
ALGO
0.999326
3.063223