uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
703cb8b4-63b0-4fc3-a3b9-c5aee8c092ce
isham-26/codeforces
old-code/all_qus/sorting_with_twos.cpp
#include <bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } int k=1; int j=0; while(j<n){ for(int i=j+1;i<min(n,k);i++){ if(arr[i-1]>arr[i]){ cout<<"NO"<<endl; retu...
ALGO
0.999905
4.396235
ed25b266-d8dd-42ae-9e0a-51bf61908e42
svn2github/ChessGNU
tags/v6.2.5/src/engine/move_do.cpp
// move_do.cpp // includes #include "attack.h" #include "board.h" #include "colour.h" #include "hash.h" #include "move.h" #include "move_do.h" #include "pawn.h" // TODO: bit.h #include "piece.h" #include "pst.h" #include "random.h" #include "util.h" #include "value.h" namespace engine { // variables static int Cas...
ALGO
0.975126
6.469171
e52635d2-b82f-4892-8f5f-9de88fbef4a8
drazovicfilip/ObjectOriented
Ass3/poolgame.cpp
#include "poolgame.h" #include "stage2ball.h" #include "stage3ball.h" #include "stage3table.h" #include "cueballdecorator.h" #include <cmath> PoolGame::~PoolGame() { for(Ball * b: m_balls) { delete b; } delete m_table; } std::vector<Ball*> PoolGame::copyBalls(std::vector<Ball*> balls){ std...
ALGO
0.903966
4.388438
c762365a-00ac-45de-86fe-86fb795c3e09
ishandutta2007/codeforces
aryanc403/normal/1065/E.cpp
/* Compete against Yourself. Author - Aryan (@aryanc403) */ /* Credits - Atcoder library - https://atcoder.github.io/ac-library/production/document_en/ (namespace atcoder) Github source code of library - https://github.com/atcoder/ac-library/tree/master/atcoder https://codeforces.com/contest/4/submission/15...
ALGO
0.99982
3.474422
02316490-b1fd-4228-aecc-0db2ddb3dbca
Vedang1510/DSA-Problems
Arrays/reverse.cpp
// reverse using recursion #include<bits/stdc++.h> using namespace std; class reverseArray { public: vector<int> ans; int func(int arr[], int i){ if (i > 3) return i; func(arr,i+1); ans.push_back(arr[i]); } void printfunc(){ for (auto n: ans) ...
ALGO
0.999336
4.770638
55c0474c-5c66-4c27-a427-c61604da415e
ishandutta2007/codeforces
origenes/normal/1200/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define ROF(i, a, b) for (int (i) = (a); (i) >= (b); (i)--) #define REP(i, n) FOR(i, 0, (n)-1) #define sqr(x) ((x) * (x)) #define all(x) (x).begin(), (x).end() #de...
ALGO
0.999984
4.588643
f69feea7-fd88-4b58-9911-ec5ca795b50b
sejinik/Algorithm
codeforces/R_569(Div.2)/C.cpp
//자료구조 deque에 관한 문제이다 //앞에 수를 AB라 할 때 큰수는 남고 작은수는 맨 뒤로 보낸다 //그 때 쿼리가 날라오고 쿼리가 n일때 n번째 순서에서 AB를 출력하면 된다 //쿼리가 10^18 까지 들어오니까 규칙을 찾으면 된다 //가장 큰수가 맨앞에오면 그 다음부터는 그냥 순서대로 일정하게 뒤의 수가 차례대로 나온다 //가장 큰수가 앞에올 경우까지 시물레이션을 돌리자 //그 값을 d에 저장하고 //가장 큰수를 제외한 나머지수를 차례대로 dp 에 저장하자 //쿼리 q가 들어왔을때 가장큰수를 찾을 때 까지 index보다 작으면 d에서 //크면 q-=inde...
ALGO
0.999975
3.868685
18b28c6e-0b75-446c-b6de-4ae7932c0097
akhileshmendon/leetcode_solutions
two_sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int, int> mp; for(int i = 0; i< nums.size(); i++){ if(mp.find(target - nums[i]) == mp.end()) mp[nums[i]] = i; else return {mp[target - nums[i]],i}; } retu...
ALGO
0.999797
6.249488
eb3d8b5e-da6e-4a1b-9203-d67204c2dfa6
webdirects/DSA
arrays/aarray.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int array[n]; for(int i=0; i<n; i++) { cin >> array[i]; } for(int i=0; i<n; i++) { cout << array[i] << " "; } }
ALGO
0.967967
3.579082
b8fcf4b2-2f31-4fe5-b36d-4c809a67f633
Shashank727663/CSES-Graphs-Practice-problems-
CodeForces/BuyingAHouse.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; typedef long long int lli; vector<int> vis; vector<vector<int>> adj; vector<int> costs; int main() { int n, m, k; cin >> n >> m >> k; adj.resize(n + 2); vis.resize(n + 2, 0); costs.resize(n + 2); ...
ALGO
0.999968
4.592781
57c4d155-afe6-402f-97a4-a295e6647eea
re1yun/Algorithm_Study
Programmers/Level2/무인도 여행/무인도 여행.cpp
#include <string> #include <vector> #include <algorithm> #include <queue> using namespace std; vector<int> solution(vector<string> maps) { // init vector<int> answer; // maps_V: check visited, 0: unvisted, 1: visited vector<vector<int>> maps_V(maps.size(), vector<int>(maps[0].size(), 0)); // dx &...
ALGO
0.999877
5.256062
3d01e449-ed87-4e78-9de0-0fbbf4289179
ankitsharma1530/DSA-topics
Sort/1508. Range Sum of Sorted Subarray Sums.cpp
class Solution { public: int rangeSum(vector<int>& nums, int n, int left, int right) { vector<int>arr; arr.push_back(nums[0]); for(int i=1;i<n;i++) { arr.push_back(arr[i-1]+nums[i]); } vector<int>res; for(int i=0;i<n-1;i++) { re...
ALGO
0.99997
5.329713
90271d48-0478-4235-a7a7-34c46f4a8cb6
jeetsavsani1173/LeetCode-Solution
Maximum Width of Tree - GFG/maximum-width-of-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; temp->right = NULL; ...
ALGO
0.999505
6.87745
d5114fa9-3536-4bc5-8d9a-4233936e527c
NestedLoof/HungryBunny
HelloWorld/GameLogic.cpp
#include "GameLogic.h" // TODO - Move some methods into a World/Level class before making new levels void GameLogic::SpawnVegetables() { // if there is room for an extra carrot, spawn one at random (about a second delay on average) if (ShouldSpawnVegetable()) { const Play::Point2D vegetablePos = GetNewVegetableP...
ALGO
0.954906
5.619425
dfea3d78-d69a-4424-9eef-fcee76354bb9
zhuango/leetCode
cppForLeetcode/848_ShiftingLetters.cpp
#include <string> #include <vector> #include <unordered_map> #include <iostream> using namespace std; class Solution { public: string shiftingLetters(string S, vector<int>& shifts) { int mm = 0x7fffffff; for(int i = shifts.size()-1; i > 0; --i) { shifts[i-1] += shifts[i] % 26; ...
ALGO
0.999957
5.194769
69c2f49a-5ff1-47ee-918a-86f4837fcdf9
netpipe/IrrlichtDemos
Games/PIRATES/libraries/bullet3/src/BulletSoftBody/btSoftBodyHelpers.cpp
///btSoftBodyHelpers.cpp by Nathanael Presson #include "btSoftBodyInternals.h" #include <stdio.h> #include <string.h> #include "btSoftBodyHelpers.h" #include "LinearMath/btConvexHull.h" #include "LinearMath/btConvexHullComputer.h" // static void drawVertex( btIDebugDraw* idraw, const btVector3& x,btScal...
TOOL
0.891965
5.095106
a195728a-c864-4d4a-9d56-1db292577918
niharikaa26/DSA
lec-4/switch.cpp
#include<iostream> using namespace std; int main(){ int x; cout<<"enter day:"<< endl; cin>> x; switch(x){ case 1: cout<< "monday"; break; case 2: cout<< "tuesday"; break; case 3: cout<< "wednesday"; break; case 4: cout<< "thursday"; break; case 5: cout<< "frid...
TOOL
0.99584
3.11649
449a6c09-ba63-4586-9bcd-aae5d1095389
fling2/platform_frameworks_av
media/libmedia/MediaScanner.cpp
//#define LOG_NDEBUG 0 #define RETRY_TIMES 3 #define LOG_TAG "MediaScanner" #include <cutils/properties.h> #include <utils/Log.h> #include <media/mediascanner.h> #include <fcntl.h> /* Definition of AT_* constants */ #include <sys/stat.h> #include <dirent.h> #include <sys/ioctl.h> #include <linux/msdos_fs.h> namespac...
TOOL
0.867127
5.642684
ea2c39ec-b6cf-4d17-9e23-fe3717bf0be0
dinhtuyen3011/cpp
abc/p1.cpp
#include <iostream> using namespace std; int main(){ int n; cin>>n; int sum=0; for(int i=1;i<=n;i++){ for(int j=1;j<=n-i+1;j++){ sum+=j; } } cout<<sum; return 0; }
ALGO
0.999721
4.032639
c4191e46-b778-4082-9950-12e872a58a77
satwikdivate/6Companies30Days
Atlassian/throten_inheritance.cpp
// class ThroneInheritance { // private: // struct Node { // std::string name; // Node* parent; // bool dead; // std::vector<Node*> children; // Node(std::string name, Node* parent) : name(name), parent(parent), dead(false) {} // void addChild(Node* node) { // ...
ALGO
0.999298
6.388574
c05f3281-0cbb-4cf9-8da8-ef3cdf15bd32
shejialuo/LeetcodeBook
src/chapter_5/code/add-two-numbers.cpp
/* * @lc app=leetcode.cn id=2 lang=cpp * * [2] Add Two Numbers */ #include <memory> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; ListNode *addTw...
ALGO
0.999723
6.527317
a03cef21-5b9a-4e3f-aa0a-6b57ff7e6cff
aquaboxs-forks/mame
3rdparty/rapidjson/example/serialize/serialize.cpp
// Serialize example // This example shows writing JSON string with writer directly. #include "rapidjson/prettywriter.h" // for stringify JSON #include <cstdio> #include <string> #include <vector> using namespace rapidjson; class Person { public: Person(const std::string& name, unsigned age) : name_(name), age_(...
TOOL
0.870264
7.009494
8478ee11-f6cc-4915-bf93-f8b472cdcf22
Kesu8888/leetcode
c++/leetcode41i.cpp
// // Created by Kesu Peterill on 6/12/2024. // //Better runtime variant #include "all.h" class leetcode41i { public: int sol(vector<int>& nums) { for(int i=0;i<nums.size();) { if((long)nums[i]-1<nums.size() && (long)nums[i]-1>=0 && nums[i]!=nums[(long)nums[i]-1]) { int t=nums[...
ALGO
0.999967
5.84473
321318ba-5784-4d26-a41b-1ab8ecb680c0
ritik955/Newton_School_DSA_Assignments
Nov Assignment/One_D_Arrays/SimpleArragement.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } for(int i=0;i<n;i++){ cout<<arr[arr[i]]<<" "; } return 0; }
ALGO
0.999844
3.56125
2473ac54-ec41-43b7-b489-b7fb0bf2bbf5
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_456_0.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 10; const int maxm = 3000 + 10; struct Edge { int v, l, r, next; Edge(int v = 0, int l = 0, int r = 0, int next = 0) : v(v), l(l), r(r), next(next) {} } edges[maxm << 1]; int head[maxn], nEdge, n, m; int a[maxm], b[maxm]; int vis[maxn], cnt...
ALGO
0.999977
4.454969
0dc0090a-c8cd-44b8-b435-0e401611c257
Solaman10/Poems
இரண்டாம் சுற்று/26.WildCard Matching("abcdef","a*d\f")/main.cpp
/* i/p: abcdefg a*de\g o/p: yes -------- i/p: abcdefg a\de*g o/p: no -------- Note: '\' Matches any single character '*' Matches any sequence of characters */ #include<bits/stdc++.h> using namespace std; class Solution { public: bool isMatch(string s, string p) { int i = 0, j = 0, iStar = -1, jStar...
ALGO
0.999853
3.874935
1e507d5c-d58b-4b83-b251-f32d9ba62dc5
Cattmonkey/openWork
webWork_backup/book/templates/examples/xkendl1.cpp
#include <string> #include <iostream> #include <iomanip> #include "nr.h" using namespace std; // Driver for routine kendl1 int main(void) { const int NDAT=200; const string txt[5]={"RAN0","RAN1","RAN2","RAN3","RAN4"}; int i,j; DP prob,tau,z; Vec_DP data1(NDAT),data2(NDAT); ...
ALGO
0.999096
4.678624
8ec319d0-df9a-4229-8007-6a1910feca4b
yhs0602/pytorch
torch/csrc/api/src/nn/modules/distance.cpp
#include <torch/nn/modules/distance.h> namespace F = torch::nn::functional; namespace torch::nn { CosineSimilarityImpl::CosineSimilarityImpl( const CosineSimilarityOptions& options_) : options(options_) {} void CosineSimilarityImpl::reset() {} void CosineSimilarityImpl::pretty_print(std::ostream& stream) c...
TOOL
0.894429
6.871532
5471c4fc-1ef1-47ff-95b2-aa54aae6ee41
IshratSwarna/Codeforces
cf1374E1.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define mkp make_pair #define pii pair<int,int> #define pi acos(-1.0) #define sorted(A) sort(A.begin(),A.end()); using namespace std; vector<ll>vecA; vector<ll>vecB; vector<ll>vecS; int main() { ll n,k,t; int a,b,check; ll La,Lb,Ls; ll i,...
ALGO
0.999966
3.242105
17a19a8a-f15f-406b-9174-cb394b7f3055
ashishpardeshi87/CPP-Assessment
Function.cpp
#include<iostream> using namespace std; int add(int a,int b){ return a+b; } int main(){ int num1=5,num2=10; int result=add(num1,num2); cout<<"Sum is:"<<result<<endl; return 0; }
TOOL
0.89773
4.602494
9d3fbc39-26ec-4506-a5f9-35745eb1aaa8
iamslash/learntocode
leetcode/CamelcaseMatching/a.cpp
#include <cstdio> #include <vector> #include <string> #include <cctype> #include <unordered_map> // queries = [ // "FooBar", // "FooBarTest", // "FootBall", // "FrameBuffer", // "ForceFeedBack"] // pattern = "FB" // // true,false,true,true,false // queries = [ // "FooBar", // "FooBarTest", // "F...
ALGO
0.988718
5.991574
edb71429-b90f-4588-9245-b66d4fe7ca27
VictorEijkhout/TheArtOfHPC_vol3_cppf08programming
Code/tinker/kent.cpp
#include <iostream> #include <vector> using std::cout,std::cerr,std::endl,std::vector; // using namespace std; #define N 10 int main(){ int index=5; // LOCATION 1 vector<int> memberList; // int index=5; // LOCATION 2 for (int i=0; i<N; ++i) { cerr << "push " << i << endl; ...
ALGO
0.955503
4.135203
0af4c004-2492-404b-8413-69781424e401
shreyakapoor08/CPP_Programs
tcs digital practice/maxquadproduct.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int *arr = new int[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } if(n<4){ cout<<"Invalid Input "; } //sort(arr, arr + n, greater<int>()); sort(arr, arr + n); //for ascending order double product...
ALGO
0.999957
3.783795
0defbf2c-0cf0-42ac-b43b-35323b833431
myself-rion/385-DSA-by-Shradha-Didi-Aman-Bhaiya
Tree/boundary_traversal.cpp
class Solution { private: void traverseLeft(Node *root, vector<int> &ans) { if (root == NULL || (root->left == NULL && root->right == NULL)) return; ans.push_back(root->data); if (root->left) { traverseLeft(root->left, ans); } else ...
ALGO
0.999982
6.120025
da787ddc-7165-4838-a9b8-61a6580b7ae9
alimottaghi/obtain
AlgorithmInterface/AlgorithmInterface_Audio.cpp
//===================================================================// // Beat Tracking Alogrithm // // Implemented on Software for Microsoft Windows // // // // Team of Sharif University of ...
ALGO
0.972204
5.763205
89b4838d-b756-48a3-aa52-37e1fbf61422
ishandutta2007/codeforces
bohdanpastuschak/normal/69/A.cpp
#include <iostream> #include <list> #include <algorithm> #include <vector> #include <string> #include <set> #include <queue> #include <iomanip> #include <cmath> #include <fstream> #include <map> using namespace std; #define ll long long int main() { int n; cin >> n; bool b = true; vector<int> x(n), y(n), z(n); fo...
ALGO
0.999511
3.703791
5550b9a5-314b-49ed-bb5a-420dfd28f24a
thund3rman3/FIT-CTU
BI-PA2 - C++/tasks/2024/4 - StudentDB(containers)/main.cpp
#ifndef __PROGTEST__ #include <cstdlib> #include <cstdio> #include <cstring> #include <cctype> #include <climits> #include <cassert> #include <iostream> #include <iomanip> #include <string> #include <array> #include <utility> #include <vector> #include <list> #include <set> #include <map> #include <unordered_set> #inc...
TOOL
0.97778
4.716989
88763dcc-f7ce-4ee1-9d6e-29da54f879c7
aki-ph-chem/try_neetcode
neet_code_150_cpp/binary_search/sorted_rot.cpp
#include <algorithm> #include <vector> #include <iostream> // AC class Solution { public: int find_min(std::vector<int>& nums) { std::size_t left = 0, right = nums.size() - 1; std::size_t mid = (left + right) / 2; while(left < right) { if(nums[mid] > num...
ALGO
0.999986
5.923637
a0f3f6f9-7b94-406b-a9e6-467a5c46029a
its-coder5128/leetcode
my-folder/problems/string_to_integer_(atoi)/solution.cpp
class Solution { public: int myAtoi(string s) { int i = 0; int n = s.size(); while(i<n && s[i] == ' ') i++; bool flag = 0; if(s[i] == '-') { flag = 1; i++; } else if(s[i] == '+') { i++; ...
ALGO
0.999438
4.918897
89bb5422-c107-47be-85bc-15596d4fdd7c
vishwaspaikra007/striver-SDE-sheet-challange
P-131 16 july 2022 Flatten Binary Tree to Linked List SC O(n).cpp
// striver SDE sheet challange Flatten Binary Tree to Linked List SC O(n) // author Vishwas Paikra /** * 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), l...
ALGO
0.999965
6.120131
e057b543-c515-49f3-a5a9-b55480604d05
SaiAnilKumarDeyyala/DataStructuresAndAlgorithmsInCPP
SortingAlgorithms/bubbleSort.cpp
/* Bubble Sort Implementation In C++ */ // Bubble Sort is a simple sorting algorithm that works by repeatedly swapping adjacent elements if they are in wrong order. // Bubble Sort is a comparison sorting algorithm // Bubble Sort is a stable sorting algorithm // Bubble Sort is an in-place algorithm #include<iostream> ...
ALGO
0.999974
5.868249
acf770ee-7794-41f8-944d-3c720aff8769
dreaming12580/ialgorithm
leetcode/cpp/numSquares.cpp
#include <vector> using namespace std; class Solution { public: int numSquares(int n) { // f[i] 表示最少需要多少个数的平方来表示整数 i vector<int> f(n + 1); for (int i = 1; i <= n; ++i) { int minn = INT_MAX; for (int j = 1; j * j <= i; ++j) { minn = min(minn, f[i - j * j]); } f[i] = minn + 1; } return f[n];...
ALGO
0.999885
5.323403
745b27ef-33b3-4bc4-bb71-3d9345e09b6a
reoden/tpl_ref
library/USI-ctl/graph/min-cost-max-flow-dij.cpp
/** * Author: Boboge adapted from zawei * Date: 23-02-06 * Description: min-cost-max-flow for graph $G = (V, E)$. Using dijkstra. * Run $compute(src, sink)$ for some $src$ and $sink$ to get the minimum cost and the maximum flow. Can \textbf{NOT} deal with negative costs. * Time: ??? * Status: tested */ template<...
ALGO
0.999394
3.981936
4cb2855c-21f0-4ebb-af7f-855196c93aef
mdfkbtc/PRiVCY
src/bls/bls_worker.cpp
#include <bls/bls_worker.h> #include <hash.h> #include <serialize.h> #include <util.h> template <typename T> bool VerifyVectorHelper(const std::vector<T>& vec, size_t start, size_t count) { if (start == 0 && count == 0) { count = vec.size(); } std::set<uint256> set; for (size_t i = start; i < ...
TOOL
0.96979
6.037484
30f22453-0fe7-4633-98d6-e4c36a301187
AyuTUL/AyushTuladhar2ndCSIT
DS/lab6.cpp
//Lab 6: Implementation of Factorial using Recursive Algorithm #include<iostream> using namespace std; long fact(int); int main() { int n; cout<<"Enter an integer : "; cin>>n; if(n<0) { cout<<"Factorial of negative integer doesn't exist."; return 0; } cout<<"Factorial of "<<n<<" = "<<fact(n); return 0; } ...
ALGO
0.999746
4.530112
eb60843b-6e46-4b44-a466-06f1b5041f15
Anshtripathi079/C_Cpp_DSA
basic problems/check_prime.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"Enter a number: "; cin>>n; int i; for (i=2; i<n; i++) { if (n%i==0) { cout<<"Not a prime"<<endl; break; } } if (i==n) { cout<<"Prime Number"<<endl; } return 0; }
ALGO
0.996938
3.126118
bf67c925-f8ad-42a2-a8d7-18e8402b8ef5
Sukant-cyber/C---Practice
p122.cpp
#include<bits/stdc++.h> using namespace std; void camel(string s) { for (int i = 0; i < s.length(); ++i) { // Check if the current character is uppercase if (isupper(s[i])) { // If not the first character, print a new line if (i != 0) { cout << endl; ...
ALGO
0.999905
5.558383
90be20c5-aa1f-40de-800c-3255dc4c3c1d
ishandutta2007/codeforces
liujunhao/normal/768/A.cpp
#include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<set> #include<map> #include<ext/pb_ds/priority_queue.hpp> #include<queue> #include<stack> #define push_back pb #define all(a) a.begin(),a.end() #define pointtype int #define pointtype_INT 1 using namespace std; typedef long long LL; typed...
ALGO
0.999864
3.490335
d6e0083a-c899-4063-952a-252e31202804
Fredtonyvel/code_assignments
cpp_codes/linked_lists/hackerrankLL/detectCycle.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; }; Node *Insert(Node *head, int data) { Node *ptr = head, *tmp = new Node(); tmp->data = data; tmp->next = NULL; if (head == NULL) { head = tmp; } else { for (; ptr->next != NULL; ptr...
ALGO
0.999746
4.8634
1f1c7951-b8b4-4398-9fd2-bdacc30e2d48
klublin/chess-engine
board/State.cpp
#include "State.hpp" #include "tables.hpp" void State::generate_hash(){ for(int p = P; p < no_piece; p++){ uint64_t board = bitboards[p]; while(board){ Square square = static_cast<Square>(get_lsb_index(board)); hash_key ^= table.piece_keys[p][square]; board &= ...
ALGO
0.966078
4.965536
2b44af8f-24ed-4fcd-b64c-33f8fb3ffe5e
ishandutta2007/codeforces
nuip/normal/605/A.cpp
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<set> #include<unordered_map> using namespace std; #define rep(X,Y) for(int (X) = 0; (X) < (Y); ++(X)) #define rrep(X,Y) for(int (X) = (Y)-1; (X) >=0; --(X)) #define sz size() #define X first #define Y second #define eb emplace_back #d...
ALGO
0.999963
3.746529
f2a076dc-4ed6-4992-9a1b-740c8f74a0cb
pritamchaudhary/DSA-Supreme-2.O
Week 13 Generic and Binary Trees/Assignment/findDuplicateSubtrees.cpp
// leetcode 652. Find Duplicate Subtrees // Given the root of a binary tree, return all duplicate subtrees. // For each kind of duplicate subtrees, you only need to return the root node of any one of them. // Two trees are duplicate if they have the same structure with the same node values. #include <iostream> #inc...
ALGO
0.999868
6.970898
686a0c73-4917-4dff-9436-7978504eb32b
dialectically/cartan-sync
C++/ROPTLIB/test/TestKarcherMean.cpp
#include "test/TestKarcherMean.h" using namespace ROPTLIB; #if !defined(MATLAB_MEX_FILE) && defined(TESTKARCHERMEAN) int main(void) { testKarcherMean(); return 0; } void testKarcherMean() { integer numP = 101, dim = 2, numC = 11, numS = 1; double *Qs = new double[numP*dim*numS]; integer NXD = nu...
TEST
0.974273
5.02915
f7ec775f-d75c-4729-a094-c976b6a688ef
abubakaristiak/CSE-Fundamentals
Basic Data Structures/Week 06- (BST, Heap, Priority Queue and Map)/Module- 21/_01_search_in_bst.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node *left; Node *right; Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; Node* input_tree() { int val; cin >> val; Node *root; if(val == -1...
ALGO
0.999951
3.95727
a3559f23-37c9-43d1-a16a-621d628ec1ad
mulani-arif/A2OJ-Ladder
11/57_puzzles.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; vector<int> v; int min=1000; for(int i=0;i<m;i++) { int temp; cin>>temp; v.push_back(temp); } sort(v.begin(),v.end()); for(int i=0;i<m-n+1;i++) { if((v[i+n-1]-v[i])<min) mi...
ALGO
0.999955
3.300958
22b65231-72e3-47a0-9887-75eda796d70b
artiam99/GeeksforGeeks
2 Linked List/33 Sorted Insert DLL.cpp
#include<bits/stdc++.h> using namespace std; struct node { int data; node* prev; node* next; }; node* getnode(int x) { node* temp = new node(); temp->data = x; temp->next = NULL; temp->prev = NULL; return temp; } void insert(int x , node** head , node** tail) { node* temp = getnode(x); if(*h...
ALGO
0.999835
3.986751
0dbe4c98-1111-4e17-a291-ddc16f8018ce
qtumproject/qtum
src/libff/libff/algebra/curves/edwards/edwards_g2.cpp
/** @file ***************************************************************************** * @author This file is part of libff, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ***********************************************************************...
ALGO
0.932362
6.947515
d1d02dcb-949f-47ec-99a9-2d28c19750f4
ranwei-rw/Hyperspectral-Imaging-Toolbox
sourcecode/stats/SuiteSparse/SPQR/Source/spqr_analyze.cpp
// ============================================================================= // === spqr_analyze ============================================================ // ============================================================================= // Given the nonzero pattern of a sparse m-by-n matrix A, analyze it for // ...
ALGO
0.999618
5.894205
03d10d66-3d4e-496b-8c20-696b702e9623
SWITCHSCIENCE/m5_gsitiles
TileImage.cpp
#include <stdio.h> #include <math.h> #include "TileImage.h" using namespace TileImage; #define _MY_MIN_(a, b) ((a) > (b) ? (b) : (a)) #define _MY_MAX_(a, b) ((a) > (b) ? (a) : (b)) #define _MY_ABS_(a) ((a) < 0 ? -(a) : (a)) ImageSource::ImageSource(uint8_t min_lvl, uint8_t max_lvl, uint16_t tile_sz, uint32_t img_w, ...
TOOL
0.895499
5.431651
0784ffc3-dd9a-4f25-a6b4-789337ee7dd1
Ian326/TC1031_ACT2.3
main.cpp
// ================================================================= // // File: main.cpp // Author: Ian Joab Padrón Corona - A01708940 // Date: 17-10-2022 // // ================================================================= #include <iostream> #include <vector> #include <fstream> #include <string> #include <sstrea...
TOOL
0.928598
3.418484
2ad8e686-e1ce-4303-a0b3-e90b36b7b38c
CodeNinjaGuy/Secure-MFA-Authenthification-Client
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
e9d3bddd-808f-4864-9b78-be84409fb5a8
marciohardcore/RMIT_ICPC
cses1163.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); ll x,n; cin>>x>>n; ll num, dis; set <ll> st{0, x}; multiset <ll> dist{x}; for (int i = 0; i < n; ++i){ cin>>num; //st.insert(num); auto ...
ALGO
0.999987
4.062311
66c7eb60-af54-49b0-b07b-93cb784636b2
virtualsecureplatform/llvm-rv16k
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp
// <algorithm> // template<ForwardIterator Iter, class T> // constexpr bool // constexpr after C++17 // binary_search(Iter first, Iter last, const T& value); #include <algorithm> #include <vector> #include <cassert> #include <cstddef> #include "test_macros.h" #include "test_iterators.h" #if TEST_STD_VER > ...
TEST
0.999023
7.465466
10ee9364-ffea-4e79-acea-d60b7cb572f7
BaGGeR322/hw_prog
13.03.20/bucketSort.cpp
#include <iostream> #include <vector> #include <string> #include <set> #include <time.h> #include <algorithm> #include <limits.h> #include <cstdlib> #include <stdio.h> #include <map> #include <cmath> #include <ctime> #include <fstream> #include <sstream> using namespace std; ifstream fin("input.txt"); ofstream fout("...
ALGO
0.999505
4.520686
f76290f0-8cf3-47bd-b374-dd321fc04499
lanukk/cp
cses/sortingAndSearching/stickLengths.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int int n; int *a; signed main() { cin >> n; a = new int[n]; for (int i = 0; i < n; i++)cin >> a[i]; sort(a, a + n); int ans = 0 ; for (int i = 0 ; i < n; i++) { ans += abs(a[i] - a[n / 2]); } cout << ans; }
ALGO
0.999352
3.999332
98b3c072-e580-4333-9780-e0945dbceac6
jun-pac/PS
240202/1set/Great Grid.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define cediv(a,b) ((a)%(b)==0?((a)/(b)):((a)/(b))+1) #define rng(i,a,b) for(int i=int(a);i<=int(b);i++) #define rep(i,b) rng(i,0,b-1) #define gnr(i,b,a) for(int i=int(b);i>=int(a);i--) #define per(i,b) gnr(i,b-1,0) #define pb push_back...
ALGO
0.999963
4.729496
7151ffcd-2cfa-4bc5-ac18-9ec2f15d3391
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12571_10.cpp
#include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"'; } string to_string(const char* s) { return to_string((string)s); } string to_string(bool s) { return to_string((int)s); } template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) ...
ALGO
0.999816
3.519084
5e03c475-d436-4c05-8ef6-91059307216d
rlaehgnss/PS
10812.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m, a[111]; cin>>n>>m; for (int i = 1; i<=n; i++) a[i]=i; while(m--) { int x, y, z, b[111]; cin>>x>>y>>z; for (int i = x; i <= y; i++) b[i] = a[i]; for (int i = x; i <= y; i++) { a[i] = b[z++]; ...
ALGO
0.999996
3.78289
f11dfb94-0900-40c0-9795-96f8bf8e0570
ishaofeng/LeetCode
FindMinimumInRotatedSortedArray/FindMinimumInRotatedSortedArray.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <cctype> using namespace std; class Solution { public: int findMin(vector<int> &num) { if (num.empty()) { return -1; } int beg = 0, end = num.size() - 1, mid; while (beg <= e...
ALGO
0.999871
4.997313
88b14519-7339-479a-98ba-9150ae4bc855
madhav592001/Striver-180
day1/setMatrixZero.cpp
Brute force 1. Traverse in the matrix and if 0 comes. 2. then traverse its entire row and column and set it to -1. 3. Whenever there is -1, fill it with 0 Optimized 1.Take two dummy arrays with the size of row and column 2. If there is 0 then set the index of row and column vector to 0 3. then traverse in the matrix a...
ALGO
0.999858
6.459641
898bd83c-63b3-4012-aa05-3ccfceabdf4d
puzzlecollector/Random-Codeforces-Topcoder
poj2431.cpp
// slightly modified #include <iostream> #include <cstdlib> #include <algorithm> #include <queue> using namespace std; const int MAXN = 10005; int A[MAXN+1]; int B[MAXN+1]; int N,L,P; int main(){ cin >> N >> L >> P; for (int i = 0; i < N; i++){ cin >> A[i]; } for (int i = 0; i < N; i++){ cin >> B[i];...
ALGO
0.999947
3.263656
5ab392d3-27ae-46dc-9e0a-cf42a55ee73c
Faumaray/cad_test
3DLibrary/src/Helix.cpp
#include <Helix.hpp> #include <cmath> #include <numbers> #include <stdexcept> Helix::Helix(double radius, double step) : radius_(radius), step_(step) { if(radius_ < 0){ throw std::invalid_argument("Radius of Helix cannot be less than 0"); } }; const char* Helix::getName() const { return "Helix"; ...
ALGO
0.98019
5.319254
e3512f1a-f77b-4afe-a2bc-2ac8eda0949d
ephynjenga/Hotel-Mnagement
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
ca3cd13f-5376-41b8-b41d-d4cbcb0a61f9
porjesuraj/Learning-Cplusplus
Practice/Day1-12Feb/matrixMultiplication.cpp
#include<iostream> using namespace std; int main(void) { int r,c,i,j,k; cout<<"enter the number of row="; cin>>r; cout<<"enter the number of column="; cin>>c; int arr1[r][c],arr2[r][c],mult[r][c]; cout<<"enter the first matrix element=\n"; for(i = 0; i < r; i++) { for(j = 0; j < c; j++) ...
ALGO
0.99963
3.251399
4823c5c7-dbee-4abb-8ac8-a111300f057f
soficrisl/unipadondeapp
unipadonde/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.998657
6.76775
4d48c114-69f6-4d05-bd36-f35997adb3d7
mlkorra/Prep
Operation S/GFG/Sorting/BubbleSort.cpp
/* Bubble Sorting : Worst Case Complexity : O(n^2) */ #include <bits/stdc++.h> using namespace std; void BubbleSort(int A[],int n) { int i,j; for(i=0;i<n-1;i++){ for(j=0;j<n-i-1;j++){ if(A[j]>A[j+1]) swap(A[j],A[j+1]); } } } void printArray(int A[],int n) { int i; for(i=0;i<n;i++){ cout << A[i] << " "...
ALGO
0.999933
4.846321
2f773044-02d2-4c3d-a0b9-f0ea070d7174
HumbertoJunior/FECG_CNN
Testes/cnnTest/eigen/bench/benchCholesky.cpp
// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT // options: // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/Cholesky> #include <bench/BenchUtil.h> using na...
TEST
0.995055
5.938015
e5781d5c-cb36-4025-ae69-fc4e1b262b9e
nmicovic/tonytester
tests/test03/NIZN.cpp
#include <iostream> int main() { long long n; std::cin >> n; n--; for (long long i = 1; i <= n; i++) n -= i; std::cout << n+1 << std::endl; return 0; }
ALGO
0.999412
3.423745
42ac6682-63d0-4715-b664-0c768dc87459
lzyrapx/Codeforces
17D(数论 + 广义欧拉定理降幂).cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1000100; char b[N],n[N]; int phi(int x) { int res=x; for(int i=2;i*i<=x;i++)if(x%i==0) { res=res/i*(i-1); while(x%i==0)x/=i; } if(x>1)res=res/x*(x-1); return res; } int q_pow(int a,int k,int mod) { ...
ALGO
0.999987
4.013492
e53d79e6-b19d-497f-933e-534e0edcd83f
christianreyner/ardupilot
libraries/AP_HAL_Linux/Flow_PX4.cpp
#include <AP_HAL/AP_HAL.h> #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP #include "Flow_PX4.h" #include <cmath> #include <stdio.h> #include <stdlib.h> extern const AP_HAL::HAL& hal; using namespace Linux; Flow_PX4::Flow_PX4(uint32_t width, uint32_t bytesperline, uint32_t max_flow_...
ALGO
0.992542
5.151992
919d0d73-4b80-4d89-8046-757ec4b33abe
swapnilsachan03/cp31
900/D_Balanced_Round.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vvi vector<vector<int>> #define pii pair<int, int> #define vii vector<pair<int, int>> void solve() { int n, k; cin >> n >> k; vi nums(n); for (int i = 0; i < n; i++) { cin >> nums[i]; } sort(num...
ALGO
0.999816
4.121195
862d8fbb-7808-4f79-9a33-5052b255f3f4
Nobu19800/openrtm_utils
SettingRTSystem/SettingRTSystem/Components/PIDController/RTMath/RTMath.cpp
/*! * @file RTMath.cpp * @brief 数値計算関連の関数 * */ #include "RTMath.h" /*int RTAbs(int input) { return abs(input); }; double RTAbs(double input) { return std::abs(input); }; float RTAbs(float input) { return std::abs(input); }; double RTSin(double input) { return sin(input); } float RTSin(float input) { ret...
TOOL
0.997341
4.871923
c1c23a4b-a144-4ab4-b914-df97649d91df
KrebsFlorian/MasterThesis
Code Generator OpenCL async with GUI/Converter_RVC_Cpp.cpp
#include "Converter_RVC_Cpp.hpp" #include <iostream> #include <algorithm> #include "Tokenizer.hpp" namespace Converter_RVC_Cpp { std::string convert_inline_if_with_list_assignment(std::string string_to_convert, std::map<std::string, std::string>& global_map, std::map<std::string, std::string>& local_map, std::string p...
TOOL
0.877383
5.274304
5dacc8bc-430f-49a8-bf98-3be843066519
AnuragChouhanDEV/LeetCode
number-of-steps-to-reduce-a-number-to-zero/Accepted/5-28-2022, 3_23_33 AM/Solution.cpp
// https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero class Solution { public: int numberOfSteps(int num) { int steps = 0; while(num) { num = (num & 1) ? num - 1: num >> 1; steps++; } return steps; } };
ALGO
0.999988
6.368494
78790249-a67f-43b2-9fdf-e02fa86f1cfd
ZHANG-SHI-CHANG/pytorch-cv
model/csrc/cpu/roialign_cpu.cpp
#include <ATen/TensorUtils.h> #include "cpu/vision.h" // implementation taken from Caffe2 template <typename T> struct PreCalc { int pos1; int pos2; int pos3; int pos4; T w1; T w2; T w3; T w4; }; template <typename T> void pre_calc_for_bilinear_interpolate( const int height, const int width, ...
DATA
0.952709
6.471403
f96c0457-68de-4089-addf-7dc02133069d
bhartik021/Data-Structure-Algorithm
Queue/Code : Queue Using LL.cpp
/************************************************************ Following is the structure of the node class class Node { public : int data; Node *next; Node(int data) { this->data = data; next = NULL; } }; ********************************************************...
ALGO
0.999544
5.253024
cc14abbd-9151-4294-9b26-190a6028507f
UPCACM/DuckKnowNothing
src/GraphAlgorithm/连通图/连通图_Tarjan.cpp
int top;//这个是用作栈顶的指针 int Stack[maxn];//维护的一个栈 bool instack[maxn];//instack[i]为真表示i在栈中 int DFN[maxn],LOW[maxn]; int Belong[maxn];//Belong[i] = a; 表示i这个点属于第a个连通分量 int Bcnt,Dindex;//Bcnt用来记录连通分量的个数,Dindex表示到达某个点的时间 void tarjan(int u) { int v; DFN[u]=LOW[u] = ++ Dindex;//这里要注意 Dindex是初始化为0,这里就不能 Dindex++; 不然第一个点的DF...
ALGO
0.999505
4.264957
fef49a97-7d32-4fba-ac75-3ea1990019bb
philma/uva_cpp
10773/10773.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { int t = 0; cin >> t; for(int i = 0; i < t; ++i) { double d = 0, v = 0, u = 0; cin >> d >> v >> u; cout << "Case " << i + 1 << ": "; if(!(u > 0 && v > 0 && u > v)) cout ...
ALGO
0.999171
4.291601
f94b1999-02e2-4d95-9fe9-1d3fe31bcddd
LetMeFly666/various
Notes/ACM/Problems/递归实现排列型枚举/main.cpp
#include <bits/stdc++.h> using namespace std; #define mem(a) memset(a, 0, sizeof(a)) #define dbg(x) cout << #x << " = " << x << endl #define fi(i, l, r) for (int i = l; i < r; i++) #define cd(a) scanf("%d", &a) typedef long long ll; int order[11]; bool chosen[11]={0}; int n; void prt() { for(int i=1;i<=n;i++) ...
ALGO
0.999926
4.317232
61348ddc-7f3c-4885-97e8-d0c6c6ae976a
Varuni387/Amazon.github.io
Codes/fenwickTree.cpp
#include <iostream> #include <vector> using namespace std; class FenwickTree { private: long long n; vector<long long> bit; public: FenwickTree(long long n) : n(n), bit(n + 1, 0) {} void update(long long i, long long data) { while (i <= n) { bit[i] += data; ...
ALGO
0.999942
4.964014
6b5df4d1-fcb0-449b-b1c4-f28928ddc1f2
MikAmb95/IIWAFRI
Code_Governing_Unit/kuka_invkin_ctrl_ergs.cpp
#include "ros/ros.h" #include "boost/thread.hpp" #include "sensor_msgs/JointState.h" #include "geometry_msgs/Pose.h" #include <std_msgs/Float64.h> #include <iostream> #include <sstream> #include <fstream> #include <stdio.h> #include <fcntl.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/types.h> #includ...
TOOL
0.967417
3.282394
288b84d6-4f44-4764-9a57-72ec48cefb1e
Zimse12345/Code
Newcoder_Contest/牛客挑战赛67/B.cpp
/******************** *FileName: *Author: Zimse *Data: 2023-03- *Description: ********************/ #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #defi...
ALGO
0.999966
4.601489
c72055dd-c30d-4f53-8dbf-657e1fcbc226
Marcus-techtile/Mobile_robot_controllers
src/robot_controllers/robot_dynamic_controllers/include/eigen/bench/sparse_setter.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.985248
4.163536
43d0e159-54ad-419d-a98a-8b34ac5c8c5a
phrock/acm
spoj/LLCA/3.cpp
#include<iostream> #include<sstream> #include<string> using namespace std;int main(){string s;int T,k,a,b,ti,n,u,y,i,j,v[200],x,w;stringstream is;while(true){getline(cin,s);if(s=="")cout<<endl;else{is.str(s);is>>T;break;}}for(ti=0;ti<T;++ti){getline(cin,s);is.clear();is.str(s);is>>k>>a>>b;n=i=j=0;x=w=1;v[n++]=x;if(a<b)...
ALGO
0.999446
3.094862
2535c299-7e7f-4aa4-901c-6f5fee3a1d06
Orang123/ACMAlgorithmExercises
图论/最短路/拆点构建虚点思维建边/反向建边/CF 1272E Nearest Opposite Parity.cpp
#include<cstdio> #include<queue> #include<cstring> #include<algorithm> #define N 200100 #define INF 0x3f3f3f3f using namespace std; //򽨱 /* :n,ÿii+a[i],i-a[i]λ, ҪÿżʹżҪС. :https://codeforces.ml/problemset/problem/1272/E ˼·:򽨱,i->i+a[i],i->i-a[i],·ʱ, a[i]żҪż(i),ôҪһΪi·, ÿյΪijȶҪȽ̾,ÿ㶼һ·, TLE spfaɴ o(n^3),DijkstraҲO(n^2),n<...
ALGO
0.999942
3.615992
55d3bca2-87c4-4fba-ae1f-01f25d6f834b
karlosebalj/CppND-System-Monitor
src/linux_parser.cpp
#include <dirent.h> #include <unistd.h> #include <string> #include <vector> #include <unistd.h> #include "linux_parser.h" using std::stof; using std::string; using std::to_string; using std::vector; // DONE: An example of how to read data from the filesystem string LinuxParser::OperatingSystem() { string line; s...
TOOL
0.897826
4.255396
f9f6e476-1535-474b-889d-b2492ab89398
raincross7/code-similarity
codes/train_code/problem325/problem325_82.cpp
#include <iostream> #include <vector> #include <tuple> #include <deque> #include <set> #include <map> #include <cmath> #include <string> #include <algorithm> #include <unordered_map> #include <queue> using namespace std; typedef long long ll; typedef long double ld; #define fastInp cin.tie(0); cout.tie(0); ios_base::...
ALGO
0.999979
3.421686
decba897-f01d-427d-8b49-7724c31d0e62
vukbyk/suspiria
dep/assimp/code/Importer/IFC/IFCOpenings.cpp
/** @file IFCOpenings.cpp * @brief Implements a subset of Ifc CSG operations for pouring * holes for windows and doors into walls. */ #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER #include "IFCUtil.h" #include "Common/PolyTools.h" #include "PostProcessing/ProcessHelper.h" #ifdef ASSIMP_USE_HUNTER # include <poly2tri...
TOOL
0.924818
3.671853
d60ea265-8953-4dad-8fd9-808accac8a50
maruf-ahammed-75/problem-solve-for-cp
Code Forces/Wonderful-Sticks.cpp
#include <bits/stdc++.h> #define ll long long #define int long long #define ff first #define ss second #define full(a) a.begin(), a.end() #define Y cout<<"YES\n" #define N cout<<"NO\n" using namespace std; void I_Am_Here() { int n; cin>>n; string s; cin>>s; int i=1 ; int j = n; int k = n-2; ...
ALGO
0.999949
3.564618
39b74174-ddc3-4789-844f-d060768ee62c
prabhjotschugh/DSA-Solutions
0036-valid-sudoku/0036-valid-sudoku.cpp
class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { int row[9][10]; int col[9][10]; int block[9][10]; for(int i = 0; i < 9; i++) { for(int j = 0; j < 9; j++) { if(board[i][j] == '.') continue; int...
ALGO
0.999023
6.865607