uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
48c16d79-c64f-41c4-8abe-e255bbbab646
ExpoSEJS/Z3
src/smt/cached_var_subst.cpp
#include "smt/cached_var_subst.h" #include "ast/rewriter/rewriter_def.h" bool cached_var_subst::key_eq_proc::operator()(cached_var_subst::key * k1, cached_var_subst::key * k2) const { if (k1->m_qa != k2->m_qa) return false; if (k1->m_num_bindings != k2->m_num_bindings) return false; for (un...
ALGO
0.980424
5.722855
21047915-8c5a-4528-b24b-445dd637ca9c
Akshay1299/UNI_Sol
2444-count-subarrays-with-fixed-bounds/2444-count-subarrays-with-fixed-bounds.cpp
class Solution { public: long long countSubarrays(vector<int>& nums, int minK, int maxK) { ios_base::sync_with_stdio(false); cin.tie(NULL); int n = nums.size(); int minPos = -1; int maxPos = -1; int left = 0; int right = 0; long long ans = 0; ...
ALGO
0.999861
5.235041
f932f2b6-fd16-4e97-98f9-36a22425f5c4
Fireking13/24W_GG3-Updated
Libraries/json/docs/examples/insert__count.cpp
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create a JSON array json v = {1, 2, 3, 4}; // insert number 7 copies of number 7 before number 3 auto new_pos = v.insert(v.begin() + 2, 7, 7); // output new array and result of insert call std::cout...
TOOL
0.942175
5.399159
8b43c96c-93b5-4c49-bf0d-d75d85a37da5
prydsn121/Dsa-practise
Excel Sheet column Title.cpp
class Solution { public: string convertToTitle(int A) { string s; while(A>0) { A--; int n=A%26; A/=26; s+='A'+n; } reverse(s.begin(),s.end()); return s; } };
ALGO
0.999935
6.003422
d2798d16-902e-4234-ae07-bbf2e641d2cd
sl1296/acm-code
fzu-2294-1 WrongAnswer.cpp
#include<cstdio> #include<cstring> #include<map> #include<string> #include<vector> using namespace std; #define ll long long vector<ll> ve; map<string,int> ma; const ll mod=1LL<<47; int cnt=1; int main(){ char op[50],va[50],vb[50]; ll v; ve.push_back(0); while(~scanf("%s",op)){ if(strcmp(op,"de...
ALGO
0.999615
3.825608
2b565efb-9c1f-4852-898d-164f806b2265
arasHi87/OnlineJudgeExercise
poj2752.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxN=4e5+10; int nxt[maxN], arr[maxN]; char sb[maxN]; void getNext(int len) { int j=0, k=-1; nxt[0]=-1; while (j<len) { if (k==-1 || sb[j]==sb[k]) nxt[++j]=++k; else k=nxt[k]; } } int main() { #ifdef...
ALGO
0.999965
3.658827
0a4c53d9-fdb5-4047-9ff4-220452fce716
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/maximum-of-absolute-value-expression-Solution.maxAbsValExpr/177870_nan.cpp
ztype(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref tnref; int code = array_get(imemory, op, (long)r_btype(op - 1), &tnref); if (code < 0) return code; if (!r_has_type(&tnref, t_name)) { /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { ...
ALGO
0.973342
5.132981
3a8f73b0-324b-4d3e-89e2-bf4c0bf73d66
aryangupta9680/DSA-Solved-Questions
Extra-Questions/Armstrong_Number.cpp
#include <iostream> #include <cmath> using namespace std; int countDigit(int n) { int count = 0; while (n) { count++; n /= 10; } return count; } bool Armstrong(int num, int digit) { int rem, n = num, ans = 0; while (n) { rem = n % 10; n /= 10; a...
ALGO
0.999939
5.230916
3da6f81c-3daa-40b7-85e5-94ee4377ca0a
mahim007/Online-Judge
contest/mbstu long contest 15-2-15/d.cpp
#include<bits/stdc++.h> using namespace std; #define i64 long long int struct data { i64 x1,y1,lok; bool operator < (const data &p) const { if(x1!=p.x1) return x1<p.x1; else return y1<p.y1; } }; vector<data>V; int main() { //freopen("inputfile.txt", "r", std...
ALGO
0.999784
3.912659
a53551a1-e69c-42c8-9c6b-da9fe2daed5f
TheoTheodorou/CinemaBaseX
CinemaBaseX/LinkedListMaterials.cpp
#include "stdafx.h" #include "LinkedListMaterials.h" //Default Constructor LinkedListMaterials::LinkedListMaterials() { } //This function loads the information stored on file into a newly generated linked list. //This linked list is exclusive for storing information about the materials. LinkedListMaterials::node* Lin...
TOOL
0.920338
4.506421
c5c4b010-3c44-428a-aa16-3b53ddc71a22
Italia2407/Mackerel-Engine
Mackerel-Core/ext/bullet3-master/examples/MultiBodyBaseline/MultiBodyBaseline.cpp
///create 125 (5x5x5) dynamic object #define ARRAY_SIZE_X 5 #define ARRAY_SIZE_Y 5 #define ARRAY_SIZE_Z 5 //maximum number of objects (and allow user to shoot additional boxes) #define MAX_PROXIES (ARRAY_SIZE_X * ARRAY_SIZE_Y * ARRAY_SIZE_Z + 1024) ///scaling of the objects (0.1 = 20 centimeter boxes ) #define SCALIN...
TOOL
0.937481
6.873039
ebea6d24-e2ec-460b-b76e-abc5f95e9864
Akriti1811/Competitive_Programming
peak_element_leetcode.cpp
/* A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞. You must write an algorithm that runs in O(log n)...
ALGO
0.999955
5.541651
f2fa8d9c-b5a7-49b5-8191-ae65866b3537
lj2759531/JaimeLuis_CIS5_Fall2017
Class/Craps/Craps_V3LJ/main.cpp
/* * File: main.cpp * Author: Luis Jaime * Created on Oct 16th, 2017, 8:05 AM * Purpose: Craps version 2 * Modified to add file-io */ //System Libraries #include <iostream> //Input/Output Stream Library #include <cstdlib> //Library set random number seed #include <ctime> //Libary to ...
ALGO
0.896987
4.236039
f421fc11-1a2f-4716-9df3-06cac04d6e43
lucianogiannini/Operating-Systems
lgianniniassignment3part3/main.cpp
#include <iostream> #include <main.h> #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ //#include <stdio.h> /* printf, fgets */ //#include <stdlib.h> #include <cmath> #include <bits/stdc++.h> //#include <ctime> using namespace st...
ALGO
0.999704
3.943406
62500959-44c7-482c-8b03-7bc86fb16139
Pulkit95700/Data-Structures-and-Algorithms-using-C-
Algorithms/SortingAlgorithms/CountSort.cpp
#include<iostream> using namespace std; void CountSort(int arr[], int n){ int minm = arr[0]; int maxm = arr[0]; for(int i=0; i<n; i++){ minm = min(minm, arr[i]); maxm = max(maxm, arr[i]); } if(minm < 0){ return; } int count_arr[maxm - minm + 1] = { 0 }; for(...
ALGO
0.999987
5.139814
7c5cc37d-c4ee-4499-9a2c-256c5e858d25
RealityVirtually2019/ComposAR
CNNServer/Fusion/3rdparty/libigl/include/igl/face_areas.cpp
template <typename DerivedV, typename DerivedT, typename DerivedA> IGL_INLINE void igl::face_areas( const Eigen::PlainObjectBase<DerivedV>& V, const Eigen::PlainObjectBase<DerivedT>& T, Eigen::PlainObjectBase<DerivedA>& A) { assert(T.cols() == 4); DerivedA L; edge_lengths(V,T,L); return face_areas(L,A); }...
ALGO
0.923167
5.898334
baa6e170-dc01-4126-8751-5889315d722f
delahee/hae_gp2_2019
mt_case_ia/Box2D/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
#include "Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h" #include "Box2D/Common/b2BlockAllocator.h" #include "Box2D/Dynamics/b2Fixture.h" #include <new> b2Contact* b2EdgeAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(...
TOOL
0.969895
6.816895
c3433820-168a-4b83-b8f1-a864c7e6bf40
johnrsibert/tagest
25-alpha/src/beta_pdf.cpp
//$Id: beta_pdf.cpp 3204 2014-08-18 01:47:44Z jsibert $ /** \file Source code for beta probability density function. Based on Steve Martell's dbeta.cpp in the ADMB contributed library statLib. The code in this file returns the unvarnished beta proability density and NOT the negative log of the probability density. \f$ ...
ALGO
0.907997
6.540548
ebbd979f-21d5-4ea0-9e9d-a4b62a24b300
Icay12/LeetCode
Cpp/89_GrayCode.cpp
class Solution { public: vector<int> grayCode(int n) { vector<int> res; for(int i = 0; i < pow(2,n); ++i) { res.push_back((i>>1) ^ i); } return res; } };
ALGO
0.999936
5.963802
4af5f90d-a512-4399-8f1c-b06d3cba6e7b
StanPlatinum/proofGen
llvm/lib/CodeGen/UnreachableBlockElim.cpp
#include "llvm/CodeGen/UnreachableBlockElim.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeG...
ALGO
0.950434
7.794345
ad9ae52b-181d-4bb1-bde7-74eb4b7aa667
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11150_0.cpp
#include <bits/stdc++.h> using namespace std; int a14; inline int rd(int l, int r) { return rand() % (r - l + 1) + l; } const int mxn = 2e5 + 3, T = 400; int n, qn, lg[mxn]; char s[mxn]; int rn[mxn], ln[mxn], sm[26][mxn]; struct SSS { int cnt[mxn], sa[mxn], rk[mxn], h[mxn], tmp[mxn * 2]; char ss[mxn]; int b[22][m...
ALGO
0.999949
4.340617
83c710af-c206-474c-9389-acc9f0f836f2
ayamahmod/competitive-programming
LeetCode/Algortihms/480.Sliding Window Median.cpp
/* Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. Examples: [2,3,4] , the median is 3 [2,3], the median is (2 + 3) / 2 = 2.5 Given an array nums, there is a sliding window of size k which is moving f...
ALGO
0.99999
6.632229
1b677055-6448-490f-9341-5ec82647b042
MayankKakkar-004/codes
136-single-number/single-number.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int n=nums.size(); int xorr=0; for(int i =0;i<n;i++){ xorr=xorr ^ nums[i]; } return xorr; } };
ALGO
0.999965
5.588713
1108a7c7-c4aa-4528-a20c-7f99f6131b9a
ChromesDuzez/GameOfFifteen
GameOfFifteen/libraries/boost_1_81_0/libs/geometry/index/example/3d_benchmark.cpp
// Boost.Geometry Index // Additional tests #include <iostream> #include <boost/geometry/index/rtree.hpp> #include <boost/chrono.hpp> #include <boost/foreach.hpp> #include <boost/random.hpp> int main() { namespace bg = boost::geometry; namespace bgi = bg::index; typedef boost::chrono::thread_clock clock_...
TEST
0.956254
6.076528
8c5a7c01-94c0-455f-94b8-9783bba92ef5
Thanhbinh1524/TranThanhBinh_MonC.
Chuong 5/Program/VD4.cpp
// This program assists a technician in the process // of checking a substance's temperature. #include <iostream> using namespace std; int main() { const double MAX_TEMP = 102.5; // Maximum temperature double temperature; // To hold the temperature // Get the current temperature. cout << "Enter the ...
TOOL
0.95221
5.340703
b9380d7b-1398-473a-bcac-5c76ba985a3f
steph1111/F23_CS11_SI
week_10/exercise2/add.cpp
#include <iostream> using namespace std; int main() { int a[10]; int size; cout << "How many values do you want to fill? "; cin >> size; cout << "Enter in " << size << " values: "; for (int i = 0; i < size; i++) { cin >> a[i]; } int value; cout << "What value do you want t...
ALGO
0.998816
3.788913
88aada07-a6ae-4cb9-bcc0-80f175b8a802
claraguoguo/ComputerGraphicsProjects
kinematics/libigl/include/igl/ray_sphere_intersect.cpp
template < typename Derivedo, typename Derivedd, typename Derivedc, typename r_type, typename t_type> IGL_INLINE int igl::ray_sphere_intersect( const Eigen::PlainObjectBase<Derivedo> & ao, const Eigen::PlainObjectBase<Derivedd> & d, const Eigen::PlainObjectBase<Derivedc> & ac, r_type r, t_type & ...
ALGO
0.999342
6.792349
2aa18be1-5824-4fb7-9908-54551a4631da
prableen14/DSA-own-practice-
Miscellaneous/RomanToInteger.cpp
//Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. //Symbol Value //I 1 //V 5 //X 10 //L 50 //C 100 //D 500 //M 1000 //For example, 2 is written as II in Roman numeral, just two one's added toget...
ALGO
0.999875
5.98216
8a07ad19-7da7-44d7-8ba0-b848f8196535
HarshadaHirapure/DSA-
easy/counting_digits.cpp
#include <bits/stdc++.h> using namespace std; int main() { int num; int count = 0; cout << "eneter number "; cin >> num; while (num > 0) { num = num / 10; count++; } cout << count; return 0; }
ALGO
0.999277
3.612394
b4dd7486-2a88-4a1e-aad2-0118f95091cf
jedsaxon/advanced-programmings-at1
src/tree/TreeIterator.cpp
// This C++ code defines the functions within the 'TreeIterator' class. The class appears to be designed to traverse a tree data structure and print its elements. #include <iostream> // Include the input/output stream for printing. #include "TreeIterator.h" // Include the TreeIterator class definition. // F...
ALGO
0.992931
6.451029
62de0618-e8ed-4193-8be7-a0219dbc8eae
tayu0110/atcoder
abc/abc52b.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<utility> #include<tuple> #include<map> #include<queue> #include<set> #include<stack> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; using ll = long long; using pii = pair<int, int>; using pll =...
ALGO
0.999223
3.605206
a088ca91-ae7b-4261-9cba-431960b3befd
morris821028/UVa
volume100/10008 - What's Cryptanalysis.cpp
#include<stdio.h> int main() { int ASCII[26] = {0}, N, i, j; char s[2000]; scanf("%d", &N); getchar(); while(N--) { gets(s); for(i = 0; s[i]; i++) switch(s[i]) { case 'a' ... 'z' : ASCII[s[i]-'a']++;break; case 'A' ... 'Z' : ASCII[s[i]-'A']++;break; } } for(i = 0; i < 26; i++) { int max = 0;...
ALGO
0.999853
3.348971
c9200ec7-971d-460f-97dc-d569a61e8af1
dhanendraverma/Daily-Coding-Problem
Day209.cpp
/****************************************************************************************************************************** This problem was asked by YouTube. Write a program that computes the length of the longest common subsequence of three given strings. For example, given "epidemiologist", "refrigeration", and...
ALGO
0.998816
5.64872
be2b1284-914c-401a-913d-b6f65700ba02
ctorney/socialInfluence2.0
sim_escape_time/main.cpp
/*test.cc*/ #include <iostream> #include <cstdlib> #include <cstdio> #include <algorithm> #include <math.h> #include <cuda.h> #include <cuda_runtime_api.h> #include <curand_kernel.h> #include <iostream> #include <algorithm> #include <time.h> #include "cuda_call.h" #include "switcherKernel.h" #include "params.h" #incl...
ALGO
0.998431
3.306427
9c35637f-13cc-4fb5-9db3-5c64800b30fb
rkp74/Apni_Kaksha_DSA_Codes
L35_1.cpp
#include<iostream> using namespace std; int setBit(int n, int pos) { return ((n & (1 << pos)) != 0); } void unique(int arr[], int n) { int xorsum = 0; for (int i = 0; i < n; i++) { xorsum = xorsum ^ arr[i]; } int tempxor = xorsum; int setbit = 0; int pos = 0; while (setbit...
ALGO
0.999996
4.853198
f70e7a7c-ef1b-428c-a54b-076f0b34a06f
Ravi-Khatri/code
codeforce/ravi_the_great/contest/469/c/100321134_wrong_answer_1.cpp
#include<bits/stdc++.h> #define ll long long #define vi vector<int> #define vll vector<ll> #define F first #define S second #define pb push_back #define f(i,s,n) for(int i=(int)s;i<=(int)n;++i) #define fr(i,n,s) for(int i=(int)n;i>=s;--i) #define all(v) v.begin(),v.end() #define sz(v) (int)v.size() #define Fast ios_bas...
ALGO
0.999743
3.370553
e75255d2-7627-49b8-be40-53485dfa25d7
Shangke7788/SGU
123.cpp
#include <bits/stdc++.h> using namespace std; typedef long long lint; const int MAX_N = 45; lint dp[MAX_N], sum[MAX_N]; int main() { dp[1] = dp[2] = 1; sum[1] = 1, sum[2] = 2; for (int i = 3; i < 41; i++) { dp[i] = dp[i - 1] + dp[i - 2]; sum[i] = sum[i - 1] + dp[i]; } int k; scanf("%d", &k); printf("%I64d\...
ALGO
0.99999
3.941961
02ea09ab-3152-45d2-93be-44c05c061cc6
bayulaxana/data_structure_implementation
For C++/Standard Template Library/deque.cpp
#include <iostream> #include <deque> using namespace std; int main() { deque<int> angka; deque<int> genap = {2, 4, 6, 8}; deque<int> ganjil = {1, 3, 5, 7}; angka.push_front(2); angka.push_back(3); angka.push_front(1); angka.push_back(4); cout << "Isi deque \"angka\":"; for (auto i...
TOOL
0.954741
5.261623
6d5194ec-6cbe-41a5-ba27-f972ef141896
divBaral/labsheet
lab7/lab72.cpp
/*Create a class Person and two derived classes Employee and Student, inherited from class Person. Now create a class Manager which is derived from two base classes Employee and Student. Show the use of the virtual base class. */ #include <iostream> #include <string> using namespace std; class Person { public: vo...
TOOL
0.912879
4.046815
ab441781-b574-4aaa-9665-ab80594995b1
zixfy/cpp-leetcode
[146]LRU 缓存.cpp
// // 请你设计并实现一个满足 // LRU (最近最少使用) 缓存 约束的数据结构。 // // // // 实现 // LRUCache 类: // // // // // // LRUCache(int capacity) 以 正整数 作为容量 capacity 初始化 LRU 缓存 // int get(int key) 如果关键字 key 存在于缓存中,则返回关键字的值,否则返回 -1 。 // void put(int key, int value) 如果关键字 key 已经存在,则变更其数据值 value ;如果不存在,则向缓存中插入该组 //key-value 。如果插入操作导致关键字数量超...
ALGO
0.999232
6.389716
86c959bb-9c48-4caf-bbcb-248d9c2d634a
ha-jinwoo/algo
programmers/괄호 회전하기.cpp
#include <string> #include <vector> #include <map> #include <stack> using namespace std; void Mapping(map<char, int> &MAP) { MAP['('] = 1; MAP[')'] = 1; MAP['{'] = 2; MAP['}'] = 2; MAP['['] = 3; MAP[']'] = 3; } bool Check(string Str, map<char, int> GwalHo) { stack<int> Stack; for (int ...
ALGO
0.999168
5.100681
76a007a0-215f-48c5-a006-d876eefadfde
sipho-mancam/common_module
Dependencies/libs/sort/example/floatsample.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/spreadsort.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <vector> #include <string> #include <fstream> #include <iostream> using namespace boost::sort::spreadsort; #define DATA_T...
ALGO
0.995608
4.808035
48c58765-863e-4283-986b-682e12ac9fde
fthdrmzzz/compress_decompress
compress.cpp
#include <iostream> #include "HashTable.h" #include <fstream> #include <sstream> #include "DictionaryNode.h" using namespace std; string return_input() { //thisfunction returns the string of the //given compin file. ifstream file; string filename = "compin.txt", input; file.open(filenam...
ALGO
0.999483
3.217466
80a4a063-0e52-4bc5-89e1-3522b3992993
cris97x/mota
ejer/mota12/ej12.cpp
#include <iostream> using namespace std; int main(){ int par; int imp; int prom; cout<<"Los numeros pares son: "<<par<<endl; cout<<"Los numeros impares son: "<<imp<<endl; cout<<"El promedio de estos numeros son: "<<prom<<endl; return 0; }
ALGO
0.858741
3.378194
1494e49e-bd0d-4d95-8c67-271539ba44ac
Aksenov239/splaylist
structs_bench/microbench/statistics_height_contains.cpp
// // Created by demon1999 on 07.02.20. // #include <bits/stdc++.h> #include "globals_extern.h" #include "random_fnv1a.h" #include "plaf.h" #include "binding.h" #include "papi_util_impl.h" #include "rq_provider.h" #include "keygen.h" #include "adapter.h" #define DS_ADAPTER_T ds_adapter<KEY_TYPE, VALUE_TYPE, RECLAIM<>...
ALGO
0.961588
3.961745
4f446c3d-0356-452d-8820-fd8b357f57fc
sumit58591/Coding-Ninjas-DSA
Recursion 1/isPalindrome.cpp
#include<bits/stdc++.h> using namespace std; bool isPalindrome_helper(string& str, int si, int ei) { if(si > ei) return true; if(str[si] != str[ei]) return false; return isPalindrome_helper(str, si + 1, ei - 1); } bool isPalindrome(string& str) { int si = 0, ei = str.length() - 1; bool output = is...
ALGO
0.999559
5.482763
63509039-f38e-405b-bcfc-6a78a03f51cf
Kingspenguin/scooby_comlex_loco
complex_loco-cvpr/a1_isaac_hardware/third_party/eigen3/include/unsupported/bench/bench_svd.cpp
// Bench to compare the efficiency of SVD algorithms #include <iostream> #include <bench/BenchTimer.h> #include <unsupported/Eigen/SVD> using namespace Eigen; using namespace std; // number of computations of each algorithm before the print of the time #ifndef REPEAT #define REPEAT 10 #endif // number of tests of t...
TEST
0.9906
6.22153
3d3e4b38-fa6d-4ca6-8a50-1650e49fa804
aralhaj/info-labs
2/Lab4.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int arraySize = 10; void printArray(int arr[], int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } int main() { srand(time(0)); int arr[arraySize]; for (int i = 0...
ALGO
0.999842
4.661231
81391f8b-81da-429b-bc30-98e8fff4984e
OlivierSohn/cpp.audio
source/rt.resynth.lib.periodicfft.cpp
namespace imajuscule::audio::rtresynth { inline void setDuration(std::optional<float> secs, std::atomic<float> & atom) { if (secs) { atom = *secs; } else { atom = -1.f; } } template<typename FftOperation> struct PeriodicFFT { using FftOp = FftOperation; using FPT = typename FftOper...
TOOL
0.939238
7.571317
739a6694-a83d-45b5-a901-c873fabe1a44
adept-thu/Fuzzy-NMS
pcdet/ops/iou3d_nms/src/iou3d_nms.cpp
#include <torch/serialize/tensor.h> #include <torch/extension.h> #include <vector> #include <cuda.h> #include <cuda_runtime_api.h> #include "iou3d_nms.h" #define CHECK_CUDA(x) do { \ if (!x.type().is_cuda()) { \ fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ exit(-1); \ } \...
ALGO
0.947305
5.820333
e19ebf27-614f-48ea-ba76-3a3a10fb8be4
201851019-iiitv/CPP-WorkSpace-
Atcoder/B_Intersection.cpp
// Created by Ambesh kumar #include "bits/stdc++.h" //I already compile this file in my computer system to save the time //if get the compiler error then you should change this header to // #include "bits/stdc++.h" ---> #include <bits/stdc++.h> using namespace std; #define fo(i,n) for(i=0;i<n;i++) #define foo(i,k,n...
ALGO
0.99993
3.549573
796f1a92-1070-4bce-8420-de57d02ea69a
YogiRajNeelamsetti/DSA
1046-max-consecutive-ones-iii/max-consecutive-ones-iii.cpp
class Solution { public: int longestOnes(vector<int>& nums, int k) { int l = 0, r = 0, maxLen = 0, zeroes = 0; while(r < nums.size()) { if(nums[r] == 0) zeroes++; if(zeroes > k) { if(nums[l] == 0) zeroes--; l++; } if(ze...
ALGO
0.999963
6.284101
d66a988f-e953-46e9-8e30-13ca1c8b9c70
JayedHoshen/Phitron-5
Introduction to C++ for DSA/mid exam/Who_Is_It.cpp
#include <bits/stdc++.h> using namespace std; class Student { public: int id; char name[101]; char section; int marks; }; int main() { int tc; cin >> tc; while(tc--) { Student s1, s2, s3; cin >> s1.id >> s1.name >> s1.section >> s1.marks; cin >> s2.id >> s2.name >> s2....
ALGO
0.999084
3.457262
3eea139d-1158-462c-9b69-e6eab523871a
flskhhdf/boj_algorithm
2693.cpp
#include "iostream" #include "algorithm" #include <algorithm> using namespace std; int main(){ int tc; cin >> tc; int num[10]; while(tc--){ for(int i = 0; i<10; i++){ cin >> num[i]; } sort(num, num+10); cout << num[7] << '\n'; } }
ALGO
0.997996
3.646547
5fc1d6bc-064a-4857-a616-603b9d989d69
bfay1/codeforces
contests/873/musical-puzzle.cpp
#include<bits/stdc++.h> using namespace std; #define int long long void solve() { int n; cin >> n; string s; cin >> s; set<string> st; int ans = 0; for (int i = 0; i < n - 1; i++) if (st.find(s.substr(i, 2)) == st.end()) st.insert(s.substr(i, 2)), ans++; cout << ans << "\n"; } s...
ALGO
0.999842
4.694563
615b8d2d-83e6-4814-b37a-6fdeb52ea23c
AmethystBird/COMP3016-Lab-Tasks
Lab1/Examples/Copying1/main.cpp
#include <iostream> using namespace std; int main() { int originalNumber = 64; int& referenceToNumber = originalNumber; //The '&' is used to declare a reference int copyOfNumber = originalNumber; cout << "Copy by Reference: " << referenceToNumber << "\n"; cout << "Copy by Value: " << copyOfNumber ...
TOOL
0.909533
3.846841
74d617ad-d7de-4e68-b087-97e688d616b0
Pathak2101/Leetcode_solution
C++ Exception Handling - GFG/c-exception-handling.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: int maxValue(int A, int B){ // code here float b = 0; long long a,c,d; a=c=d=0; a = A*B; ...
ALGO
0.999531
4.986506
905d8497-e03f-4aeb-805f-e185cf9f8f74
logsol/SilverbirdApp
Plugin/JuceLibraryCode/modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp
namespace LagrangeHelpers { template <int k> struct ResampleHelper { static forcedinline void calc (float& a, float b) { a *= b * (1.0f / k); } }; template<> struct ResampleHelper <0> { static forcedinline void calc (float&, float) {} }; template <int k> static ...
ALGO
0.99884
5.796696
0c642a85-4c2f-4213-a068-22d697341e0b
lkvlkvlkv/ntpu_prog_2021
example/0117/string2.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s1 = "123", s2 = "654"; s1+=s2; cout << s1 << endl; cout << "----------------------" << endl; // s1從index 2後的子字串 cout << s1.substr(2) << endl; // s1從index 2後長度為2的子字串 cout << s1.substr(2,2) << endl; cout << "-------...
TOOL
0.955431
3.389837
93267462-47f3-4009-b84d-248a12ccad6c
CtrlShift-Esc/programers-lv1-24
Project/main.cpp
#include <vector> #include <algorithm> using namespace std; int solution(vector<int> d, int budget) { int answer = 0; sort(d.begin(), d.end()); for (; answer < d.size(); answer++) { if (budget >= d[answer]) { budget -= d[answer]; continue; } break; } return answer; } void main() { //test //auto...
ALGO
0.999608
5.528985
41276934-e345-4193-a63e-cc6969acd474
EnderQIU/vslc
syntax/structure/ast.cpp
#include "ast.h" void AST::addChild(AST *child) { this->children.push_back(child); child->setParent(this); } AST *AST::getLowerLeftNTNode() { if (this->symbol.isTerminal()) { return this; } else if (this->children.size() != 0) { for (AST *child : this->children) { AST *curr...
ALGO
0.905466
3.499171
fc880b86-fd8a-4025-abab-b76c5445604e
Nisarg1206/DSA
Stack/question/reverse.cpp
#include<bits/stdc++.h> using namespace std; int main() { string str; cin >> str; int i = 0,j=str.size()-1; while(i<=j) { swap(str[i], str[j]); i++; j--; } cout << "Reverse String is" << endl; cout << str << endl; return 0; } void swap(char &s1,char &s2) { ...
ALGO
0.999657
5.40344
1a6af0d3-cff2-4a90-bd5f-cf48a23705eb
imsaurabh1998/CodeForces
UniquePath.cpp
// // Created by Saurabh on 12/30/2019. // #include<bits/stdc++.h> using namespace std; void totalPath(int R, int C, int rCount, int cCount); int ans=0; void totalPath(int R, int C, int rCount, int cCount){ if(R==rCount && C==cCount) { ans++; return; } if(C==cCount) totalPath(R,C, rCoun...
ALGO
0.999971
4.104169
7e5f32fc-b268-4320-94e0-5a529f912c60
amitbansal13/Coding-Practice
InterviewBit/Linked List/K reverse linked list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ typedef ListNode* l; ListNode* Solution::reverseList(ListNode* A, int B) { if(!A)return A; l prev = NULL, curr = A, next; int b = B; while(B--) ...
ALGO
0.999995
5.092942
048ce108-5c43-4932-9eb4-898ac23bedbd
VishalRohilla07/DSA_Series
Bit_Manipulation/Setbit.cpp
#include<iostream> using namespace std; int setBit(int n, int pos){ return (n | (1<<pos)); } int main(){ cout<< setBit(5,1) <<endl; return 0; }
ALGO
0.959416
5.150548
9848ffe5-be9d-4224-b9cf-cf7696152c9c
kunalpro379/Data_structures_Algorithms_C_Cpp_Py__2023
Arrays/BookAllocation.cpp
class Solution { public: bool isPossible(int A[], int N, int M, int mid) { int studentCount = 1; // number of students needed int pageSum = 0; // current sum of pages for(int i = 0; i < N; i++) { if (pageSum + A[i] > mid) { studentCount++; p...
ALGO
0.99999
5.898394
b1ba0471-7031-4e99-a9d9-46282704d9d3
billycheung/HackerRank
30-days-of-code/day19-interfaces.cpp
/* The AdvancedArithmetic interface and the method declaration for the abstract int divisorSum(int n) method are provided for you in the editor below. Write the Calculator class, which implements the AdvancedArithmetic interface. The implementation for the divisorSum method must be public and take an integer parameter,...
ALGO
0.999192
6.724818
ef8d8b76-d7e3-4fc4-b46a-316f8374742f
buck-yeh/parsergen
ParserGen/main.cpp
/*! \file ALGORITHM SOURCES: -# Rienhard Wilhelm and Dieter Maurer(1995). Compiler Design. Addison-Wesley. - Definitions for eps() and e-ffi() (p319), Sec 8.3 FC_CreateClosure::FC_CreateClosure(const C_ParserInfo &parsed, std::ostream &log); - Figure 8.22: Algorithm LR(k)-PARSER, S...
TOOL
0.935696
6.51987
3ebe78a6-d159-4f2a-8605-f75df95dd067
viditnagpal/Data-Structure-Lab
Linked List/circular linked list(structure in class).cpp
#include<iostream> #include<stdlib.h> using namespace std; class linkedlist { private: struct list { int info; struct list * next; }; struct list * start; public: linkedlist() { start=NULL; } void insatbeg(int); void insatend(int); void delatbeg(); void delatend(); ...
ALGO
0.998445
3.581321
a526b9c1-d64a-4775-a4f2-f351b85cb7c8
ywz978020607/drmv-miniadmin
files/wiki/lcof2/剑指 Offer II 119. 最长连续序列/Solution.cpp
class Solution { public: int longestConsecutive(vector<int> &nums) { unordered_set<int> s; for (int num : nums) s.insert(num); int res = 0; for (int num : nums) { if (!s.count(num - 1)) { int t = 1, next = num + 1; ...
ALGO
0.999967
5.576113
c2169237-ab3c-4e3a-9ef2-a26f0ac53fbc
thtfive/USACO_Training
subset/subset.cpp
/* ID:thtfive LANG:C++ TASK:subset */ #include<fstream> #include<iostream> using namespace std; int main() { ifstream fin("input.txt"); ofstream fout("output.txt"); int N; fin>>N; int total=N*(N+1)/2; if (1==total%2){fout<<0<<endl;return 0;} if (N<3){fout<<0<<endl;return 0;} int ave=...
ALGO
0.99998
3.869613
5487ebd3-da94-48eb-b62c-4b1972aec757
Adityasharma15/Agorithms
Dynamic Programming/max-matrix-subsquare.cpp
// Largest square formed in a matrix #include<bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll t; cin >> t; while(t--) { ll n, m; cin >> n >> m; ll arr[n][m]; ll dp[n+1][m+1]; memset(dp, 0, sizeof(dp)); ll maxx =...
ALGO
0.999978
3.659764
0a89357c-8fa0-4a52-b99d-3b418a21733b
abhinavg247/pep-coding
pep-coding-foundation/Basics-of-Programming/Patterns/Pattern-8.cpp
#include <bits/stdc++.h> using namespace std; using std::vector; /* Index : 1. References/videos/tuts : 1. Special Points : 1. */ int main() { int n; cin>>n; for(int i = 1;i<=n;i++){ for(int j = 1;j<=n;j++){ if(i+j == n+1){ cout<<"*\t"; } ...
ALGO
0.999921
3.596621
c4f76602-3377-4a83-ba45-6ab88ead3c76
yutianwu/leetcode
codes/Counting_Bits.cpp
/** 利用以前的结果,其实A[i]的值就是A[i&(i - 1)] + 1, 意思是把i的最后一个一去掉,这是的到的数是i & (i - 1),而i > i & (i - 1); 而且A[i]比A[i & (i - 1)]多了一个1,就是去掉的那个 **/ class Solution { public: vector<int> countBits(int num) { vector<int> ret(num+1, 0); for (int i = 1; i <= num; ++i) ret[i] = ret[i&(i-1)] + 1; return ...
ALGO
0.999994
5.77135
72b977dc-f9c8-47fd-895d-6175c534819c
lychees/ACM-Training
Note/集训队作业/2014/作业1/试题泛做/ytl13508111107/ytl/题目与程序/D6901. Huffman Codes/huffman.cpp
//By ytl 2014-1-9 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #define N 105 using namespace std; int n,po,root=1; int ls[N],rs[N],fa[N],ff[N],ys[N],Q[N],val[2][30005][N]; char str[N]; void build(char str[],int len){ int p=root; for (int i=0;i<len;i++){ ...
ALGO
0.999841
3.621723
e2249605-7a22-4606-b8c8-e09d6df9e9e5
mebagger/reddcoin-0.17
src/rpc/server.cpp
#include <rpc/server.h> #include <fs.h> #include <key_io.h> #include <random.h> #include <shutdown.h> #include <sync.h> #include <ui_interface.h> #include <util.h> #include <utilstrencodings.h> #include <boost/bind.hpp> #include <boost/signals2/signal.hpp> #include <boost/algorithm/string/case_conv.hpp> // for to_upp...
WEB
0.926496
4.105628
4fe8c3e0-0e96-4142-ae4e-4c9eeb092cd4
Moein-Karami/OlympiadCodes
olampiad cpp/radix-sort/main.cpp
#include <iostream> using namespace std; int arr[10000] ,temp[10000] ,temp2[10000],cnt[10000] , cou[10000]; int main() { int n , max=0 , max2=0 , cn=0 ; cin>>n; for (int i=0 ; i<n ; i++) { cin>>arr[i]; temp[i]=arr[i]; temp2[i]=arr[i]; if(arr[i]>max2) max2=a...
ALGO
0.999902
3.282329
d7b5dae4-1ba5-410b-8433-b744567dbb00
Raynxxx/Contest
UVA Problem Set/UVA 109 SCUD Busters.cpp
/* ** UVA 109 SCUD Busters ** Created by Rayn on 2014/12/13 */ #include <cmath> #include <cstdio> #include <vector> #include <string> #include <cstring> #include <iomanip> #include <iostream> #include <algorithm> using namespace std; typedef long long Long; const int MAXK = 20 + 10; const int MAXN = 100 + 10; const i...
ALGO
0.99943
5.216752
7110e636-86eb-40f2-92e0-bacee975f0b8
dikang/ISI-ffsim-opera
src/clos/datacenter/fc_topology.cpp
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*- #include "fc_topology.h" #include <vector> #include "string.h" #include <sstream> #include <strstream> #include <iostream> #include "main.h" #include "queue.h" #include "switch.h" #include "compositequeue.h" #include "prioqueue.h" #include "queue_lossless....
ALGO
0.980752
4.420162
199b7df5-436c-47d1-b8c1-445621831915
hugary1995/weak_bc
eigen/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp
MatrixXd A = MatrixXd::Random(6,6); cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; EigenSolver<MatrixXd> es(A); cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl; complex<double> l...
ALGO
0.999342
3.093769
003acaea-e76d-41f8-a91d-3d9f54a75131
qteqpid/spiderq
src/hashs.cpp
#include "hashs.h" unsigned int times33(char *str) { unsigned int val = 0; while (*str) val = (val << 5) + val + (*str++); return val; } unsigned int timesnum(char *str, int num) { unsigned int val = 0; while (*str) val = val * num + (*str++); return val; } unsigned int apha...
ALGO
0.992481
3.851041
88f2457b-20dc-4b33-ae86-5e3b0ec04faf
Diamondsn/algorithm-programming
20180908Leetcode刷题/701_二叉搜索树中的插入操作_中等/701_二叉搜索树中的插入操作_中等.cpp
#include<string> #include<vector> #include<iostream> #include<algorithm> #include"math.h" #include<map> #include<list> using namespace std; //给定二叉搜索树(BST)的根节点和要插入树中的值,将值插入二叉搜索树。 //返回插入后二叉搜索树的根节点。 保证原始二叉搜索树中不存在新值。 // //注意,可能存在多种有效的插入方式,只要树在插入后仍保持为二叉搜索树即可。 //你可以返回任意有效的结果。 // //例如, //给定二叉搜索树: // // 4 // /...
ALGO
0.99999
5.549906
21801253-ea45-4162-94c0-faa67d098ea8
sharonmei1219/LeetCodeCPP
Problem_1_to_100/36 Valid Sudoku.cpp
class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { for(int i = 0; i < 9; i ++){ if(!isValidUnit(board, row(i))) { return false; } if(!isValidUnit(board, colum(i))) { cout << "colum " << i << endl; ret...
ALGO
0.99892
6.490945
922efb82-5304-4f9e-8c98-0e1a9f635a9e
DhruvTotala/Leetcode
1510-find-lucky-integer-in-an-array/find-lucky-integer-in-an-array.cpp
class Solution { public: int findLucky(vector<int>& arr) { int ans = -1; int n = arr.size(); unordered_map <int, int> mp; for(auto it : arr) mp[it]++; for(auto it : mp) { int num = it.first; int freq = it.second; if(num == freq) { ...
ALGO
0.999958
5.387342
22f88300-3001-41fc-9c9e-a194f896915d
tjmtmmnk/Algorithm
atcoder/ABC/108/A.cpp
#include <stdio.h> int main(void) { int k; scanf("%d", &k); int count = 0; for (int i = 1; i <= k; ++i) { if (i % 2 == 0) { for (int j = 1; j <= k; ++j) { if (j % 2 == 1) { count++; } } } } printf("%d\n...
ALGO
0.999888
3.455013
a8cf3fff-f57b-438b-878f-ed2f446c32fa
rainbow-auto/rainbow-codes
Comp/23-10-03 QBXT-Day5/Redo/C.cpp
#include <iostream> #include <cstring> #include <bitset> using namespace std; const int maxk = 205; int n, m, K; int a[maxk]; namespace Task1 { const int maxn = 205; const int maxm = 2005; int dp[maxn][maxm]; // dp[i][j] 前i个人, 选的物品价值和为j inline void solve () { memset (dp, 0, sizeof (dp)); ...
ALGO
0.999908
3.821683
057cee5b-2e82-4385-9eb6-077d4ac40e6d
Murad501/Phitron
Practice/Non_matching_Name.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, m; cin >> n >> m; int freq[26]; memset(freq, 0, sizeof(freq)); for (int i = 0; i < n; i++) { char x; cin >> x; freq[x - 'a...
ALGO
0.99999
5.140892
f017dccf-8001-468f-84ed-cc37630f61b1
wdjang/SVS
DeepFlow_release2.0/deepflow2_matlab.cpp
/* MATLAB Wrapper */ #include <mex.h> #include <assert.h> #include <math.h> #include <string.h> #include <stdint.h> #define printf mexPrintf extern "C" { #include "image.h" #include "opticalflow.h" #include "io.h" } color_image_t *input3darray_to_color_image(const mxArray *p){ const int *dims = mxGe...
ALGO
0.960243
5.404831
ff7a92ac-e6cb-4882-ad17-a3501ef1a5dc
smithdavedesign/music-app-flutter
namer/step_07_e_add_layout_builder/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.996952
6.76073
cef135f9-25d9-4020-8860-418afff3adc4
HsuChiChen/ncku-data-structures
4sort.cpp
#include <iostream> #include <stdlib.h> #include <time.h> #include <iomanip> #include <ctime> #include<list> #include<cmath> using namespace std; void insertion(int arr[], int n); void selection(int arr[], int n); void swap(int* array_1, int* array_2); void quickSort(int arr[], int left, int right); void mergeSort(int...
ALGO
0.999856
4.841477
7b5a08c3-47b5-44ac-9e59-844f0fbc0d99
famahsha/cpp
cpp08/ex00/main.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
ALGO
0.959925
5.378723
6b9d3047-4bc6-4002-8382-5d05076d4463
manansaraniya46/Flutter_Music_Player_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.9988
6.76073
6dd4c855-963a-4ca5-aa85-1b1b758bfcb4
sakshi-142000/VSDirectory
striver/PrimeSeries/tdkPrime3.cpp
#include <iostream> #include <vector> using namespace std; //int N=100000000; //initially int N=86028122; // i found the max size by running the program for N=100000000 bool sieve[86028122]; //int storePrime[5000001]; //5000000 inclusive int main() { vector<int> storePrimes; sieve[0]=0; sieve[1]=0; for(int ...
ALGO
0.999605
3.852993
95c6e6de-b9b7-4a59-9cb6-c51bb4996ef9
mk28r/Code-
CollectingNumeber2_CSES.cpp
#include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> using namespace std; //using namespace __gnu_pbds; #define int long long #define ll long long #define ld long double #define nline "\n" #define ff first #define ss ...
ALGO
0.998676
3.900486
722a7de9-ad83-4c7c-a317-2c0e49be7aef
shivgupta198922/HACKEREARTH-MASTER
Math/Combinatorics/Basics of Combinatorics/Permutations and queries.cpp
#include <bits/stdc++.h> using namespace std; int dp[505][505 * 505 / 2], fac[505], c[505][505]; template<class T> inline int chkmin(T& a, const T& val) { return val < a ? a = val, 1 : 0; } inline void addmod(int& a, int val, int p = 1000000007) { if((a = (a + val)) >= p) a -= p; } inline void submod(int& ...
ALGO
0.999906
4.167674
27832a55-3124-4b3e-959b-7360689c2d12
ramyagoel98/datastructures
sorting/quicksort.cpp
#include<iostream> using namespace std; void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } int partition (int arr[], int low, int high) { int pivot = arr[high]; int i =low - 1; for (int j = low; j <= high- 1; j++) { if (arr[j] <= pivot) { i++; ...
ALGO
0.999963
3.454868
aac389f9-5fc9-4518-94b5-b67271f9e0f9
ijewiarz/SPD
SCHRAGE/projekt4/projekt4.cpp
#include <iostream> #include <cstdio> #include "Schrage.h" #include "Task.h" using namespace std; int main() { Data D; Schrage A; string path = "data1.txt"; D.readData(path); cout << A.SchrpmtnHeap(D); //D.showOrderAndCmax(); cout << "\n\n Press anything to close the program.\n"; get...
ALGO
0.962898
3.40978
ec243efd-f654-4a4c-baa9-09d49765ad9e
lucastarche/aotd
Strings/045-BracketMatching.cpp
//Bracket Matching //It determines whether an expression composed of brackets (), [], {}; is properly balanced and ordered or not. //Examples of valid expressions: ([]{})()[], {()}, ()()()() //Examples of invalid expressions: ()(, [(]), {{{{)}}} //The idea is that we keep a queue of brackets, in which we push the openi...
ALGO
0.999768
5.996266
c9da1408-be9a-47ae-ab95-594cc0544013
OganyanRV/nnsu-cpp-basics-oop
Oop-basics-1-2 term/Mini-games/Snake/Project142/Project142/MainTest.cpp
#include <iostream> #include <windows.h> using namespace std; struct position { int x, y; }; class Fieldclass { private: const int height=24; const int width=24; //размеры поля 24на24 char ** field; // наше поле public: Fieldclass(); ~Fieldclass(); void print(); // нарисовать пустое поле void clear(); // очи...
TOOL
0.939486
4.222207
aec1866f-a449-4849-ae86-7320009352f0
htien314/hw1
split.cpp
/* CSCI 104: Homework 1 Problem 1 Write a recursive function to split a sorted singly-linked list into two sorted linked lists, where one has the even numbers and the other contains the odd numbers. Students will receive no credit for non-recursive solutions. To test your program write a separate .cpp file and #inc...
ALGO
0.999921
5.556325