uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6f8ba9a5-0559-425c-bf76-4e4279eccf19
vishwasrajbatham/Graph-Series
cycleCheckUGDfs.cpp
#include<bits/stdc++.h> using namespace std; // o- based indexing code class Solution { public: bool checkForCycle(int node, int parent, vector<int> &vis, vector<int> adj[]) { vis[node] = 1; for(auto it: adj[node]) { if(!vis[it]) { if(checkForCycle(it, node, vis, adj...
ALGO
0.999945
5.817303
cc2f1145-ea6a-44db-8db7-1d25d4b81e2d
bytedance/terark-zip
3rdparty/boost-include/libs/math/src/tr1/assoc_legendrel.cpp
extern "C" long double BOOST_MATH_TR1_DECL boost_assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) BOOST_MATH_C99_THROW_SPEC { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); }
TOOL
0.992783
4.163469
e010e274-5073-4d5b-ad8d-b074797b1771
RiyaShankar19/third_semester_programming_in_c-
Week_6_9.cpp
/* C++ Program to check Palindrome using function overloading */ #include<iostream> #include<string.h> using namespace std; class func { public: void pal(int ); void pal(char c[]); }; void func :: pal(int n) { int n1,sum,a; n1=n; sum=0; do ...
ALGO
0.981519
5.434904
b9a1c69a-83e2-462e-b1f3-0912dd66bd08
alzhu1/advent-of-code
2019/c++/day18/solution2.cpp
#include <algorithm> #include <deque> #include <iostream> #include <fstream> #include <limits> #include <string> #include <sstream> #include <unordered_map> #include <unordered_set> #include <vector> #include "stdlib.h" // https://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x template <class ...
ALGO
0.999755
5.323355
5676cecb-6884-4b45-8f2d-646e9aba05a0
dede1751/algolab
Exam/P2/MadTeaParty/src/algorithm.cpp
#include <limits> #include <iostream> #include <iomanip> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/push_relabel_max_flow.hpp> #include <boost/tuple/tuple.hpp> typedef boost::adjacency_list_traits<boost::ve...
ALGO
0.999727
5.073118
744325b8-2152-4648-9f2c-c76e1a816993
Survedog/MultiThreading
Source/Thread.cpp
#include <iostream> #include <thread> #include <vector> using namespace std; const int N = 100000000; const int THREADS = 100; void Sum(vector<int8_t>::iterator start, vector<int8_t>::iterator end, int& result) { result = 0; for (auto iter = start; iter != end; ++iter) result += *iter; printf("[T...
ALGO
0.999545
4.354406
5740e15d-cf94-46b4-bee4-a71374442c26
geniousisme/leetCode
C++/251-missingNumber.cpp
class Solution { public: int missingNumber(vector<int>& nums) { int length = nums.size() + 1; int sum = (length * (length - 1)) / 2, realSum = 0; for (int i = 0; i < nums.size(); i++) { realSum += nums[i]; }; return sum - realSum; } };
ALGO
0.999805
5.738733
643e59e7-db2b-4e0b-8235-36eb4be6f7cc
Yuuuuuu-xue/DataStructures_and_Algorithms
hashing/find_players_with_zero_or_one_losses/solution.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> findWinners(vector<vector<int>>& matches) { unordered_map<int, int> m; for (vector<int>& match : matches) { if (m.find(match[0]) == m.end()) { m[match[0]] = 0; } if (m.find(match[1]) == m.en...
ALGO
0.999965
5.490407
05675c4d-4345-4d08-8634-3faa85e6a390
IcyGlaceon/GAT350
ThirdParty/glm/test/core/core_func_matrix.cpp
#include <glm/matrix.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/ulp.hpp> #include <glm/gtc/epsilon.hpp> #include <glm/gtc/constants.hpp> #include <vector> #include <ctime> #include <cstdio> using namespace glm; int test_matrixCompMult() { int Error(0); { mat2 m(0, 1, 2, 3); mat2 n = matrixC...
TEST
0.94616
6.693093
280b7023-8329-4ba1-bb87-fec235ec0b6b
MQHANAD/Shopping-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
794a4bda-d314-4954-b408-fb67123a3b09
ExorEmbedded/libencloud
src/common/config.cpp
#include <encloud/Utils> #include <common/config.h> #include <common/helpers.h> namespace libencloud { // // public methods // /* Set defaults from defaults.h definitions */ Config::Config () : sysSettings(NULL) { QString sep = "/"; QString progFiles = getBinDir(); #ifndef LIBENCLOUD_SPLITDEPS // abso...
CONFIG
0.878674
6.448377
68329ba5-1110-4092-a7bf-6a6fa236b7e2
SanjogBelose/DS-Algo
LinkedList/singly.cpp
#include<iostream> using namespace std; struct Node { int data; Node *address; }; class SinglyLinkedList{ Node *head; public: SinglyLinkedList(){ head = NULL; } void insert(int val){ Node *new_node = new Node; // *new_node is node like head which is storing the memory ...
ALGO
0.995389
3.531136
78cc8f30-30b5-4c6a-8392-2ea7bb2ffb4c
Poonam-Singh13/dsa
c tutorials/Recursion/friendsPairing.cpp
#include<iostream> using namespace std; int friendsPairing(int n){ if(n==1 || n==2){ return n; } return friendsPairing(n-1)+(n-1)*friendsPairing(n-2); } int main(){ cout<<friendsPairing(4); return 0; }
ALGO
0.999956
4.440142
f7e2b8f7-446d-41de-9f3d-e6c7ebb26889
qsstcl/SJTU-cpp-Tutorial
labs/4-for.cpp
#include <iostream> // I can only do caculation under ten // and I hate 5 // input a Number N // calculate from 1 to N // BUT!!! // 1. Encounter with number over 10, toooo hard, i can't solve it.quit // 2. Encounter with number 5, I hateeee it!! Do not add it. int main() { int N; std::cout << "请输入一个正整数 N:"; ...
ALGO
0.998657
3.700922
15b722ba-adf2-480c-b577-eadabdc704d9
paboAYUSHI/90daysOfCODE
recursion6.cpp
#include<iostream> using namespace std; bool prime(int number , int i){ if(number<=2){ return (number==2) ?true:false; } else if(number%2==0) return false; else if(i*i>number) return true; return prime(number,i+1); } int main(){ if(prime(15,2)) cout<<"true"; els...
ALGO
0.999817
4.086912
3c762a6c-da98-401d-a107-221304ce8423
hokaso/OJ100
00温度.cpp
#include<stdio.h> int main () { double ce,fa; while(scanf("%lf",&fa)!=EOF){ ce=5.00*(fa-32.00)/9.00; printf("%.2f\n",ce); } return 0; }
ALGO
0.986864
3.021483
e8812c0c-2ed0-41d8-962f-343adbdee25f
ktr03rtk/study-algorithm
atcoder.jp/abs/abc085_c/Main.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i <= (int)(n); i++) using namespace std; int main() { int n, y, a = -1, b = -1, c = -1; cin >> n >> y; rep(i, n) { rep(j, n - i) { int total = 10000 * i + 5000 * j + 1000 * (n - i - j); if (total == y) { a = i; b = j, c...
ALGO
0.999825
3.162435
adcdfda9-e4c7-4b98-b4c6-08cf2661d48f
MOHAMED141414/Embedded_Linux
02c++/02_Derived/task2.cpp
// create a function to search to the number in the array which number is taken from user #include <bits/stdc++.h> int search_num(int arr[],int size_,int num) { int i, y=0; for(i=0;i<size_;i++) { if(arr[i] == num) { y=arr[i]; } } return y; } int main() { int ...
ALGO
0.99967
4.942899
7df76bcd-c71d-4a19-98eb-35f111824566
Aman007-dev/Competitive-programming
Cpp by Sanket sir/Matrix2dPathsRecursion.cpp
/*You are given a 2d matrix of dimension(n*m). You will start from top left cell and you want to go to bottom right. At each point you can move either right or down. Print and count all possible paths. */ #include<bits/stdc++.h> using namespace std; int total_path=0; void maze_path(int i,int j,int m,int n,string osf){...
ALGO
0.999436
3.033358
ba597fd4-c250-4294-b9c4-25b78287b628
ishandutta2007/codeforces
ronnie007/normal/1467/C.cpp
#include<bits/stdc++.h> using namespace std ; #define MAXN 300007 int n[ 3 ] ; int a[ 3 ][ MAXN ] ; long long tot[ 3 ] ; void input ( ) { for ( int i = 0 ; i < 3 ; ++ i ) { cin >> n[ i ] ; } for ( int i = 0 ; i < 3 ; ++ i ) { for ( int j = 0 ; j < n[ i ] ; ++ j ) { cin >> a[ ...
ALGO
0.999979
3.527993
dd8be013-809c-4d45-8695-009954e389d0
jhonnySarmaLegend/Striver-SDE
Day 1 : Arrays/3_NextPermutation.cpp
/* Question Link --> https://leetcode.com/problems/next-permutation/description/ */ // METHOD 1 --> Using inbuilt function void nextPermutation(vector<int>& nums) { next_permutation(nums.begin(), nums.end()); } // METHOD 2 --> Optimal Way // T.C. = O(3N) , S.C. = O(1) void nextPermutation(vector<int>...
ALGO
0.999985
5.968606
7e5b964c-80b2-4056-8008-e2e203ade888
lh2024W/OOP_15
OOP_15/OOP_15.cpp
// OOP_14.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> #include <vector> using namespace std; class Animal {}; class Herbivore : public Animal { protected: bool alive = true; public: virtual bool IsAlive() { return alive; } virtual...
TOOL
0.857655
5.470845
62d992da-1681-402d-a0b0-d5da609bdd18
Ravi-kumar178/DSA
practice/minimizeMaximumPairSumInArray.cpp
class Solution { public: int minPairSum(vector<int>& nums) { sort(nums.begin(),nums.end()); int i = 0; int j = nums.size()-1; int result = INT_MIN; while(i < j){ int sum = nums[i]+nums[j]; result = max(result,sum); i++; j--; } ...
ALGO
0.999988
6.048914
6c063877-d416-4498-8c53-1cf57c2c48eb
prinagangani/audio_player
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
248328b6-4222-4bc8-a6ef-2d68b360cd7d
teamFLT/floater
FloaterMath/include/Vector3f.cpp
#include "../../FloaterUtil/include/FloaterMacro.h" #include "Vector3f.h" flt::Vector3f flt::Vector3f::Lerp(const Vector3f& v0, const Vector3f& v1, float t) noexcept { ASSERT(t >= 0.0f && t <= 1.0f, ""); return v0 + (v1 - v0) * t; }
ALGO
0.954578
6.28161
846d0f04-d4ab-44a1-913c-95afc6d1ec6d
USunOfBeach/legacy
dep/g3dlite/source/Welder.cpp
/** \file Welder.cpp \author Morgan McGuire, Kyle Whitson, Corey Taylor \created 2008-07-30 \edited 2011-07-04 */ #include "G3D/platform.h" #include "G3D/Vector2.h" #include "G3D/Vector3.h" #include "G3D/Sphere.h" #include "G3D/PointHashGrid.h" #include "G3D/Welder.h" #include "G3D/Stopwatch.h" // for profilin...
TOOL
0.98047
7.77295
a9c720fc-65e8-454f-aef1-84997e28d94f
shohirose/advection-equation-1d
src/fromm.cpp
#include <Eigen/Core> #include "cfd/cfd.hpp" #include "common.hpp" namespace cfd { using Simulator = ScalarAdvectionEquationSimulator< RoeRiemannSolver, FrommSpacialReconstructor, ExplicitEulerScheme>; } int main(int argc, char** argv) { using Eigen::VectorXd; namespace fs = std::filesystem; const auto ...
ALGO
0.989767
5.466239
4f372388-58e6-41ff-a532-d5177bcb6fa5
regitabish/competitive-programming
leetCode/arai60/75.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==nullptr)return false; ListNode* fast = head; ListNode* slow = head;...
ALGO
0.999706
5.349268
029f6451-06a4-43f1-a34f-5908b2b2ed82
ishandutta2007/codeforces
l7-56/normal/1051/F.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; typedef pair <ll, ll> pll; const ll maxn = 1e5 + 10; ll n,m,d,q; struct Edge { ll v,w,nxt; }e[maxn << 1]; ll h[maxn],cnt_e; void add(ll x, ll y, ll z) { e[++cnt_e] = {y, z, h[x]}; h[x] = cnt_e; } ll dep[maxn],len[maxn],fa[maxn][20]; vector <ll> V;...
ALGO
0.999988
4.853443
cc195c02-4cea-47e6-8bd0-2c14a5f756bd
NachoCM/CarND-Path-Planning
src/Eigen-3.3/doc/examples/DenseBase_template_int_middleCols.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl; return 0; }
ALGO
0.887526
3.154174
76740def-9481-4b30-8e08-e5d8428c3867
jcarlson23/gpumalware
instruction-contents/util.cpp
#include "util.h" #define MIN( x,y ) (x) > (y) ? (y) : (x) using std::string; using std::vector; vector<string> split_line( const string& line ) { vector<string> tokens; string sub; size_t pos = 0, prev_pos = 0, len = line.length(); pos = line.find(" ",prev_pos); while ( pos != string::npos ) { ...
TOOL
0.991785
4.982375
28d549f9-3eb2-422a-a4ae-bf85d90d48e2
raushanprabhakar1/mahindraMPC
control_mahindra/src1/MPC.cpp
#include "MPC.h" #include <cppad/cppad.hpp> #include <cppad/ipopt/solve.hpp> #include "Eigen-3.3/Eigen/Core" using CppAD::AD; // Timestep length and duration size_t N = 10; double dt = 0.1; // This value assumes the model presented in thes classroom is used. // // It was obtained by measuring the radius formed by ru...
ALGO
0.999842
5.197291
7c53165a-6a93-41ca-ab4f-3299133737b0
Nikita110602/-CrackYourPlacement
DP/Maximum_Product_SubArray.CPP
class Solution { public: vector<vector<int>> buildMatrix(int k, vector<vector<int>>& rowConditions, vector<vector<int>>& colConditions) { vector<vector<int>> rowGraph(k + 1), colGraph(k + 1); for (auto& rc : rowConditions) { rowGraph[rc[0]].push_back(rc[1]); } for (auto& ...
ALGO
0.999986
6.071414
5e1ebd2a-85fa-4bd1-831b-36787c4565d1
Altu-Bitu/Altu-Bitu_seoyeon
10월 15일- DFS,BFS/1697.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const int SIZE = 1e5; //(0 ≤ N ≤ 100,000) int bfs(int n, int k) { vector<int> check(SIZE + 1, 0); queue<int> q; //큐에 좌푯값 저장 int ans = 0; //최단 시간 check[n] = 1; //시작 노드 방문 체크 q.push(n); //시작 노드 초기화 while (!q.empty()) { ...
ALGO
0.99987
4.917656
bcb18d3f-107c-42c2-9421-1d032b4fe7a5
Mephisto1024/MFST_Engine
Engine/Source/ThirdParty/ICU/icu4c-64_1/source/i18n/numparse_stringsegment.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING // Allow implicit conversion from char16_t* to UnicodeString for this file: // Helpful in toString methods and elsewhere. #define UNISTR_FROM_STRING_EXPLICIT #include "numparse_types.h" #include "numparse_stringsegment.h" #include "putilimp.h" #include "unicode/...
TOOL
0.952342
7.547309
8d96a510-caa8-4b9a-9b3e-2a1ad82cebfd
LonxunQuantum/Lammps_for_PWMLFF
lammps_neigh_mlff_20230508/src/KOKKOS/pair_lj_class2_kokkos.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ #include "pair_lj_class2_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" #inc...
ALGO
0.988934
7.146228
2d0c21a5-a512-4ef3-a063-cb42520d2831
whale2002/datastructure-and-algorithm
bjfu_oj/AlgorithmDesignandAnalysis/6.six/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; char add, del, rep1, rep2; int a, b, c; string tmp, sub; int i = 1; while(cin >> s) { cin >> add >> a; // 添加字母 cin >> del; cin >> rep1 >> rep2; cin >> b >> c; cin >> sub; cout << "Case " << i << ":" << endl; s = s.substr(0, a)...
ALGO
0.996317
3.694473
c3c70736-f0dd-480f-82f1-6a4379884c4b
Anonymous-solver/codingWithCpp
time.cpp
#include <stdio.h> #include <time.h> int main() { clock_t st=clock(); double cpu_time_used; int i,j,sum=0; for(j=1;j<=10000;j++) { for(i=1;i<=10000;i++) { sum++; } } clock_t en=clock(); cpu_time_used = ((double)(en- st)) / CLOCKS_PER_SEC; printf("...
ALGO
0.969968
3.15748
dfb70d1c-38e7-4407-99b7-e3abf3aa305c
drmeister/legacy-externals-clasp
boost/libs/numeric/ublas/doc/samples/vector_slice.cpp
#include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/vector_proxy.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; vector<double> v (3); vector_slice<vector<double> > vs (v, slice (0, 1, 3)); for (unsigned i = 0; i < vs.size (); ++ i) ...
ALGO
0.965678
3.141449
01a5186a-ccbb-4167-baf4-da34a085cf11
john6/CONTAIN
EIGENDIR/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.940268
5.865374
b8a05874-ea09-4361-ae75-16dbb1b2d1c5
HTDerekLiu/intrinsic-simplification
src/trace_geodesic.cpp
#include "trace_geodesic.h" #include <Eigen/Dense> #include <array> #include <iostream> #include <flatten_diamond_mesh.h> // geodesic tracing helpers namespace { using namespace Eigen; const double TRACE_EPS_TIGHT = 1e-12; const double TRACE_EPS_LOOSE = 1e-9; const bool TRACE_PRINT = false; do...
ALGO
0.999667
6.188343
b9118f82-2f85-4379-958e-16a9037c5524
Daniel-Byers-git/Computational-Physics-C---Code
Problem_1_Wk_16/Problem_1_Wk_16.cpp
#include <iostream> #include <fstream> #include <cmath> #include <vector> using namespace std; typedef vector <double> row; typedef vector <row> mat; int main() { double K = 237; // W / m*K double C = 900; // J / kg*K double p = 2700; // kg / m^3 double N = K / (C*p); // equals = 9.753e-5 // cout...
ALGO
0.999306
3.324411
882d9601-d216-4b43-b582-3a6329598313
WangYaohuii/CXL-SSD-Sim
src/systemc/tests/systemc/misc/sim_tests/biquad/biquad3/delay_line.cpp
/***************************************************************************** delay_line.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*************************************************************************...
ALGO
0.992904
5.923184
14dd9ef7-e6f0-4de0-be7f-6a7fa08a1b0e
selim121/CODEFORCES-PROBLEM
1772B.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int m,n,p,q; cin>>m>>n>>p>>q; if((m<n && p<q && m<p && n<q) || (p<q && m<n && p<m && q<n) || (n<m && q<p && n<q && m<p) || (n<m && q<p && q<n && p<m)){ cout<<"YES"<<endl; }else{ ...
ALGO
0.999645
3.649774
4a1a75a7-feb1-4682-9186-5518323d9064
ishandutta2007/codeforces
heaplax/normal/967/B.cpp
#include<map> #include<set> #include<queue> #include<stack> #include<cmath> #include<ctime> #include<bitset> #include<cstdio> #include<cstdlib> #include<cstring> #include<complex> #include<iostream> #include<algorithm> #define N 100001 #define int long long #define add_edge(u,v) nxt[++cnt]=head[u],head[u]=cnt,to[cnt]=v...
ALGO
0.999838
3.265383
3b99a58d-01b7-4576-bf56-95398aad9143
Cmput416F21/PyGlueTokenizer
CodeGen-main/data/transcoder_evaluation_gfg/cpp/STRING_CONTAINING_FIRST_LETTER_EVERY_WORD_GIVEN_STRING_SPACES.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; string f_gold ( string str ) { string result = ""; bool v = true; for ( int i = 0; i < str . length ( ); i ++ ) { if ( str [ i ] == ' ' ) v = true;...
ALGO
0.996068
4.776503
5e5a6b40-ed28-4d2c-b44b-ce2f9caf69b9
Domain-Cmap/assignments-day-1-to-day-9-Abhishek22BCS13366
Day 2/Hard/2.cpp
#include <bits/stdc++.h> using namespace std; int cherryPickup(vector<vector<int>>& grid) { int rows = grid.size(), cols = grid[0].size(); vector<vector<vector<int>>> dp(rows, vector<vector<int>>(cols, vector<int>(cols, -1))); dp[0][0][cols - 1] = grid[0][0] + (0 == cols - 1 ? 0 : grid[0][cols - 1]); ...
ALGO
0.999998
6.556742
8af7457d-f7ff-427d-b668-bdbe6ad50883
Shahbaz898414/Codeforces
Practice Question/CP sheet/Implementation Constructive (105=50)/A. Erasing Zeroes.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s; cin>>s; int c=0,k=0,m=0; for (int i = 0; i <s.length(); i++) { if(s[i]=='1'){ k=i; break; } } for (int i = s.length()...
ALGO
0.999936
4.471515
d6ef2518-61c5-4ac3-b211-ce353b398119
Noodle3D/ZCookie
algorithm/POJ/POJ3528 Ultimate Weapon.cpp
#include <cmath> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 505; const int INF = 990000; const double eps = 1e-8; int dblcmp(double x) { if (fabs(x) < eps) { return 0; } return x > 0 ? 1 : -1; } int dblcmp(double x, double y) { return db...
ALGO
0.999624
4.481848
c3bfa877-4246-4623-8428-c27ba6973ec4
tomo1010blue/AtCoder
ABC/ABC014/C.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define fi first #define se second #define repl(i, l, r) for (int i = l; i < r; ++i) #define rep(i, r) repl(i, 0, r) #define pb push_back #define eb emplace_back #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define sz(x) ((int) (x).size()) ...
ALGO
0.999934
4.296257
533dd098-6067-4418-90b1-6b97b20ba7bd
junxzm1990/x86-sok
gt/llvm/llvm-6.0.0/tools/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.general/p8.cpp
// RUN: %clang_cc1 -std=c++11 %s -verify // expected-no-diagnostics using size_t = decltype(sizeof(0)); template<typename T> struct check; template<size_t N> struct check<const char[N]> {}; constexpr bool startswith(const char *p, const char *q) { return !*q || (*p == *q && startswith(p + 1, q + 1)); } constexpr bo...
TEST
0.903463
6.935109
873182a7-2807-407b-8d9e-b529b5d98491
uranolais/Programas-C-EE-UFPI
questoes/listas de exercicios/lista 8/QUESTAO 6.cpp
/* 6) Escreva um programa que leia pares de valores positivos (use a funo leNaoNegativo). Imprima se os elementos de cada par so nmeros amigos (ou no). A leitura dos pares deve terminar quando o usurio digitar o par 0 e 0. Dois nmeros A e B so amigos se a soma dos divisores de A excluindo A igual a B e a soma dos d...
ALGO
0.998873
3.32342
b5199f61-05a0-4b8b-a3d4-c61b51322730
dhiru7890/cpp-learning
codes/bubblesort.cpp
#include<iostream> using namespace std; int main() { int arr[1000]; int n; cout << "Enter size of array n: "; cin >> n; cout << "Enter the elements: "; for (int i = 0; i < n; i++) { cin >> arr[i]; } // Bubble Sort for (int i = n - 2; i >= 0; i--) { bool swapped = ...
ALGO
0.999478
5.704205
b7b9626a-bc1a-415b-a04a-4114a0cc384d
Haidar008/data-stucture-and-algorithm
RECURSION/permutation_with_spaces.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void solve(int ind,string str,string res,vector<string>&ans){ if(ind==str.length()-1){ res+=str[ind]; ans.push_back(res); return; } solve(ind+1,str,res+str[ind]+" ",ans); solve(ind+1,str,res+str[ind],ans); } vector<s...
ALGO
0.999976
5.123341
f3ce5e60-3634-4a85-a8a9-084b336e2d47
Amanhacker/Aman-Barnwal-Leetcode-Solutions
1462-course-schedule-iv/1462-course-schedule-iv.cpp
class Solution { public: bool dfs(int node, int dest, unordered_map<int, vector<int>> &adj, vector<int> &vis) { if(node == dest) return true; if(vis[node] == 1) return false; vis[node] = 1; ...
ALGO
0.999938
5.767709
04e99675-7775-43d0-9a61-822630a6aa3a
alexandraback/datacollection
solutions_5706278382862336_0/C++/wangyc/a.cpp
#include <iostream> #include <cstdio> #include <fstream> #include <cmath> using namespace std; long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); } int main() { int T; freopen("a.in", "r", stdin); ofstream fout("a.out"); scanf("%d\n", &T); for (int t = 1; t <= T; ++t) { long long p...
ALGO
0.99926
3.568224
3f5556dd-0776-4365-80bd-604dd740a2c6
LittleYang0531/CQ-NOIP-2021
CQ-0117/sequence/sequence.cpp
/* wpcakioi */ #include<bits/stdc++.h> #define N 105 #define ll long long #define p 998244353 using namespace std; ll ans,n,m,k,v[N],f[40][62000],cf[31]; ll read() { ll x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-') f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { x=x*10+ch-48; ch=getchar(...
ALGO
0.99998
4.062464
c87c2d36-8be4-4370-8d73-a7086bf73694
beeplovsharma/DSA-Reboot
Recursion/3.Print all subsequences/Recursive Way/code.cpp
#include<bits/stdc++.h> using namespace std; void fun(int arr[],int n,int ind,vector<int>&ans){ if(ind==n){ for(auto x:ans) cout<<x<<" "; cout<<endl; if(ans.size()==0) cout<<"{}"<<endl; return; } // Pick this element from the array ans.push_back(arr[ind]); fun(arr,...
ALGO
0.999715
6.154855
f8f7e4d0-0c27-4876-99fb-079180ddb56b
xiaoxiaoxiaomi/NEU_CS5008_Data-Str-Algo-App
Lab1/Q2.cpp
#include<iostream> #include<math.h> using namespace std; const double CARTON_CAPACITY = 3.78; const double COST_OF_ONE_LITER = 0.38; const double PROFIT_ON_A_CARTON = 0.27; int main() { double amount; cout << "Enter the total amount of milk: " << endl; cin >> amount; int cartons; cartons = ceil(amount / C...
ALGO
0.996767
4.233076
a89bc728-fcbd-4c89-8fbe-07c4c8db8032
shivcodecf/leetcode-start-9-2-24
3619-adjacent-increasing-subarrays-detection-ii/adjacent-increasing-subarrays-detection-ii.cpp
class Solution { bool solve(vector<int>& pref, int mid) { for (int i = mid-1; i+mid<=pref.size()-1; i++) { if (pref[i] >= mid && pref[i + mid] >= mid) { return true; } } return false; } public: int maxIncreasingSubarrays(vector<int>& nums)...
ALGO
0.999987
5.716253
cebfa171-96e2-4eb9-a03e-ac4ab15f357e
Vector-013/CP-Vector013
Codeforces/CONTEST/894/894C.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <cmath> #include <cstdlib> #include <string> #include <numeric> #include <map> #include <queue> #define pb push_back #define pop pop_back using namespace std; typedef long long ll; using i64 = long long; typedef unsigned long long ull; t...
ALGO
0.99984
4.681275
c6a00dd5-aef8-4c9e-a8ae-665f8bd9f98c
qubka/DynoHook
src/core.cpp
#include <dynohook/core.h> #include <dynohook/os.h> #include <cstring> namespace dyno { size_t getPatternSize(const char* pattern) { const size_t l = std::strlen(pattern); // c = 2 * b + (b - 1) . 2 chars per byte + b - 1 spaces between return (l + 1) / 3; } uintptr_t findPattern(uintptr_t rangeStart, size_t...
TOOL
0.886526
5.83534
2a667e76-60b2-4080-bcf5-eccd667dbc12
Ownfos/Waffle
libraries/boost_1_72_0/libs/math/src/tr1/assoc_legendrel.cpp
extern "C" long double BOOST_MATH_TR1_DECL boost_assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) BOOST_MATH_C99_THROW_SPEC { return (m&1 ? -1 : 1) * c_policies::legendre_p BOOST_PREVENT_MACRO_SUBSTITUTION(l, m, x); }
TOOL
0.979107
4.163469
47a4abe8-a07b-466a-9a38-c7ad25097847
ArefinAlter/ProblemSolving
codeforces/1416/A.cpp
#include<bits/stdc++.h> using namespace std; const int N = 3e5 + 9; vector<int> a[N]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; for (int i = 1; i <= n; i++) { a[i] = vector<int>(1, 0); } for (int i = 1; i <= n; i++) { int k; cin >> k; ...
ALGO
0.999816
4.413456
2842f196-37ec-46f5-84aa-ca4b2d69e076
whadam/BOJ
CPP/3053/Source.cpp
#define _USE_MATH_DEFINES #include <iostream> #include <cmath> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); double r; cin >> r; cout << fixed; cout.precision(6); cout << M_PI * r * r << '\n' << 2 * r * r; return 0; }
ALGO
0.990069
3.741123
e212fd23-f754-423f-a66a-7ba7b2b367a5
xiaomanzi1/xunlian
p1317.cpp
#include <bits/stdc++.h> using namespace std; int n,m,a[100001],ans,k; int main() { scanf("%d",&n); for(int i=1;i<=n;i++)scanf("%d",&a[i]); int i=1; while(i<=n){ while(a[i]<=a[i-1]&&i<=n) i++; while(a[i]>=a[i-1]&&i<=n) i++; ans++; } printf("%d",ans-2); return 0; }
ALGO
0.999902
3.459314
f3345ef2-16c8-48f1-88d9-ab63018f5a34
mikita-zhuryk/comp-algebra
Gauss_Seidel/GaussSeidel.cpp
#include "GaussSeidel.h" using namespace CMA; GaussSeidel::GaussSeidel(size_t dim, int acc): Method(dim), accuracy(pow(10, acc)) { } void GaussSeidel::solve(ostream& out) { b = A.transpose() * b; A = A.transpose() * A; x = b; Vector<double> newX(n, 0); int k = 1; do { if (k != 1) { x = newX; } for (in...
ALGO
0.99979
5.531305
7f0b6358-1538-45bb-8927-badd447c18d9
MonalSD/Learn-C-
Array 2/q39.cpp
// Write a Program to Find the mean and median of an unsorted array. #include<iostream> using namespace std; int main() { int i,n,j,sum=0,temp; double a[100]; double mean,median; cout<<"Size of Array:"; cin>>n; cout<<"Insert Elements in Array:"; for(i=0;i<n;i++) { cin>>a[i]; ...
ALGO
0.999969
5.345682
ed1916ed-6910-4cfd-b30c-e05ade8bc219
dhruvarora23/DSA-Questions
Array/dupelements.cpp
#include <iostream> using namespace std; int removingdup(int arr[], int size){ int arr2[5] = {}; int index = 0; for(int i = 0; i < size-1; i++){ if(arr[i] != arr[i+1]){ arr2[index] = arr[i]; index++; } } for(int i = 0; i < index; i++){ cout << arr2[...
ALGO
0.999146
4.595235
4ceae300-b1dc-4836-9b14-3c9b524e294f
anulrajeev/pep
codes/arrays and strings/K Sum - Target Sum Unique Set/K Sum - Target Sum Unique Set.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<bool> vb; typedef vector<vb> vvb; typedef vector<string> vs; typedef vector<char> vc; typedef vector<vc> vv...
ALGO
0.999986
4.317481
cc295640-4c7f-4424-8b7b-6b3772f5cf46
iamrakesh28/Competitve-Programming
contest/sep/270A.cpp
#include <iostream> using namespace std; int keys[26]; int main() { int n, ans = 0; scanf("%d", &n); for (int i = 0; i < n - 1; ++i) { char a, A; scanf(" %c %c", &a, &A); keys[a - 'a']++; if (keys[A - 'A']) keys[A - 'A']--; else ans++; } printf("%d\n", ans); return 0; }
ALGO
0.999861
4.05619
2dae91e5-4811-49b7-acc1-56992606774a
Hendrik240298/PhD_SupplementaryCode
ROM_NSE/dealII/include/eigen-3.4.0/unsupported/doc/examples/MatrixPower_optimal.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { Matrix4cd A = Matrix4cd::Random(); MatrixPower<Matrix4cd> Apow(A); std::cout << "The matrix A is:\n" << A << "\n\n" "A^3.1 is:\n" << Apow(3.1) << "\n\n" "A^3.3 is:\n" << Apow(3.3) << "\n\n" ...
ALGO
0.998563
3.396939
b81a71b5-aabc-4ebd-bb98-f6de05fff8ff
josuerom/Competitive-Programming
Training/Codeforces/Round 112/Another Problem on Strings.cpp
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl #define fori(i,b,e) for (int i = (b); i < (e); ++i) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; const int oo = 1e9; int main() { ios_base::sync_with_stdio(false); cin.tie(0...
ALGO
0.99992
4.183725
fbec8257-0beb-4f4f-b4ff-ee342a8e5bde
ishandutta2007/codeforces
leopro/normal/1450/A.cpp
#include <bits/stdc++.h> namespace { using namespace std; #define int long long template<typename T> inline bool whitespace(const vector<T> &) { return false; } template<typename T> inline bool whitespace(const T &) { return true; } inline bool whitespace(const char) { return false; } t...
ALGO
0.999914
5.086796
a3e0a984-745b-4601-9bdb-7a28b3a8a952
TonuruRikkon/Tin-VL
2025/nguyenhongthai/09_04_2025/1014.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a1,b1,c1,a2,b2,c2; cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2; int max1=max(a1,max(b1,c1)); int max2=max(a2,max(b2,c2)); cout<<(a1+b1+c1-max1)+(a2+b2+c2-max2)+(abs(max1-max2)); }
ALGO
0.999788
3.64892
f0c7b29a-49cc-4de9-a8a2-be7f1dfbd96d
Lunaris-AOSP/external_cronet
tot/third_party/llvm-libc/src/src/math/generic/tanhf16.cpp
#include "src/math/tanhf16.h" #include "expxf16.h" #include "hdr/fenv_macros.h" #include "src/__support/CPP/array.h" #include "src/__support/FPUtil/FEnvImpl.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/PolyEval.h" #include "src/__support/FPUtil/cast.h" #include "src/__support/FPUtil/except...
ALGO
0.994173
7.521945
3499fbc6-b436-414a-bd88-582dbb95a494
dmkz/competitive-programming
acmp.ru/0177.cpp
/* Задача: 177. Склад Решение: моделирование, O(n*m) Автор: Дмитрий Козырев, github: dmkz, e-mail: <EMAIL> */ #include <bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define isz(x) (int)(x).size() typedef std::pair<int,int> pii; typedef std::vector<int> vi; typedef std::vector<vi> vvi; stru...
ALGO
0.999946
4.138094
97b66a7a-060b-4887-be13-b8b8df25b7ae
son-of-mountain/problem-solving
codeforces/.history/icpc_mansoura/session4/A- Max Box 2_20240908110407.cpp
#include<bits/stdc++.h> using namespace std; #define sonic ios_base::sync_with_stdio(false) ; cin.tie(NULL) ; cout.tie(NULL); // stopped at 1:04:37 /* approach : - first you should make a prefix array where results are stored - then , take two parameters that increments along the pre array - calculat...
ALGO
0.999933
3.606062
e563eaad-b7f4-438e-8175-903a21f7cbc6
himanshu062/leetcode-problems
1411-convert-binary-number-in-a-linked-list-to-integer/convert-binary-number-in-a-linked-list-to-integer.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: int getDecimalValue(L...
ALGO
0.999953
5.667543
9b08c39d-94f0-43ac-bc67-d992d8432cd5
OstinPower41016/weather_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.998859
6.785645
203def06-038f-4293-ba1c-cfb61a4a46ec
d3NNEb/NeuralAmpModeler-
eigen/failtest/jacobisvd_int.cpp
#include "../Eigen/SVD" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { JacobiSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
ALGO
0.948089
3.327923
8a0a61fd-3141-48cd-80c3-ffc2a400d7d0
JesseOgunlaja/CPlusPlus
FarenhiteToCelcius.cpp
#include <iostream> int main () { char temp; std::cout << "Type c for celsius to fahrenheit and f for fahrenheit to celsius "; std::cin >> temp; int temperature; std::cout << "TYpe in the temperature "; std::cin >> temperature; if (temp == 'c') { int answer = temperature * 9 / 5 + 3...
TOOL
0.881811
4.795622
731f5ec8-c137-474d-a8f8-c9d599819815
sejalsavasani-1914/Assignment_c_cpp_ds
assignment_cpp2.cpp
#include<iostream> using namespace std; class Matrix { int row,col; int mat1[10][10], mat2[10][10],sum[10][10],mul[10][10]; public: int no_rows() { cout<<"\nEnter no.of rows: "; cin>>row; return row; } int no_cols() { cout<<"Enter no. of columns: "; cin>>col; return col; } void SetElement(in...
ALGO
0.951375
3.642578
b953a6f4-6173-4e14-855e-9a48d9005446
lilhuang/quantum_circuit_decomp
src/view_decomposition.cpp
#include "simulate.h" #include "parser.h" #include <sstream> #include <iostream> #include <fstream> #include <cstdlib> #include <stdexcept> #include "graph_partition.h" #include "tensor_network.h" #include "clustering.h" #include "genetic_partitioning.h" void print_communication_cost(MultiCircuit multi_circ){ std:...
ALGO
0.999034
4.318351
972c267b-72e7-40db-aae0-9640e3a20ef9
firiexp/contest_log
codeforces/1249C.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::nu...
ALGO
0.999865
3.879296
6ac1e68d-2cc2-42ca-b698-e1b38b3f51f9
rahiaag/abcd
Difficulty Hard/Maximum of minimum for every window size/maximum-of-minimum-for-every-window-size.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> maxOfMins(vector<int>& arr) { stack<int>st; stack<int>st2; int n=arr.size(); vector<int>left(n,-1); vector<int>right(n,n); for...
ALGO
0.999881
6.542898
41b16e70-f873-4f94-bbc4-678fbe94a252
Sylar009/Scaler-Academy-Modules
Advanced DSA 1/Advanced DSA - Arrays 3 - Interview Problems/Homework/Q1. Next Permutation.cpp
/* Problem Description Implement the next permutation, which rearranges numbers into the numerically next greater permutation of numbers for a given array A of size N. If such arrangement is not possible, it must be rearranged as the lowest possible order, i.e., sorted in ascending order. NOTE: The replacement must ...
ALGO
0.99999
5.300046
0f81c312-ab0d-4528-b442-585b5e95e19b
Red-0111/Leetcode
2119-minimum-number-of-operations-to-make-array-continuous/2119-minimum-number-of-operations-to-make-array-continuous.cpp
class Solution { public: int minOperations(vector<int>& nums) { int n=nums.size(); int ans=n; unordered_set<int> mp; for(int x:nums) mp.insert(x); vector<int> uni(mp.begin(),mp.end()); sort(uni.begin(),uni.end()); int j=0; int m=uni.size(); ...
ALGO
0.999992
5.78566
da7c5486-782a-43ba-94fb-808bffaff610
wowoto9772/Hungry-Algorithm
LAVIDA/2404/solution.cpp
#include <stdio.h> int main() { int t; scanf("%d", &t); while (t--){ int n; scanf("%d", &n); for (int i = 1; i <= 9; i++)printf("%d x %d = %d\n", n, i, n*i); } }
ALGO
0.999037
3.741922
6d14c2f9-cde4-462a-89f8-19c4f33169a7
DominikWojtanowski/UMCS-PRZYGOTOWYWANIA
najwieksza mozliwa wartosc/main.cpp
#include <iostream> #include <algorithm> int ok(int wartosc) { return wartosc < 133 ? wartosc * 10 : 1; } int main() { int k{1}, prevk{1}, mid{}; if (ok(k) > ok(k + 1)) { std::cout << k << std::endl; return 0; } while (ok(k <<= 1) > ok(prevk)) prevk = k; while ((k...
ALGO
0.999821
3.971825
7bd5a59d-bffb-4b20-940d-6a146faca53c
ClaudioRaciti/BagattoEngine
Engine.cpp
#include "Engine.hpp" #include "Move.hpp" #include "MoveGenerator.hpp" #include "TT.hpp" #include "evaluation.hpp" #include "notation.hpp" #include "utils.hpp" #include <algorithm> #include <cassert> #include <chrono> #include <cstdint> #include <stdexcept> #include <vector> void Engine::resizeTT(int tMBSize) { s...
ALGO
0.992111
6.28195
1e64b4b1-7aed-48f5-9360-0d0f655a2e42
lovethiscode/boost
libs/mpi/example/string_cat.cpp
// An example using Boost.MPI's reduce() to concatenate strings. #include <boost/mpi.hpp> #include <iostream> #include <string> #include <boost/serialization/string.hpp> // Important for sending strings! namespace mpi = boost::mpi; /* Defining STRING_CONCAT_COMMUTATIVE lies to Boost.MPI by forcing it * to assume that...
ALGO
0.993536
6.371629
c3b6074b-44a0-48c6-9f9d-e79b4843af53
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_2018_7.cpp
#include <bits/stdc++.h> int n, m; int rooms[100]; double probs[60][60][60]; double dists[60][60][60]; double pascal(int n, int k) { double ans = 1.0; for (int i = 1; i <= n; i++) ans = ans * i; for (int j = 1; j <= k; j++) ans = ans / j; for (int j = 1; j <= (n - k); j++) ans = ans / j; return ans; } double ...
ALGO
0.999876
3.739437
69f8a501-506c-4b62-a213-a6271cee4e5a
chongrufan123/Cpp_Primer_Plus_Test
ch11/01-randwalk/randwalk.cpp
#include "vector.h" #include <iostream> #include <ctime> // for time() #include <cstdlib> // for rand() and srand() #include <fstream> using namespace std; using namespace VECTOR; int main(){ double dis, size; srand(time(0)); Vector step(0.0, 0.0); Vector result(0.0, 0.0); step.rect_mode(); res...
ALGO
0.979455
3.131731
a9496d0e-473b-4e2f-bdec-597357f823bd
urawa72/procon
atcorder/abc191/b/main.cpp
#include <bits/stdc++.h> using namespace std; #define ALL(v) v.begin(), v.end() #define V vector #define P pair using ll = long long; int main() { int n, x; cin >> n >> x; V<int> v(n); for(int i = 0; i < n; i++) cin >> v[i]; int c = 0; for(int i = 0; i < n; i++){ if(v[i] == x) { ...
ALGO
0.999973
3.89432
be206a62-20af-4570-a5c2-f7e4d360b92c
ankur-maheshwari/cpp
Linked-List-2/reverse-LL-iterative.cpp
#include <iostream> class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } }; using namespace std; Node *reverseLinkedList(Node *head) { // Write your code here if(head == NULL){ return head; } Node* current = head...
ALGO
0.999799
5.609708
68831859-59a8-402b-b6d9-6980a25f7f4a
MeGiorgi/untitled
examples/platform_channel/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.998851
6.785805
6b6e32a9-0c17-4b23-a100-a19a1d28128e
ra2003/Plagiarism
dataset/test/1466/24.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin>>n; int arr[n]; map<int,int>m; for(int i=0;i<n;i++) { cin>>arr[i]; } sort(arr,arr+n); for(int i=1;i<n;i++) { if(arr[i]<=arr[i-1]) arr[i]++; } for(int i=0;i<n...
ALGO
0.99895
4.974069
d4348ca7-2007-4522-840c-09c2a8dbcd8f
Vladimir855/Kangaroo-256-bit
Kangaroo.cpp
#include "Kangaroo.h" #include <fstream> #include "SECPK1/IntGroup.h" #include "Timer.h" #include <string.h> #define _USE_MATH_DEFINES #include <math.h> #include <memory> #include <algorithm> #ifndef WIN64 #include <pthread.h> #endif using namespace std; #define safe_delete_array(x) if(x) {delete[] x;x=NULL;} // ---...
ALGO
0.997669
4.309133
847b74b3-950d-4a81-845c-eecc501e02d1
Ryexocious/problemsolving
div3(855)/b.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vec; typedef map<char,int> mp; #define cy cout<<"YES"<<endl; #define cn cout<<"NO"<<endl; #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pb push_back #define pf pu...
ALGO
0.99992
4.247557