uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
f5da00a5-47f9-4416-afa4-d83a75e4ef33
Tikitikitikidesuka/SolucionesAceptaElReto
140SumaDeDigitos.cpp
#include <iostream> typedef std::int_fast16_t c_int_big; typedef std::int_fast8_t c_int_small; inline bool fastDigitInput(c_int_small& number) { register std::int_fast8_t input; register std::int_fast8_t negativo = false; input = getchar_unlocked(); // Clear noise on buffer for (; (input < '0' |...
ALGO
0.999897
4.037504
138c88cc-f597-4380-87a6-40bca9e8fe98
sayonika06/DSAinCPP
star pattern/leftpyr.cpp
#include<bits/stdc++.h> using namespace std; main() { int n; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { cout<<"*"; } cout<<endl; } }
ALGO
0.999949
3.69132
ec30a1b2-8059-4bb5-b919-6040e93456b2
ChedyMeksi007/NN-chedy
cpp2/src/nn/seterrors.cpp
#include "../../include/nn.hpp" #include <cassert> #include <cmath> void NN :: setErrors(){ if(this->target.size() == 0){ cerr << "No target for this NN" << endl; assert(false); } if(this->target.size() != this->layers.at(this->layers.size() -1)->getNeurons().size()){ cerr << "Target size (" << this->target....
ALGO
0.855306
3.970547
b70a8de2-4402-4cf2-8855-3f0a08669bd5
suhaskvittal/foresight-cpp
include/boost_1_78_0/libs/graph/example/loops_dfs.cpp
/* IMPORTANT!!! ~~~~~~~~~~~~ This example uses interfaces that have been deprecated and removed from Boost.Grpah. Someone needs to update it, as it does NOT compile. */ #include <boost/config.hpp> #include <boost/concept/assert.hpp> #include <iostream> #include <fstream> #include <stack> #include <map> #in...
ALGO
0.999212
7.307745
ef753438-3883-4ac3-b6d1-985c59cb7903
DJRGVC/Exploring-Computational-Geometry
RRT-Multi-Joint-Path-Planning/geom.cpp
#include "geom.h" #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <vector> using namespace std; /* **************************************** */ /* returns the signed area of triangle abc. The area is positive if c is to the left of ab, and negative if c is to the right of ab */ int signed_are...
ALGO
0.999515
3.900005
fc9a2f77-beb6-4518-b25f-358c536bce74
fan1997/HP-SpMM-SDDMM
spmm/starml/operators/cpu/binary_kernel.cpp
#include <iostream> #include "index_helper.h" #include "starml/operators/binary_ops.h" #include "starml/operators/expression.h" namespace starml { namespace { template <typename TScalarType1, typename TScalarType2, typename TResultType, typename TOp> void eval_binary(const TScalarType1* data1, const TScala...
ALGO
0.992991
7.482921
5e78047c-d362-40d4-b768-3a51a9c1d927
sireButItsUnique/solutions-24-25
cf/964/e.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<ll, ll> ll t, r, l; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> t; while (t--) { cin >> l >> r; ll res = 0; // gets l + 1 to original number ll tmpL = l; ...
ALGO
0.999953
3.947083
2fc58b9a-b54f-4e30-9977-eb6e550c1634
mdrasel101126/xpsc-batch-4
week_2/day_1/B_Minor_Change.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; getline(cin, s1); getline(cin, s2); int res = 0; for (int i = 0; i < s1.size(); i++) { if (s1[i] != s2[i]) { res++; } } cout << res; return 0; }
ALGO
0.999854
3.749939
d57563b7-add2-4420-b72c-6e4cb50ed719
ektagoel-12/Leetcode_Solutions
cpp/Sqrtx.cpp
# Brute Force The condition is y*y<=x; We will search from 0,1,2....y and square each value to see if the condition is satisfied. # Code ``` class Solution { public: int mySqrt(int x) { long long y=0; while(y*y<=x) { y++; } return y-1; } }; ``` # Complexity - ...
ALGO
0.999998
5.516778
2930ee16-3a39-4618-88ed-d56d37710272
proxmox/ceph
ceph/src/boost/libs/math/example/neumann_zeros_example_1.cpp
#ifdef _MSC_VER # pragma warning (disable : 4512) // assignment operator could not be generated. # pragma warning (disable : 4996) // assignment operator could not be generated. #endif #include <iostream> #include <limits> #include <vector> #include <algorithm> #include <iomanip> #include <iterator> //[neumann_zero...
ALGO
0.99909
6.31315
0fca554c-6407-4764-9557-dec3fedac3d3
Savan-Solanki/DSA-CPP
05-Day/LR-Shift.cpp
#include <iostream> using namespace std; int main() { // Left Shift, Right Shift cout<<(17>>1)<<endl; cout<<(17>>2)<<endl; cout<<(19<<1)<<endl; cout<<(19<<2)<<endl; return 0; }
ALGO
0.975215
3.217262
8bd121af-2ec5-40e5-9003-8342009bfdb9
LazyPlanet/MX-Architecture
ThirdParty/boost_1_63_0/libs/spirit/example/qi/compiler_tutorial/conjure2/vm.cpp
#include "config.hpp" #include "vm.hpp" #if defined(_MSC_VER) # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' // (performance warning) #endif namespace client { int vmachine::execute( std::vector<int> const& code , std::vector<int>::const_it...
TOOL
0.909216
5.55243
733a1232-32ee-4734-94af-579eb008e164
skandavc18/logic_detector
backend/CDataset/maxDepth/maxDepth_6.cpp
class Solution { public:class TreeNode{ public: TreeNode* left; TreeNode* right; int val; }; int maxDepth(TreeNode* root) { return root==NULL ? 0 : 1+max(maxDepth(root->left),maxDepth(root->right)); } };
ALGO
0.999638
5.955976
869f6d06-5ea9-4761-8987-5cebec785adc
ishandutta2007/codeforces
kirill22/normal/103965/F.cpp
#include "bits/stdc++.h" using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const s...
ALGO
0.999805
4.244573
1947a52f-2c2a-41cb-a035-a616e3f91dd0
eari100/Algorithms_Workbook
cpp/Baekjoon/implementation/Q4921.cpp
#include<iostream> using namespace std; /** * @source: https://www.acmicpc.net/problem/4921 (나무 블록) * @classification: implementation * @문제 푼 날짜 (자력으로 풂?): 25.06.26 (O) **/ int order = 0; void fail() { cout << order << ". NOT" << '\n'; } void success() { cout << order << ". VALID" << '\n'; } int main() { ...
ALGO
0.99859
4.84028
3312d897-3f27-436c-8c5c-6daccd79b424
odashi/Project-Euler
euler0021.cpp
#include <stdio.h> int ddd(int n) { int ret = 0; int lim = n / 2; for (int i = 1; i <= lim; i++) if (n % i == 0) ret += i; return ret; } int main(void) { int total = 0; for (int i = 1; i < 10000; i++) { int a = ddd(i); if (ddd(a) == i && a != i) total += i; } printf("%d\n", total); return ...
ALGO
0.9999
4.650156
d29c8241-e5f3-4a16-9c5e-5a5e841c15e2
AnmarSammour/Roller_dice_Flutter
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.998764
6.762122
1b07d2da-41e5-4b43-9f8d-2d4da31af8d9
Gazella019/Leetcode
leetcode_88.cpp
class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int i, now; m = m-1; n = n-1; now = nums1.size()-1; while(n >= 0){ if(m >= 0 && nums1[m] >= nums2[n]){ nums1[now] = nums1[m]; m --; } ...
ALGO
0.999987
5.261434
4a84eae3-17d9-437d-a5b4-2861aafe2f95
hrishipawar24/Logical-Programming
45/Assignment221Template.cpp
#include<iostream> using namespace std; struct node { int data; struct node *next; }; typedef struct node NODE; typedef struct node* PNODE; class SinglyLL { public: PNODE head; int iCountNode; SinglyLL() { head = NULL; iCountNode = 0; } ...
ALGO
0.999143
4.422127
f45c12aa-9f24-471a-938a-3ad21b2a76be
omN1gb/frameworks_base
media/libstagefright/codecs/amrnb/common/src/weight_a.cpp
/* Pathname: ./audio/gsm-amr/c/src/weight_a.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Put file into template and first pass at optimization. Description: Made changes based on comments from the review meeting. Used pointers instead of inde...
ALGO
0.999577
6.017359
3780472e-7f92-4083-89e1-a5fb5663705e
MichaelEdoigiawerie/Computer-Graphics-Journey
graphics-code/ext/eigen/doc/examples/Tutorial_simple_example_fixed_size.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; int main() { Matrix3f m3; m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9; Matrix4f m4 = Matrix4f::Identity(); Vector4i v4(1, 2, 3, 4); std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl; }
ALGO
0.969685
3.129515
6b497cab-6d9b-430e-9022-bd7258dcbe45
The-Legion-Preservation-Project/TrinityCore
src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
#include "scarlet_monastery.h" #include "InstanceScript.h" #include "MotionMaster.h" #include "ScriptedCreature.h" #include "ScriptMgr.h" #include "SpellInfo.h" #include "Timer.h" enum MograineAndWhitemaneSays { // Mograine SAY_MO_AGGRO = 0, SAY_MO_KILL = 1, SAY_MO_RESURRECTED = 2, //...
TOOL
0.851671
6.615184
ca674b35-d86b-47d7-922b-91aa726ac738
RWTH-HPC/PInT
Helpers.cpp
#include "Helpers.h" #include <vector> /** * @brief A helper function to retrieve all PatternOccurrence objects from a list of PatternCodeRegions. * On demand, the list is turned into a set. * * @param CodeRegions List of PatternCodeRegion objects. * @param MakeUnique If true, all duplicates are removed from the ...
ALGO
0.973539
7.097325
495be234-8e09-4526-a8eb-fe5b6eeb49d4
Corei13/contest-programming-codes
UVA/441.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second #define mp make_pair #define pb push_back #define sz(a) (int)(a.size()) #define all(a) a.begin(), a.end() typedef long long ll; typedef vector <int> VI; typedef vector <VI> VVI; typedef pair <ll, ll> PI; typedef vector <PI> VPI; typedef v...
ALGO
0.999472
3.868461
5bd669b8-a1b8-4dd7-b77a-d57089b2928f
bolunli11/boost-1_71_0
libs/geometry/doc/src/examples/algorithms/num_interior_rings.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[num_interior_rings //` Get the number of interior rings in a multi-polygon #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost...
ALGO
0.96482
6.85315
f99a5da3-d202-418c-bfda-1b7299178286
gadhiyakeval163/c-assignment
Assignment Of C++/c++Assignment/constructor7.cpp
//Q-7.Write a program of Addition,Subtraction,Division,Multiplication using Constructors. #include<iostream> using namespace std; class Maths { int a,b; public: Maths(int x,int y) { a=x; b=y; } void Cal() { cout<<"The Addition of two numb...
TOOL
0.883121
3.728341
84673b6c-8951-468c-b955-a5e6ea9e152c
ishandutta2007/codeforces
ei133333/normal/1542/E1.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.999954
4.678448
4a7358e2-728e-44aa-90d8-707645414d3b
IsaacHana/algorithmForCPP
0x09 BFS/5014.cpp
#include <bits/stdc++.h> using namespace std; const int MX = 1'000'000; int dist[MX + 1]; int main() { ios::sync_with_stdio(0); cin.tie(0); int F, S, G, U, D; cin >> F >> S >> G >> U >> D; fill(dist, dist + MX + 1, -1); queue<int> Q; Q.push(S); dist[S] = 0; while (!Q.empty()) {...
ALGO
0.999937
4.172198
7bcedb50-79c1-43f2-a95b-4f03f787cf89
Abhishek-Atole/Logic-Building
src/Program217.cpp
#include <iostream> using namespace std; typedef struct node { int data; struct node *next; } NODE, *PNODE, **PPNODE; // Here we Cant initialize the First beacuse ṭhe memeory is not allocated here memeoy allocation is done when the object of the class is crated // or we can initialize it using the constructor...
ALGO
0.967744
4.040906
8522329a-fb3c-47d8-85a2-a2208668080b
ishandutta2007/codeforces
mohammedehab2002/normal/549/H.cpp
#include <iostream> using namespace std; double a,b,c,d; pair<double,double> ret; bool go(double x) { ret.first=min(ret.first,x); ret.second=max(ret.second,x); } pair<double,double> get(double f,double s,double m) { ret={4e18,-4e18}; go((f+m)*(s+m)); go((f-m)*(s+m)); go((f+m)*(s-m)); go((f-m)*(s-m)); return ret...
ALGO
0.999826
3.576583
a7e844d9-e7a6-497a-922e-5b229484c5c7
torrra/spectrum-retreat-clone
LibMath/Source/Angle.cpp
#include "Angle.h" #include "Arithmetic.h" #define PI 3.14159265359F #define RAD2DEG 180.0F / PI #define DEG2RAD PI / 180.0F #define DEG_PRECISION 1.0F #define RAD_PRECISION 0.001F namespace LibMath { Degree::Degree() = default; Degree::Degree(float val) : m_value(val) {} // explicit so no ambiguous / implicit ...
TOOL
0.921811
6.623709
03a191ab-6768-4ee0-ba24-c2b747c6540c
deep-bansal/HACKER-BLOCKS
HB EASY REVISING QUADRATIC EQUATIONS/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; int x,y; cin>>a>>b>>c; int F= (b*b)-(4*a*c); int D = pow(F, 0.5); if(D==0 && a!=0){ cout<<"Real and Equal"<<endl; } if(D>0 && a!=0){ cout<<"Real and Distinct"<<endl; } if (D<0 && a!=0) { ...
ALGO
0.999866
4.385763
c474aec1-af7c-472a-9f10-4267ce2c9d8e
rutuja-patil923/Data-Structures-and-Algorithms
String/RabinKarpImplementation.cpp
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 #define ll long long ll dp[100001]; ll inv[100001]; ll power(ll a,ll m) { ll result=1; while(m) { if(m & 1) result = (result*a)%mod; m=m>>1; a = (a * a)%mod } return result; } void init(string text) { ll p=31; ll p_power=1; // will ...
ALGO
0.999992
5.065424
abd2c6d2-d8ee-4b46-8871-7860cfc6498c
mayank-kabra2001/boost
tools/bcp/licence_info.cpp
#include "licence_info.hpp" std::pair<const license_info*, int> get_licenses() { static const char* generic_author_sig = "(?:" "(?:" "Copyright|\\(c\\)|\xA9" ")[[:blank:]]+" "){1,2}" "(?:" "\\d[^[:alpha:]]+" "([[:alpha:]]" "(?:" ...
TOOL
0.860119
5.019783
ec58578a-15c1-41bc-8788-0c38b0b16d15
thakursachin05/MASTERING_CPP
NagarroAsisignment1/intersectionOfLinkedList.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: int length(ListNode* head){ if(!head) return 0; int len = 0; ListNode* temp = head; while(temp)...
ALGO
0.999931
5.020417
4dee2612-30bb-4baa-85b4-41c7dc089a17
raincross7/code-similarity
codes/train_code/problem260/problem260_251.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cstdio> #include<queue> using namespace std; int main(void){ priority_queue<int> que; char ch[10]; int k; while(true){ scanf(" %s",ch); if(ch[2]=='d')break; if(ch[0]=='i'){ scanf("%d",&k); que.push(...
ALGO
0.989034
3.149087
6626470b-8e4d-4cae-9d7b-ff83b27cb8ed
vineethm1627/CPP
Interview Preparation/02 Character Arrays/largest_string.cpp
#include <iostream> #include <cstring> using namespace std; int main() { // read n, followed by n strings and print the largest string and its length // don't store all the strings // store the largest string till now and the current input string. int n; cin >> n; cin.get(); // fetches the '\n'...
ALGO
0.998982
3.684761
0bac6f41-7861-4bf8-a836-acb98ff4f035
greatergoodguy/Game_Tech_Assignment1
Bullet/src/BulletCollision/Gimpact/gim_tri_collision.cpp
/*! \file gim_tri_collision.h \author Francisco Len Njera */ #include "gim_tri_collision.h" #define TRI_LOCAL_EPSILON 0.000001f #define MIN_EDGE_EDGE_DIS 0.00001f class GIM_TRIANGLE_CALCULATION_CACHE { public: GREAL margin; btVector3 tu_vertices[3]; btVector3 tv_vertices[3]; btVector4 tu_plane; btVector4 tv_pl...
ALGO
0.999684
5.703652
2ec03119-21bb-4671-9540-b9ce04868799
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_641_0.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a[5]; for (int i = 0; i < 4; i++) cin >> a[i]; sort(a, a + 4); int flag = 0; int ans1 = 0, ans2 = 0; for (int i = 3; i >= 0; i--) { if (ans1 >= ans2) ans2 += a[i]; else { ans1 += a[i]; } } if (ans1 == ans2) flag =...
ALGO
0.999973
3.515086
8244b5c1-21a6-4c8b-9172-74b962456671
jwgcarlson/Copter
src/LinearPS.cpp
#if HAVE_CONFIG_H # include <config.h> #endif #include "GrowthFunction.h" #include "LinearPS.h" LinearPS::LinearPS(const Cosmology& C_, real z_) : C(C_), z(z_), Pnw(C_, z_, EisensteinHu) { GrowthFunction D(C); real A = pow2(C.delta_H) * pow2(D(z)/D(0)); real T0 = C.Ti[0]; int N = C.ki.size(); ...
ALGO
0.964519
5.330536
40c97e6e-8d79-43b6-9398-91ea790337be
Mohamed-Hossam/Problem-Solving
codeforces/543-B/543-B-11827788.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<set> #include<map> #include<queue> #include<stack> #include<iterator> #include<cmath> #include<string> #include<sstream> #include<cstring> #include<ctype.h> #include<iomanip> #include<functional> #include<bitset> #include<s...
ALGO
0.999915
3.566284
357b1f4c-1e49-439f-9c87-8c9c2c637d01
Mayurishinde27/Leetcode
1749-maximum-absolute-sum-of-any-subarray/1749-maximum-absolute-sum-of-any-subarray.cpp
class Solution { public: int maxAbsoluteSum(vector<int>& nums) { int n = nums.size(); int max_so_far = nums[0]; int maxi = nums[0]; int min_so_far = nums[0]; int mini = nums[0]; for(int i = 1; i<n; i++) { max_so_far = max(nums...
ALGO
0.999977
6.003614
4e8b440d-147c-448f-a9fb-2f2fc68d8814
jayeshpatel8/Coding-Practise-using-Leetcode-Coding-Platform
problems/count_all_valid_pickup_and_delivery_options/solution.cpp
class Solution { public: int MOD = 1e9 + 7; int countOrders(int n) { vector<vector<long>> dp (n + 1, vector<long>(n + 1, -1)); return cnt(n,n,dp); } long cnt(int p, int d, vector<vector<long>>& dp){ if (d<p) return 0; if (dp[p][d] != -1) return dp[p][d]; if (p== ...
ALGO
0.999956
5.559818
1a4145aa-13bd-46db-89d7-8b29f6151659
Ammar-mahmoud/code-forces
Deadly_Laser.cpp
#include <bits/stdc++.h> using namespace std; #define more ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); int main() { more int n; cin >> n; while (n--) { pair<int,int> base({1,1}); pair<int,int> to_go;cin >> to_go.first >> to_go.second; pair<int,int> laser;cin >> laser.fir...
ALGO
0.999755
3.750975
2cceccd4-3bd5-4f60-9f7a-d586a7db02cd
jylin34/Compiler
judge1/t.cpp
//Compiler HW1-1 Parser //110403518 林晉宇 資工 3B #include<iostream> #include<string> #include<cctype> #include<vector> using namespace std; string input; struct Token{ string type; string lexeme; }; vector<Token> tokens; class Scanner { private: string input; size_t pos = 0; char peek(){ ...
TOOL
0.951584
4.182315
b59cc315-e39a-4af7-a005-a7ccce56084d
leon-schi/fortune-hyperbolic
experiments/CGAL-5.2/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp
#include <fstream> #include <map> #include <cmath> #include <CGAL/property_map.h> #include <CGAL/algorithm.h> struct Custom_point_3{ // Required by File_scanner_OFF struct R{ typedef double RT; }; double coords[3]; Custom_point_3(){} Custom_point_3(double x, double y, double z) { coords[0]=x; coords...
ALGO
0.998634
5.011279
91ea63cf-edf4-428a-b751-28682054ebf5
TejasLearningGithub/MyFoldersAndFiles
kind_a_code/kind_a_proj/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.997958
6.785645
36c31f8b-a8aa-4a25-b3b6-ef1513002167
wangtongxue-369/xcpc_Code_file
file/nowcoder/2025summer_duoxiao/1/L.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define INF 0x3f3f3f3f #define PII pair<ll, ll> const ll mod = 1e9 + 7; const ll MAXN = 500005; const ll base1 = 131; const ll base2 = 127; ll _ = 1, n, m, ans = 0, a[MAXN], b[MAXN]; void solve() { ll totsize = 0; ...
ALGO
0.999741
4.16318
1acacf2d-a0b2-4909-9a50-8eb99c59f748
Certseeds/CS203_DSAA_template
algorithm/2020S/20200511/20200511_4th_test.cpp
#ifdef CS203_DSAA_TEST_MACRO #include <catch_main.hpp> #include <tuple> #include <vector> #include <iostream> #include "20200511_4th.cpp" std::string getFilePath() noexcept { return "./../../../../algorithm/2020S/20200511/20200511_4th_data/"; } const std::string CS203_redirect::file_paths = getFilePath(); name...
TEST
0.997149
4.686306
5c6e09f9-e093-4aa0-8fa5-aa6be16d0539
ishandutta2007/codeforces
cinnamoroll/normal/1286/A.cpp
// warm heart, wagging tail,and a smile just for you! // // // // // ...
ALGO
0.99999
4.010914
3c4a94b8-525a-4a6c-9da7-a09e2f3d4b4f
RodolfoJSCampos/hairsense
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.998485
6.76775
dfb46fdc-6a0c-4c6b-a37e-ac0df2eda7cc
kyt9613/ALGORITHM_CLASS
10주차 실습(그래프표현)_2.cpp
#include <stdio.h> #include <stdlib.h> typedef struct edge { int v1; int v2; int weight; struct edge *prev; struct edge *next; } edge; typedef struct { int name; } vertex; typedef struct { vertex vertices[6]; edge *edgesHead; edge *adjacencyMatrix[6][6]; } graph; edge *getEdge(); void add_incident(edge *ad...
ALGO
0.965258
3.304512
fc071893-618b-43c3-956d-977db1a8def1
ChilliCreek/Competiton-preparation
USACO/mother's milk rewrite.cpp
#include<bits/stdc++.h> /* ID: chiig.e1 LANG: C++ TASK: milk3 */ #define MAX 20 using namespace std; struct State { int yoyo[3]; }; int seen[MAX+1][MAX+1][MAX+1]; int res[MAX+1]; int cap[3]; State pour(State curr, int from, int to){ int temp; if(cap[to]>=curr.yoyo[from]+curr.yoyo[to]){ temp=curr.yoyo...
ALGO
0.999942
3.149865
67fc45f1-bf57-4b04-8c6d-0e348de46d0b
ishandutta2007/codeforces
couplefire/normal/852/E.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<algorithm> #include<cstring> #include<string> #include<vector> #include<map> #include<set> #include<queue> using namespace std; const int mod=1e9+7; int n,rdu[100010]; int main() { scanf("%d",&n); int i; for (i=1;i<n;i++) { int x,y; ...
ALGO
0.999823
3.706799
4e1d473c-633c-45d0-bb2f-081039c21bcd
Frank-Pesadilla/idea_app
ideas_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.998403
6.76775
7ce2e331-63ea-456d-8092-5ac799089f92
SagarPrajapati1/LeetcodePOTD2024
Jan24/implement_queue_using_stacks.cpp
#pragma GCC optimize("O3", "unroll-loops") class MyQueue { stack<int> s0, s1; int front=0; public: MyQueue() { } void push(int x) { if (s0.empty()) front=x; s0.push(x); } int pop() {// amortized O(1) if (s1.empty()){ while(!s0.empty()){ ...
ALGO
0.99919
5.180109
1a988513-37b1-4f50-8f4f-d111ea632231
Averesoft/DMOJ_Solutions
coci06c2p2/coci06c2p2.cpp
#include <bits/stdc++.h> using namespace std; int a[3]; string s; int main() { cin >> a[0] >> a[1] >> a[2]; cin >> s; sort(a, a + 3); for (int i = 0; i < s.size(); i++) { if (s[i] == 'A') { cout << a[0]; } else if (s[i] == 'B') { cout << a[1]; } else if (s...
ALGO
0.999908
4.014409
70ef398f-ec8b-4a4e-9fa6-ba6971838011
Hecrecerelle/hechen
一元二次方程的解函数.cpp
#include <stdio.h> #include <math.h> #include <stdlib.h> void Function(float x,float y,float z,float p,float q,float t); int main(void) { printf("It's a program to find solution of equations like ax+by+c=0 and dx+ey+f=0\n"); printf("please input the coefficient of x and y in the order of a,b,c,d,e,f and let the num...
ALGO
0.9989
3.112941
92e3b23f-db59-4f2a-9d6a-3c8f94d44359
hideoussquid/deuscoin-core-gui
src/rpc/blockchain.cpp
#include "amount.h" #include "chain.h" #include "chainparams.h" #include "checkpoints.h" #include "coins.h" #include "consensus/validation.h" #include "validation.h" #include "policy/policy.h" #include "primitives/transaction.h" #include "rpc/server.h" #include "streams.h" #include "sync.h" #include "txmempool.h" #incl...
WEB
0.910558
6.510525
b00afdc3-4254-479f-a6da-036eba256f2f
BKhomutenko/visgeom
src/render/texture.cpp
#include "render/texture.h" #include "render/aa_filter_lt.h" Texture::Texture(const Mat8u & textureMat) : _textureMat(textureMat.clone()), _grid(_textureMat.cols, _textureMat.rows, _textureMat.data), _interpolator(_grid) {} Texture::~Texture() {} uchar Texture::sample(const Vector2d & pt, const Matri...
ALGO
0.896139
6.097804
1e017840-b4e8-4442-b369-c1902e1b7597
swapnilsparsh/100DaysOfCode
Day09/InsertionSort.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the size of array: "; cin>>n; int array[n]; cout<<"Enter the elements of array: "; for(int i=0; i<n; i++){ cin>>array[i]; } for(int i=1; i<n; i++){ int counter = array[i]; int j = i-1; while(array[j]>counter && j>=0...
ALGO
0.999984
3.75707
4e7ac21b-1b77-4d0f-a71a-af3e5bca6a7a
vishal25sharma/Week-2-and-3-Cipher-School
Lecture 46 - Cipher School.cpp
#include<iostream> using namespace std; void printMaxClassesAttend(int start[], int end[], int class_id[]){ cout<<"The classed which you should attend to cover maximum of them : "<<endl; cout<<class_id[0]; int i,end_of_class_currently_attending=end[0]; for(i=1;i<9;i++){ if(start[i] >= end_of_class_currently_a...
ALGO
0.999222
3.89684
eb93dc95-554f-4433-8c92-f3ccccf1bad1
jwk20851/CodingTest
Baekjoon/S3/C++/S3_근손실.cpp
//https://www.acmicpc.net/problem/18429 #include <iostream> using namespace std; int N, K, w = 500, ans = 0; int A[51]; bool visited[51]; void DFS(int depth) { if (depth == N) { ans++; return; } for (int i = 0; i < N; i++) { if (!visited[i]) { if (w + A[i] - K >= 500...
ALGO
0.999883
3.96978
1878f64e-b542-49fc-a6f6-b3dd6f725944
TalleresGuisao/RootLectures
Module1_cpp/lecture4/example5_busquedalineal.cpp
#include <iostream> using namespace std; int busquedaLineal( const int [], int, int ); int main(){ const int tamanioArreglo = 100; int a[ tamanioArreglo ]; int claveBusqueda; // valor a localizar en el arreglo a for ( int i = 0; i < tamanioArreglo; i++ ){ a[ i ] = 2 * i; } cout << "Introduzca...
ALGO
0.999627
4.242515
29c95007-7f26-431e-af6e-26eef948b5e0
MujtabaMubasher/Data-Structure-and-Algorithms
C++_Phase_1/10_1_Leetcode_Problems_Array/dublicate.cpp
#include <iostream> using namespace std; // Find Dublicate Element in the Array int dublicateElement(int arr[], int size) { int unique = 0; // XORing all elements in arr[i] for (int i = 0; i < size; i++) { unique = unique ^ arr[i]; // cout<< "Unique: "<< unique << "\n"; } int d...
ALGO
0.99923
4.218403
d0afb774-318d-4284-ad8d-07fd541267b9
NadaKG/Elzerowebschool-assignments-cpp
W7A14.cpp
#include <iostream> using namespace std; int main() { int num = 2; while (num < 520) { // Your Code Here if(num == 2) num = 1; cout << num <<"\n"; num = num * 2 + 2; } /* Needed Output 1 4 10 22 46 94 190 382 */ }
ALGO
0.999508
3.36456
4bbb9ecf-8bf2-4bab-8f3d-bf4474f5f9b5
Kfkcome/lougu
P1314.cpp
#include <bits/stdc++.h> using namespace std; struct stone { long long w; // 重量 long long v; // 价值 }; bool compare(struct stone s1, struct stone s2) { return s1.w < s2.w; } int main() { long long n, m, s; cin >> n >> m >> s; struct stone rock[200001]; struct stone rock_list[200001]; for ...
ALGO
0.999911
3.82613
0fd26a07-070b-40c9-aa32-74722e102575
Varsha562/CP_CODES
huffman_coding.cpp
#include <bits/stdc++.h> using namespace std; struct MinHeapNode { char data; int freq; MinHeapNode *left, *right; MinHeapNode(char data, int freq) { left = right = NULL; this->data = data; this->freq = freq; } }; struct compare { bool operator()(MinHeapNode* l, Min...
ALGO
0.999879
4.502039
46475257-3aac-4200-93d0-be2d9fb7b65e
duttaANI/AL_Lab
Interview Bit/Tree/Symmetric Binary Tree.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ int fun(TreeNode* A,TreeNode* B) { if(!A && !B) return 1; if(!A || !B) return 0; if(A->val!=B->val) return 0; re...
ALGO
0.999996
6.103068
489584bc-5b95-42cf-a7d6-8e2a739411db
naxocist/POSN-IPST
TOI/toi10_catcode.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 3; bool has[N]; int hsh[N], idx[N]; int t, x, n, sz; string s; void fastscan(int &number) { bool negative = false; register int c; number = 0; c = getchar(); if (c=='-'){ negative = true; c = getchar(); } for (; (c>47 && c<58); c=getchar()) ...
ALGO
0.99872
4.605837
a31102bd-0c6a-47ab-9f59-d485da243c49
qiatongxueshaonianC/CaiZebin-Code_warehouse
PAT/第一轮/未归档/1048/01背包思路_没解出来/main.cpp
#include<bits/stdc++.h> using namespace std; const int maxn=10010; const int maxv=1010; int n,sum,dp[maxn][maxv],w[maxn]; bool choice[maxn][maxv]; vector<pair<int,int>>ans; bool cmp(int a,int b){ return a>b; } int main() { scanf("%d%d",&n,&sum); for(int i=1;i<=n;i++) scanf("%d",&w[i]); sort(w+1,w+n+1,cmp); for(...
ALGO
0.999999
3.278608
168e3b21-687f-4fa9-be71-19a6f984dde0
suraj101998/LeetCodeSolutions
2400-2499/2429.Minimize XOR/Solution.cpp
class Solution { public: int minimizeXor(int num1, int num2) { int cnt = __builtin_popcount(num2); int x = 0; for (int i = 30; ~i && cnt; --i) { if (num1 >> i & 1) { x |= 1 << i; --cnt; } } for (int i = 0; cnt; ++i) { ...
ALGO
0.999961
5.736545
6b609ab1-74c3-4a98-b355-7f55a42427f7
sig5/cses
dp7.cpp
#include<bits/stdc++.h> using namespace std; const long long int mod=(long long int)1e9+7; //vector<vector<long long int>> dp(1000,vector<long long int>(1000,nax)); long long int nax=(long long int)(1e9); void add_self(long long int &a,long long int b) { a+=b; if(a>mod) { a-=mod; }} int main() ...
ALGO
0.999957
4.270515
c2ed60a3-2494-43e2-b1bf-c89d6c0a93c5
towhid1zaman/Categories-problem-solve
Data Structures/Policy Based Data Structure (PBDS)/Number of Pairs CF-1538C.cpp
//https://codeforces.com/contest/1538/problem/C /*これを翻訳している間、あなたはあなたの人生のいくつかの貴重な瞬間を無駄にしました*/ #pragma comment (linker,"/STACK:16777216") #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef std::vector<int> vi; typedef std::vector<ll> vll; #define endl "\n" #define pb push_back #define sp(k) cout...
ALGO
0.999419
4.746358
233015d5-302c-460d-86eb-10b8265016d7
hjiang13/LLMs-in-IR
processed_data/DecompiledResuts_Human_x_164_O1/GPT4o_Human_x_164_O1_decompiled/CPP_62.cpp
```cpp #include <vector> #include <stdexcept> #include <new> void derivative(std::vector<float>& result, const std::vector<float>& input) { float temp; result.clear(); result.resize(input.size()); for (size_t i = 1; i < input.size(); ++i) { float factor = static_cast<float>(i); temp = ...
ALGO
0.997383
6.568604
a236a338-e178-4752-afcc-423f40e7924d
lzyrapx/Algorithmic_Template
DataStructure/HASH.cpp
/* HASH 数字HASH,开散列,邻接表 */ #include <iostream> #include <cstdio> typedef long long ll; const int MOD = 4001, STA = 1000010; // MOD为表长,STA为表大小 struct Hash { int first[MOD], next[STA], sz; ll f[STA], sta[STA]; // sta[]存放状态,f[]为对应状态的权值 void init() { sz = 0; memset(first, -1, sizeof(first)); }...
ALGO
0.998959
3.443179
3ec6405f-6541-49f0-985a-0ffa4934b61d
followingthefasciaplane/source-engine-diff-check
misc/game/server/tf/bot/behavior/tf_bot_retreat_to_cover.cpp
#include "cbase.h" #include "tf_player.h" #include "bot/tf_bot.h" #include "bot/behavior/tf_bot_retreat_to_cover.h" extern ConVar tf_bot_path_lookahead_range; ConVar tf_bot_retreat_to_cover_range( "tf_bot_retreat_to_cover_range", "1000", FCVAR_CHEAT ); ConVar tf_bot_debug_retreat_to_cover( "tf_bot_debug_retreat_to_cov...
ALGO
0.915034
6.801181
b9908bd5-a50a-43c8-9f99-f584b88fb72c
JustAG7/Competitive_Programming
VKU/2025/VKU Summer 2025 - Contest 3 DP/cses1097.cpp
// #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") // #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define ll long long #define pb push_back #define pf push_front #define db double #define X...
ALGO
0.999945
4.55731
43600ee4-676e-408f-8a87-e9e7041353ab
Bharat2044/365-days-coding-challanges
Day_328/01_consecutiveLosses.cpp
// Question Link: https://www.interviewbit.com/problems/consecutive-losses/ /* Consecutive Losses Problem Description: India and Pakistan are playing a bilateral series of A matches. Now, you know that India won exactly B matches. We know that there are ACB ways in which India could win B out of the A matches playe...
ALGO
0.99996
4.882198
a6278cf0-7151-4028-b767-519d4edd20ac
SanDiegoCastilho/Methods-II
lib/CImg/examples/jawbreaker.cpp
#include "CImg.h" using namespace cimg_library; #undef min #undef max // Main procedure //---------------- int main(int argc, char **argv) { // Display help (if option '-h' or '--help' specified) and retrieve program arguments cimg_usage("A small and funny game featuring colored balls.\n (by David Tsc...
TOOL
0.850882
5.559761
846a29d4-0533-45f9-8a9a-74f7f47f32d1
ishandutta2007/codeforces
amoo_safar/normal/1019/D.cpp
// vaziat meshki-ghermeze ! #include <bits/stdc++.h> #define pb push_back #define F first #define S second #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " : " << x << '\n' using namespace std; typedef long long ll; typedef long double ld; typedef string str; typedef pair<ll, ll> pll; const ll Mod...
ALGO
0.999929
3.85327
9c7c90d7-b272-415d-9ecb-ec14b4ae069a
labs-inatel/Laboratorio_C202
Vetores/Vetor_maior_menor.cpp
#include <iostream> using namespace std; int main() { int i, n; int vetor[100]; int maior = -500; int menor = 10000; int posmaior = -50; int posmenor = 101; cin >> n; for(i = 0; i < n; i++) { cin >> vetor[i]; } for(i = 0; i < n; i++) { if (vetor[i] > maior) { maior = vetor[i]; posmaior = i;...
ALGO
0.999708
3.404724
66731edd-c854-4d78-8d48-7d7bd4b734e8
notjik/informatics
classworks/ege/27ege/data/r00/solve27.cpp
#include <iostream> #include <fstream> #include <cmath> using namespace std; int main() { ifstream Fin( "27-b.txt" ); int N, s = 0, dMin = 10001; Fin >> N; for( int i = 0; i < N; i++ ) { int a, b; Fin >> a >> b; s += max( a, b ); int d = abs( a-b ); if( d % 3 > 0 ) dMin = min( d...
ALGO
0.999803
3.9408
53759a8f-02dc-4c77-a85a-91d50ea1b4e1
ericbrandwein/competencias
Codeforces/1523/c/c.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define fore(i, s, n) for(ll i = s; i < n; i++) #define forn(i) for(ll i = 0; i < n; i++) #define all(v) v.begin(), v.end() #define vec vector void print_item(vec<ll>& pos, ll last) { for (ll i = 0; i < last; i++) { ...
ALGO
0.999904
4.358987
709c9fc2-efd0-4f43-a647-ffed23bcebd4
vsroy/Leet-Code-Solutions
739_Daily_Temperatures.cpp
/*Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead. For example, given the list of temperatures T = [73, 74, 75, 71, 69, 72, 76, 73], y...
ALGO
0.999983
6.009851
5ee08ec0-abe6-4b7a-95ca-84717dcb3211
TotoroCodingDojo/leetcode-cpp
43/sol0.cpp
class Solution { public: string multiply(string num1, string num2) { if(num1.length() > num2.length()) return multiply(num2, num1); reverse(num1.begin(), num1.end()); reverse(num2.begin(), num2.end()); vector<int> ans(num1.length(), 0); int c = 0, i, j, a; ...
ALGO
0.999959
5.85696
cfbdecd0-c4fb-47eb-9070-b63353878092
AlexFalzone/Uni
2 Anno/1 Semestre/Algoritmi/Laboratorio/01_Heap/Heap/StandardHeap/Heap.cpp
#include <iostream> using namespace std; //Template of the Priority Queue template <class T> class PriorityQueue { public: virtual T* extract() = 0; virtual PriorityQueue<T>* enqueue(T x) = 0; virtual T compare(T* a, T* b) = 0; virtual void printKey(int i) const = 0; }; //BinaryHeap template ...
ALGO
0.999527
4.340755
5206ee71-e052-4862-b542-3e5278df3b3e
Malboro-ya/MindSpore-Vit-base
research/cv/fairmot/infer/mxbase/src/PostProcess/FairmotMindsporePost.cpp
#define BOOST_BIND_GLOBAL_PLACEHOLDERS #include "FairmotMindsporePost.h" #include <dirent.h> #include <float.h> #include <stdio.h> #include <stdlib.h> #include <iostream> #include <memory> #include <string> #include <boost/property_tree/json_parser.hpp> #include <opencv2/core/hal/hal.hpp> #include <opencv2/opencv.hpp>...
ALGO
0.989674
4.891503
fd359659-758e-4db8-83c5-a0e4d5172c1a
Oakenshield-Su/leetcode-codelist
leetcode-51.cpp
/** * 题解:N皇后问题 * 回溯剪枝 **/ class Solution { public: vector<vector<string>> solveNQueens(int n) { vector<vector<string>> res; vector<int> seq(n); //N皇后全排列序列 vector<bool> visited(n, false); //回溯N皇后序列 solveNQueensDFS(res, seq, visited, 0, n); return res; } /...
ALGO
0.999838
5.302865
28dbf9ce-2a5f-4df7-9c25-9971703c737b
brighthush/algorithms
acm-icpc/simple/leet-regular-experession-matching.cpp
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; class Solution { public: bool isMatch(string s, string p) { return dfsMatch(s, p, 0, 0); } bool dfsMatch(const string &s, const string &p, int beg1, int beg2) { if(beg1==s.size() && beg2==p.size()) return true; ...
ALGO
0.999576
3.708228
b0baf179-71f1-40c1-aa4e-7621d7fe447e
ishandutta2007/codeforces
benq/normal/801/B.cpp
#include <bits/stdc++.h> using namespace std; //using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; //typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set; #define FOR(i, a, b) for (int i=a; i<b; i++) #define F0R(i, a) for ...
ALGO
0.999991
4.077316
3fa8c7e0-ae40-4b4c-aa39-cd5f3926070d
ankushlohiya001/algo_cpp
test/searching_test.cpp
#include "binary.hpp" #include "insertion_sort.hpp" #include <iostream> int main() { int *items = new int[]{1, 5, 34, 23, 123, 45}; binary_insertion_sort(items, 6); // 1 5 23 34 45 123 for (int i = 0; i < 6; i++) { std::cout << items[i] << ", "; } std::cout << std::endl; return 0; }
ALGO
0.999563
4.87966
b88d27a8-2c0f-4dbc-9eed-1cc6f94e51ce
hrishabh123/-6Companies30days
1st Company/8.cpp
class Solution { public: int solver(string s, int pos, vector<int> &dp) { if(pos>=s.size()) return 1; if(dp[pos]==-1) { string temp; int i,j,n,k,count=0; temp.push_back(s[pos]); if(stoi(temp)==0) return 0; n = stoi(temp); ...
ALGO
0.999977
5.451462
4f877c84-6657-4f8f-bbd9-675625585f5e
Shasha0309/LeetCode
0044-wildcard-matching/0044-wildcard-matching.cpp
class Solution { bool solve(string&p ,int j){ for(int ii=1;ii<=j;ii++){ if(p[ii-1]!='*') return false; } return true; } public: bool isMatch(string s, string p) { int n = s.size(); int m = p.size(); vector<vector<bool>> dp(n+1,vector...
ALGO
0.999991
5.025474
f014677d-87ac-4469-80ae-db840762af16
Xie-Minghui/ACM
BFS-Valid BFS.cpp
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 2e5 + 100; int n = 0; vector<vector<int> > mp(maxn); int vis[maxn],id[maxn],num[maxn],ans[maxn]; bool cmp(int x,int y){//ձŴС return id[x] < id[y]; } void bfs(){ queue<int> que; que.push(1); vis[1] = 1; int cnt = 0; ans[++cnt] = 1...
ALGO
0.999982
3.791401
6317c1cc-3f26-4144-89ac-1a0c95a84fd7
tarunsilam07/LEETCODE
3379-score-of-a-string/score-of-a-string.cpp
class Solution { public: int scoreOfString(string s) { int n=s.size(); int sum=0; for(int i=0;i<n-1;i++) { sum+=abs((int)s[i]-(int)s[i+1]); } return sum; } };
ALGO
0.999934
5.434978
bf7156ad-3f37-4656-817c-355ddf00d451
AndradeB91/PreprocessedFiltering
eigen/lapack/lu.cpp
#include "common.h" #include <Eigen/LU> // computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges EIGEN_LAPACK_FUNC(getrf,(int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info)) { *info = 0; if(*m<0) *info = -1; else if(*n<0) ...
ALGO
0.998595
5.816968
02802c26-ed7e-4fec-9383-20bf84b86987
TheTrustyPwo/CP
CodeForces/1927/B/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<int> g[200005]; void test_case(int test) { int n; cin >> n; for (int i = 0; i <= n; i++) g[i].clear(); for (int i = 25; i >= 0; i--) g[0].push_back(i); string s = ""; for (int i = 0; i < n; i++) { int x; cin >> x; ...
ALGO
0.999584
4.626882
8eb6a733-0d0b-4f6b-a352-29b8fbe0accf
balanikaran/GCFL_Immersion_GLAU
6-June-2019/Pattern_G4.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int size; cin >> size; int mid = (size - 1)/2; for (int i = 0; i < size; i++){ ...
ALGO
0.99995
3.652748
0c27f21c-21ee-4708-a1c6-07ef3272d2ef
wsc-0816/StudyGuide-C-plus-plus
start/5-single-dataType-number.cpp
/* This file is about the single data type with single variable Basic concepts: For the computer memory, the basic unit is bit. One bit includes 2 numbers, 1 and 0. This is the reason why we always say that computer is the binary system. If we have 8 bits, for the different combinations, we will have 256 combonations....
TOOL
0.863515
3.601142