uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5418881f-5ee5-44d6-a15e-7fd63c156638
Drago96/cpp-data-structures-homeworks
CppHomework2/tasks1-4/tasks1-4.cpp
#include <iostream> #include "graph.cpp" #include "llist.cpp" //helper functions template <typename T> void addRibs(graph<T>& g, T from, T to) { g.addRib(from, to); g.addRib(to, from); } template <typename T> bool contains(LList<T> & list, T x) { list.IterStart(); elem_link1<T>* p; while ((p = list.Iter())) { ...
ALGO
0.997046
4.635172
32a016fe-5825-4dac-af3d-64b6b84c3290
bruna-anunciacao/beecrowd
c++/1009.cpp
#include <bits/stdc++.h> using namespace std; double calculo(double s, double t){ return s + (t * 0.15); } int main() { string name; double s, t; cin >> name >> s >> t; cout << "TOTAL = R$ " << fixed << setprecision(2) << calculo(s, t) << endl; return 0; }
ALGO
0.996835
4.924921
a3cf9e0c-af8e-4ce3-94ce-f2c5e03e42e5
revng/ui-qt-creator
src/libs/3rdparty/botan/src/lib/math/numbertheory/numthry.cpp
#include <botan/numthry.h> #include <botan/pow_mod.h> #include <botan/reducer.h> #include <botan/monty.h> #include <botan/rng.h> #include <botan/internal/bit_ops.h> #include <botan/internal/mp_core.h> #include <botan/internal/ct_utils.h> #include <botan/internal/monty_exp.h> #include <botan/internal/primality.h> #inclu...
ALGO
0.998423
6.319372
688f465a-140d-4991-917f-5494e0c26082
sssteeefaaan/DS-Priprema-20-21
MPI/24.01.2019/a.cpp
//#include <mpi.h> //#include <stdlib.h> //#include <stdio.h> // //int main(int argc, char** argv) //{ // int rank, size, root = 0; // int* a = nullptr, * b = nullptr, // * local_a = nullptr, * local_b = nullptr, // * dist_a = nullptr, * dist_b = nullptr; // int m, l, scal, local_scal; // // MPI_Init(&argc, &argv); /...
ALGO
0.999725
3.12947
5e1ce5a0-7b52-4acc-8929-2cee18294b4c
sayakbanerjee1999/Coding-Notes
C++/GreedyCPP/minNumberofTaps.cpp
LEETCODE - 1326 class Solution { public: int minTaps(int n, vector<int>& ranges) { int min = 0; int max = 0; int open = 0; while(max < n){ for(int i = 0; i <= n; i++){ if((i - ranges[i]) <= min && (i + ranges[i]) > max){ max...
ALGO
0.999925
6.075807
e6292e97-c39e-44e4-b3c7-c639b0540ddd
ppengtang/ESMIR
include/features/lbp_mex.cpp
#include "mex.h" #include <float.h> #include <math.h> #include <memory.h> #include <stdio.h> #include "mex.h" #ifndef M_PI #define M_PI 3.1415926 #endif /* Compare a value pointed to by 'ptr' to the 'center' value and * increment pointer. Comparison is made by masking the most * significant bit of an integer (the ...
ALGO
0.999801
5.422715
18311721-2736-41f1-8952-caa64a9e5b6f
It4innovations/espreso
src/omitted/feti/generic/utils.cpp
#include "utils.h" #include "esinfo/mpiinfo.h" #include "esinfo/eslog.hpp" #include "basis/utilities/utils.h" #include <sstream> #include <fstream> #include <cstring> #include <complex> #include "mkl.h" #include <limits> #include <cmath> using std::endl; namespace espreso { // ************************************...
TOOL
0.934528
4.137918
3b39ffa0-3afa-462f-8158-2c1838287b01
stskeeps/HyCC
src/cbmc/src/solvers/flattening/boolbv_constant.cpp
/*******************************************************************\ Module: Author: Daniel Kroening, <EMAIL> \*******************************************************************/ #include "boolbv.h" bvt boolbvt::convert_constant(const constant_exprt &expr) { std::size_t width=boolbv_width(expr.type()); if(w...
ALGO
0.948072
7.085355
cb5f9cc3-142d-49ba-99c8-ce8df238b2bd
priyam3955/Interview-Prep
1439-find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/1439-find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows.cpp
class Solution { public: int kthSmallest(vector<vector<int>>& mat, int k) { using pi = pair<int, vector<int>>; priority_queue<pi, vector<pi>, greater<pi>> pq; int m = mat.size(), sum = 0; int n = mat[0].size(), curSum = 0; vector<int> v(m, 0); for(int i=0; i<...
ALGO
0.999998
5.826219
326e0924-b636-477a-bcf7-66b797fd274f
abhay121kumar/c---with-pw
Friend Question/1stnonrepeatingchar.cpp
#include<iostream> using namespace std; #include<map> //right code class Solution { public: //Function to find the first non-repeating character in a string. char nonrepeatingCharacter(string s) { //Your code here map<char,int> ourMap; for(int i=0;i<s.length();i++){ if(o...
ALGO
0.999643
4.492274
24b3c70c-6c40-432c-b431-cbeafa4a0b55
hojoon0205/Problem-Solving
Competition/Codeforces/Rounds/1316/b.cpp
#include<bits/stdc++.h> using namespace std; int n; char str[10010]; char ans[10010]; char tmp[10010]; int ansk; int main() { int tt, T; scanf("%d", &T); for(tt=1; tt<=T; ++tt){ scanf("%d", &n); scanf("%s", str); ans[n] = tmp[n] = 0; strcpy(ans, str); ansk=1; for(in...
ALGO
0.999953
3.443903
e22facb0-0818-4efc-9a2d-eb3461299c8e
kmjp/procon
codeforce/801-850/827/c4.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.998123
4.33772
f93de410-8769-4f66-bf5d-37448a761abd
alex6446/ProgrammingStuff
C++/NeuralNetworks/Perceptron/Backpropagation/src/Neuron.cpp
#include "Neuron.h" #include <random> #include <cmath> #include <iostream> Neuron::Neuron () : out(1), weights(nullptr) {} Neuron::~Neuron () { delete[] this->weights; } void Neuron::init (int T, Neuron* neurons) { this->T = T; this->neurons = neurons; this->delta = 0; this->weights = new double[T]; for (i...
ALGO
0.972635
4.504037
98c891d7-e24b-4e09-b6b4-98e8705db23a
shreyasingh2302vl10/SimpleRiscAssembler
assembler.cpp
#include<bits/stdc++.h> #include <windows.h> using namespace std; void first(vector<string>&v,vector<string>&current){ for(int i=1;i<v.size();i++){ // Check if it is like R0, R1, #25 etc. if(v[i][0] =='R'){ // Register like R0, R1 int a = stoi(v[i].substr(1)); // Convert ...
ALGO
0.997666
4.388855
6060b3a3-dfac-45dc-bbe5-e79c55d55fa3
petemus/BAEKJOON
Project1/SetAndMap_5.cpp
// հ > 5. ī 2 // base 1 ߺ ȴٴ ٸ.. // ⺻ set -> ߺ X // multiset -> ߺ // sol1> multiset => ð ʰ // sol12> map ؼ value ߺǴ // Ǽ :: count() ӵ . why??? #include <iostream> #include <set> #include <map> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n;...
ALGO
0.999919
4.328359
1d1970d6-3399-4186-9e9f-2ec0d198b2d2
JackChuengQAQ/SubgraphMatchingSurvey
vlabel/matching/ReassignLabel.cpp
#include <cassert> #include <algorithm> #include <vector> #include <fstream> #include <iostream> #include <sstream> #include <chrono> #include <tuple> #include <random> using namespace std; int main(int argc, char *argv[]) { string input_vertex_num(argv[1]); string input_label_num(argv[2]); string output...
DATA
0.921222
4.224998
30983b6a-302e-45e2-825d-a659825becf4
brianpark0415/practical4
main-2-2.cpp
#include <iostream> #include <stdlib.h> using namespace std; extern int max_sub_sum(int *nums,int length); int main(int argc, char **argv){ int array[10] = {-1,3,7,-2,4,9,-6,1,-8,5}; cout << max_sub_sum(array,10) << endl; return 0; }
ALGO
0.991606
4.263256
18c11ea8-8ff4-4a36-929d-3503b2b71b2b
hzc1111/opencv
modules/imgproc/src/resize.sse4_1.cpp
/* //////////////////////////////////////////////////////////////////// // // Geometrical transforms on images and matrices: rotation, zoom etc. // // */ #include "precomp.hpp" #include "resize.hpp" namespace cv { namespace opt_SSE4_1 { class resizeNNInvokerSSE2 : public ParallelLoopBody { public: resizeNNI...
ALGO
0.981456
6.967784
49009c0e-d3d2-4061-9f66-3e8a7f7495a7
vusec/stickytags
llvm-project/llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
#include "llvm/CodeGen/GlobalISel/CSEMIRBuilder.h" #include "llvm/CodeGen/GlobalISel/CSEInfo.h" #include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h" #include "llvm/CodeGen/GlobalISel/Utils.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/IR/DebugInfoMetadata.h" using namespace llvm; bool CSEMIRBuil...
ALGO
0.989661
7.889601
a2f11b62-5b70-42ee-81fc-c24d8cb6547d
gradientspace/UnrealMeshProcessingTools
UE4.24/IGLMeshProcessingProject/Plugins/MeshProcessingPlugin/ThirdParty/libigl/include/igl/mosek/mosek_linprog.cpp
IGL_INLINE bool igl::mosek::mosek_linprog( const Eigen::VectorXd & c, const Eigen::SparseMatrix<double> & A, const Eigen::VectorXd & lc, const Eigen::VectorXd & uc, const Eigen::VectorXd & lx, const Eigen::VectorXd & ux, Eigen::VectorXd & x) { // variables for mosek task, env and result code MSKenv_t ...
ALGO
0.998931
6.541717
e942bf22-273d-43b8-9d68-bbbb80522040
danshved/aoc
2023/12/a.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <map> #include <optional> #include <set> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #include "numbers.h" #include "order.h" #include "parse.h" int main() ...
ALGO
0.999858
4.596746
c965a213-0a4d-4e62-a5b9-570984c70fac
sinanshamsudheen/leetcodes
binaryString.cpp
int n = s1.length(); int m = s2.length(); int carry = 0; // To keep track of the carry string res = ""; // Result string int i = n - 1, j = m - 1; // Traverse both strings from the rightmost bit while (i >= 0 || j >= 0 || carry) { int bit1 = (i >= 0) ? s1[i]...
ALGO
0.99984
6.033688
d1c7245d-1471-42e9-90ba-71b3d7ef2bd1
LLstream/atcoder
devote-oneself/abc157-b.cpp
#include <bits/stdc++.h> #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; using mint = modint998244353; #endif using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep1(i, s, n) for (ll i = s; i < n; i++) int main() { vector<vector<ll>> ...
ALGO
0.999968
4.295951
c55f8f12-a91a-44f3-9c8a-e865e4b567b5
ashokabairwaideology/Leet-code-problem
solution/1800-1899/1865.Finding Pairs With a Certain Sum/Solution.cpp
class FindSumPairs { public: FindSumPairs(vector<int>& nums1, vector<int>& nums2) { this->nums1 = nums1; this->nums2 = nums2; for (int& v : nums2) { ++cnt[v]; } } void add(int index, int val) { int old = nums2[index]; --cnt[old]; ++cnt[old...
ALGO
0.999971
6.032467
daa36694-c9b8-48ea-b1a6-5f4223545c50
tde-nico/cses
intro/missing_number/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { bitset<200001> nums; int n, num; cin >> n; for (int i = 0; i < n; ++i) { cin >> num; nums[num - 1] = true; } for (int i = 0; i < n; ++i) { if (!nums[i]) { cout << i + 1 << "\n"; break; } } return 0; }
ALGO
0.999692
3.788581
c87ce9a1-1f3e-4119-a054-17bc8a248f21
baptuDenjer/Competitive-Programming
Kattis/C++/PalindromeSubstring.cpp
#include<iostream> #include<map> #include<vector> #include<set> #include<unordered_set> #include<unordered_map> #include<list> #include<string> #include<algorithm> #include<cmath> #include<iterator> #include<cstring> #include<stack> #include<queue> #include<bitset> #include<climits> #include<sstream> #include<iomanip> ...
ALGO
0.999949
3.92814
cbecd562-aff1-45d3-b973-f5272b4ee402
arthurmaahes/EternalGen
src/bitcoin-cli.cpp
#if defined(HAVE_CONFIG_H) #include "config/bitcoin-config.h" #endif #include "chainparamsbase.h" #include "clientversion.h" #include "fs.h" #include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" #include "utilstrencodings.h" #include <stdio.h> #include <event2/buffer.h> #include <event2/keyvalq_struct....
WEB
0.981312
6.494398
0a839a27-5b76-489b-bce9-23b9d0671431
Priybhanu99/My-Codes
rectangle cutting.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define P pair<int,int> #define pb push_back #define F first #define S second int dp[500][500]; int solve(int x,int y){ if(x==y){ return 0; } if(dp[x][y]!=-1){ return dp[x][y]; } int temp = min(x,y); return dp[x][y] = 1 + solve(temp,...
ALGO
0.999867
4.007987
09769c20-8247-456c-b608-8599603a717b
AsesinoAKg/Competitive-programming
MELTGOLD.cpp
//shree ganeshay namah #include <bits/stdc++.h> using namespace std; #define ll long long #define pi (3.141592653589) #define mod 1000000007 #define ll long long #define float double #define pb push_back #define mp make_pair #define ff first #define ss second #define all(c) c.begin(), c.end() #define min3(a, b, c) min(...
ALGO
0.999971
3.902431
0c206469-99ff-488d-9371-65df5fdb180d
TM-Tareq/Phitron-Problem-Solving
Batch 7/C++/M 1 Basic C++/4_EOF.cpp
#include<iostream> using namespace std; int main() { int x; while(cin >> x) { cout << x << endl; } }
ALGO
0.99521
3.00967
213dfa35-dbea-4fca-8a25-502d5847a779
LKJhouji/my-knowledge-repository
并查集.cpp
//路径压缩 int n = 1005; // n根据题目中节点数量而定,一般比节点数量大一点就好 vector<int> a = vector<int> (n, 0); // C++里的一种数组结构 // 并查集初始化 void init() { for (int i = 0; i < n; ++i) { a[i] = i; } } // 并查集里寻根的过程 int find(int u) { return u == a[u] ? u : a[u] = find(a[u]); // 路径压缩 } // 判断 u 和 v是否找到同一个根 bool isSame(int u, int v) ...
ALGO
0.999938
4.403673
6456dbc7-8f7d-49b0-a63a-3b60047977fa
Curthaldor/godot-3.6
thirdparty/recastnavigation/Recast/Source/RecastRasterization.cpp
#include <math.h> #include <stdio.h> #include "Recast.h" #include "RecastAlloc.h" #include "RecastAssert.h" /// Check whether two bounding boxes overlap /// /// @param[in] aMin Min axis extents of bounding box A /// @param[in] aMax Max axis extents of bounding box A /// @param[in] bMin Min axis extents of bounding box...
ALGO
0.988454
4.657124
c3cd6e3b-2959-4594-9d02-3ecc0ade74ab
luishhatashita/1d_solver
src/time-marching.cpp
#include <iostream> #include <cmath> #include <format> #include "array.h" #include "allocate.h" #include "io.h" using namespace std; void setInitialSolution(int n, double*& y, double*& u) { for (int i=0; i<n; i++) { u[i] = y[i] + sin(M_PI*y[i]); } } /* Function to compute local time step based on st...
ALGO
0.999983
6.032572
a1feabc3-3397-4d2d-8e4c-5944e8c77853
ishandutta2007/codeforces
iandehaan/normal/1278/D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; #define pb push_back #define mp make_pair #define MAXN 500010 int par[MAXN]; int getPa...
ALGO
0.999997
4.43524
00aad80f-210d-4e6a-8841-9586ab438fa2
nimishmedatwal/dsa
C++/functionn/function.cpp
#include <iostream> using namespace std; int factorial(int num1){ int temp=num1; for (int i=2; i<num1 ;i++){ temp=temp*i; } return temp; } int main(){ cout<<factorial(5); return 0; }
ALGO
0.999453
4.047925
7ce2c141-32e0-4405-abe1-b879226c2e44
ishandutta2007/codeforces
ifsmirnov/normal/354/C.cpp
#include <functional> #include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include <cassert> #include <numeric> #include <sstream> #include <string> #include <vector> #include <cstdio> #include <ctime> #include <map> #include <set> using namespace std; #define forn(i, n) for (int i = 0; i < (...
ALGO
0.999989
3.705491
da3d8e7f-08b2-43a0-9411-5ad51bf021ca
Kunakbaev/CustomCompiler
SyntaxTree/source/syntaxTree.cpp
#include <stdlib.h> #include <inttypes.h> #include "../include/syntaxTree.hpp" #include "../../Dumper/include/dumper.hpp" #include "../include/commonFileStart.hpp" const size_t MIN_MEM_BUFF_SIZE = 8; const size_t MAX_OBJ_NAME_LEN = 30; static void initMemBuff(SyntaxTree* tree) { assert(tree != NULL); for (...
TOOL
0.866769
5.789739
491055b5-739e-43c7-81be-b2cf72388cfa
CSI-SRM-NCR-Chapter/100-Days-of-Code
ridam krishna/day47/47a.cpp
class Solution { public: int findPoisonedDuration(vector<int>& timeSeries, int duration) { int n=timeSeries.size(); int res=0; if(n==1) return duration; for(int i=0; i<n; i++) { if(i+1<n) if(timeSeries[i+1]>timeSeries[i]+duration-1) res=res+duration; ...
ALGO
0.999821
6.450827
4d1149b2-21b8-4ad1-b4cf-49bcc1015ffc
inzamam-ul/DSA-SETUP
src/@Striver SDE Sheet/day6/fourSumLeetCode.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> res; if(nums.empty() == 0) return res; int n = nums.size(); sort(nums.begin(), nums.end()); for(int i = 0; i<n; i++){ int target3 = target - nums[i]; for(i...
ALGO
0.999852
5.470545
756cf8e7-0a58-439c-b576-0d353ae342d5
nishant-sachdeva/cpp-practice-examples
code/6_3.cpp
#include<bits/stdc++.h> std::vector<int> multiply( std::vector<int>num1, std::vector<int>num2){ const int sign = (num1.front() < 0) ^ (num2.front() < 0); num1.front() = abs(num1.front()); num2.front() = abs(num2.front()); std::vector<int> result(num1.size() + num2.size(), 0); // now we start the ...
ALGO
0.999991
4.983961
2e3c02b4-ba53-4904-8d6b-763ab77c6782
anoshak/EPI---Stacks-and-Queues
EPI - Stacks and Queues/Q3_Paranthesis.cpp
/* * Q3_Paranthesis.cpp * * Created on: Nov 16, 2015 * Author: Anoshak */ #include "common_utils.h" class Solution { public: bool isValid(string s) { stack<char> mystack; for(int i=0; i<s.length() ; i++) { if(s[i] == '(' || s[i] == '{' || s[i] == '[') ...
ALGO
0.998802
5.975105
8c915bb4-b5f2-4c80-851f-d0776c486dba
A0L0XIIV/ITU_Undergrad_Projects
BLG 233E (Data Structures)/Lab/9/tree.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include <ctime> using namespace std; struct node{ int index,sum,mn,mx,num; struct node *left,*right; }*root; int N; int *ar; void update( node *p ){ if( p->left && p->right ){ p->num=1+p->left->num+p->right->num; p->sum=...
ALGO
0.997998
3.948648
bd1766e6-3965-452c-8f94-3075b76d5133
SnoopyCodes/code
cf/randomq/meximizescore.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 998244353; ll exp(ll x, int p) { ll res = 1; while (p > 0) { if (p & 1) { res = res * x % MOD; } x = x * x % MOD; p /= 2; } return res; } void solve() { int N; cin >> N; vector<int> A(...
ALGO
0.999982
5.329745
ba81ba41-b550-4066-867f-79e9a194871e
Lyuyk/Compile-Principle-Course-Labs
GPProcessor/ndfa.cpp
#include "ndfa.h" #include <QDebug> NDFA::NDFA() { NFAStateNum=0;//状态创建计数 DFAStateNum=0; mDFAStateNum=0; OpCharSet.clear(); dividedSet->clear(); NFAG.startNode=NULL; NFAG.endNode=NULL; DFAG.endCharSet.clear(); DFAG.endStates.clear(); mDFAG.endCharSet.clear(); mDFAG.endState...
ALGO
0.995577
3.618486
71da4c70-7442-42ab-afa7-6b7ff776e628
ipc-sim/ipc-toolkit
tests/src/tests/barrier/test_adaptive_stiffness.cpp
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_approx.hpp> #include <catch2/generators/catch_generators_range.hpp> #include <ipc/barrier/adaptive_stiffness.hpp> #include <ipc/collisions/normal/normal_collisions.hpp> #include <igl/edges.h> using namespace ipc; TEST_CASE("Initial barrier stiffness", "...
TEST
0.884337
6.951063
ea4f2f97-f52a-441e-b0c0-4395ed8435f0
iamsaquib2508/Competitive-Programminng
Codeforces/CF 1295 B.cpp
#include<bits/stdc++.h> #define ffr(i,a,b) for(i=a;i<b;i++) #define ffrr(i,a,b) for(i=a;i<=b;i++) #define mm(a,b) memset(a,b,sizeof(a)) #define PI acos(-1.0) #define pb push_back #define ll long long int #define pf printf #define MMX 1000000009 using namespace std; map<int,int> mp; ll modd(ll a, ll b) { if(b<0) ...
ALGO
0.999659
3.896018
1559e196-97cc-483c-9425-079d7d8f55b5
Whituru/BAEKJOON_OnlineJudge
2785.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <array> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; vector<int> v; int tmp; for(int i=0; i<N; i++) { cin >> tmp; v.push_back...
ALGO
0.999785
4.659096
cf9a57bc-2ec4-4857-b58b-15e2ddd0f6e1
encounter/dawn-cmake
third_party/vulkan-deps/spirv-tools/src/source/fuzz/fuzzer_pass_outline_functions.cpp
#include "source/fuzz/fuzzer_pass_outline_functions.h" #include <vector> #include "source/fuzz/fuzzer_util.h" #include "source/fuzz/instruction_descriptor.h" #include "source/fuzz/transformation_outline_function.h" #include "source/fuzz/transformation_split_block.h" namespace spvtools { namespace fuzz { FuzzerPassO...
TOOL
0.920643
7.832681
daeda377-8dbc-4aff-b065-00b2264f61a9
divyansh884/Leetcode
1621-number-of-subsequences-that-satisfy-the-given-sum-condition/1621-number-of-subsequences-that-satisfy-the-given-sum-condition.cpp
class Solution { public: int numSubseq(vector<int>& nums, int target) { int MOD = 1e9 + 7; sort(nums.begin(), nums.end()); int n = nums.size(); vector<int> power(n, 1); for (int i = 1; i < n; ++i) { power[i] = (power[i - 1] * 2) % MOD; } int i = 0...
ALGO
0.999997
6.334173
87684a43-318e-43ca-b876-9e501a88be0f
rajatverma23/SDE-Problems
pascal_traingle_one.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> result(numRows); for(int i = 0; i < numRows; i++) { result[i].resize(i+1); result[i][0] = result[i][i] = 1; for(int j = 1; j < i; j++) ...
ALGO
0.999957
6.005173
072ad2a8-ae89-4910-b8ca-49a8fad58bec
heesangh/spmm-llm-optimization
optim4/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
#include <iostream> #include <Eigen/Dense> int main() { Eigen::Matrix3f A; Eigen::Vector3f b; A << 1, 2, 3, 4, 5, 6, 7, 8, 10; b << 3, 3, 4; std::cout << "Here is the matrix A:\n" << A << std::endl; std::cout << "Here is the vector b:\n" << b << std::endl; Eigen::Vector3f x = A.colPivHouseholderQr().solv...
ALGO
0.999929
3.528523
22dd3176-2923-4dc2-a722-8e6deba2ab87
feyhide/DSA_Practice
heap/basics.cpp
#include<iostream> using namespace std; class heap { public: int arr[100]; int size; heap() { size = 0; arr[0] = -1; } void insert(int val) { size++; int index = size; arr[index] = val; while (index > 1) {...
ALGO
0.999913
4.901166
aad016f1-bc8c-4652-b6c2-6d241ebad9c6
jacob-zhoupeng/thinkincpp
ch13/Stack11.cpp
//: C13:Stack11.cpp {0} // New version of Stack #include "Stack11.h" void *Stack::pop() { if (head == NULL) { return NULL; } void *result = head->data; link *oldHead = head; head = head->next; delete oldHead; return result; } Stack::~Stack() { link *cursor = head; while...
TOOL
0.929551
3.896839
a2bf24b0-7df3-465e-87b7-5068480f4089
JakobEnglhauser/Advent-of-Code
2015/15/main.cpp
#include <iostream> #include <array> #include <fstream> #include <vector> #include <algorithm> using solutionType = unsigned long; constexpr unsigned char spoons = 100; constexpr unsigned int calorieTarget = 500; struct Ingredient { int const capacity; int const durability; int const flavor; int const texture; ...
ALGO
0.993788
4.642001
5dd043e0-98b4-4e1b-8447-59ee9cf24b79
shyu61/program-competition
code/contest/abc400/d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using P = pair<int, int>; const int INF = 1001001001; // 初見でどうやったら解けるか // 到達可能性問題だが、本質的には最短距離を問われているので、最短路問題として考える // そうすると、壊す壁の個数を重みとしたedgeを持つグラフとしてグリッドを表現すれば良いことが思いつける // 常に「最終的に求めるものは何か?」を考えると本質的な問題の性質が見える const vector<in...
ALGO
0.999785
4.723419
b49607fe-7152-4791-91aa-97c28467be32
satwik104/LeetCode_Questions
287-find-the-duplicate-number/287-find-the-duplicate-number.cpp
class Solution { public: int findDuplicate(vector<int>& nums) { //simple approach can be with hash map //another can be sort the array and then find adjecent easily by arr[i]==arr[i+1] //it will work in O(nlogn)+O(n) complexity //another approach is using frequency array bu...
ALGO
0.999989
5.674894
fec061a2-f878-4003-a73e-89488a65641b
SanskarSinghiit/Data-Structures-and-Algorithms-Accepted-solutions
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.cpp
class Solution { public: vector <int> dijkstra(int src, vector<vector<int>> adj[], int n) { // vector<int> // since we need unexplored node with smallest time, we will use pq, ; // if clash between two or more, choose any of them; // why pq, as it may change the order of bfs, ...
ALGO
0.999986
6.142803
db9c603e-c08d-476a-adf6-d9faea822f38
mohamedhamiid/DataStructure
CPP/Algorithm/02- BinarySearch/main.cpp
#include <iostream> #include <assert.h> using namespace std; /**************** Binary Search ******************/ /* Algorithm: Find element in SORTED array */ /* by dividing by 2 and compare the value with */ /* each half */ /* Complexity => O(logn) ...
ALGO
0.999816
6.167219
f85ee5a5-19d9-44ac-ac96-bd01ec18d310
Ankush12217540/Data-Structure-And-Algiorithm-C-
4g.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"Enter any number: "; cin>>n; int i=1; int sum=1; while (i<=n) { int j=1; while (j<=i) { cout<<sum; sum=sum+1; j=j+1; } cout<<endl; i=i+1; ...
ALGO
0.999373
3.561305
c245ea41-5160-495f-b32e-cf07ae5fa82a
ishandutta2007/codeforces
frame233/normal/1320/E.cpp
// Author -- Frame #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #include<vector> #include<iostream> #include<queue> #define lowbit(x) ((x)&(-x)) #define Finline __inline__ __attribute__ ((always_inline)) #define DEBUG printf("Running on Line %d in Function %s\n",__LINE__,__...
ALGO
0.999978
3.96829
f779d7e7-f5ad-43e0-8751-c0d32a452e76
henriqueramosqs/CSES
Advanced Techniques/ParcelDelivery.cpp
#include <bits/stdc++.h> using namespace std; // #pragma GCC target("popcnt") #define sws ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define mp make_pair #define pb push_back #define rep(i, a, b) for (int i = a; i < b; i++) #define dbg(x) cout<<#x<<" "<<x<<endl; #define output(x) for(auto c:x){cout<...
ALGO
0.999651
3.843908
52811ed3-9bd6-4c73-88ec-d2d157093fb0
omsingh031/DSA
861-flipping-an-image/flipping-an-image.cpp
class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& image) { for (auto& row : image) { reverse(row.begin(), row.end()); for (int& pixel : row) { pixel ^= 1; } } return image; } };
ALGO
0.999723
6.749604
41745448-c5ce-4ee2-8db7-89273fc665b4
CodificandoAlonso/ARQUITECTURA
src/common/binario.cpp
// // Created by beto on 4/10/24. // #include "binario.hpp" #include <bitset> #include <cmath> #include <cstdint> #include <fstream> #include <iostream> static constexpr unsigned char BYTE = 8; static constexpr unsigned char FFF = 0xFF; static constexpr __uint16_t FFFF = 0xFFFF; using namespace std; uint8_t re...
DATA
0.945421
5.517406
9a15e28d-343d-4e92-9fc9-d58c4a0e32ec
JangIkhwan/BOJ-practice-2024
Jan/9252_3.cpp
/* 24-01-26 23:35 ~ 25:10 ݷ ABCABCABC ACABCC 4 ABCC */ #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; string A, B; int dp[1001][1001]; char result[1001]; void lcs() { int lcsLen = 0; bool found; //int prevJ = 0; for (int i = 1; i <= A.length(); i++) { found = fals...
ALGO
0.999983
4.613645
ef2c869d-37c9-47a9-9cd3-54c8ffbb0e10
Cheekybaby/leetcode
131-palindrome-partitioning/palindrome-partitioning.cpp
class Solution { public: // Global vector<vector<string>> ans; vector<string> temp; void solve(string &s, int index){ if (index >= s.length()) { ans.push_back(temp); return ; } for (int i=index; i<s.length(); i+=1){ if (isPalindrome(s, index,...
ALGO
0.999976
6.52522
9301c00a-fa42-4290-be76-9e7173e08a3a
Jha01Sarvjeet/Practice-Cpp
11_2D_Array/Assignment/4_largestElementIn2DArray.cpp
//program to find the largest element of a given 2D array of integers. #include<iostream> #include <bits/stdc++.h> using namespace std; int main(){ int m1, n1; cout << "enter number of rows of 1st array" << endl; cin >> m1; cout << "enter number of column of 1st array" << endl; cin >> n1; int arr...
ALGO
0.999296
3.955936
7c9b603a-b72a-491d-ae4e-744d0f3e809c
cheng-chi/bulletsim_source
lib/bullet-2.79/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
#include "btSoftRigidCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionShapes/btSphereShape.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "btSoftBody.h" #inc...
ALGO
0.989614
4.667078
3536a9b6-6816-4210-896f-5cdf417fc9d5
HarborDong/LeetCode
C++/3.Longest_SubString_Without_Repeating_Characters.cpp
class Solution { public: int lengthOfLongestSubstring(string s) { int index = 0, max = 0; int start = -1; int charIndex[256]; memset(charIndex, -1, sizeof(int)*256); while(s[index] != '\0') { if(start < charIndex[s[index]]) { s...
ALGO
0.99986
5.630025
26b1b550-243f-435e-a6f3-82b4d110481e
Muneef-10/2nd-Year
DaaLab/W7Q3.cpp
#include<bits/stdc++.h> using namespace std; int solve(int src,int dst,int &k,vector<int> &visited,int parent,int &cost) { if(k==0 && src==dst)return 0; } int main() { int vertex, edge; cout << "Enter number of vertices and edges:" << endl; cin >> vertex >> edge; vector<pair<int, int>> edges; // ...
ALGO
0.999981
4.884487
65273d21-0923-498a-b682-8a0c19a0310b
PhuocVinhLee/system_exam_quiz_programming
online_exam_system_backend/temp/aw553yz3.cpp
#include <stdio.h> int main() { int number1, number2, sum; printf("Enter two integers: "); scanf("%d %d", &number1, &number2); // calculate the sum sum = number1 + number2; printf("%d + %d = %d", number1, number2, sum); return 0; }
TOOL
0.986172
4.438632
0a55e492-dc9c-4b45-884a-aabe6fa5816a
fantianwen/leela13_training
src/Eigen/unsupported/doc/examples/MatrixSinh.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXf sinhA = A.sinh(); std::cout << "sinh(A) = \n" << sinhA << "\n\n"; MatrixXf coshA = A.cosh(); std::cout << "cosh(A) = \n"...
ALGO
0.985698
5.890235
3032de83-145b-4ffb-a853-a203eac42f85
Prashanto-Sutradhar/problem_solving_using_C_PlusPlus_language
2.4_for_loop.cpp
#include<iostream> using namespace std ; int main() { int n; cin>>n; int sum=0; for (int counter =1;counter<=n;counter++){ sum=sum+counter; } cout<<sum<<endl; return 0; }
ALGO
0.999105
4.158969
fbe0bb41-44a3-4c95-b1c5-0596bd795d17
ishandutta2007/codeforces
binary-grid-colouring/normal/28/A.cpp
// codeforces.cpp : // #include <cstdio> #include <iostream> #include <vector> #include <queue> using namespace std; int n,m; int x[567],y[567],ans[567]; queue<int>a[200010],c[200010]; int check(int k) { for(int i=0;i<200000;i++) a[i] = c[i]; for(int i=0;i<n;i++) { if(abs(i-k)%2==1) { ans[i] = -1;continue; ...
ALGO
0.999999
3.581019
19dcb00a-02f2-4c78-aedd-a9f950b44187
VuTienQuang/CTDL-GT
kiemtrachutrinh.cpp
#include<bits/stdc++.h> using namespace std; vector<int> adj[1001]; bool cxet[1001]; int n , m; void inp(){ memset(cxet , false , sizeof(cxet)); cin >> n >> m; for(int i = 1;i <= n;i++){ adj[i].clear(); } for(int i = 0;i < m;i++){ int x , y; cin >> x >> y; adj[x].push_back(y); adj[y].push_back(x); } }...
ALGO
0.999974
5.23254
00ca1281-80d9-4c2c-8fb7-0998dce78062
alibaba/nann
blaze-benchmark/thirdparty/boost_1_53_0/libs/phoenix/example/parallel_for.cpp
#include <boost/phoenix.hpp> struct omp_for_eval { typedef void result_type; template <typename Init, typename Cond, typename Step, typename Do, typename Context> result_type operator()( Init const& init , Cond const& cond , Step const& step , Do const& do_ , Context &...
ALGO
0.997747
5.904364
22d9324b-1915-4c22-b04c-56fa3855e76f
WeDot-Engine/WeDot
thirdparty/cvtt/ConvectionKernels_Util.cpp
#include "ConvectionKernels_Config.h" #if !defined(CVTT_SINGLE_FILE) || defined(CVTT_SINGLE_FILE_IMPL) #include "ConvectionKernels.h" #include "ConvectionKernels_ParallelMath.h" #include <algorithm> namespace cvtt { namespace Util { // Signed input blocks are converted into unsigned space, with the ...
TOOL
0.957687
6.37215
5942436e-e86c-47fc-be62-2d69b32ecb02
joelchaconcastillo/Codeforces
contests/914_Div2/B/main.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); int T; cin>>T; while(T--){ int n; cin>>n; vector<pair<long long, int>> ai(n); for(int i = 0 ; i< n ; i++){ cin>>ai[i].first; ai[i].second=i; } sort(ai.begin...
ALGO
0.999993
4.185524
14624d35-53e1-4581-a697-616c548b3f72
Shah-Shishir/Codeforces-Solutions
17A. Noldbach problem.cpp
/*** Bismillahir Rahmanir Rahim Read the name of Allah, who created you!!! Author : Shah Newaj Rabbi Shishir Department of CSE, City University, Bangladesh. ***/ #include <bits/stdc++.h> using namespace std; #define sf scanf #define pf printf #define ssf sscanf #defin...
ALGO
0.999966
3.928932
54a2c1dc-e143-49e5-822e-61a74c41be57
andrelbd1/algorithms-practice
solutions/sales-by-match/main.cpp
#include <bits/stdc++.h> using namespace std; int sockMerchant(int n, vector<int> ar) { if (ar.size() == 0) return 0; sort(ar.begin(), ar.end()); //O(nlogn) int count=0; int count_curr=0; int curr = ar.at(0); for (int i: ar) //O(n) { if (i == curr) count_cur...
ALGO
0.999867
4.79026
b7e4edb1-a4a0-46a4-b99f-218c1db844f0
thanhtri59/DangThanhTri_monC
Chapter 2/Program/vd22.cpp
// This program calculates the amount of pay that // will be contributed to a retirement plan if 5%, // 7%, or 10% of monthly pay is withheld. #include <iostream> using namespace std; int main() { // Variables to hold the monthly pay and the // amount of contribution. double monthlyPay = 6000.0, contribut...
ALGO
0.997159
3.881077
d08e1497-bc01-4ca0-90ab-0c39936be542
eecrazy/ACM
数据结构/后缀数组/1743 Musical Theme后缀数组.cpp
// 1743 Musical Theme不可重叠最长重复子串 #include <cstdio> #include <algorithm> #define INF 0x7FFFFFFF #define MAXN 20010 using namespace std; int a[MAXN]; int wa[MAXN], wb[MAXN], sa[MAXN], wv[MAXN], ws[MAXN]; int height[MAXN], Rank[MAXN]; inline bool cmp(int *r, int a, int b, int len) { return r[a] == r[b] && r[a + len] ==...
ALGO
0.999896
3.340044
1b8b18e8-a085-44ae-8429-cad4eee3a261
victorhugomarinocaproni/puctime-flutter-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
da89250c-46cd-496a-8523-ec8b0c9838c3
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/May/ModularEquation_20210509152747.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; int Modulo(int m,int a ,int b){ return (m % a) %b; } int main(){ int t; cin >> t; while(t--){ int n,m; cin >> n >> m; set<pair<int,int>> freq; for(int i = 1; i < n; i++){ for(int j = i + 1; j <...
ALGO
0.999646
3.965047
d801a1eb-50a4-403d-b03d-fe22dcf125a0
Adez017/30DAYSCHALLENGE
WEEK 2/Day 6/middle_of_LL.cpp
class Solution { public: ListNode* middleNode(ListNode* head) { //bruteforce approach if(head== NULL || head->next == NULL){ return head; } int cnt =0; ListNode* temp = head; while(temp!= NULL){ cnt++; temp = temp->next; } ...
ALGO
0.999929
5.84014
69ba26a8-6e48-4618-abef-354e9751b4df
hjf1997/Leetcode
Binary-Indexed-Tree/online-majority-element-in-subarray.cpp
#include <bits/stdc++.h> using namespace std; class MajorityChecker { public: MajorityChecker(vector<int>& arr) { } int query(int left, int right, int threshold) { } }; /** * Your MajorityChecker object will be instantiated and called as such: * MajorityChecker* obj = new Majo...
ALGO
0.999881
5.865943
3f36a0f8-b6aa-431f-aefc-08c16c648d15
Aayush1406/DSA-
Arrays/LargestSubarraywithKSum(OP).cpp
int maxLen(vector<int>& arr) { map<int, int> mpp; int len = 0, maxlen = 0; int sum = 0, k = 0; mpp[0] = -1; for(int i=0;i<arr.size();i++){ sum +=arr[i]; if(mpp.find(sum-k)!=mpp.end()){ len = i - mpp[sum-k]; ...
ALGO
0.999855
5.195623
fa9677cf-f0d3-483b-bbcb-349e356a5191
ZhangGroup-MITChemistry/Explicit_Ion_Chromatin
Code/example_lammps_src/MISC/fix_viscosity.cpp
/* ---------------------------------------------------------------------- Contributing author: Craig Tenney (UND) added support for swapping atoms of different masses ------------------------------------------------------------------------- */ #include <math.h> #include <mpi.h> #include <str...
ALGO
0.99859
5.233045
584554d0-c10c-46f5-818b-36fd6907f5cf
ShrutiUz/https-github.com-ShrutiUz-Leetcode-Problems
0554-brick-wall/0554-brick-wall.cpp
class Solution { public: int leastBricks(vector<vector<int>>& wall) { //create an unordered map which will store the frequency of each edge position unordered_map<int,int>mp; int max_freq = 0; for(int row = 0; row < wall.size(); row++){ int edgePos = 0; fo...
ALGO
0.999695
6.181181
a51cf0ab-3b8b-446b-8a37-77d2412b2ff1
reiya0104/AtCoder
APG4b/Chapter3/Ex22_Sort_by_second_value.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; using pii = pair<int, int>; vector<pii> data(N, make_pair(0, 0)); for (pii &v: data) { cin >> v.second >> v.first; } sort(data.begin(), data.end()); for (pii &v: data) { v = make_pair(v.second, v...
ALGO
0.999797
4.056647
a74af69f-2d9f-4b73-828a-e0754659ed05
chiseungii/baekjoon
02444.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; for (int i = 1; i < N + 1; i++) { for (int j = 0; j < N - i; j++) cout << ' '; for (int j = 0; j < i * 2 - 1; j++) cout << '*'; cout << endl; } for (int i = N - 1; i >= 1; i--) { for (int j = 0; j < N - i; j++) cout << ' '; ...
ALGO
0.999972
3.870954
59634472-af81-4a6a-9d17-56acac7d18ff
danmxli/leetcode
cpp/743-network-delay-time.cpp
#include <iostream> #include <print> #include <vector> #include <queue> #include <functional> #include <algorithm> #include <climits> using namespace std; class Solution { public: int networkDelayTime(vector<vector<int>> &times, int n, int k) { // weighted, directed graph - nodes are 1-indexed ...
ALGO
0.999981
6.160035
f9b90ee9-682f-4dff-8f49-5ea4faf6a5b1
mk28r/Code-
DoubleString.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ld long double #define nline "\n" #define ff first #define ss second #define pb push_back #define int long long #define fl(i,k,n) ...
ALGO
0.999933
4.426589
413dcd34-aa87-4122-9537-c80cd0d07bbd
TranNgoc-Giang/bai_tap_cuoi_ki
Chapter 2/Chapter 2/Program 2-28.cpp
#include <iostream> using namespace std; int main() { // Constants const double PI = 3.14159; const double DIAMETER = 10.0; // Variable to hold the circumference double circumference; // Calculate the circumference circumference = PI * DIAMETER; // Display the circumference cout ...
ALGO
0.989048
5.541478
23a75670-53f8-4cf6-80de-061a1833d807
Nih1tGupta/Leetcode-GFG
3884-minimum-absolute-difference-in-sliding-submatrix/3884-minimum-absolute-difference-in-sliding-submatrix.cpp
class Solution { public: vector<vector<int>> minAbsDiff(vector<vector<int>>& grid, int k) { int m = grid.size(); int n = grid[0].size(); vector<vector<int>> ans(m - k + 1, vector<int>(n - k + 1)); for (int i = 0; i <= m - k; ++i) { for (int j = 0; j <= n - k; ++j) { ...
ALGO
0.9999
6.40523
6cc5e312-6635-49fd-8ccb-ed2f62102e8d
logan0501/LeetCode-solutions
111-minimum-depth-of-binary-tree/111-minimum-depth-of-binary-tree.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.999882
6.594437
80239168-8d85-4017-8f4c-189a1138f33f
dongxiaofu/leetcode-practise
stack/103/01/Solution.cpp
// // Created by chugang on 2020/7/8. // // https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/ #include "Solution.h" vector<vector<int>> Solution::zigzagLevelOrder(TreeNode *root) { vector<vector<int>> result; if (root == NULL) { return result; } stack<TreeNode *> S1; ...
ALGO
0.999922
6.379128
6a3ff77f-81a0-4e70-9812-de258bd204b5
deepak789657/private
pattern printing/new_pattern.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"enter number :"; cin>>n; // for upper trangle; for(int i=0;i<=n;++i){ for(int j=0;j<i;++j){ cout<<"*"; } cout<<endl; } // for lower trangle for(int k=1;k<=n-1;k++){ for(int j=...
ALGO
0.999926
3.459733
878033b3-445e-464a-9548-3785e12596fa
illillli/codes
toj/toj_17.cpp
#include<iostream> using namespace std; int main() { string str[26] = { "A", "ABA", "ABCBA", "ABCDCBA", "ABCDEDCBA", "ABCDEFEDCBA", "ABCDEFGFEDCBA", "ABCDEFGHGFEDCBA", "ABCDEFGHIHGFEDCBA", "ABCDEFGHIJIHGFEDCBA", "ABCDEFGHIJKJIHGFEDCBA", "ABCDEFGHIJKLKJIHGFEDCBA", ...
ALGO
0.999401
3.146657
43868d61-c6e5-4380-8a1e-ce92774cf485
DarriMT/ExamPrep
FinalExam_2021_CodeBase/cpp_finalexam/B1/main.cpp
#include <iostream> #include <string.h> using namespace std; bool compare_strings(char *s1, char *s2){ int smaller = strlen(s1) < strlen(s2) ? strlen(s1) : strlen(s2); int bigger = strlen(s1) > strlen(s2) ? strlen(s1) : strlen(s2); int count = 0; int difference = bigger - smaller; cout << "The str...
ALGO
0.999239
4.496229
599437b9-ada4-4ba8-b10d-ea935245db22
venum61/-mro-viim31-Ivanov-Veniamin-Nikolaevi3
src/lab2/eigen3/failtest/qr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { HouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.919445
3.076401