uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
f9f13858-4e64-4748-9a3a-27e1afafb4cc | samuraiexx/competitiveProgramming | summerCamp/2018/d5w1/b.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e5;
char dir[4][10] = {"NORTH", "SOUTH", "EAST", "WEST"};
char s[N];
int vis[100][100];
int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
int x, y;
void dfs(int x, int y) {
if(vis[x][y]) return;
vis[x][y] = 1;
for(int i=0; i<4; i++) {
x ... | ALGO | 0.999918 | 3.76905 |
7b8cee14-85be-4776-893e-b0909bc7f215 | yuyahy/Atcoder | adt/adt_easy_20240215_3/E/main.cpp | // TODO: マクロや共通関数は別ファイルに定義し、埋め込む様にする
// デバッグ用関数の設定
#ifdef DEFINED_ONLY_IN_LOCAL
#include </workspaces/atcoder/cpp-dump/dump.hpp>
#define dump(...) CPP_DUMP(__VA_ARGS__)
#else
#define dump(...)
#define CPP_DUMP_DEFINE_EXPORT_OBJECT(...)
#endif
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define REP3(i, m, ... | ALGO | 0.99959 | 5.105253 |
908e45fd-6295-4092-adfc-2190d7e393ad | chiquibitrian/lammps-induced-dipole-polarization-pair-style | src/USER-OMP/angle_charmm_omp.cpp | /* ----------------------------------------------------------------------
Contributing author: Axel Kohlmeyer (Temple U)
------------------------------------------------------------------------- */
#include "angle_charmm_omp.h"
#include "atom.h"
#include "comm.h"
#include "force.h"
#include "neighbor.h"
#include "d... | ALGO | 0.999539 | 7.319853 |
9c695fc4-c6ca-4c94-ae25-f38c2d29dc7a | coin-or/CppAD | example/general/for_two.cpp | /*
{xrst_begin for_two.cpp}
Subset of Second Order Partials: Example and Test
#################################################
{xrst_literal
// BEGIN C++
// END C++
}
{xrst_end for_two.cpp}
*/
// BEGIN C++
# include <cppad/cppad.hpp>
namespace { // -----------------------------------------------------
// defi... | TEST | 0.9832 | 7.00357 |
29ba01cd-c2bf-48d8-b28c-c9473b122800 | Modding-Zaibatsu/ue5-polaris | Engine/Source/ThirdParty/Intel/TBB/IntelTBB-2019u8/src/perf/fibonacci_impl_tbb.cpp | #include <cstdio>
#include <cstdlib>
#include "tbb/task_scheduler_init.h"
#include "tbb/task.h"
#include "tbb/tick_count.h"
extern long CutOff;
long SerialFib( const long n ) {
if( n<2 )
return n;
else
return SerialFib(n-1)+SerialFib(n-2);
}
struct FibContinuation: public tbb::task {
lon... | ALGO | 0.999547 | 4.705167 |
8a82a96a-19ea-4d47-9b28-a83677614bfd | Sonu-2127/CPP_Practice | PracticeProblems/Pointers/Source/005IncreaseValue.cpp | #include <iostream>
using namespace std;
void increase(void* data, int size)
{
if(size == sizeof(char))
{
char* DataChar = (char*)data;
(*DataChar)++;
}
else if(size == sizeof(int))
{
int* DataInt = (int*)data;
(*DataInt)++;
}
}
int main(void)
{
char ch = '... | TOOL | 0.881507 | 3.435973 |
ba083fbe-12fa-4b5a-a17c-1da3b08b05dd | lyg726016/algorithm | algo_11066_190810.cpp | #include <iostream>
#include <algorithm>
#include <queue>
#include <functional>
using namespace std;
int tc;
int count_file;
int f_s[501];
int result = 0;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cin >> tc;
for (int i = 0; i < tc; i++){
cin >> count_file;
priority_queue <int, vector<int>, greate... | ALGO | 0.999446 | 4.213391 |
b323ff74-1408-4722-9f3d-6e5a407d0588 | chungers/lab616 | third_party/cpp/boost_1_43_0/libs/math/tools/rational_tests.cpp | #include <boost/math/bindings/rr.hpp>
#include <boost/tr1/random.hpp>
#include <boost/math/tools/rational.hpp>
#include <iostream>
#include <fstream>
int main()
{
using namespace boost::math;
using namespace boost::math::tools;
boost::math::ntl::RR::SetPrecision(500);
boost::math::ntl::RR::SetOutputPrecis... | TEST | 0.977487 | 5.290174 |
575adda3-3c2e-4c40-ad6d-e974672e8afc | OpenBlatam/TruthGPT-chatGPT | TruthGPT/Without-Framework/Production/pytorch-main/aten/src/ATen/native/cudnn/Conv_v7.cpp | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED
#if AT_CUDNN_ENABLED()
#include <ATen/core/Tensor.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Functions.h>
#else
#include <ATen/ops/empty.h>
#include <ATen/ops/empty_like.h>
#include <ATen/ops... | TOOL | 0.974347 | 3.415533 |
cbc08f1f-ea83-468e-af4a-f3e4aa9d2b86 | braincorp/panda_bullet_dependencies | opende/ode/src/odemath.cpp | #include <ode/common.h>
#include "config.h"
#include "odemath.h"
#undef dSafeNormalize3
#undef dSafeNormalize4
#undef dNormalize3
#undef dNormalize4
// this may be called for vectors `a' with extremely small magnitude, for
// example the result of a cross product on two nearly perpendicular vectors.
// we must be rob... | ALGO | 0.997425 | 7.455901 |
4ad5ff2b-ec66-4dfe-be2a-20ad702016c2 | sarvesh23/Competitive-Programming | codechef/contest/practice/luckyfr.cpp | #include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int num,count=0;
cin>>num;
while (num!=0)
{
if(num%10==4)
count++;
num=num/10;
}
cout<<count<<endl;
}
} | ALGO | 0.999723 | 4.060839 |
de6891f3-f158-44c2-aa0d-c0fb2296837d | ishandutta2007/codeforces | shayan.p/normal/838/F.cpp | // Wanna Hack? GL...
#include<bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;/////
const int maxn=1e4+10,Six=1e6;... | ALGO | 0.999912 | 3.501852 |
1218820c-ddeb-4934-8db5-087760021701 | sempuki/code | exercises/codeeval/easy/data-recovery.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <deque>
std::pair<std::string, std::string> split(std::string &&line) {
std::stringstream buffer{std::move(line)};
std::string sentence, order;
std::getline(buffer, sentence, ';');
std::getline(buffer, order, '\n');
return ... | TOOL | 0.997442 | 5.893969 |
c830bd5a-5b8f-4a0f-b8e3-2a8109274307 | rishisethia258/CSES-Solutions | Sorting and Searching/Movie_Festival_II.cpp | // Author : rs258
#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 RB rb_tree_tag
#define TSNU tree_order_statistics_node_update
template <typename T>
using oset = tree<T,null_type,less<T>,RB,TSNU>;
templa... | ALGO | 0.999909 | 4.45928 |
2bfaffe8-4298-47bc-8f11-a01c32f7bd27 | twyblade64/AdventOfCode2021 | 06_2/main.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
int main() {
std::ifstream data("input_06_2.txt");
if (!data.is_open()) return -1;
std::string input;
data >> input;
std::stringstream ss(input);
long long int* bufferIn = new long long int[9];
long long int* bufferOut = new long long... | ALGO | 0.999807 | 4.301356 |
95d68308-38a2-4644-947e-2fa5d39bd006 | sarvex/leetcode-c-- | solution/1200-1299/1233.Remove Sub-Folders from the Filesystem/Solution.cpp | class Solution {
public:
vector<string> removeSubfolders(vector<string>& folder) {
sort(folder.begin(), folder.end());
vector<string> ans = {folder[0]};
for (int i = 1; i < folder.size(); ++i) {
int m = ans.back().size();
int n = folder[i].size();
if (m >=... | ALGO | 0.996674 | 5.441705 |
bc0eb125-9afb-4420-84d3-5ed20defb6f5 | Ferdaussk/nub-all | 2A/OOP C++ Lab/OOP C++ Lab/Ex-13/Ex-01 ID-42230301042.cpp | #include <iostream>
int main() {
for (int i = 1; i <= 10; ++i) {
if (i == 4 || i == 7) {
continue;
}
std::cout << i << " ";
}
std::cout << std::endl;
return 0;
}
| ALGO | 0.99516 | 4.328321 |
9f36a42e-eb75-4522-8f70-4d7d12262e4a | jimlin2004/AtCoder | Dijkstra/ABC325E/ABC325E.cpp | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
using namespace std;
inline long long carDis(long long w, int A)
{
return w * A;
}
inline long long trainDis(long long w, int B, int C)
{
return w * B + C;
}
long long w[1001][1001];
bool visited[1001];
long long dis1[1001]; //從1出發,做車,也就是與c... | ALGO | 0.999904 | 3.737454 |
7cc8132b-60eb-4d00-a699-2880f0f8c991 | raincross7/code-similarity | codes/train_code/problem319/problem319_336.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0;i < n;i++)
using ll = long long;
int main(){
int n,m; cin >>n >>m;
int x = (1900*m+100*(n-m));
rep(i,m) x*=2;
cout << x << endl;
return 0;
} | ALGO | 0.998175 | 3.304527 |
58618b11-6f1e-47f3-92b5-4222e3310fee | intrinsicvardhan/SortingandStuff | BinaryTrees/main.cpp | #include <iostream>
using namespace std;
class node {
public:
int data;
node *left;
node *right;
node() {
data = 0;
left = nullptr;
right = nullptr;
}
};
void inorder(node *root) {
while(root) {
inorder(root->left);
cout<<root->data;
... | ALGO | 0.999947 | 4.683226 |
31625c54-a0d8-4e55-8c0f-95d725d6c6f3 | zeroliu/DumplingJump | DumplingJump/libs/Box2D/Collision/b2BroadPhase.cpp | #include <Box2D/Collision/b2BroadPhase.h>
#include <cstring>
using namespace std;
b2BroadPhase::b2BroadPhase()
{
m_proxyCount = 0;
m_pairCapacity = 16;
m_pairCount = 0;
m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair));
m_moveCapacity = 16;
m_moveCount = 0;
m_moveBuffer = (int32*)b2Alloc(m_move... | ALGO | 0.924785 | 6.644435 |
822a78f9-7c71-4f8c-a661-904af469d675 | ishandutta2007/codeforces | rush_d_cat/normal/1558/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 4000000 + 10;
int n, m;
int sum[N];
void upd(int pos, int x) {
(sum[pos+1] += x) %= m;
//printf("# add %d %d %d\n",pos+1,n,x);
for (int i = 2;; i ++) {
int l = i * pos, r = i * (pos + 1) - 1;
if (l > n) break;
r = min(r, n);
... | ALGO | 0.999991 | 4.0078 |
a2e485a7-a192-41df-ba6d-d7c56576532a | lalchhabi/Attendance-Management-System | haarcascades_files/opencv-master/samples/cpp/ela.cpp | /**
@file ela.cpp
@author Alessandro de Oliveira Faria (A.K.A. CABELO)
@brief Error Level Analysis (ELA) permits identifying areas within an image that are at different compression levels. With JPEG images, the entire picture should be at roughly the same level. If a section of the image is at a significantly dif... | TOOL | 0.97935 | 5.366011 |
240e54ec-eab3-4281-b84c-496d46257233 | bloodstrawberry/Samsung_Software_Competency_Test_A_Type | C++/섹션09. 2022 하반기 이후 (A형 풀이)/54. 고대 문명 유적 탐사 (코드트리, 2024 상반기 오전 1번).cpp | #include <stdio.h>
#define MAX (5 + 3)
int T;
int K, M;
int MAP[MAX][MAX];
bool visit[MAX][MAX];
int piece[300 + 50];
int pcnt;
struct RC
{
int r;
int c;
};
RC queue[MAX * MAX];
// ↑, →, ↓, ←
int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, 1, 0, -1 };
void input()
{
scanf("%d %d", &K, &M);
for (int r = 1; r <=... | ALGO | 0.999864 | 4.155703 |
be5cd3ef-8535-4728-adf9-c6c7ed913878 | rafed01/tha3loub | kurama - Copy/Library/PackageCache/com.unity.ide.visualstudio@2.0.14/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <filesystem>
#include <windows.h>
#include <shlwapi.h>
#include "BStrHolder.h"
#include "ComPtr.h"
#include "dte80a.tlh"
constexpr int RETRY_INTERVAL_MS = 150;
constexpr int TIMEOUT_MS = 10000;
// Often a DTE call made to Visual Studio can fail after ... | TOOL | 0.950939 | 6.969462 |
8d057634-83af-4864-a2a6-a19d9e315198 | pewapplepie/Qunat_Interview_Algo | Amazon/MinCost.cpp | #include <string>
#include <algorithm>
#include <vector>
#include <unordered_set>
#include <iostream> // std::cout, std::end
using namespace std;
class DisjointSet {
private:
vector<int> weights; // Used to store weights of each nodes
vector<int> parents;
public:
void Union(int a, int b) {
int... | ALGO | 0.999906 | 5.473631 |
93debeb8-2bd3-4a7a-86cc-43fc0b0b2c86 | palilo815/ps | baekjoon/21000/21149.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
#ifdef palilo
freopen("in", "r", stdin);
freopen("out", "w", stdout);
#endif
int n, m;
cin >> n >> m;
vector<int> sender(m);
for (auto& x : sender) cin >> x;
auto compress = [&]<typen... | ALGO | 0.999988 | 4.259204 |
b9ab7537-e62a-4e49-bb1e-d0c11d36c4b4 | iammaxlichter/CS1336-UTD | Practice 1336/Practice4/GCDOf2Numbers.cpp | /*This program finds the GCD of two different integers*/
#include <iomanip>
#include <iostream>
#include <cmath>
using namespace std;
int GCD(int, int); //PT
//This function gets the GCD of the two numbers and return them
int GCD(int num1, int num2){
if (num1 == 0 || num2 == 0){
return 0;
}
else... | ALGO | 0.998866 | 5.772775 |
513aa357-05b7-4ca6-9ebc-ca7059d193f3 | zyeternity/MyStudyCode | Luogu.com.cn/P/P3867.cpp | #include <bits/stdc++.h>
using namespace std;
namespace IO_ios {
#define MAXN 100
struct ios_in {
template <typename _Tp> inline ios_in &operator>>(_Tp &x) {
char ch = getchar(), sgn = 0;
x = 0;
while (ch ^ '-' && !isdigit(ch))
ch = getchar();
if (ch == '-')
... | ALGO | 0.999995 | 3.934571 |
7a1a7efd-0177-4b8b-994b-952fd3cecf1a | Taejin1221/Problem-Solving | Baekjoon/Baekjoon02066.cpp | // Baekjoon02066_DoublePatient.cpp
// https://www.acmicpc.net/problem/2066
#include <cstdio>
#define ROW 9
#define COL 4
using namespace std;
int main(void) {
char cards[ROW + 1][COL + 1], temp;
for ( int i = 1; i <= ROW; i++ )
for ( int j = COL; j > 0; j-- )
scanf(" %c %c", &cards[i][j], &temp );
int idx[1... | ALGO | 0.998453 | 3.754605 |
1c699223-ce5a-4ef3-ac42-e581fa14c8f0 | deecodess/Data-Structures-and-Algorithms | TopicWise/Stacks/code1.cpp | /* Implementation of a stack using a array */
#include <iostream>
#include <string.h>
using namespace std;
class Stack{
private:
int top;
int arr[5];
public:
Stack(){ //constructor: calling a class, without return fxn
top=-1;
for(int i=0;i<5;i++){
... | ALGO | 0.974701 | 4.072876 |
a28c8245-f2db-4411-9f2b-34a46b04afce | 0x11111111/CBCTReconstructionICP | dependencies/include/igl/offset_surface.cpp | #include "offset_surface.h"
#include "marching_cubes.h"
#include "voxel_grid.h"
#include "signed_distance.h"
#include "flood_fill.h"
#include <cassert>
template <
typename DerivedV,
typename DerivedF,
typename isolevelType,
typename DerivedSV,
typename DerivedSF,
typename DerivedGV,
typename Derivedside,... | ALGO | 0.964047 | 5.7717 |
0422ea73-1c55-4df7-b275-78a8256bfe00 | sendivogius/algo | Hackerrank/Hackerrank/max_min.cpp | #include <iostream>
#include <algorithm>
#include <limits>
#include <vector>
using namespace std;
//https://www.hackerrank.com/challenges/angry-children/problem
int solveMinMax(vector<int>& s, int k){
sort(s.begin(), s.end());
k--;
int min_uniformity = std::numeric_limits<int>::max();
for(int i = 0; i < s.siz... | ALGO | 0.999491 | 4.241151 |
de4def30-bff2-4a61-9ed5-69215aff7a05 | rajjasoliya/myProblemSolvings | test.cpp | #include<bits/stdc++.h>
using namespace std;
int getMax(int a[], int n) {
int max = a[0];
for(int i = 1; i<n; i++) {
if(a[i] > max)
max = a[i];
}
return max; //maximum element from the array
}
string countSort(int a[], int n) // function to perform counting sort
{
int ... | ALGO | 0.999767 | 4.141194 |
8c17db49-dff3-462c-837f-e23cfe8ef6f2 | KYENS/gem5_v20.1_ramulator | src/systemc/tests/systemc/misc/user_guide/chpt11.2/mean.cpp | /*****************************************************************************
mean.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*****************************************************************************
... | ALGO | 0.999244 | 4.592771 |
83965fed-9ee8-400b-bd81-20b12d95a0eb | imromanticcat/chessengine | Pruning/Board.cpp | #include <functional>
#include "Board.h"
//! - print(), print_movable_cases() Լ
#include <iostream>
#include <Windows.h>
#include <conio.h>
#include "pruning_tree.h"
Board::Board() {
for (int idx = WK; idx <= BP; ++idx)
_exist[idx] = 0;
turn = Empty;
castling_K = false;
castling_Q = false;
castling_k = fals... | ALGO | 0.955056 | 5.049512 |
2f1c262c-931f-4c1b-9adb-39346c18818a | sajalAppdevs/flutter-video-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.998756 | 6.772262 |
75b9aceb-a503-4b5a-97cc-6eb9ba23ef83 | kendreaditya/ap-csa | C++/Chapter 3/Polynomial Operator Overloading/Polynomial Operator Overloading/Polynomial.cpp | #include"Polynomial.h"
#include<iostream>
#include<string>
using namespace std;
Polynomial::Polynomial()
{
for (int x = 0; x < 11; x++)
{
coeff[x] = 0;
}
degree = 0;
}
Polynomial::Polynomial(int c[], int d)
{
for (int x = 0; x <=d ; x++)
{
coeff[x] = c[x];
}
for (int x = d + 1; x <= 10; x++)
{
coeff[x]... | TOOL | 0.978296 | 3.610281 |
96eda664-68bf-45f2-a43f-23ba37f347af | JeromeTH/CSES | NumberSpiral.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
long long int find(long long int a, long long int b)
{
int n = 0;
while(n < max(a , b) - 1){
n++;
}
int count = n * n;
if (n % 2 == 0){
if (a >= b) count += b;
... | ALGO | 0.999673 | 3.963814 |
eeb5dc14-0a42-44b3-acf4-81ca92d371ea | ishandutta2007/codeforces | 12tqian/normal/1372/D.cpp | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("unroll-loops")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#i... | ALGO | 0.999988 | 4.421095 |
2d8a631e-e7df-4b1d-a34b-d6d90c2e970c | AsadullahGalib007/Codeforces | contest1176problemB.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n,c=0;
cin>>n;
int a[n];
for(int i=0; i<n; i++)
{
cin>>a[i];
}
sort(a, a+n);
for(int i=1; i<=n; i++)
{
if((a[i]+a[i... | ALGO | 0.999519 | 3.767547 |
376033dc-ffa6-4cc0-81e2-ff8396164001 | lkv01/cpp_practice_lkv01 | cp_questions_codeforces_codechef/B_Cat_Cycle.cpp | // #include <iostream>
// #include <string>
// #include <vector>
// #include <deque>
// #include <list>
// #include <set>
// #include <map>
// #include <stack>
// #include <algorithm>
// typedef long long ll;
// using namespace std;
// int main() {
// int t;
// cin>>t;
// while(t--) {
// int n,k;cin... | ALGO | 0.999547 | 4.190972 |
cfef6cdd-617e-4d04-8f83-3ada78186e25 | ShreyJ1729/Competitive-Programming | Project Euler/solutions/P16.cpp | #include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main()
{
vector<int> num;
num.push_back(1);
int carry = 0;
int power = 1000;
// iterate as many times as power
for (int curr_pow = 0; curr_pow < power; curr_pow++)
{
// first double everyhting in the v... | ALGO | 0.999871 | 4.537701 |
8729b829-41cb-4be1-a758-5a88fd9a69c2 | anmolsmann/Data_Structures | test.cpp | #include <iostream>
using namespace std;
class Node{
public:
int data;
Node *next;
Node(int data){
this -> data = data;
this -> next = NULL;
}
};
void print(Node *head){
Node *temp = head;
while(temp != NULL){
cout << temp -> data << " ";
temp = temp -> next;
... | ALGO | 0.994271 | 3.9582 |
38c36cc8-339b-486d-950b-08095992d8f4 | sunnymac/navigationdemo | 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.998762 | 6.786404 |
f30baa68-18d0-4097-90c7-8719bc34da5b | abhagangwar712/DSA | Recursion + Backtracking/39_leetcode.cpp | // LEETCODE LINK : https://leetcode.com/problems/combination-sum/submissions/1684756014/
#include <vector>
using namespace std;
class Solution {
public:
void backtrack(vector<int>& candidates, int target, vector<vector<int>>& result, vector<int>& current, int index) {
if (target == 0) {
result.push_ba... | ALGO | 0.999972 | 6.797869 |
2296f6a0-477b-43dc-89ec-965e24a3061c | Kristoff-starling/OJ-Programmes | TopCoder/[TCO2013 AlgorithmRound3ADIV1B]Block3Checkers.cpp | // I'll always miss you like a darling.
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define LD long double
#define ull unsigned long long
#define uint unsigned int
#define x first
#define y second
#define pb push_back
#define pf push_front
#define mp make_pair
#define Pair pair<int,int>
#define ... | ALGO | 0.99878 | 4.292486 |
bd6b208b-02ee-4ae1-bfde-3ae67f10336f | Apress/learn-cocos2d-2 | Learn Cocos2d 2/CH12/PhysicsBox2D01/cocos2d-2.x-Box2D-ARC-iOS/libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp | #include <Box2D/Dynamics/Contacts/b2CircleContact.h>
#include <Box2D/Dynamics/b2Body.h>
#include <Box2D/Dynamics/b2Fixture.h>
#include <Box2D/Dynamics/b2WorldCallbacks.h>
#include <Box2D/Common/b2BlockAllocator.h>
#include <Box2D/Collision/b2TimeOfImpact.h>
#include <new>
using namespace std;
b2Contact* b2CircleConta... | ALGO | 0.963586 | 6.881729 |
fb488023-10fa-47ad-aeba-152287a39ccd | hakelakhan/Data-Structures-Problems | LinkedList_insert_data.cpp | #include <bits/stdc++.h>
using namespace std;
class SinglyLinkedListNode {
public:
int data;
SinglyLinkedListNode *next;
SinglyLinkedListNode(int node_data) {
this->data = node_data;
this->next = nullptr;
}
};
class SinglyLinkedList {
public:
S... | ALGO | 0.999881 | 3.949758 |
8a69d79b-54b6-4b19-aae4-192db78b66ce | kim0chan/PS | Codes/BOJ/11000-11999/11700-11799/11724.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> adj[1001];
bool visited[1001];
int N, M;
int main() {
cin.tie(0);
cin.sync_with_stdio(0);
cin >> N >> M;
while (M--) {
int u, v;
cin >> u >> v;
adj[u].push_back(v);
adj[v].push_back(u);
}
int solve = 0;
for (int i = 1; i <= N; i++) {
if (vis... | ALGO | 0.999738 | 4.940292 |
889445d4-b161-45d2-b602-0214d072e1f4 | eshohag/leetcode | solution/0000-0099/0089.Gray Code/Solution.cpp | class Solution {
public:
vector<int> grayCode(int n) {
vector<int> ans;
for (int i = 0; i < 1 << n; ++i) {
ans.push_back(i ^ (i >> 1));
}
return ans;
}
}; | ALGO | 0.999967 | 6.050643 |
e3e8dc4a-d5f3-4b5f-8c5f-6e8a7a44a309 | EthanShin/Hackerrank_cpp | 4.STL/3.Lower Bound-STL.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int N, Q;
vector<int> x;
cin >> N;
for (int i = 0; i < N; i++) {
int temp;
cin >> temp;
x.push_back(temp);
}
cin >> Q;
for (int i = 0; i < Q; i++) {
int y;
cin >> y;
int... | ALGO | 0.999899 | 4.118825 |
aff3cab1-4653-487f-b479-0aa27340d894 | Dilla444/Dilla-Safira_Tugas-Pratikum_StrukturData | pratikum 6 no 4.cpp | //DILLA SAFIRA
//20051397072
//MI_B_2020
#include <stdio.h>
#include <stdlib.h>
int prima(int n, int i){
if(n%i==0)
return 0;
if(i==2)
return 1;
prima(n, i-1);
}
int main()
{
int i,n, output;
printf("DILLA SAFIRA\n");
printf("20051397072\n");
printf("MI_B_2020\n");
printf("Input bilangan : ");
scanf("%d", &n)... | ALGO | 0.9997 | 3.796175 |
7f90152f-3e46-4617-af42-4589835ae8fd | darosior/ordisrespectooor | src/policy/fees.cpp | #include <policy/fees.h>
#include <clientversion.h>
#include <consensus/amount.h>
#include <kernel/mempool_entry.h>
#include <logging.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <random.h>
#include <serialize.h>
#include <streams.h>
#include <sync.h>
#include <tinyformat.h>
#include <ui... | ALGO | 0.987966 | 7.320181 |
985cb464-846d-4973-96a6-70bf7322fe34 | wiemrezgui/TPSCompilation | UPDATE C/AA2.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define MAX_STATES 10
#define MAX_SYMBOLS 10
// Définir les symboles terminaux et non-terminaux
enum Symbol {
ID, PLUS, MULT, LPAREN, RPAREN, END, // Terminaux
E, T, F, S_PRIME // Non-terminaux
};
// Définir les actions possibles... | ALGO | 0.999688 | 6.175829 |
7339b266-d6c5-428d-839b-b8a48fc51eb2 | Kiki1875b/BOJ | 프로그래머스/3/132266. 부대복귀/부대복귀.cpp | #include <bits/stdc++.h>
using namespace std;
/*
* 두 지역 간의 길을 통과 하는데 걸리는 시간은 모두 1
* 각 부대원 은 최단 시간 부대로 복귀 하고자 한다
* 되돌아 오는 경로가 없어져 복귀가 불가능 할 수도 있다
* 총 지역의 수 = n
* 왕복할 수 있는 길 2차원 배열 = roads
* 서로 다른 지역들을 나타내는 정수 배열 = sources
* 부대의 지역 = destination
*
* sources 의 원소... | ALGO | 0.999651 | 5.423743 |
f679204e-8d4f-4d8a-9450-015f8132c86c | amengol/GameEngine_101 | Physics/bullet_src/BulletCollision/Gimpact/gim_contact.cpp | #include "gim_contact.h"
#define MAX_COINCIDENT 8
void gim_contact_array::merge_contacts(
const gim_contact_array & contacts, bool normal_contact_average)
{
clear();
if(contacts.size()==1)
{
push_back(contacts.back());
return;
}
gim_array<GIM_RSORT_TOKEN> keycontacts(contacts.size());
keycontacts.resize(... | ALGO | 0.994033 | 4.558418 |
ae8239d6-5e75-43f0-be9c-566a32f71408 | hayrapetyanishkhan/Algorithms | Bounds.cpp | #include "Headers.hpp"
int LowerBound(const std::vector<int>& nums,int target)
{
int start = 0;
int end = nums.size();
int mid;
while(start < end)
{
mid = start + (end - start) / 2;
if(nums[mid] >= target)
{
end = mid;
}
else
{
... | ALGO | 0.999152 | 5.114528 |
c7663e68-a636-4362-8ed0-1ce7d5a67aa9 | yuii88/View_detection_python | opencv/opencv-master/samples/cpp/flann_search_dataset.cpp | // flann_search_dataset.cpp
// Naive program to search a query picture in a dataset illustrating usage of FLANN
#include <iostream>
#include <vector>
#include "opencv2/core.hpp"
#include "opencv2/core/utils/filesystem.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/flann.hpp"
u... | ALGO | 0.996465 | 5.997706 |
99baffb3-c358-41a3-90e1-75e753f6a7f8 | 170300STM/170300-Assignment2 | ShoppingCart.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{ // iNITIALIZATION SECTION
double cart, total, new_total;
// END OF THE SECTION
// INPUT SECTION
cout << "Please enter the total amount: ";
cin >> total;
// END OF THE SECTION
// IF-ELSE SECTION
if (total >= 60000)... | TOOL | 0.86778 | 4.112985 |
15aa2325-4a77-483f-a7c3-4571cdd6090a | robturtle/crypto-projects | project2/src/enc.cpp | #include <iostream>
#include "crypto.hpp"
using namespace std;
using namespace crypto;
int main(void) {
string plaintext, key;
getline(cin, plaintext);
getline(cin, key);
cout << aes_128_gcm_encrypt(plaintext, key) << endl;
}
| ALGO | 0.976153 | 5.285079 |
13fddc4a-a63e-4898-9d67-b91624fd2175 | MustafaAhmed313/Codeforses-PS-Training | B/Drinks.cpp | #include <bits/stdc++.h>
#define ll long long
#define N 1e18
#define large (1e9 + 5)
#define all(v) v.begin() , v.end()
#define lower s.begin() , s.end() , s.begin() , ::tolower
#define upper s.begin() , s.end() , s.begin() , ::toupper
using namespace std;
void solve() {
ll n;cin >> n;
double avg = 0;
fo... | ALGO | 0.99853 | 3.993999 |
19c11590-940e-460b-916f-62c2d58f863a | winstondcosta/Data-Structures-and-Algorithms | 12.Binary Trees and BST/3_Height_and_levelOrder.cpp | #include<bits/stdc++.h>
using namespace std;
class node{
public:
int data;
node *left;
node *right;
node(int d){
data = d;
left = NULL;
right = NULL;
}
};
node* buildTree(){
int d;
cin>>d;
if(d==-1){
return NULL;
}
node *root = new node(d);
root->left = buildTree();
root->right ... | ALGO | 0.999812 | 4.335962 |
c914801a-0154-4149-a1c1-bf7b2c5b01d4 | satyam-7318/Striver_SDE_Sheet_2022 | Dayy15 String/Longest Common Prefix.cpp | https://leetcode.com/problems/longest-common-prefix/
class Solution {
public:
// static bool cmp(string a , string b){
// if(a.size()<b.size())
// return true;
// return false;
// }
// string longestCommonPrefix(vector<string>& strs) {
// ... | ALGO | 0.999674 | 5.402694 |
c5ff2f61-73e5-4e2a-8477-4a70fa60488e | Ritesh7000/STL | 6_Final_LIST/Final_ListCode_Tamplate.cpp | #include<iostream>
using std::cout;
using std::endl;
using std::cin;
using std::ostream;
template<typename T>
class CList;
template <typename T>
void MyMain(T );
template <typename T>
void printLists(CList<T> &, CList<T> &);
template <typename T, typename Iterator>
typename Iterator find(Iterator, Iterator, T);
t... | ALGO | 0.959126 | 3.396508 |
dc337f1d-ae85-47f1-9a59-4f40fd121d2d | johnsonfight/Riderless-Bicycle | eFLL/examples/sample01.cpp | #include <iostream>
#include "../FuzzyRule.h"
#include "../FuzzyComposition.h"
#include "../Fuzzy.h"
#include "../FuzzyRuleConsequent.h"
#include "../FuzzyOutput.h"
#include "../FuzzyInput.h"
#include "../FuzzyIO.h"
#include "../FuzzySet.h"
#include "../FuzzyRuleAntecedent.h"
using namespace std;
int main(int argc, c... | ALGO | 0.999222 | 4.479089 |
d10fb02a-2757-47dc-b58d-2e46b2b67b8a | ishandutta2007/codeforces | songc/normal/1726/A.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define MOD 1000000007
#define INF (1ll<<62)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
int TC, N;
int A[101010];
int main(){
sca... | ALGO | 0.999681 | 4.319493 |
1059dd2c-d5da-4e37-ba8e-674c578b6d14 | Joel970203/CodeExperience | 프로그래머스/1/12906. 같은 숫자는 싫어/같은 숫자는 싫어.cpp | #include <vector>
#include <iostream>
using namespace std;
vector<int> solution(vector<int> arr) {
vector<int> ans;
for (int i = 0; i < arr.size(); i++) {
if (i == 0 || arr[i] != arr[i - 1]) {
ans.push_back(arr[i]);
}
}
return ans;
} | ALGO | 0.999889 | 5.553527 |
8ab7a9dc-92e7-48f2-a1cc-6c6bfc9ab270 | ITC-Vanadzor/ITC-7 | Ani_Saghatelyan/Classwork/Vagharsh _Ani/19.11.15/Darts.cpp | # include <iostream>
void CheckDarts( char* Darts){
int count=0;
for(int i=0; i<246; ++i){
if(Darts[i]=='>'){
if(Darts[i+1]=='>' && Darts[i+2]=='-' && Darts[i+3]=='-' &&Darts[i+4]=='>'){
++count;
}
}
if(Darts[i]=='<'){
... | ALGO | 0.999561 | 3.781483 |
3a4b3a09-3562-423a-bb95-152467fbd278 | ManishMandrai/Day-1 | new.cpp | #include <iostream>
using namespace std;
int main()
{
int a = 10, b = 20;
bool result = (a > 5 && b > 30);
cout << "Logical AND (a > 5 && b < 30): " << result << endl;
result = (a > 15 || b < 30);
cout << "Logical OR (a > 15 || b < 30): " << result << endl;
result = !(a > 15);
cout << "Lo... | TOOL | 0.943396 | 3.393918 |
a6e0093a-9f38-4b26-a3fb-34e7007fe67a | biTLegi0n/DSA-Codes-w-Explanation | bITmanip/Hacks_For_BitManip.cpp | /**
* @file Hacks_For_BitManip.cpp
* @author your name (<EMAIL>)
* @brief
* @version 0.1
* @date 2021-07-04
*
* @copyright Copyright (c) 2021
*
*
It is recommended to refer Interesting facts about Bitwise Operators as a prerequisite.
1. How to set a bit in the number ‘num’ :
If we want to set a bit at nth posi... | ALGO | 0.9976 | 4.688882 |
2737f255-8641-4937-87d4-dae416f63516 | ishandutta2007/codeforces | a.k.e.e/normal/1344/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
#define x first
#define y second
#define mp make_pair
#define pb push_back
template <typename TYPE> inline void chkmax(TYPE &x,TYPE y){x<y?x=y:TYPE();}
template <typename TYPE> inline void chkm... | ALGO | 0.999734 | 4.290912 |
c3fc3ee3-1a96-4d28-8b22-bffe13f6daf0 | ishandutta2007/codeforces | krijgertje/normal/1238/C.cpp | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <list>
#include <cassert>
#include <ctime>
#include... | ALGO | 0.999933 | 3.789342 |
d690095a-66a7-46e0-bd3a-28b5501d528a | ronnyzzzz/code_samples | listing_4.22.cpp | #include <future>
std::future<FinalResult> process_data(std::vector<MyData>& vec)
{
size_t const chunk_size=whatever;
std::vector<std::future<ChunkResult>> results;
for(auto begin=vec.begin(),end=vec.end();beg!=end;){
size_t const remaining_size=end-begin;
size_t const this_chunk_size=std::m... | DATA | 0.853425 | 4.367018 |
c44befbb-1c52-4b40-942e-5a5ea192e8f3 | green-fox-academy/julcsi2121 | week-01/day-5/PalindromeBuilder/main.cpp | #include <iostream>
std::string reverseString(std::string example, int size);
int main() {
std::cout << "Give me a string" << std::endl;
std::string example;
std::cin >> example;
std::cout << example;
int size = example.length();
std::string palindrom = reverseString(example, size);
std::c... | ALGO | 0.941271 | 5.470388 |
01a4607f-a7c1-41fb-8bf8-12c0284cdbc1 | sl1296/acm-code | uvalive-7635-3 TimeLimitExceed.cpp |
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int dis[3100][3100];
inline int get_dis(const int& x1,const int& y1,const int& x2,const int& y2)
{
return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
}
int n,m;
int px[3100],py[3100];
int main()
{
while(scanf("%d%d",&n,&m)!=EOF)
{
if(... | ALGO | 0.999863 | 3.545845 |
33121368-b09e-4ee8-b7c0-a005bbaf5a65 | luchiito95/FacialRecognition | src/main/resources/opencv/sources/modules/objdetect/test/test_aruco_utils.cpp | #include "test_aruco_utils.hpp"
namespace opencv_test {
vector<Point2f> getAxis(InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _rvec,
InputArray _tvec, float length, const Point2f offset) {
vector<Point3f> axis;
axis.push_back(Point3f(offset.x, offset.y, 0.f));
axis.p... | TEST | 0.917242 | 6.714052 |
ee99bd2b-8322-49b7-aab0-d44e17a20fa1 | bdcbqa314159/numMFcpp | cpp/src/bsModel01.cpp | #include "../include/numMFcpp_bits/bsModel01.hpp"
#include <iostream>
#include <cmath>
const double pi = 4. * atan(1.);
double gauss()
{
double u1 = (std::rand() + 1) / (RAND_MAX + 1.);
double u2 = (std::rand() + 1) / (RAND_MAX + 1.);
return sqrt(-2. * log(u1)) * cos(2. * pi * u2);
}
void BSModel::gene... | ALGO | 0.992958 | 3.600485 |
a02450aa-173b-4257-a6b1-aa303e2be5ab | alexandraback/datacollection | solutions_5688567749672960_1/C++/tommek/a.cpp | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef long double LD;
typedef vector<int> VI;
typedef pair<int,int> PII;
#define REP(i,n) for(int i=0;i<(n);++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=(b);--i)
#define FOREACH(it,v) for(decltype((v).begin(... | ALGO | 0.999815 | 3.695758 |
15f89a47-54af-45c3-9a6a-130409cad602 | AyushPandey1502/LeetCode-Questions | 3477-minimum-operations-to-make-binary-array-elements-equal-to-one-ii/3477-minimum-operations-to-make-binary-array-elements-equal-to-one-ii.cpp | class Solution {
public:
int minOperations(vector<int>& nums) {
int n = nums.size();
int count = 0;
bool flag = false;
for (int i = 0; i < n; i++) {
if(flag == true){
nums[i] = 1 - nums[i];
}
if (nums[i] == 0) {
coun... | ALGO | 0.999987 | 5.995874 |
6574083e-b87a-4ddf-ad95-be247ea7b12f | fnplus/interview-techdev-guide | Algorithms/Searching & Sorting/Insertion Sort/insertion_sort.cpp | // C++ program for insertion sort
#include <bits/stdc++.h>
using namespace std;
/* Function to sort an array using insertion sort*/
void insertionSort(int arr[], int n)
{
int i, key, j;
for (i = 1; i < n; i++)
{
key = arr[i];
j = i - 1;
/* Move elements of arr[... | ALGO | 0.999992 | 5.963044 |
189a8e4e-523b-430e-b864-051957b5546f | JoelJ18/Leetcode | 101-symmetric-tree/101-symmetric-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.999974 | 6.676256 |
b53f12ae-b58c-4187-b1ad-314ba2dd7567 | fredgrott/not_in_the_sdk | animations_demo/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.998315 | 6.763549 |
a12f2096-3b24-4e98-8340-39ff728551eb | 1838641320/newbee_code_store | 20.3/class和字典树.cpp | #include"stdafx.h"
#include<bits/stdc++.h>
using namespace std;
class Trie {
public:
struct node {
int num;
map<char,int> next;
};
vector<node> dt;
Trie() { dt.push_back({}); };
void insert(string &s,int k) {
int p=0;
for (char i:s) {
if (dt[p].next[i]) p=dt[p].next[i];
else {
dt[p].next[i]=dt.si... | ALGO | 0.999895 | 4.240794 |
e8a17842-92a2-4ce4-a65b-b4925aa27ae6 | frantgn90/miri-thesis | mcxx-2.1.0/src/tl/analysis/liveness/tl-liveness.cpp | #include "tl-analysis-utils.hpp"
#include "tl-liveness.hpp"
#include "tl-node.hpp"
#include "tl-task-concurrency.hpp"
namespace TL {
namespace Analysis {
// **************************************************************************************************** //
// ******************************* Class implemen... | ALGO | 0.999364 | 7.970096 |
fbe1db13-ef88-4b7d-a4cd-672132078514 | Ddyln/CP | Codeforces/1574B.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
int a[3], m;
signed main() {
#ifdef lan_ngu
freopen("test.inp", "r", stdin);
freopen("test.out", "w", stdout);
#endif
int _nt;
cin >> _nt;
while (_nt--) {
int x = 5;
if (x = 0)
... | ALGO | 0.992429 | 3.341493 |
8f50bbae-1b84-4be0-8dd6-41a6932e643c | ishandutta2007/codeforces | potato167/normal/1406/D.cpp | #include <bits/stdc++.h>
using namespace std;
int64_t zero=0;
int main() {
int64_t N,Z=0;
cin>>N;
vector<int64_t> p(N);
for(int i=0;i<N;i++){
cin>>p[i];
}
vector<int64_t> q(N-1);
for(int i=0;i<N-1;i++){
q[i]=p[i+1]-p[i];
if(q[i]>0){
Z+=q[i];
}
}
if(Z+1+p[0]>0){
cout<<(Z+1+p... | ALGO | 0.999685 | 3.623443 |
b7325dcc-e42a-4c1d-a5e0-1932e5312a86 | mailtokartik1/InterviewBit-Solutions | Cpp/Arrays/Problems/spiral-order-matrix-ii.cpp | vector<vector<int> > Solution::generateMatrix(int A) {
vector<vector<int> > B(A, vector<int>(A));
// Corner case
if (A <= 0) {
return B;
}
int temp = 1;
// I know variables are usually supposed to start with a lowercase letter, I know *sigh*
// Keep 4 variables to mark the 4 corn... | ALGO | 0.999123 | 4.07818 |
df3be57f-91e9-4c13-8af2-a7f2a8cefec6 | muyi110/DataStructures | introduction/lcs.cpp | /***********************************************************/
/*
* 最长公共子序列(Longest Common Subsequence)
*/
/***********************************************************/
#include <iostream>
#include <cstring>
#include <vector>
/*
* 版本1:迭代版本
* 时间复杂度:O(n+m)(最好情况), O(2^n)(最坏情况)
*/
int max(int a, int b){
return (a ... | ALGO | 0.999904 | 4.545609 |
a8660d39-7c5c-49fe-817d-6838064744ae | maxkrivenya/250501 | serious/lab7srs/Source.cpp | #include "please_work.h"
void strinput(char* mom, int a, int num) {
printf("input string %d ", a-1);
rewind(stdin);
fgets(mom, num, stdin);
}
//считывание строки
char** stralloc(int n, ...) {
int a = 1;
int* p = &n + 2;
char** str = (char**)calloc(a, sizeof(char*));
for (p; n > 0 ; n--) {
str = (char**... | TOOL | 0.985295 | 3.345659 |
1704007c-fa70-411b-a11c-5b6975cff741 | swapnilhota/interviewBit | Two Pointers/Sort by Color.cpp | void merge(vector<int> &A, int left, int mid, int right)
{
vector<int> l;
vector<int> r;
for(int i=left; i<=mid; i++)
{
l.push_back(A[i]);
}
for(int i=mid+1; i<=right; i++)
{
r.push_back(A[i]);
}
int x=left;
int i=0;
int j=0;
while(i<l.size() && ... | ALGO | 0.999993 | 5.468705 |
c1a37e64-5994-48ca-8d1b-90e1bc12ff80 | ecent16/Number-Sequence | Number_Sequences.cpp | // DataStructure_Assignment5_Part2_Centeno.cpp
// Ervin Centeno
// March 5, 2019
#include "pch.h"
#include "Sort_Sequence_Centeno.h"
#include <iostream>
#include <cctype>
#include <cassert>
#include <cstdlib>
using namespace std;
// FUNCTION PROTOTYPE
void print_menu();
// Postcondition: This function will print ou... | ALGO | 0.987952 | 4.733448 |
bc047a69-ba30-4447-a654-0db2a073994e | vkuzmov/di | BinTree/BinTree/BinTree.cpp | #include "BinTree.h"
using namespace std;
BinTree::BinTree()
{
this->root = NULL;
}
BinTree::~BinTree()
{
this->DeleteTree(this->root);
}
BinTree::BinTree(const BinTree &source)
{
this->CopyTree(this->root, source.root);
}
BinTree & BinTree::operator=(const BinTree &right)
{
if (this != &right)
... | ALGO | 0.999705 | 4.561588 |
e6da1c77-78be-4f8b-865d-68a148817419 | AlexFourgs/TIRobot | ATI/Opencv_fonctionnel_2016/opencv-2.4.10/samples/cpp/bagofwords_classification.cpp | #include "opencv2/opencv_modules.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/nonfree.hpp"
#include "opencv2/ml/ml.hpp"
#ifdef HAVE_OPENCV_OCL
#define _OCL_SVM_ 1 //select whether using ocl::svm method or not, d... | ALGO | 0.916603 | 6.812798 |
0e713ddd-b958-4b85-bd3c-7d1662f17864 | Keisuke-eng/opencv-haarcascades | samples/cpp/squares.cpp |
// The "Square Detector" program.
// It loads several images sequentially and tries to find squares in
// each image
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
static void he... | TOOL | 0.997497 | 5.996675 |
06eab7ed-802d-4e49-9607-1d2d07507855 | abckhush/DSA-QA | 102. Binary Tree Level Order Traversal.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.999963 | 6.216107 |
09131c21-081e-408f-9306-ab3322042569 | ishandutta2007/codeforces | rniya/normal/360/C.cpp | #define LOCAL
#include <bits/stdc++.h>
using namespace std;
#pragma region Macros
typedef long long ll;
typedef __int128_t i128;
typedef unsigned int uint;
typedef unsigned long long ull;
#define ALL(x) (x).begin(), (x).end()
template <typename T> istream& operator>>(istream& is, vector<T>& v) {
for (T& x : v) is ... | ALGO | 0.999983 | 5.342558 |
cbae94b0-9917-48ef-89f1-b047cdce6528 | nagendrak/coursework | Algorithms_Specialization/course_3/prog_2/question2/clustering_big_v2.cpp | #include <iostream>
#include <cassert>
#include <fstream>
#include <sstream>
#include <climits>
#include <vector>
#include <list>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#define DESIRED_MIN_DIST 3
typedef struct sNODE {
std::string str;
long id;
long leader;
sNODE () : str(""),... | ALGO | 0.999849 | 5.332414 |
7a886839-6663-4146-925d-bc0b0c9a910b | Cellul4r/Comp_Programming | CSES/Sorting_and_Searching/Collecting_Numbers_2.cpp | #include<bits/stdc++.h>
using namespace std;
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void ... | ALGO | 0.999966 | 4.388246 |
2c049c01-4ece-49a0-a226-a9230b78b545 | techstormteam/12-vision-connect-ios-linphone | submodules/externals/openh264/codec/decoder/core/src/get_intra_predictor.cpp | #include <string.h>
#include "macros.h"
#include "ls_defines.h"
#include "get_intra_predictor.h"
namespace WelsDec {
#define I4x4_COUNT 4
#define I8x8_COUNT 8
#define I16x16_COUNT 16
void WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
const uint32_t kuiVal = LD32A4 (pPred - kiStride);
ST32A4 (p... | ALGO | 0.99982 | 5.610734 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.