uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a054e185-248d-492b-9c15-065c1349f578
ShawnTSH1229/XEngine
ThirdParty/boost_1_78_0/libs/math/example/root_finding_n_example.cpp
// Note that this file contains Quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! // Example of finding nth root using 1st and 2nd derivatives of x^n. #include <boost/math/tools/roots.hpp> //using boost::math::policies::policy; //using boost::math::tools::newton_raph...
ALGO
0.998598
4.32598
f7561213-174d-4228-a65c-d1f670a1b43e
venexene/Int_Sys_Lab1
Int_Sys_Lab1.cpp
#include <iostream> #include <vector> #include <queue> #include <chrono> #include <string> #include <stack> #include <set> #include <unordered_set> typedef int (*Operation) (int n); struct op_struct { Operation op; std::string str; }; struct node { node* prev; op_struct op; int n; int c; }; ...
ALGO
0.999952
4.883695
72913097-2582-4c27-b09f-4f80c48bc15c
mathieu-pinaud/runtrack_cpp
jour01/job04/isEven.cpp
#include <iostream> int main() { int a; std::cout << "Enter a number: "; std::cin >> a; if (a % 2 == 0) { std::cout << "The number is even." << std::endl; } else { std::cout << "The number is odd." << std::endl; } return 0; }
ALGO
0.942639
4.049393
3de50e12-a09e-4bce-a3a3-13e54af9b25d
pratik-choudhari/AlgoCode
C - C++/searchingTrees/BST.cpp
#include<iostream> using namespace std; struct Node { struct Node *lchild; int data; struct Node *rchild; }*root=NULL; void Inorder(struct Node *p) { if(p) { Inorder(p->lchild); cout<<p->data<<" "; Inorder(p->rchild); } } struct Node * Search(int key) { struct Node *t=root; ...
ALGO
0.999971
3.514346
d004f43f-3de6-44e4-aca3-0dbeae2c74dd
WenyinWei/NuKit
cpp/odeintTest/harmonic_oscillator.cpp
#include <iostream> #include <boost/array.hpp> #include <boost/numeric/odeint.hpp> using namespace std; using namespace boost::numeric::odeint; const double sigma = 10.0; const double R = 28.0; const double b = 8.0 / 3.0; typedef boost::array< double , 3 > state_type; void lorenz( const state_type &x , state_type ...
ALGO
0.999908
6.35435
2d52d2db-1b66-4b41-8459-3e00a41a01c1
akihikoy/ay_test
opencv/cpp/ros_rs_normal.cpp
//------------------------------------------------------------------------------------------- /*! \file ros_rs_normal.cpp \brief Convert a depth image to a normal image. \author Akihiko Yamaguchi, <EMAIL> \version 0.1 \date Oct.31, 2022 $ g++ -O2 -g -W -Wall -o ros_rs_normal.out ros_rs_normal....
ALGO
0.986862
5.37393
0c9460b3-5b6f-4a78-85ef-d5032a276856
csdivyansh/Cpp-Programming
pointers.cpp
#include <iostream> using namespace std; int main() { int i = 5; int *ptr = &i; int **ptr2 = &ptr; int ***ptr3 = &ptr2; cout << i << endl; cout << *ptr << endl; cout << **ptr2 << endl; cout << ***ptr3 << endl; return 0; }
ALGO
0.998802
3.014913
766d81a2-c2f9-4fc9-a958-78fd4f07e1bc
Shodydosh/CodePtit-Solutions-Cpp
CPP0228.cpp
#include <bits/stdc++.h> using namespace std; void output(vector<int> a) { for (int i = a.size() - 1; i >= 0; i--) cout << a[i] << ' '; cout << endl; } int main() { int t; cin >> t; while (t--) { int m; cin >> m; vector<int> v1; vector<int> v2; i...
ALGO
0.999586
3.12787
e30e7607-43c2-4c8c-b004-49e9f7835275
AishwaryaDoosa/Boost1.49
libs/icl/example/man_power_/man_power.cpp
/** Example man_power.cpp \file man_power.cpp \brief Using set style operators to compute with interval sets and maps. Interval sets and maps can be filled and manipulated using set style operation like union (+=), difference (-=) and intersection (&=). In this example 'man_power' a number of thos...
ALGO
0.865796
5.001825
28e713c5-2494-46e2-9ea0-8f7ff6d7f6c5
Next-Gen-UI/Code-Dynamics
Leetcode/0391. Perfect Rectangle/0391.cpp
class Solution { public: bool isRectangleCover(vector<vector<int>>& rectangles) { int area = 0; int x1 = INT_MAX; int y1 = INT_MAX; int x2 = INT_MIN; int y2 = INT_MIN; unordered_set<string> corners; for (const auto& r : rectangles) { area += (r[2] - r[0]) * (r[3] - r[1]); x1 ...
ALGO
0.998672
7.047546
1b17b912-1c19-4608-bc5d-153b449271ff
imdeen/Data-Stucture-and-Algorithm-in-c-and-cpp
1.recursion/indirect_recursion.cpp
#include <iostream> using namespace std; void fun(int); void fun1(int n) { if (n > 0) { cout << n << " "; fun(n - 1); } } void fun(int n) { if (n > 0) { cout << n << " "; fun1(n / 2); } } main() { fun1(20); return 0; }
ALGO
0.999923
4.026049
f071a993-58b0-4bf5-a4e9-b108669ca3fe
richikrich/Interviewbit-Cpp-Problems
Pascal Triangle.cpp
#include<iostream> #include<vector> #include<cmath> using namespace std; vector<vector<int>> pascalTriangle(int n) { vector<vector<int>> ret; vector<int> temp; temp.push_back(1); ret.push_back(temp); for(int i=1; i<n; i++) { temp.clear(); temp.push_back(1); int j=0; while(j<ret[i-1].size()-1) { ...
ALGO
0.999923
4.926557
da964d11-b240-4cb4-ad2a-47da924e8eef
PANISHAR/Programming
random practice problem /282A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int x=0; string s; while(n--){ cin>>s; if(s[1]=='+'){ ++x; } else{ --x; } } cout<<x<<endl; }
ALGO
0.999577
3.962344
d410d32c-06a1-4b53-96d2-023e4dda0231
Doctorlike/pcrack
guesser.cpp
#include <iostream> #include <string> #include <fstream> #include <stdio.h> #include <openssl/md5.h> int main(int argc, char *argv[]) { if (argc == 1) { std::cout << "Error: No input!" << std::endl; return 1; } std::string input = argv[1]; //std::string input = "5f4dcc3b5aa765d61d8327deb882cf99"; std::cou...
ALGO
0.910924
4.57527
70ea6226-1a08-41f8-9291-a44665d63e55
alex-narrator/xp-dev_xray
3rd party/boost/libs/graph/example/dag_shortest_paths.cpp
#include <boost/graph/dag_shortest_paths.hpp> #include <boost/graph/adjacency_list.hpp> // Example from Introduction to Algorithms by Cormen, et all p.537. // Sample output: // r: inifinity // s: 0 // t: 2 // u: 6 // v: 5 // x: 3 int main() { using namespace boost; typedef adjacency_list<vecS, vecS, direct...
ALGO
0.999984
6.00738
d2815268-ce29-427a-88db-bfebabb8d737
duynguyen38/DSA-Assignment
Assignment2/HuffTree-Part2/buildHuff.cpp
#include <iostream> #include <fstream> #include <string> #include <math.h> #include <vector> #include <map> #include <stack> #include <queue> #include <list> #include <utility> #include <algorithm> #include <sstream> using namespace std; class Node { public: int weight; char c; int height; Node *left; ...
ALGO
0.999757
4.318582
4d464729-bf2a-41d5-9da7-556f6da94e12
Shaphil/hackerrank
C++/04_STL/01_vector_sort.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { freopen("in.txt", "r", stdin); int a, n; vector<int> v; cin >> n; for(int i = 0; i < n; i++) { cin >> a; v.push_back(a); } sort(v.begin(), v.end()); for(auto i: v) { cout << i << " "; } cout << endl; ret...
ALGO
0.999881
4.241462
606a22f1-82a0-4a25-8774-df7854d2f144
vanshika-37/LeetCode
0859-buddy-strings/0859-buddy-strings.cpp
class Solution { public: bool buddyStrings(string s, string goal) { int count = 0; int n = s.size(), m = goal.size(); if (n != m || n == 1) return false; if (s == goal){ sort(s.begin(),s.end()); for (int i = 0; i < n-1; i++){ if (s[i] == s[i+1]...
ALGO
0.999985
5.431424
2b9c823c-f213-48ca-9929-1970d35e4d20
August1314/Data-Structure-Projects
Project3/include/check.cpp
#include<iostream> #include<fstream> #include<sstream> #include<math.h> #include<vector> #include<string> #include<string.h> #include<iomanip> #include<utility> using namespace std; #define Maxsize 100 #pragma warning(disable:4996) double stringToDouble(const string& str);//将字符串str转化成double型,返回转化结果 int word_analysis(v...
ALGO
0.999699
3.183823
c277a2c4-d7bb-4d55-b7c6-cb2582bace87
jackros1022/pcl_sources
4_alignment/vfh_recognition/nearest_neighbors.cpp
#include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <pcl/common/common.h> #include <pcl/common/transforms.h> #include <pcl/visualization/pcl_visualizer.h> #include <pcl/console/parse.h> #include <pcl/console/print.h> #include <pcl/io/pcd_io.h> #include <iostream> #include <flann/flann.h> #include <flann/...
ALGO
0.985691
6.12954
ec970990-3955-4d25-9ed0-3cee09800e47
Darkknight1299/C-plus-plus
Misc/count digits(doubt).cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,a,i,j=0; cin>>n>>a; while(n>0){ i=n%10; if(i==a){ j=j+1; } else{ n=n/10; } } cout<<j; }
ALGO
0.999368
3.01569
f1f20137-fa3d-4268-b9a1-610e6596913e
junggyo1020/Algorithm
프로그래머스/0/181935. 홀짝에 따라 다른 값 반환하기/홀짝에 따라 다른 값 반환하기.cpp
#include <bits/stdc++.h> #include <string> #include <vector> using namespace std; int solution(int n) { int sum = 0; while(n>0){ sum += (n&1) ? n:pow(n,2); n-=2; } return sum; }
ALGO
0.999781
5.006412
397c1322-fa67-4384-84e5-22b551d82a62
PrivacySolutions/Abscond-Browser
content/media/dash/DASHReader.cpp
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* DASH - Dynamic Adaptive Streaming over HTTP * * DASH is an adaptive bitrate streaming technology where a multimedia file is * partitioned into one or more segments and delivered to a client u...
TOOL
0.874648
5.433578
31f02412-de9f-4d31-b166-d1493df50a78
FALL1N1/WoWCircle-5.4.7
src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
/* ScriptData SDName: Boss_Celebras_the_Cursed SD%Complete: 100 SDComment: SDCategory: Maraudon EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" enum Spells { SPELL_WRATH = 21807, SPELL_ENTANGLINGROOTS = 12747, SPELL_CORRUPT_FORCES = 21968 }; class celebr...
TOOL
0.876665
7.132463
2960c0b7-3f1c-48a4-9b99-86b0eb407ddf
aadityesh/DSA-Cpp
Loops/ques-loops.cpp
#include<iostream> #include<cstring> using namespace std; int main() { int range = 3; int i = 1; while (range > 0) { //starts new ROW int count = 3; while (count > 0) { //completes each ROW {1 1 1} cout << i; count--; ...
ALGO
0.999678
3.520661
0dc02048-98a5-4b8e-982a-6a46817247f5
hwCloudDBSDDS/dds
src/mongo/util/net/privateip_privateiprange.cpp
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork #include <arpa/inet.h> #include <map> #include <netinet/in.h> #include <stdio.h> #include <string> #include "mongo/util/log.h" #include "mongo/util/text.h" #include <boost/algorithm/string.hpp> // #include "mongo/util/concurrency/rwlock.h" #i...
TOOL
0.864339
5.282794
213ab99e-b087-450a-891a-be850def51a7
gtkn/atcoder
ABC_155_C.cpp
//title #include <bits/stdc++.h> using namespace std; //#include <atcoder/all> //using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>...
ALGO
0.999866
4.344453
98e6458c-f015-497c-8b16-496c64ae674b
joelrajuthomas/CppDataStructuresNotes
bubblesort.cpp
#include <ios> #include <iostream> #include <algorithm> #include <fstream> #include <sstream> #include <iomanip> //#include "ArgumentManager.h" using namespace std; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } // A function to implement bubble sort void bubbleSort(int ar...
ALGO
0.987673
4.135453
1d362d74-0979-4e8a-8386-e1bdc441f6fa
hellocomrade/happycoding
leetcode/Integer2Roman.cpp
#include <string> #include <sstream> #include <unordered_map> #include <algorithm> using namespace std; //https://leetcode.com/problems/integer-to-roman /* Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. https://en.wikipedia.org/wiki/Roman_numerals Observ...
ALGO
0.998406
6.887967
ec1440f7-473c-42df-a8eb-1d4e950bf7af
juniorandrade1/Competitive-Programming
Codechef/APRIL17/rndGridLarge.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned long long ull; typedef pair< ll, ll > ii; typedef vector< ll > vi; typedef vector< ii > vii; #define INF 0x3F3F3F3F #define LINF 0x3F3F3F3F3F3F3F3FLL #define pb push_back #define mp make_pair #define pq prio...
ALGO
0.999882
4.223832
286db3c4-7114-477b-933b-0d619094d2e8
Areeb-7/Areeb-100-cpp
pattern86.cpp
#include <iostream> using namespace std; int main(){ int n = 4; for(int i = 1; i <= n+3; i++){ for(int j = 1; j <= n; j++) { cout << j; } n--; cout << "\n"; } return 0; }
ALGO
0.999762
3.402725
dcbc9544-19e9-4ec1-ae62-30b3a6bf886c
Deirror/FMI
DSA/HackerRank and LeetCode/Current Seminars and Practicums/Shared Repo FMI/Koce/Week 06/maxDepth.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.999645
6.55363
fba9f93c-1c8d-4781-b1da-7657914df7cd
CS1342-July2021/Lecture-Materials
Chapter03&04/golf_switch.cpp
#include <iostream> using namespace std; int main() { const int constantValue{100}; int numStrokes; cin >> numStrokes; // Assumes "par 4" switch (numStrokes) { case 1: cout << "Hole in 1!"; break; case 2: cout << "Eagle!"; break; case 3: cout << "Birdie!"; br...
TOOL
0.976968
5.877638
3685a933-9cc2-4ad9-a0ac-97f36fd2c911
CrypticSai-08/LeetCode
0485-max-consecutive-ones/0485-max-consecutive-ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int count =0; int maxi =0; for(int i=0; i<nums.size(); i++){ if(nums[i] == 1){ count ++; }else{ count =0; } maxi = max(maxi, count); ...
ALGO
0.99996
6.133061
09de5e97-4e98-4f44-8c7b-c1bfc74a4151
lsh0805/BOJ
solved/BOJ2921.cpp
#include <bits/stdc++.h> using namespace std; template <typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template <typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::...
ALGO
0.999981
4.302331
f55f1bc6-61bc-4296-8df7-55eda38fd6b4
jonckjunior/UVa
UVa 10751 - Chessboard.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t,n; cin >> t; while(t--){ cin >> n; if(n == 1) cout << "0.000" << endl; else if(n == 2) cout << "4.000" << endl; else{ int aux = n-2; double res = (aux-1)*(aux) + aux; res = res*sqrt(2) + n*n - res; printf("%.3lf\n",res); } if(t) ...
ALGO
0.999477
3.826189
615dec94-8769-4d3c-8076-a5f7bfcc4059
divyanshu-kushwaha/Striver_SDE_Sheet
Day 5-Linked List/1_ReverseLL.cpp
// https://leetcode.com/problems/reverse-linked-list/ /** * Definition for singly-linked list. * 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) {} * };...
ALGO
0.999928
5.753044
a5c97570-80c9-4878-9599-2d85131ad7e3
RohanSingh17/CarND-Path-Planning-Project-master
src/Eigen-3.3/doc/examples/tut_matrix_coefficient_accessors.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << "Here is the matrix m:\n" << m << std::endl; VectorXd v(2); v(0) = 4; v(1) = v(0) - 1; std::cout << "Here is the vector v:\n...
ALGO
0.993199
3.687909
99e14fdc-3402-4f5f-a1a7-bf446b455238
programmer-k/Baekjoon-Online-Judge-Submission
15657.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n, m; int nums[8]; vector<int> answer; void GetInput() { cin >> n >> m; for (int i = 0; i < n; i++) cin >> nums[i]; sort(nums, nums + n); } void Solve(int startIdx) { if (answer.size() == m) { for (unsigned int i = 0; i < ...
ALGO
0.999938
3.652436
d8347e59-f0ad-42e3-adec-6cc99091665a
asad-shuvo/ACM
Online Judge/codforces/Codeforces Round #550 (Div. 3)/D. Equalize Them All.cpp
#include <bits/stdc++.h> using namespace std; int fx4[] = {1 , -1 , 0 , 0}; int fy4[] = {0 , 0 , 1 , -1}; int Kfx[]= {-2,-2,2,2,1,1,-1,-1}; ///knight move x - exis int Kfy[]= {1,-1,1,-1,2,-2,2,-2}; ///knight move y- exis int fx8[]= {1,1,1,0,0,-1,-1,-1}; int fy8[]= {0,1,-1,1,-1,0,1,-1}; #define ll long long int #define ...
ALGO
0.999707
3.097355
b442b292-bff4-4608-9e35-85d4dce84f75
Utkarsh-123github/Striver-DSA-end-topics
Graph/05_Flood-fill.cpp
// You are given an image represented by an m x n grid of integers image, where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and color. Your task is to perform a flood fill on the image starting from the pixel image[sr][sc]. // To perform a flood fill: // Begin with t...
ALGO
0.999539
6.557508
5700fa85-84a6-4598-87ec-c5da558ffe79
arshamakhtar/Assignments
Bit_manipulation/Calculate_the_sq_with_bit_manipulation.cpp
#include <iostream> using namespace std; int square(int n) { int result = 0; int x = n; while (x) { if (x & 1) result += n; n <<= 1; x >>= 1; } return result; } int main() { int n; cin >> n; cout <<"square of the number will be"<< square(n) << endl; return...
ALGO
0.999504
4.504447
ebd9c09f-e02f-4656-9d58-1be33866fdc2
Pranavmane7796/Programs-C-
lab1/compoundIN.cpp
#include<iostream> using namespace std; #include<math.h> int main(){ double rate,time; int principal; cout<<"enter the value\n"; cin>>principal; cout<<"enter the interest"<<endl; cin>>rate; cout<<"enter the time\n"; cin>>time; double Amount = principal * (...
ALGO
0.999696
3.575622
ceeacbb3-813b-4c2f-bb40-007e81f36b10
Abhipsha05/C-plusplus-codes
dsa-15.cpp
//fibnacci recursion// #include<iostream> using namespace std; int fib(int n){ if(n<=1){ return n; } return fib(n-1)+fib(n-2); } int main(){ int num; cin>> num; cout<<fib(num); }
ALGO
0.999913
4.66274
887a33fd-1891-4d1b-8e39-4ad327e994cb
Urho-Net/Urho3D
Source/ThirdParty/Bullet/src/BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp
///This file was written by Erwin Coumans #include "btMultiBodyPoint2Point.h" #include "btMultiBodyLinkCollider.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include "LinearMath/btIDebugDraw.h" #ifndef BTMBP2PCONSTRAINT_BLOCK_ANGULAR_MOTION_TEST #define BTMBP2PCONSTRAINT_DIM 3 #else #define BTMBP2PCONSTRAINT_D...
TOOL
0.89162
6.895022
1ba0c724-77cf-4698-aa4b-e30a5f0e9656
TNFSH-Programming-Contest/2020NHSPC-TNFSH-Preliminary
pB/solution/100pt-by-Yazmau.cpp
#include<bits/stdc++.h> #define maxn 1000005 using namespace std; int n,k,m; int arr[maxn],brr[maxn]; bool check(int mid) { long long cnt = 0; for(int i=1;i<=n;i++) { long long rem = (long long)k - (long long)arr[i] * mid; if(rem > 0) cnt += (rem - 1) / brr[i] + 1; } return cnt <= m; } int main() { ios::syn...
ALGO
0.999969
3.621314
c74d3b37-4f78-4e69-96d3-1c7b12c4a0f1
gnipun05/CPP
Hashing/NumberofSubarrayshavingGivenSum.cpp
// Number of Subarrays having given sum // This is a O(n) solution // O(logn) solution is done by using ordered map simply called as map #include <bits/stdc++.h> #include <unordered_map> #define ll long long using namespace std; ll int countSubarrays(ll int arr[], ll int n, ll int sum) { ll int count=0, currSum=...
ALGO
0.999991
5.342259
4352c2a8-8393-44c5-a2e7-c417629ff88a
thishaaarsh/Leetcode-Solutions
0128-longest-consecutive-sequence/0128-longest-consecutive-sequence.cpp
class Solution { public: int longestConsecutive(vector<int>& arr) { unordered_set<int>s; int n = arr.size(); for(int i=0; i<n; i++){ s.insert(arr[i]); } int ans =0; for(auto num : arr){ if(!s.count(num-1)){ int curr = num; ...
ALGO
0.999938
5.649036
910df320-556d-4418-9bc8-5b75814788eb
AsGreyWolf/Teeworlds3d
src/client/components/graphics/geometry/Primitives.cpp
#include "Primitives.h" Geometry3d Point(const glm::vec3 &v, const glm::vec3 &n, const glm::vec2 &t) { Geometry3d geom; geom.Push(v, n, t); return geom; } Geometry3d Line(const glm::vec3 &v1, const glm::vec3 &v2, const glm::vec3 &n1, const glm::vec3 &n2, const glm::vec2 &t1, const glm::vec2 &t2) { ...
TOOL
0.909061
5.471452
69f8976f-98d1-4e3c-8b59-325bc3c00f4c
Kaan-Karaoglan/CarDetectionAndCountingYOLOv1
third_party/opencv4.10/opencv-4.10.0/samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
/** * @function cornerHarris_Demo.cpp * @brief Demo code for detecting corners using Harris-Stephens method * @author OpenCV team */ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; /// Global variables Mat src, src_gray; int thresh = 200;...
ALGO
0.998882
6.837141
82852dff-b914-48e1-a786-596ffb8be906
Antrax2680/tareas-de-progra-1SF
Condiciones Complejas/año biciesto.cpp
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int anio; cout<<"Ingrese un anio, para calcular si es biciesto: \n"; cin>>anio; if(anio%4==0 && anio%100!=0 || anio%400==0){ cout<< anio; cout << "Es biciesto\n"; }else { } cout<< anio; cout << "No es biciesto \n"; ...
ALGO
0.991154
3.302785
7ef4d4e9-a06e-44db-a067-08d70b77f7a5
Eshan39/Combinatorial-optimization
dp1.cpp
#include<iostream> #include<algorithm> using namespace std; int a[1000]; int b[100]; int knapSack(int m, int mid){ for(int i = 0; i<= mid; i++){ a[i] = 0;; } for(int i = 1; i<= m; i++) for(int j = mid; j>0; j--){ if(b[i]<= j) a[j] = max(a[j], b[i] + a[j - b[i]]); } ...
ALGO
0.999889
3.659362
5a0ca320-84ff-4b27-b0fd-422eaf00ba54
Prakhar-002/LEETCODE
📜 Daily Challange 💡/06 June 🌞 2024/14 - 06 - 2024 --- 945. Minimum Increment to Make Array Unique ☃️ 🍁 🍰 🎲 💖/🎲CPP_945_MinimumIncrementToMakeArrayUnique.cpp
//! https://github.com/Prakhar-002/LEETCODE //Todo 📌 QUESTION NUMBER 945 class Solution{ public: int minIncrementForUnique(vector<int> &nums){ // Sort the array sort(nums.begin(), nums.end()); // Make variable int increment = 0; for (int i = 0; i...
ALGO
0.999986
6.381936
37436704-3b79-47fd-b284-d9d58b9ea990
rajarahul27/rahul-ctesting
modules/photo/src/calibrate.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" //#include "opencv2/highgui.hpp" #include "hdr_common.hpp" namespace cv { class CalibrateDebevecImpl : public CalibrateDebevec { public: CalibrateDebevecImpl(int _samples, float _lambda, bool _random) : name("CalibrateDebev...
TOOL
0.994164
5.928608
88bc8752-a96b-44c1-b6c2-20ba10b8a0e1
ryosuzuki/computer-graphics-playground
engine/dgpc/calculate.cpp
#include <iostream> #include <iostream> #include <limits> #include "Generator.h" #include "Mesh.h" #include "rapidjson/document.h" #include "rapidjson/writer.h" #include "rapidjson/stringbuffer.h" using namespace std; using namespace rapidjson; extern "C" { typedef struct { int n; int *id; double *r;...
TOOL
0.968735
4.272059
ae188d11-db85-4471-97d4-262c7209cbe4
Naezan/we-are-algorithm
10o0o/Week2/21939.cpp
#include <array> #include <iostream> #include <queue> #include <string> #include <unordered_map> using namespace std; struct Greater { bool operator()(array<int, 2>& a, array<int, 2>& b) { if (a[1] != b[1]) return a[1] < b[1]; return a[0] < b[0]; } }; struct Less { bool operator()(array<int, 2>& a, ar...
ALGO
0.99997
5.218371
a540b99a-68c3-43b7-8d53-49b909506899
marymonty/rendering_and_graphics_programming
C++_HLSL_DirectX11/Assignment7_OrganizingGraphicObjects/pt1_q4_GraphicsObject_PerMesh/src/TerrainModel.cpp
// Mary // TerrainModel.cpp #include "TerrainModel.h" #include "Model.h" #include "d3dUtil.h" #include "DirectXTex.h" #include <assert.h> TerrainModel::TerrainModel(ID3D11Device* dev, LPCWSTR heightmapFile, float len, float maxheight, float ytrans, int RepeatU, int RepeatV) { DirectX::ScratchImage scrtTex; HRESULT...
TOOL
0.925586
4.512211
a7c7c01b-ece6-4999-a35d-1d7d761be9d6
timvdm/openbabel-razinger
src/math/matrix3x3.cpp
#include <openbabel/babelconfig.h> #include <openbabel/math/matrix3x3.h> #include <openbabel/obutil.h> using namespace std; namespace OpenBabel { /** \class matrix3x3 matrix3x3.h <openbabel/math/matrix3x3.h> \brief Represents a real 3x3 matrix. Rotating points in space can be performed by a vector-m...
TOOL
0.995803
7.653024
126211d9-e4e8-443a-a553-3d964e8fe1f3
vampcoder/Online-Programmes
lightoj/beginner/1109.cpp
#include<algorithm> #include<iostream> #include<cstdio> #include<cmath> #ifndef ONLINE_JUDGE // ifndef checks whether this macro is defined earlier or not #define gc getchar //for local PC #else #define gc getchar_unlocked //for online judge environments #endif using namespace std; int read_int() { register char c=gc...
ALGO
0.999725
3.413467
0e485008-d5c6-4cf7-8816-ee03e5acca69
SingularDuo/C-COMPETITIVE-TRAINING
BT-CO-SUONG/redo/MINGROUP1.cpp
/* _.-- ,.--. .' .' / @ |'..--------._ / \._/ '. / .-.- \ ( / \ \ \ '. | # \ \ -. / :\ | )._____.' \ " | / \ | \ ) Kduckp ...
ALGO
0.999932
4.283601
4b89f2e5-5232-4f19-9b86-652616485713
miyatis/atcoder
abc304/a.cpp
// #include <bits/stdc++.h> #include <stdlib.h> #include <stdio.h> #include <iostream> #include <cmath> #include <atcoder/all> #include <set> #include <map> #include <atcoder/all> #include <unordered_map> #include <unordered_set> using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i...
ALGO
0.999972
4.50535
bc74a2c1-d3ea-48cf-8dfc-c686b7df5040
mridul-sehgal/cpp_dsa
Learning/1D-dynamic programming/minCostToClimbStairs.cpp
//****************TOP-DOWN APPROACH**************** // class Solution { // public: // int solve(vector<int>&cost,int n, vector<int>&dp) // { // if(n==0) // { // return cost[0]; // } // if(n==1) // { // return cost[1]; // } // if...
ALGO
0.999993
6.137337
efc5de42-39ba-482e-831b-22b0fd15c23f
audio-dsp/RackAFX-Dev
ALL_SDK/AU_SDK/myprojects/NanoSynth MM1/Synth Core/VAOnePoleFilter.cpp
#include "VAOnePoleFilter.h" CVAOnePoleFilter::CVAOnePoleFilter(void) { // --- init defaults to simple // LPF/HPF structure m_dAlpha = 1.0; m_dBeta = 0.0; m_dZ1 = 0.0; m_dGamma = 1.0; m_dDelta = 0.0; m_dEpsilon = 0.0; m_da0 = 1.0; m_dFeedback = 0.0; // --- always set the default! m_uFilterType = LPF1;...
TOOL
0.855663
5.809643
d1bdc7d7-9abf-43cf-a84c-51ea7ea69e9d
Singh-Vibhor/Competitive-Programming---Cpp
C_Good_Subarrays.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> //Whatever //IMSS I am sad scam #define pi (3.141592653589) #define M 1000000007 #define ll long long int #define pb push_back #define mp make_pair #define all(x) x.begi...
ALGO
0.999883
4.802825
388783e0-8341-4e5d-b106-4f2d70ac7ed8
AbrarBb/DSA
Random_Practice/DBFS.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const int MAX = 100; vector<int> graph[MAX]; bool visited[MAX]; void DFS(int node) { cout << "Visited " << node << " in DFS" << endl; visited[node] = true; for (int neighbor : graph[node]) { if (!visited[neighbor])...
ALGO
0.999953
6.246812
c69d4e6a-6381-44ab-94f0-52f1629f26c2
sarvex/leetcode-object-pascal
solution/0100-0199/0110.Balanced Binary Tree/Solution.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.999933
6.870937
01f391a1-a252-449c-88e5-b7b63bf98f4d
Rakesh9100/Internship-Training-Practice--DSA--CPP
DSA/Arrays/array9.cpp
// Program to print the WAVE pattern of a 2D array matrix /* Input: 1 2 3 4 5 6 7 8 9 10 11 12 Output: 1 5 9 10 6 2 3 7 11 12 8 4 */ #include <bits/stdc++.h> using namespace std; int main() { int rows, cols; cout << "Please enter the number of rows: " << endl; cin >> rows; cout << endl << "Please...
ALGO
0.999431
4.788571
70642b38-c7b1-41dc-901f-2cf9d6f9fb3f
listedlinked/amster
src/denomination_functions.cpp
/** * @file denominations_functions.cpp * * @brief Denomination functions for the Zerocoin library. * * @copyright Copyright 2017 AmsterdamCoin Developers * @license This project is released under the MIT license. **/ #include "denomination_functions.h" using namespace libzerocoin; // ---------...
ALGO
0.981979
7.16947
77eb9986-283f-4097-8201-7b0bd2032fe6
nomar113/beecrowd
1001.cpp
#include <bits/stdc++.h> using namespace std; int main() { int A=0, B=0; cin >> A >> B; cout << "X = " << A+B << endl; return 0; }
ALGO
0.984911
3.588387
8ef6f5eb-3c65-435f-aba0-fa002520f194
bhavya077/weather_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998784
6.761023
72d29d05-b736-4377-a08f-a0f56fbe1735
FBimo/bmo-inventory-mobile
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
0aaf5c19-67ac-4223-ac4f-0752e1034f8e
VishwajeetSinghParihar750/CP
practice/cf-2062d.cpp
// Author__ VISHWAJEET_SINGH_PARIHAR __ #pragma GCC optimize("Ofast") #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; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statist...
ALGO
0.999956
4.63908
ca65edf8-4236-4b89-af37-0bebb4b6e7c5
ishandutta2007/codeforces
orzdevinwang/normal/1428/E.cpp
#include<bits/stdc++.h> using namespace std; #define L(i, j, k) for(int i = (j), i##E = (k); i <= i##E; i++) #define R(i, j, k) for(int i = (j), i##E = (k); i >= i##E; i--) #define ll long long #define db double #define mp make_pair const int N = 1e6 + 7; int n, k, a[N], cnt[N]; ll ans = 0; priority_queue< pair<ll, ...
ALGO
0.99993
3.566871
a0e284bc-0b82-4510-90d1-ef88a67cd639
caefleury/PCOMP
at-coder/mik-beg-contest/C.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define pb push_back #define all(x) x.begin(), x.end() typedef vector<int> vi; typedef pair<int,int> pi; typedef set<int> si; typedef long long ll; typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef set<ll> sll; int main() { ios::sync_with_s...
ALGO
0.999218
3.770336
57fa20f2-4292-4181-945a-d24eb8b9dc3f
mkls6/numerical_methods
lu_decomposition/main.cpp
#include <iostream> #include <fstream> #include <string> #include <iomanip> #include "../include/matrix.hpp" #include "../include/linear_algebra.hpp" int main() { std::string filePath = "input.txt"; std::ifstream inputFile; std::ofstream outputFile; size_t n; Matrix *a; vector<double> b; v...
ALGO
0.998916
5.274289
05a41946-8b5a-4ab6-b58b-6722d7b444b5
goutamb07/aps-code-library
finding_connected_comp.cpp
#include<bits/stdc++.h> using namespace std; int n; vector<int> g[1000] ; bool used[10000] ; vector<int> comp ; void dfs(int v) { used[v] = true ; comp.push_back(v); for (size_t i = 0; i < (int) g[v].size(); ++i) { int to = g[v][i]; if (!used[to]) dfs(to); } } void find_co...
ALGO
0.999573
4.752345
fc225a54-fd0b-41a1-9c75-a059240db007
devanshdalal/CompetitiveProgrammingAlgos
devanshdalal/codechef/CSUB/CSUB-4189636.cpp
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #include<cmath> #include<cstdlib> #include<queue> #include<map> #define DD ios_base::sync_with_stdio(false) #define maxx 10000001 #define PI 3.14159265358979323846264338327950288419716939937510 #define eps 0.0000001 typedef long long ll; typede...
ALGO
0.999819
3.267035
6fec126b-2ed7-4b7e-836f-f3e06b3b4e70
houtaru/code
VNOI Training/Hải Dương/2017.10.16/Code/AF12.cpp
#include <bits/stdc++.h> using namespace std; template <class T> void read(T &x) { x = 0; char c; bool nega = 0; while (!isdigit(c = getchar()) && c != '-'); if (c == '-') nega = 1, c = getchar(); while (isdigit(c)) x = x * 10 + c - '0', c = getchar(); if (nega) x = -x; } template <class T> wri(T x...
ALGO
0.99998
3.397871
d2243474-c228-4c86-9076-e81bbba1c17f
part-of-the-crew/cpp_backend
sprint3/Counting_Bills/main.cpp
#include <algorithm> #include <iostream> #include <vector> #include <cassert> using namespace std; class MoneyBox { public: explicit MoneyBox(vector<int64_t> nominals) : nominals_(move(nominals)) , counts_(nominals_.size()) { } const vector<int>& GetCounts() const { return counts_...
TOOL
0.960858
5.317245
08bc64fc-9175-4d8a-8cea-274576976da5
uk-ar/competitive_programming
abc187/d/a.cpp
// vector<int> v(N); // for(int i =0;i<N;i++){ // cin >> v.at(i); // } // single line with multi param // vector of vector // vector<vector<int>> data(row,vector<int>(col)); //for(int row=0;row<N;row++){ // for(int col=0;col<N;col++){ // cin >> data[row][col]; // }} // cout << std::fixed << std::setprecis...
ALGO
0.999842
4.684085
0634ff3a-12a7-4744-a29d-da87fc25c6b9
ishandutta2007/codeforces
leapfrog/normal/1027/D.cpp
//{{{ #include<bits/stdc++.h> using namespace std; template<typename T>inline void read(T &x) { x=0;char c=getchar(),f=0; for(;c<48||c>57;c=getchar()) if(!(c^45)) f=1; for(;c>=48&&c<=57;c=getchar()) x=(x<<1)+(x<<3)+(c^48); f?x=-x:0; }/*}}}*/ struct edge{int to,nxt;}e[200005];char vis[200005];int we[200005],ct,vl[20...
ALGO
0.999953
3.266464
a1a9978e-2b0f-4759-8e65-a23faf0c2baf
liandd/Competitive_programming_2020_2024
BeeCrowd/countingSheep-1609.cpp
#include <bits/stdc++.h> using namespace std; #define fo(i, n) for (int i = 0; i < n; i++) #define si(x) scanf("%d", &x) #define pi(x) printf("%d\n", x) int main() { int t; si(t); while (t--) { set<int> sheeps; int n; si(n); fo(i, n) { int aux; si(aux); sheeps.insert(aux); }...
ALGO
0.998274
4.174391
17bd60b7-b714-4c2d-a506-3390f818eac9
airen3339/llvm-project
libc/src/math/amdgpu/trunc.cpp
#include "src/math/trunc.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(double, trunc, (double x)) { return __builtin_trunc(x); } } // namespace LIBC_NAMESPACE_DECL
TOOL
0.855444
6.032022
e3042898-abe2-4fb9-bf8b-ad77d6ff1a24
920328eric/LeetCode75_practises
59_N-th Tribonacci Number.cpp
// 1137. N-th Tribonacci Number // runtime : 0 ms Beats 100.00% // space : 7.46 MB Beats 52.41% // O(n) time and O(1) space class Solution { public: int tribonacci(int n) { int dp[3]={0,1,1}; // 只紀錄最近三筆的資料 for(int i=3;i<=n;i++){ // 從 n >= 3 開始更新 dp[i%3]=dp[0]+dp[1]+dp[2]; // 依序更新最近三筆的資...
ALGO
0.999748
6.316843
e021a0f7-2078-4888-8419-829dae21dca8
ByteBigBoss/cpp-mstr
demos/oop_banking_system/bnsys.cpp
#include <iostream> #include <vector> using namespace std; class Account { protected: string owner; double balance; public: Account(string name, double initialBalance) : owner(name), balance(initialBalance) {} void deposit(double amount) { balance += amount; } void withdraw(doub...
TOOL
0.948984
5.950399
e8563e92-1fe5-4d85-9daa-ae68358683cb
oVeron0615/baekjoon
solved.ac - CLASS/CLASS 6/boj_5719.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int MAXN = 500, INF = 1e9; int N, M; int S, D; int graph[MAXN][MAXN], rgraph[MAXN][MAXN]; int dist[MAXN]; bool vis[MAXN]; void dijkstra() { priority_queue<pii, vector<pii>, greater<pii>> p...
ALGO
0.999752
4.74859
1b8e1bb3-1347-4bd8-8f2d-4e01f3636c01
Nag28endra/Competitive-Programming-using-C--
longest_subarray.cpp
#include<bits/stdc++.h> using namespace std; int betterApproach(vector<int> &arr,int k){ map<long long, int> prefixSum; int maxLen = 0; long long sum = 0; for(int i= 0; i<arr.size(); i++){ sum +=arr[i]; if(sum == k){ maxLen = max(maxLen, i+1); } long long r...
ALGO
0.999228
4.334819
e1620dc7-f5c7-4ccf-b969-4b087c29cea2
buwagaurav/DSA
Strings/Reverse-words-in-a-string.cpp
//Given a string s, reverse the words of the string. #include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; s+=" "; stack<string> st; int i; string str=""; for(i=0;i<s.length();i++) { if(s[i]==' ') { st.push(str); str=""; ...
ALGO
0.99996
4.952418
d20bd3f9-6f22-4fee-a4f7-d10f54b67a67
linjianz/caffe-colorization-master
src/caffe/layers/conv_layer.cpp
#include <vector> #include "caffe/layers/conv_layer.hpp" namespace caffe { template <typename Dtype> void ConvolutionLayer<Dtype>::compute_output_shape() { const int* kernel_shape_data = this->kernel_shape_.cpu_data(); const int* stride_data = this->stride_.cpu_data(); const int* pad_data = this->pad_.cpu_data...
ALGO
0.911508
7.832802
6aae998f-926f-4a5c-bc36-9b25bdf48e16
PoWx-Org/obtc-miner
algo/swifftx/Swifftx_sha3.cpp
#include "Swifftx_sha3.h" extern "C" { #include "SWIFFTX.h" } #include <math.h> #include <stdlib.h> #include <string.h> // The default salt value. // This is the expansion of e (Euler's number) - the 19 digits after 2.71: // 8281828459045235360. // The above in base 256, from MSB to LSB: BitSequence SWIF_saltValueChar...
ALGO
0.998266
6.402174
262cb4eb-d0ab-404a-9ffc-0432cf342e2b
raincross7/code-similarity
codes/train_code/problem142/problem142_138.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int cnt = count(s.begin(),s.end(),'x'); if(cnt>=8) cout<<"NO"; else cout<<"YES"; }
ALGO
0.999447
3.628203
1bb49c4b-2e55-4e4b-805b-8b43d99202ce
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3697_21.cpp
#include <bits/stdc++.h> using namespace std; double x[2005], y[2005]; double d[2005]; double eps = 1e-10; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { int a, b, c; scanf("%d%d%d", &a, &b, &c); x[i] = 1.0 * a * c / (a * a + b * b); y[i] = 1.0 * b * c / (a * a + b * b); } ...
ALGO
0.99976
4.009859
72b7e6d7-9ec1-42ad-be9e-6141866ff743
AkshayRamchandraDhole/Python
Python Code/Daily_Flash_Code_0/Week 5/10 Feb/24-DailyFlash_Solutions/24-DailyFlash_Solutions/10_Feb_Solutions_Three/C++/prog4.cpp
#include<iostream> int main() { for(int i = 0; i < 4; i++) { for(int j = 0; j < 4; j++) { if(j < 3 - i) { std::cout << " "; } else if(i + j == 3) { std::cout << "3 "; } else { std::cout << j * (j + i) << " "; } } printf("\n"); } }
ALGO
0.999233
3.31177
82d44f28-ced4-446c-b484-7104791e67ac
fusiontwo/-C-EXPRESS
예제9-2.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> int get_dice_face(int num); int main(void) { int num = 0; srand((unsigned)time(NULL)); // 난수 시드값 설정 get_dice_face(num); } int get_dice_face(int num) { int i; static int count1 = 0, count2 = 0, count3 = 0, count4 = 0, count5 = 0, count6 = 0; for (i = ...
ALGO
0.983857
3.328092
76428437-6b2e-4d20-aad4-bf3a755c120b
yashvardhan-rustedlegend/DAA
assgn5/q1/countMaxOccurance.cpp
#include<iostream> using namespace std; void maxOcc(char ch[], int size) { int alpha[26] = {0}; for(int i = 0; i< size; i++) { alpha[ch[i] - 'a']++; } int maxsize = 0; char c; for(int i=0; i<26; i++) { if(alpha[i] > maxsize) { maxsize = alpha[i]; c = 'a' +...
ALGO
0.99984
3.313357
07c7336e-1b05-4f8f-b63b-fc50541695bd
ChronisYan/Algorithms-Data-Structures
C++/algorithms/leastCommonMultiple.cpp
#include <iostream> int gcd(int a, int b) { while(b != 0){ int temp = b; b = a % b; a = temp; } return a; } int lcm(int a, int b){ return (a * b) / gcd(a, b); } int main() { int num1 = 234; int num2 = 5205; int result = lcm(num1, num2); std::cout << result << std::endl; }
ALGO
0.999287
5.277407
57873317-2d95-411c-90b5-ddd72588562e
phm1231/Algorithm-Practice
baekjoon/covenant_kit/15898.cpp
// based problem: #include <iostream> #include <vector> #include <cstring> using namespace std; #define ll long long #define MAX 100001 void init(); void input(); void solve(); void rotate(); void check(int, int, int); void calcul(int ,int ,int ,int ,int, int); int n, answer; const int startY[] = {0, 0, 1, 1}; cons...
ALGO
0.999389
3.874723
1d675098-d946-4a56-8003-90faf1afedd2
Hikari9/UVa
stuff/rpln.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; const int N = 2000001; int t, n, m, a, b, tc; int log2[N], st[N][22]; int main() { ios::sync_with_stdio(false); cin.tie(0); for (int i = 1, l = -1; i < N; ++i) { if ((i & (i - 1)) == 0) l++; log2[i] = l; } cin...
ALGO
0.99979
3.951429
800ecd9c-7a9c-4ca9-a544-227f25b191a5
Sivasubramani/LeetCode
StudyPlan/DataStructures/FirstUniqueCharacterinaString.cpp
// 387. First Unique Character in a String // Easy // Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. // Example 1: // Input: s = "leetcode" // Output: 0 // Example 2: // Input: s = "loveleetcode" // Output: 2 // Example 3: // Input: s = "aabb...
ALGO
0.999929
6.046684
8aff0910-8e4a-4648-8656-b138c8363466
ZhaohengLi/mesh-simplification
main.cpp
#include "Vector.h" #include "cal.h" #define INFD 1e8 #define BUFFER_SIZE 1024 #define TOLERATE 2.0 typedef std::pair<int, int> Edge; class Model { std::vector< Vector > vertex; std::vector<bool> removed; std::vector< std::set<Edge> > face; std::set<Edge> edge; std::priority_queue< std::pair<dou...
ALGO
0.996609
5.379078