uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
c29a3d31-3646-4042-b2e8-5ed5c893d75b
dapetcu21/Porkholt
Externals/box2d/Box2D/Box2D/Dynamics/b2World.cpp
#include <Box2D/Dynamics/b2World.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Dynamics/b2Island.h> #include <Box2D/Dynamics/Joints/b2PulleyJoint.h> #include <Box2D/Dynamics/Contacts/b2Contact.h> #include <Box2D/Dynamics/Contacts/b2ContactSolver.h> #include <Box2D/Collision...
ALGO
0.96575
3.623568
c4360fa5-135d-4bcc-9ebe-744943310e29
OPM/ResInsight
ThirdParty/NRLib/nrlib/iotools/fileio.cpp
//$Id: fileio.cpp 1068 2012-09-18 11:21:53Z perroe $ #include "fileio.hpp" #include "../exception/exception.hpp" #include "stringtools.hpp" //#define BOOST_FILESYSTEM_VERSION 2 #include <boost/filesystem.hpp> #include <fstream> #include <iostream> #include <locale> #include <sstream> #include <string> using namesp...
TOOL
0.921034
4.37099
9ef86ffd-158d-431c-9be2-6fdc11f55051
sarthakkapoor44/CP
D_World_is_Mine.cpp
///////////////////////////////////////////////////// DYNATOS //////////////////////////////////////////////////// #include<bits/stdc++.h> #pragma GCC optimize("O3,unroll-loops") #ifdef ONLINE_JUDGE #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #endif using namespace std; //#include <ext/pb_ds/assoc_container.hpp> /...
ALGO
0.999718
4.028111
e1358a59-edd0-4874-bbee-f74debb71d0b
RisshabSingla/LeetCode-C-Solutions
1806-count-of-matches-in-tournament/count-of-matches-in-tournament.cpp
class Solution { public: int numberOfMatches(int n) { return n-1; } };
ALGO
0.999844
4.091667
c4133eb8-0d4c-491d-bafc-9a52a49d093c
project-qmc/QMC
src/qt/rpcconsole.cpp
#include "rpcconsole.h" #include "ui_rpcconsole.h" #include "clientmodel.h" #include "guiutil.h" #include "peertablemodel.h" #include "chainparams.h" #include "main.h" #include "rpcclient.h" #include "rpcserver.h" #include "util.h" #include "json/json_spirit_value.h" #include <openssl/crypto.h> #ifdef ENABLE_WALLE...
TOOL
0.863955
6.577013
04a83089-2f2c-49a9-8747-7fbddcb5b0fe
prathameshhire/LeetCode
0230-kth-smallest-element-in-a-bst/0230-kth-smallest-element-in-a-bst.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.999996
6.535696
991bb589-14b3-4eeb-ae42-13e6e3968558
JHuraibi/Assignment_4-Heaps
Heap ADT/Heap ADT/Heap.cpp
//------------------------------------------------------------------------------------------- // // Laboratory 11 Heap ADT Heap.cpp // // Class implementation for the array implementation of the Heap ADataType // //------------------------------------------------------------------------------------------...
ALGO
0.996469
5.097348
93ce709a-aab0-4b88-883e-1f46cd13e3d6
Tanmay067/Algorithmic_Trading_Project
phase2/trader.cpp
// This is your trader. Place your orders from here #include <iostream> #include <string> #include <fstream> #include <vector> using namespace std; struct ll2 { string broker_name; // broker vector<string> company; // AMD, AMZN types vector<int> number; // number of stocks of each company int ...
ALGO
0.992593
4.259575
a057a9ab-a4e8-40f6-90c4-af1d72f13e21
reduce-algebra/reduce-algebra
csl/cslbase/arith-misc.cpp
#ifdef ARITHLIB // $Id$ // This contains some oddments of stray functions, including the ones // that return random and pseudo-random numbers. #include "arith-headers.h" // The intent here is to take a single precision floating point value and // mask off its low 4 bits. The code here is a fine example of the sort ...
ALGO
0.997533
5.659113
badb62ab-b22d-40d6-b027-bc88cfe0da64
boatinw99/CompetitiveProgramming
Codeforces/1_13_6.cpp
#include<bits/stdc++.h> using namespace std ; const int N = 1e5+9; int qs[N] ; int dp[N]; main() { int n,m,i,j,min1=1e9+5,max1=0,l,r,x ; scanf("%d %d",&n,&m); while(m--) { scanf("%d %d %d",&l,&r,&x); min1=min(min1,x); qs[l]+=x; qs[r+1]-=x; dp[1]=max(dp[1],l-1); ...
ALGO
0.999911
3.696172
922333a2-e0d3-4bb0-8ef1-42e10d89e8d1
aniketyd/leetcode_solution
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level/minimum-number-of-operations-to-sort-a-binary-tree-by-level.cpp
class Solution { public: int minimumOperations(TreeNode* root) { queue<TreeNode*> queue; queue.push(root); int swaps = 0; // Process tree level by level using BFS while (!queue.empty()) { int levelSize = queue.size(); vector<pair<int, int>> nodes(leve...
ALGO
0.999994
6.991692
94e10645-d455-4b72-bfc3-34e1941c3885
bigy2012/chatapp_firebase
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
2aad9f0e-6c52-46e6-bae3-90bba8e92a63
nduong18/DSA_CODE.PTIT_nduong18
DSA02030 - LIỆT KÊ XÂU KÝ TỰ.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; //GitHub: nduong18 int X[100], k; char N; void Try(int i, char start){ for (int j = start; j <= N; j++){ X[i] = j; if (i == k){ for (int t = 1; t <= k; t++) cout << (char)X[t]; cout << endl; } ...
ALGO
0.999812
3.651415
863dd621-dcbd-4a61-be33-ecff850e56c8
jackliu2013/recipes
cpp/cpp_primer_6/Chapter8/swaps.cpp
// swaps.cpp -- swapping with references and with pointers #include <iostream> void swapr(int & a, int & b); // a, b are aliases for ints void swapp(int * p, int * q); // p, q are addresses of ints void swapv(int a, int b); // a, b are new variables int main() { using namespace std; int wallet1 = 300;...
TOOL
0.992794
6.00984
69d459ce-ecc7-4f0a-a886-3faf825fb2d0
Mhdzakey/Mastering-Data-Structure-and-Algorithms-by-problem-solving
DSA/lec31/recursion.cpp
#include <iostream> using namespace std; /* //define factorial recursively int factorial(int n){ cout << n << " \n"; // Base case first likho // if(n == 0) return 1; return n = n * factorial(n - 1); if(n == 0 || n==1) { return 1; } else { return n = n * factorial(n ...
ALGO
0.999898
4.526786
36fbc93d-80db-4233-91ca-abae70f0e85b
jinyoung0612/Algorithm
c++/BOJ/math/1929.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; #define MAX 1000001 bool arr[MAX]; int main(void){ int M,N; cin>>M>>N; arr[1]=1; for(int i=2; i<sqrt(N); i++){ for(int j=i*i; j<=N; j+=i){ if(arr[j]==0){ arr[j]=1; } ...
ALGO
0.999974
3.824636
ad7e799f-e1b3-4a22-b384-fe194d847cc6
fabiocasmar/diseno-algoritmos-1
P3/2-BABY/p2.cpp
/* / ci5651 (Diseño de Algoritmos I) - Proyecto 3 - Problema BABY SPOJ / Fabio, Castro, 10-10132 / Leopoldo, Pimentel 06-40095 */ /* Se utilizó una estartegia top-down usando memorizacion en un / vector de bits. Donde, se se hace uso de una máscara de bits, / que indica que posiciones se han usado o no en dicho mom...
ALGO
0.999592
5.039039
98e207d6-a0da-4ed6-8f49-53f315a2bb44
SheikhArfin0/Learning-Data-structure
number_location.cpp
#include<iostream> using namespace std; int main() { int A[25],n,i,x; cout<<"Enter the element number: "; cin>>n; cout<<"Enter the elements: "; for(i=0;i<n;i++) { cin>>A[i]; } cout<<"Enter the target element: "; cin>>x; for(i=0;i<n;i++) { if(A[i]==x) { cout<<x<<" is found"<<" & it's location is "...
ALGO
0.999647
4.324435
e3239445-0c66-45a1-8b28-02783a78aef1
mauroberto/maratona
estruturas/priority_queue.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vi> vvi; typedef set<int> si; typedef map<string, int> msi; #d...
ALGO
0.998962
3.905675
a79af4b3-b597-4dcd-ad7a-e80e33de1651
baofuhann/FISCO_BCOS_FL
deps/src/boost/libs/compute/perf/perf_bolt_partial_sum.cpp
#include <iostream> #include <algorithm> #include <vector> #include <bolt/cl/scan.h> #include <bolt/cl/copy.h> #include <bolt/cl/device_vector.h> #include "perf.hpp" int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; bolt::cl::control ctrl = bo...
ALGO
0.934301
4.070592
5b284177-ad45-4946-8666-bc629d35fc31
THU-DSP-LAB/llvm-project
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2> // requires indirectly_copyable<I1, I2> // constexpr ranges::copy_backward_result<I1, I2> // ranges::copy_backward(I1 first, S1 last, I2 result); // template<bidirec...
TEST
0.923002
7.667341
b4b94ac0-5267-457f-a1bb-1c11259e3afa
jocic/jocic
other/dsa/quick-sort/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void print_arr(vector<int>& arr) { for (const auto& n : arr) { cout << n << " "; } cout << endl; } void quick_sort(vector<int>& arr, int left = -1, int right = -1) { if (left == -1) { left = 0; } ...
ALGO
0.999972
5.602253
0640d2ae-5045-4e61-afd6-fe9c12cb733f
Yang2096/snippet
leetcode/contest/197-3.cpp
#include "pch.h" double maxProbability(int n, const vector<vector<int>> &edges,const vector<double> &succProb, int start, int end) { vector<vector<pair<int, double>>> mat(n); int edge_num = edges.size(); for (int i = 0; i < edge_num; ++i) { mat[edges[i][0]].emplace_back(edges[i][1], succProb[i]...
ALGO
0.999411
4.717198
55266c0b-b9b1-4822-b193-84f8ebbe9539
sedihub/project_euler
problems_001-050/euler_42.cpp
/* PROBLEM: The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word v...
ALGO
0.997558
6.578358
d59a3adf-dde7-4d67-84f9-bcdfdcc051c9
actilogi/angorafdtd
src/fft/fft.cpp
//Definitions of the FFT wrappers //Whatever FFT is used, it should have the following: // 1) 2D FFT support (for imaging) // 2) 3D FFT support (for random-medium generation) // 3) complex<double> type support at the input // 4) Different FFT size than the input size #include "headers.h" //#include "fft.h" // #incl...
ALGO
0.993281
5.822902
491b008b-7037-4f2d-9089-f641f2d3ccca
Archit669/competitive-programming
codechef/april long challenge II 2022/best_coupon.cpp
#include <iostream> using namespace std; int main(){ int t; cin >> t; while (t--){ int x; cin >> x; if ((x - x/10) < (x-100)){ cout << x/10 << endl; }else{ cout << 100 << endl; } } return 0; }
ALGO
0.999769
3.950263
4a823046-994c-4124-accd-6dfd240abbac
DiveshChauhan123/Leetcode
0962-flip-string-to-monotone-increasing/0962-flip-string-to-monotone-increasing.cpp
class Solution { public: int solve(string &s,int curr,int prev,vector<vector<int>>&dp){ if(curr>=s.length())return 0; if(dp[curr][prev]!=-1)return dp[curr][prev]; int flip=INT_MAX; int notflip=INT_MAX; if(s[curr]=='0'){ if(prev==0){ flip=1+solve(s,curr+1,1,dp); notfli...
ALGO
0.999991
6.145432
e2ef4491-e93c-41f8-aca0-dbaeded4cafc
DukeIEEE/stockfishInterface
temp/stockfish-6-linux/src/movepick.cpp
#include <cassert> #include "movepick.h" #include "thread.h" namespace { enum Stages { MAIN_SEARCH, CAPTURES_S1, KILLERS_S1, QUIETS_1_S1, QUIETS_2_S1, BAD_CAPTURES_S1, EVASION, EVASIONS_S2, QSEARCH_0, CAPTURES_S3, QUIET_CHECKS_S3, QSEARCH_1, CAPTURES_S4, PROBCUT, CAPTURES_S5, RE...
ALGO
0.998651
7.850319
a3708600-b1b4-49ca-9734-2fff6f955402
byeongkukoh/algorithm
Cpp/BaekJoon/Bronze/B4_5524.cpp
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { string name; cin >> name; for (int j = 0; j < name.size(); j++) { if (name[j] >= 'A' && name[j] <= 'Z') { cout << char(name[j] + 32); } else { cout << ...
ALGO
0.999467
5.347304
34558a12-9132-4bb8-8e87-031d9758a583
Alex-Shen1121/SZU_Learning_Resource
计算机与软件学院/面向对象程序设计(荣誉)/大作业1/素材1/2017081130_1234_10.cpp
2017081130:Problem1234:𰸴 #include <iostream> #include<cstring> #include<cstdio> using namespace std; class Group { public: Group(){}; virtual int add(int x, int y) { return 1; } virtual int sub(int x, int y) { return 1; } }; class GroupA:virtual public Group { public: G...
ALGO
0.999784
3.916291
9835267b-a02f-44a2-b228-3871279c8061
mengjin-su/p16ecc
cc_source_8.11/p16e/pic16e5.cpp
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> #include <time.h> #include "../common.h" extern "C" { #include "../cc.h" } #include "../sizer.h" #include "../pcoder.h" #include "../display.h" #include "pic16e.h" #include "pic16e_asm.h" #include "pic16e_reg.h" #include "pic16e_inst.h" voi...
ALGO
0.946516
3.107007
46bd9898-f13b-49e0-abf9-e34087da6855
OpenCAXPlus/OpenCAXPlus
OpenDigitalTwin-main/tools/gmsh/contrib/Netgen/libsrc/stlgeom/stlgeomchart.cpp
//20.11.1999 third part of stlgeom.cc, functions with chart and atlas #include <mystdlib.h> #include <myadt.hpp> #include <linalg.hpp> #include <gprim.hpp> #include <meshing.hpp> #include "stlgeom.hpp" namespace netgen { int chartdebug = 0; void STLGeometry :: MakeAtlas(Mesh & mesh) { double h, h2; h = mpa...
ALGO
0.928213
4.816844
7d763c84-9853-4299-97a5-203445d86c6f
Abdelghafour2001/solo_learn_challenges
imagetriangle90.cpp
/*dessiner un triangle*/ #include<stdio.h> int main() { int n,i,j; printf("intro le nbre de ligne"); scanf("%d",&n); for(i=n;i>=1;i--) { for(j=i;j>=1;j--) { printf("@"); } printf("\n"); } return 0; }
ALGO
0.999372
3.198299
083bca47-5737-43f4-a49d-ff228721f174
shieldcoindevs/shieldcoin
src/addrman.cpp
#include "addrman.h" using namespace std; int CAddrInfo::GetTriedBucket(const std::vector<unsigned char> &nKey) const { CDataStream ss1(SER_GETHASH, 0); std::vector<unsigned char> vchKey = GetKey(); ss1 << nKey << vchKey; uint64_t hash1 = Hash(ss1.begin(), ss1.end()).Get64(); CDataStream ss2(SER_...
ALGO
0.970554
6.243333
b8a5c67a-1bbc-47d8-ab46-d1ebf5188d2f
Tushar-mn/dsa_practice
137-single-number-ii/single-number-ii.cpp
class Solution { public: int singleNumber(vector<int>& nums) { unordered_map<int,int> freq; for(int val: nums){ freq[val]++; } for(int val: nums){ if(freq[val] == 1){ return val; break; } } return ...
ALGO
0.999948
5.630252
df9abd25-0a1f-4a87-91e1-be8a0ed16c71
raincross7/code-similarity
codes/train_code/problem410/problem410_423.cpp
//Practice #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization ("unroll-loops") #include <bits/stdc++.h> #define ll long long using namespace std; const ll N = 2e5 + 5; const ll INF = 1e9 + 5; const ll mxN = 1000000007; const double E = 1e-9; //-----------------------------------...
ALGO
0.999984
3.565473
5f7e4876-7972-4c8a-86c9-34b035b75dee
Omer283/CPSubmissions
Codeforces/Codeforces Round #640 (Div. 4) - (B) Same Parity Summands.cpp
#define MOD 1000000007 #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define foru(i, k, n) for (int i = k; i < n; i++) #define ford(i, k, n) for (int i = k; i >= n; i--) #define pb push_back #define mp make_pair #define has(set, x) set.find(x) != set.end() #define nohas(set, x) set.find(x) == set.en...
ALGO
0.999716
3.993718
2c34b284-f725-4ea2-852e-dcb718781466
tempure/algorithm-advance
category/图论/单源最短路扩展/acwing_1137.cpp
#include <iostream> #include <algorithm> #include <cstring> using namespace std; //多起点 唯一终点 问题 //建立虚拟原点 与每个原点 连一条权值为0的边 //这样就不用每个起点都跑一次最短路了 只需要全图一次最短路即可 const int N = 1010, M = 21010, INF = 0x3f3f3f3f; //注意M边数的范围,多加了虚拟原点到所有起点的边 int n,m, T; int h[N], ne[M], e[M], idx, w[M]; int dist[N]; int q[N]; bool st[N]; void add...
ALGO
0.999972
4.519087
2d5132bc-a686-47f9-9866-4dad68e2e7f9
IslamAmr155/Problem-Solving
LeetCode/Medium/74. Search a 2D Matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int m = matrix.size(), n = matrix[0].size(); int s = 0, e = m*n - 1, mid; while (s <= e) { mid = s + (e - s) / 2; if (matrix[mid/n][mid%n] == target) return t...
ALGO
0.999879
6.329691
d99caefd-19ee-461f-859c-956e867ba30d
ManHunter1/40216341054581
c++/C++/C++/C++18.cpp
#include <iostream> using namespace std; int main() { int a, b, c, max; cout << " Enter your numbers "; cin >> a >> b >> c; max = a; if (b > max) max = b; if (c > max) max = c; cout << " The max is " << max << endl; }
ALGO
0.996945
3.904923
461d2e1e-4c9d-4b36-b783-814b56dd0848
jammy-6/DataStructure
STACK_QUEUE/ImplementStackByTree.cpp
#include "TreeNode.h" #include <bits/stdc++.h> using namespace std; class MyStack { public: queue<int> q; MyStack() {} void push(int x) { q.push(x); } int pop() { int size = q.size(); size--; while (size--) { q.push(q.front()); q.pop(); } int val = q.front(); q.pop(); ...
ALGO
0.988216
3.720345
0ff845a7-cd32-4e17-b44f-ada960a34283
alexandraback/datacollection
solutions_5634947029139456_0/C++/dc26/main.cpp
#include <iostream> #include<stdio.h> using namespace std; long long int scan() { long long int a; char c; while(c<33) c = getchar(); a = 0; while(c>33) { a = a*2 + c - '0'; c = getchar(); } return a; } int main() { long long int n,z,l,t,i,j,k,xx,c; long long int ini[155],req[155]; cin>>t; for(xx=1;xx<=t;xx++) ...
ALGO
0.999775
3.527471
38bc808e-d71e-49bb-9ad4-ba2b91395498
mahirhayaat4u/DSA
Array/binarysearch.cpp
class Solution { public: int search(vector<int>& nums, int target) { int size=nums.size(); int s=0; int e=size-1; while(s<=e){ int mid=s+(e-s)/2; if(nums[mid]==target){ return mid; } if(target>nums[mid]){ ...
ALGO
0.999937
6.181757
42b48ef3-794d-46d3-a393-14f7853be8d4
apple/llvm-project-v5
libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp
// <algorithm> // template<ForwardIterator Iter> // requires LessThanComparable<Iter::value_type> // bool // is_sorted(Iter first, Iter last); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h" #if TEST_STD_VER > 17 TEST_CONSTEXPR bool test_constexpr() { int ia[] ...
TEST
0.994738
6.825424
1a3773a3-9c41-4457-8708-b3729f59e80f
Sanchitarora01/5th_sem_training-cpp
DAY 10/accumulate.cpp
#include<iostream> #include<vector> #include<numeric> //for accumulate using namespace std; int main() { vector<int> numbers={1,2,3,4,5}; int sum=accumulate(numbers.begin(),numbers.end(),0,[](int total,int n){ return total+n; }); cout<<"sum : "<<sum<<endl; return 0; }
ALGO
0.999092
4.516143
2ec33573-db7b-49b6-906e-a92730bae218
tazkhan24/Coding-Questions
62-unique-paths/62-unique-paths.cpp
class Solution { public: int uniquePaths(int m, int n) { vector<int> pre(n,1), curr(n,1); for(int i=1;i<m;i++){ for(int j=1;j<n;j++){ curr[j]= pre[j]+curr[j-1]; } swap(pre,curr); } return pre[n-1]; } };
ALGO
0.999971
6.311135
fbf259c7-cf13-430b-a6bd-2008bf458666
Nomaan234/LEARNING_C_PLUS-PLUS
pattrenprinting.cpp/diff4verticalpyramid.cpp
#include <iostream> using namespace std; int main() { int n,m; cout<<"enter hieght of pyramid (half of it) : "; cin>>n; // cout<<"enter number of column : "; // cin>>m; for(int i=1 ; i<=n ; i++) { for(int j=1 ; j<=n-i ; j++) { cout<<" " ; ...
ALGO
0.999303
3.669031
a725c9b4-2d17-4881-a660-6fd7a07ef87b
ugozapad/FarCry
SourceCode/Editor/Util/ImagePainter.cpp
#include "StdAfx.h" #include "ImagePainter.h" #include "Image.h" ////////////////////////////////////////////////////////////////////////// CImagePainter::CImagePainter() {} ////////////////////////////////////////////////////////////////////////// CImagePainter::~CImagePainter() {} /////////////////////////////////...
TOOL
0.92202
4.723183
9848eb99-0645-4e3d-aca3-209738e2be6f
GOOTEAKIM/algo
C++/SSAFY_Embedded/SSAFY_Embedded/재귀함수3.cpp
#include <iostream> #include <vector> using namespace std; int N; int DAT[10]; void func(int now) { if (N == now) { for (int i = 0; i < N; i++) { cout << DAT[i] << " "; } cout << endl; return; } for (int i = 1; i <= 6; i++) { DAT[now] = i; func(now + 1); } } int main() { cin >> N; func...
ALGO
0.999642
4.453698
5f46c318-9938-4c3c-9e01-02c5cc586d2d
aryanharitsh123/Competitive-Programming-
A_Stable_Arrangement_of_Rooks.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lli; #define all(arr) arr.begin(),arr.end() #define f first #define s second #define debug1(x) cout<<x<<"\n" #define debug2(x,y) cout<<x<<" "<<y<<"\n" #define debug3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n" #define nl cout<<"\n"; #define pq priority_queue...
ALGO
0.987433
3.05994
df644816-f57f-4990-8611-79d85f86dc0b
Bevisy/flutter-app
passgen/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.99847
6.763549
03fc5bd0-81e7-48b4-8ea0-fd6a89d2195b
KiCadServices/kicad_base
3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/ctriangle.cpp
/** * @file ctriangle.cpp * @brief Implements a triangle ray intersection based on article: * http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_7_Kd-Trees_and_More_Speed.shtml * by Jacco Bikker, that implement optimizations based on Ingo Wald's thesis. */ #include "ctriangle.h" void CTRIANGLE::...
ALGO
0.98279
7.139203
986d6113-b5c5-4f10-82cb-a7709f1c9850
alex8937/Leetcode
383. Ransom Note.cpp
class Solution { public: bool canConstruct(string ransomNote, string magazine) { vector<int> dict(26, 0); for(char c : magazine) { dict[c - 'a']++; } for(char c : ransomNote) { dict[c - 'a']--; if(dict[c - 'a'] < 0) return false; } ...
ALGO
0.999928
6.404242
b0435c4a-cc81-44d7-8abd-5a52c7e31f5f
shubhamgarg9/spoj
COMDIV.cpp
#include<bits/stdc++.h> using namespace std; int gcd(int a,int b) { if(b==0) return a; return gcd(b,a%b); } int main() { int test; scanf("%d",&test); while(test--) { int a,b; scanf("%d%d",&a,&b); int t = gcd(a,b),ans=0; for(int i=1;i*i<=t;i++) { if(t%i==0) ans += 2; if(t%i==0 && i==t/i) ...
ALGO
0.999835
4.951268
2eb8dbac-0c9f-4729-8e11-d6a7d9a88fe8
jlanga/smsk_selection
src/guidance.v2.02/libs/phylogeny/C_evalParamUSSRV.cpp
// $Id: C_evalParamUSSRV.cpp 1915 2007-04-04 15:56:24Z privmane $ #include "C_evalParamUSSRV.h" // ********************* // * USSRV * // ********************* MDOUBLE C_evalParamUSSRV::operator() (MDOUBLE param) { setParam(param); MDOUBLE res = likelihoodComputation2USSRV::getTreeLikelihoodAllPos...
ALGO
0.969829
3.811006
0e058997-f89d-4678-829a-6e74ec1bb9e4
leo4048111/One-Leetcode-Everyday
1235-maximum-profit-in-job-scheduling.cpp
// https://leetcode.cn/problems/maximum-profit-in-job-scheduling/ class Solution { public: static bool cmp(pair<int, int> e1, pair<int, int> e2) { return e1.first < e2.first; } int jobScheduling(vector<int>& startTime, vector<int>& endTime, vector<int>& profit) { int len = startTime.size();...
ALGO
0.999993
5.924136
8cb91826-a06f-4133-a58a-e48532b9e358
RajThakur777/Leetcode-POTD
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.cpp
class Solution { public: int findTheCity(int n, vector<vector<int>>& edges, int distanceThreshold) { int N = edges.size(); vector<vector<int>> dist(n , vector<int>(n , INT_MAX)); for(int i=0; i<n; i++) { dist[i][i] = 0; } for(int i=0; i<N; i++) { int...
ALGO
0.999994
6.178905
e0d25df2-00be-48ef-ad88-7931030111b2
ishandutta2007/codeforces
rajat1603/normal/852/H.cpp
#include "bits/stdc++.h" using namespace std; struct point{ long long x , y; point(long long _x = 0 , long long _y = 0){ x = _x; y = _y; } point operator + (const point &other) const { return point(x + other.x , y + other.y); } point operator - (const point &other) const { return point(x - other.x , y - o...
ALGO
0.999534
4.254816
16a693b1-be3b-47f8-ae4e-986827816133
DreadArceus/Growth-Trackers
Calculator/Ideas/Vectors/Cross_Product.cpp
#include <iostream> #include <cmath> using namespace std; struct vector3D { int i; int j; int k; }; int main() { struct vector3D a, b, c; cin >> a.i >> a.j >> a.k >> b.i >> b.j >> b.k; c.i = (a.j * b.k) - (a.k * b.j); c.j = (a.i * b.k) - (a.k * b.i); c.k = (a.i * b.j) - (a.j * b.i); cout << "Cross ...
ALGO
0.999118
3.426861
f76e13af-46da-44fa-881f-ef5eb6326e45
openjdk/playground
src/hotspot/share/gc/g1/g1IHOPControl.cpp
#include "precompiled.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1IHOPControl.hpp" #include "gc/g1/g1Predictions.hpp" #include "gc/g1/g1Trace.hpp" #include "logging/log.hpp" G1IHOPControl::G1IHOPControl(double initial_ihop_percent, G1OldGenAllocationTracker const* ol...
ALGO
0.911702
7.790366
47c9ac02-cd86-4334-b295-63559fd64494
Abhinav-0103/DSA-CPP
4. Loops/Practice Questions/3_Reverse_A_Number.cpp
#include<iostream> using namespace std; int main() { int digit; cout << "Enter a digit : "; cin >> digit; int i = digit, sum = 0; while(i > 0) { int rem = i % 10; sum = (sum * 10) + rem; i/=10; } cout << "Reversed Number = " << sum << endl; return 0; }
ALGO
0.995686
4.688441
7732c272-0c58-474f-bcbb-41b965f39ca0
liuawen/Play-Leetcode
Play-Leetcode-master/0142-Linked-List-Cycle-II/cpp-0142/main.cpp
/// Source : https://leetcode.com/problems/linked-list-cycle-ii/description/ /// Author : liuyubobobo /// Time : 2017-12-09 #include <iostream> #include <cassert> #include <set> using namespace std; /// Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(...
ALGO
0.999972
5.623487
fe582343-8ed4-4436-b262-512c667ab86a
George778656890/Zhihong_Liu_CS2010_Lab4
DiceCrap.cpp
//Dice game---Craps #include <iostream> #include<string> #include<vector> #include<iterator> #include<type_traits> #include<iterator> #include<algorithm> #include<utility> #include<fstream> #include<cstdlib> #include <thread> // Required for sleep_for #include <chrono> // Required for milliseconds using std::cin; us...
TOOL
0.88954
5.084796
0c4077aa-1b60-4dad-93ba-5d92240ff8d6
SterbenDa/NYOJ-Linda
语言入门/比较字母大小/Untitled1.cpp
#include "iostream" using namespace std; int main(){ int n,i; char a,b; cin>>n; for(i=0;i<n;i++){ cin>>a>>b; if(a>b) cout<<a<<"<"<<b<<endl; else if(a==b) cout<<a<<"="<<b<<endl; else cout<<a<<">"<<b<<endl; } return 0; }
ALGO
0.999456
3.110808
70f26e7f-2deb-4871-84dc-b367b60aa965
PrathameshJadhav30/Striver-s-SDE-Sheet-LeetCode
10-Recursion and Backtracking/2-N queens Problem/NqueensProblem.cpp
// https://leetcode.com/problems/n-queens/description/ class Solution { public: // Function to check if placing a queen at board[row][col] is safe bool isSafe(vector<string> &board, int row, int col, int n) { // Check column for any queen placed above the current row for (int...
ALGO
0.99991
7.10107
6931f115-a796-49be-8a67-cc8dacfbd25c
kuramajssken001/Custom-cMangos-Classic
dep/tbb/src/old/concurrent_vector_v2.cpp
#include "concurrent_vector_v2.h" #include "tbb/tbb_machine.h" #include <stdexcept> #include "../tbb/itt_notify.h" #include "tbb/task.h" #include <cstring> #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4267) #endif namespace tbb...
TOOL
0.947465
7.319817
0fb4357e-c280-4389-87d9-05d3b08e8e9b
RogerHideki/Maratona
beecrowd/exs-23xx/ex-2388/beecrowd-ex-2388.cpp
#include <iostream> using namespace std; int main() { int n, t, v, distancia = 0; cin >> n; while (n--) { cin >> t >> v; distancia += (t * v); } cout << distancia << endl; return 0; }
ALGO
0.999629
4.324667
20aa5e68-6901-47de-8075-84ff1409a138
quocdung2603/ALL_OF_C
CodeForces/A_2048_Game.cpp
#include <bits/stdc++.h> using namespace std; #define nl << '\n' #define fi first #define se second #define vd vector<double> #define vi vector<int> #define vii vector<pair<int, int>> #define vtr vector<string> #define yes cout << "YES" #define no cout << "NO" #define int long long #define double long double #define pb...
ALGO
0.999713
4.193083
43112083-ca68-40e4-b26b-e5e9a9676220
dernDren161/DataStructuresAndAlgorithms
Facebook-Leet/VideoQuestions/BestTimeToBuyAndSellStocks-II.cpp
// Problem Link: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/submissions/ class Solution { public: int maxProfit(vector<int>& prices) { int n = prices.size(); if(n==0 || n == 1) return 0; int ans = 0; for(int i=0;i<n-1;i++){ if(prices[i+1]>price...
ALGO
0.999939
6.278838
c1b797ca-7010-49d2-88c0-c8246733bb60
atharvborse30/learn_cpp
Day_9/STL_Algorithm/25_lower_bound,upper_bound,binary_search/lower_bound,upper_bound,binary_search.cpp
#include <iostream> #include <algorithm> #include <vector> #include <iomanip> void print_v(const std::vector<int>& v){ for(size_t idx = 0; idx < v.size(); idx++){ std::cout << v[idx] << " \t| " << &v[idx] << std::endl; // std::cout << elem << " "; } std::cout << std::endl; } int main(){ ...
ALGO
0.99929
4.775316
a23270ae-1af8-437c-8365-544b4de1b928
Balzhan31/PP1
lab03/n.cpp
#include <iostream> using namespace std; int main(){ int n; cin >> n; int a[n]; for(int i = 0; i < n;i++){ cin >> a[i]; } for(int i = 0; i < n;i++){ cout << a[i] * a[i] << " "; } }
ALGO
0.999162
3.616201
05bcb4fb-2c16-4476-9160-d4e9cc90dc43
rohanberadev/DSA-Foundation
08_Stack_and_queues/01_Learning/06_Queue_using_stack/Brute/main.cpp
#include <bits/stdc++.h> #include <fstream> #include <stack> #include <streambuf> using namespace std; class Queue { private: stack<int> st1; stack<int> st2; public: Queue() {} // Time :- O(2 * N) void push(int x) { if (st1.empty()) { while (!st2.empty()) { st1.pus...
ALGO
0.999755
4.810604
4fb20a2d-65ee-4085-9e75-59a4a702a0e2
uncle-lu/surf-the-internet
luogu/3003.cpp
#include <algorithm> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int N = 1e5 + 10, M = 2e5 + 10; struct node { int v, next, val; }; struct heapnode { int v, w; friend bool operator<(const heapnode a, const heapnode b) { return a.w > b.w; } }; node edge[2 * M...
ALGO
0.999916
3.913094
89050b6e-b98d-4632-95ef-40cdb363c2b2
FlowSight/coding
company wise/metA/robot_to_print_smallest_string.cpp
// better way is with O(1) space.. //failed sev0 class Solution { public: string robotWithString(string s) { int n = s.size(); vector<char> sufMin(n,'*'); string t = "", p = ""; sufMin[n-1] = s[n-1]; for(auto i=n-2;i>=0;i--){ sufMin[i] = min(sufMin[i+1],s[i]); ...
ALGO
0.999987
6.188566
510da4f4-6d99-4f1b-8d53-b895af2842e3
civinx/ACM_Code
Practice/POJ/1258 Agri-Net (最小生成树 Kruskal)/1258 Agri-Net (最小生成树 Kruskal)/main.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int maxn = 200; const int maxm = 50000; int u[maxm], v[maxm], root[maxn], p[maxm], w[maxm]; bool cmp(const int i, const int j) { return w[i] < w[j]; } int find(int x) { return x == root[x] ? x : root[x] =...
ALGO
0.999978
3.76121
3e2c6f3a-475c-4465-b4eb-633243cfd871
Roman98nsk/Finaly-QW
Приложение/Marlin/src/gcode/probe/G38.cpp
#include "../../inc/MarlinConfig.h" #if ENABLED(G38_PROBE_TARGET) #include "../gcode.h" #include "../../module/endstops.h" #include "../../module/motion.h" #include "../../module/planner.h" #include "../../module/probe.h" inline void G38_single_probe(const uint8_t move_value) { endstops.enable(true); G38_move =...
ALGO
0.936269
7.689202
4c31a5d7-ea26-4521-8f32-df7066d4a20c
doctorlove/IntroducingCpp
chapter_07/main.cpp
#include <iostream> #include <random> #include "analysis.h" #include "input.h" void random_experiment() { std::random_device rd{}; std::default_random_engine generator(rd()); std::uniform_int_distribution distribution{1, 6}; const int roll = distribution(generator); std::cout << "Dice roll " << ro...
ALGO
0.936344
5.183438
2f04d9a4-e27b-4f4a-8212-ae647d09005e
YongBhin-Kim/algorithm
baekjoon/greedy/2839.cpp
// 설탕 배달 (실4) 23.7.3 #include <iostream> using namespace std; int a,N; int cnt; int main() { cin>>N; a=N; while (true) { if ( (a%5)==0 ) { cnt += a/5; break; } else { a-=3; cnt+=1; } if (a<0) { cnt = -1; ...
ALGO
0.999974
4.134689
4e611399-c8fd-4b74-9c40-6cfdad7905a6
gvnee/dataStructures-Algorithm
codeforces/1914D.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) int((x).size()) typedef pair<int,int> pi; typedef long long ll; #define pb push_back #define S second #define F first // void f(){ // int n; cin>>n; // ll a[n], b[n], c[n]; // for(int i = 0;i<n;i++) cin>>a[i]; // for(...
ALGO
0.999936
4.300166
bbd1521c-1fa4-4b54-bca1-37f59486455a
hjiang13/LLMs-in-IR
POJ-104/85/2099.cpp
#include <iostream> using namespace std; int main () { int n,i,j; char a[60]; cin >>n; for ( i=0; i<n; i++) { cin >>a; if (a[0]!='_'&&((a[0]<='Z'&&a[0]>='A')==0)&&((a[0]<='z'&&a[0]>='a')==0)) cout <<"no"<<endl; else { for ( j=0; a[j]!='\0'; j++) { if (a[j]!='_'&&(a[j]>'Z'||a[j]<'A')&&(a[j]>'z'||a[j]<'a')&&(a[j]>'9'||a[...
ALGO
0.999677
3.39903
248805c2-c18d-4bc4-951b-1bf8016ab0ac
Mayank9mare/Codechef-Solutions
codesenso/e.cpp
#include<bits/stdc++.h> #include<iostream> #define pb push_back using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++)cin>>a[i]; int left[n]; left[n-1]=n; stack<int> st; st.push(n-1); for(int i=n-2;i>=0;i--){ while(st.size() && a[st.top()]>a[i]){ st.pop(); ...
ALGO
0.999795
3.041935
565f8ad8-79c3-4631-8687-1888ec82119a
kevinBabu037/firebase_CRUD
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
0c0c572d-cdf8-4a01-9bc7-8a2934265a9c
SnoozeZ/LeetCode
C++/122 Best Time to Buy and Sell Stock.cpp
//8ms, time O(n), space O(1) class Solution { public: int maxProfit(vector<int>& prices) { if(prices.size() == 0) return 0; int profit = 0; for(int i = 0; i < prices.size() -1; i++){ if(prices[i] < prices[i+1]) profit += prices[i+1] - prices[i]; }...
ALGO
0.999687
6.183988
a3546f03-1e61-4d7b-a429-67c7d6934fb9
sohampirale/DSA
Replit_Data/DSA/Linked_List/Questions/give_start_of_cyclic_list.cpp
// class Solution { // public: // ListNode *detectCycle(ListNode *head) { // if(head==nullptr||head->next==nullptr)return nullptr; // ListNode*temp=head,*slow=head,*fast=head; // while(fast!=slow){ // fast=fast->next->next; // slow=slow->next; // if(fast==...
ALGO
0.999855
5.750994
a38c028a-118c-43cb-a390-ee51ff42a301
PolaKuma/SCU_Homework
编程C++/田星课堂作业/五子棋(finished)/五子棋/main.cpp
#include <iostream> #include <graphics.h> using namespace std; #define BLOCK 24 class Chess{ private: int map[15][15]={0}; int number; int x; int y; bool is_Show; public: Chess(); ~Chess(){} void Display(); void moseMoveMsg(ExMessage *msg); void mosePressMsg(ExMessage *msg); ...
ALGO
0.943546
4.387025
6bd98039-08e2-4595-b213-4492091dc880
WQCG/blitzdg
src/poisson1d/main.cpp
/** * @file poisson1d/main.cpp ... */ #include "Nodes1DProvisioner.hpp" #include "CsvOutputter.hpp" #include "Types.hpp" #include "Constants.hpp" #include "Warning.hpp" #include "Poisson1d.hpp" #include "LSERK4.hpp" #include "GMRESSolver.hpp" #include <blitz/array.h> #include <cmath> #include <string> #include <std...
ALGO
0.994357
5.864557
01c066f4-8767-4fe9-89bf-9042ece167aa
RahulScripted/CodeChef
CodeChef-Problems/Rating 500 To 800/BestOfTwo.cpp
// Alice and Bob are playing a game. Each player rolls a regular six faced dice 3 times. The score of a player is the sum of the values of the highest 2 rolls. The player with the highest score wins, and the game ends in a Tie if both players have the same score. Find the winner of the game or determine whether it is a...
ALGO
0.999924
4.307536
6d962f2b-9b0a-4f22-b567-376442ce2ed2
deepakr2k1/Quick-CP
2. Array & Binary Search/permutation.cpp
#include <bits/stdc++.h> using namespace std; #define FastIO ios_base::sync_with_stdio(false),cin.tie(NULL); #define endl "\n" #define rep(i,a,b) for(int i=a;i<=b;i++) #define irep(i,a,b) for(int i=a;i>=b;i--) #define ip(V,n) vector<int> V(n); for(int _i=0;_i<n;_i++) cin>>V[_i] #define op(V,sep) for(int _i=0;_i<V.size(...
ALGO
0.99865
3.616754
57171e89-45f4-4cab-9070-7c253dccc05e
kobutomo/AOJ
ITP1_Circle_in_a_Rectangle/main.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' int main() { int W, H, x, y, r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if (x + r <= W && x - r >= 0) { if (y + r <= H && y - r >= 0) { printf("Yes\n"); return 0; } } printf("No\n"); }
ALGO
0.999461
3.398183
7e9ac4f0-2983-4fc8-9277-784181017d11
lxy417/python_1
opencv-master/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.989978
5.242318
81081e17-b833-456c-9fa0-6bf900d2ebf5
pranshu667/dsa
algos/codeforces/contests/educational-89-div2/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; bool intersecting(ll a, ll b, ll c, ll d) { if (b < c || a > d) { return false; } return true; } int main() { int t; cin >> t; while (t--) { ll n, x, m; cin >> n >> x >> m; // int ...
ALGO
0.999985
4.165658
2cc5f644-fa32-4a7b-af39-4e12e4e57cb9
shahjalal-mahmud/CodeForces
Rank800/A_Easy_Problem.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; while (t--) { int n; cin>>n; cout<<n-1<<endl; } return 0; }
ALGO
0.999765
4.059106
3bd9a0d3-7c91-4216-b39a-75030f6a1b11
Md-Noman-Biswas/Codeforces_problems
C_Mr_Perfectly_Fine.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int maxxx = 100000000; void solve(){ ll n; cin >> n; int skl1, skl2, skl; skl1 = skl2 = skl = maxxx; while(n--){ int books; cin >> books; string skills; cin >> skills; if(skills == "01"){ ...
ALGO
0.999601
4.644655
5f007568-550d-4f8a-b9f1-fcf765f02580
coding-blocks-archives/data-structures-online-course-cpp
CPP/Lecture-09-Codes/sorting_comparators.cpp
#include<iostream> #include<algorithm> using namespace std; bool compare(int a,int b){ int a1 = 10; cout<<a1<<endl; //return a<b; } void bubbleSort(int *a,int n){ for(int i=0;i<n-1;i++){ for(int j=0;j<=n-i-2;j++){ if(compare(a[j],a[j+1])){ swap(a[j],a[j+1]); } } } } void print(int *a,int n){ fo...
ALGO
0.999885
4.483676
c27b981e-f914-4e8a-b003-4b7c1d1651be
Ryexocious/problemsolving
team2/i.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vec; typedef map<string,int> mp; #define cy cout<<"YES"<<endl; #define cn cout<<"NO"<<endl; #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pb push_back #define pf ...
ALGO
0.999904
4.255087
b894ce80-b2bc-47f9-8fec-a4e5455fba9a
antanasbendoraitis/lab1
source/examples/face_landmark_detection_ex.cpp
#include <dlib/image_processing/frontal_face_detector.h> #include <dlib/image_processing/render_face_detections.h> #include <dlib/image_processing.h> #include <dlib/gui_widgets.h> #include <dlib/image_io.h> #include <iostream> using namespace dlib; using namespace std; // ---------------------------------------------...
DATA
0.943945
6.488337
81784964-6ed0-4745-94ad-ff83ca643995
Gastonm123/codeforces
1292-a.cpp
#include <iostream> #define forn(i, n) for(int i=0; i<n; i++) using namespace std; const int MAXN = 1e5 + 5; bool calabozo[2][MAXN]; int padre[2][MAXN]; int dy[] = {1, 1, 1}; int dx[] = {-1, 0, 1}; int n; int tamanio = 0; void unir (int x, int y, int mod) { forn (i, 3) { int nx = x+i-1; if (nx <...
ALGO
0.999979
4.585778
7a7839b9-3ba1-402e-8a0e-a5dc95354dd6
ClearCanvas/ClearCanvas
ImageViewer/Rendering/BilinearInterpolation/BilinearInterpolation.cpp
#pragma endregion // ClearCanvas.ImageViewer.Renderer.BilinearInterpolation.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #include "BilinearInterpolation.h" #include "math.h" #include <memory> #ifdef _MANAGED #pragma managed(push, off) #endif BOOL APIENTRY DllMain( HMODULE hModule, ...
ALGO
0.982432
5.521041
3032006b-7982-4808-aff4-645273b6a665
starHo4/AtCoder_PastProblems
ABC/B/ABC114B/main.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> using namespace std; int toNum(string s) { int num = 0; for (int i = 0; i < s.size(); i++) { num *= 10; int each = s[i] - '0'; num += each; } return num; } int main() { string S; cin >> S; ...
ALGO
0.999574
3.76911
b7b23aac-e545-4931-a969-d9b6c92abbb1
FelixYuan-YF/step2_megasam
base/thirdparty/lietorch/eigen/doc/examples/class_CwiseBinaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template binary functor template<typename Scalar> struct MakeComplexOp { EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp) typedef complex<Scalar> result_type; complex<Scalar> operator()(const Scalar& a, const Scalar& b...
ALGO
0.957932
6.700232