uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
41b9325d-5e63-488c-97cd-720086ab5bd6
Arcathrone/Exercise
zigzag.cpp
#include <iostream> #include <cstring> #include <vector> using namespace std; //Write a string in zigzag pattern and read line by line. Conversion rows are arbitrary. string convert(string s, int numRows) { int len = s.size(); string result; if (numRows > 1) { vector<cha...
ALGO
0.999968
4.596786
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-02-01T09:09:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dbbc55f14...
28dea751-23ff-4b2e-a498-90f9c03a94af
aryannnn17/DailyProblems_Leetcode
2466.cpp
// class Solution { // int dp[100001], MOD = 1000000007; // int countWays(int& low, int& high, int& zero, int& one, int idx) { // if (idx > high) // return 0; // if (dp[idx] != -1) // return dp[idx]; // int count = 0; // if (idx >= low) // coun...
ALGO
0.999895
5.401268
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2024-11-05T19:56:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "204b588721...
18f9c30b-e103-4438-87e7-9e51282a1351
ket-hash/BruteForceRayTracer
bvh_node.h
#ifndef BVH_NODE_H #define BVH_NODE_H #include "ppmrenderer.h" #include "hittable.h" #include "hittable_list.h" #include "aabb.h" #include <algorithm> class bvh_node: public hittable { public: bvh_node(hittable_list list): bvh_node(list.objects, 0, list.objects.size()) {} bvh_node(std::vector<shared_ptr<hittab...
ALGO
0.978004
6.558738
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2024-06-27T07:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "296302c32...
56b87d33-9d8f-4cab-8b41-e24fb63febb5
petercsiba/acm
ksp/matchnums.cpp
#include <iostream> #include <vector> #include <cstdio> #include <algorithm> #include <set> #include <string> #include <map> #include <queue> #include <iomanip> #include <cmath> using namespace std; #define REP(i, to) for(int i=0; i<to; i++) typedef long long int LLI; typedef pair<LLI, LLI> PII; int P[10] = {6, 2...
ALGO
0.998742
3.091269
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-11-13T15:10:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1e90e35d...
22d93be4-33f6-4b50-a6e9-6d084fc3ee96
william12ab/FuzzyLogicTool
FuzzyLogicTool/Operation.cpp
#include "Operation.h" #include <algorithm> Operation::Operation() { } Operation::~Operation() { if (rule_vector.size() > 0) { rule_vector.clear(); } } void Operation::AddRule(const bool& is_consequence, int& counter_, const bool& is_validate) { if (!is_consequence) { if (rule_template.GetSizeOfAntecedent() ==...
TOOL
0.931433
4.492507
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2024-01-25T18:08:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c326c6ad...
3a30f053-4561-4717-ba55-6ee7f83a728a
leimpengpeng/ComputerVision_script
cvObjDetection/surfTest.cpp
#include <stdio.h> #include <iostream> #include <fstream> #include <string> #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/calib3d/calib3d.hpp" # include "opencv2/nonfree/features2d.hpp" using ...
ALGO
0.993404
5.445462
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-02-26T08:39:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c2eb6442...
3dc5af54-82f7-403e-9f29-fbff31b9aab1
msporyshev/cryptography
des.h
#pragma once #include <bitset> #include <string> #include <cstdint> #include <vector> namespace des { const int BLOCK_SIZE = 64; const int KEY_SIZE = 56; const int ROUND_KEY_SIZE = 48; const int ROUND_COUNT = 16; typedef std::bitset<BLOCK_SIZE> Block; typedef std::bitset<KEY_SIZE> Key; typedef std::bitset<BLOCK_SIZ...
ALGO
0.956096
6.415292
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-11-28T03:11:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef7578d910...
76f8d75a-a6fe-4b9d-b324-f42114912b5f
liukai234/cxx_course_record
容器和算法/定制算法和lambda作为谓词.cpp
#include <iostream> #include <algorithm> #include <vector> #include <numeric> using namespace std; /* * lambda * [capture](parameter list) -> return type { function body }; * 捕获列表 参数列表 返回值类型 方法体 * 1. 值捕获时[a],与参数不同,被捕获的变量的值是在lambda创建时拷贝,而不是调用时拷贝 * 可变lambda:可以通过参数列表首加上mutable来改变值拷贝参数的值,`auto f...
ALGO
0.991416
4.652317
{ "github_metadata": { "branch": "master", "commit_count": 201, "repo_created_at": "2020-03-14T03:57:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "46f86550...
fe21df49-c8dd-433b-884c-00233b6a05a6
ishandutta2007/codeforces-p
ppavic/normal/1729/F.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include <map> #include <set> #include <ext/pb_ds/assoc_container.hpp> #define X first #define Y second #define PB push_back using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef p...
ALGO
0.999544
3.335234
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a36f2e9b46f7...
0696f02b-1bba-4661-a1b5-573d6b3f274d
vijaysaravanan1812/placemet_training
Linked_list/problem03.cpp
// return the node which is starting point of cycle in linked list #include<iostream> using namespace std; #include"linked_list.cpp" node * starting_point_of_cycle(node *& start) { node * fast , * slow; fast = slow = start; while(fast && slow && fast->next) { slow = slow -> next; f...
ALGO
0.999963
3.776545
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-11-07T17:27:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce2c3e30d85...
c648ec9a-982b-4cf5-8943-e6ec420ccb73
bqmnhat/CompetitiveProgramming
DIGIT/DIGIT.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; string a2, a3; void DataChange() { string s = a2; a2 = ""; for (int i=s.length()-1; i>=0; i--) { a2 += s[i]; } s = a3; a3 = ""; for (int i=s.length()-1; i>=0; i--) { a3 += s[i]; } } bool CanChange(int x, ...
ALGO
0.999908
3.895574
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-28T06:45:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18e9b67b75e...
2ee2daa4-815c-49fe-b0c7-33ec9917cd9d
koparion/SelectionSort-Lists
Lab4/driver.cpp
#include "ArrayList.h" // ADT list operations #include <iostream> #include <string> #include "LinkedList.h" #include <fstream> using namespace std; // selection sort void selectionSort(ListInterface<int> &array) { int i, j, minIndex; if (array.getLength() != NULL) { //cout << "IndexSize: " << array.getLeng...
TOOL
0.997069
3.699215
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-12-09T17:34:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e75a5ec81e...
1736eae9-59dc-40ae-adff-2aae5ea12ed4
omarsalem33/Algorithmic-Toolbox
Algorithmic Toolbox/week2/5- fibonacci_number_again.cpp
#include <iostream> //using namespace std; long pisano(long m) { long prev = 0; long curr = 1; long res = 0; for(int i = 0; i < m * m; i++) { long temp = 0; temp = curr; curr = (prev + curr) % m; prev = temp; if (prev == 0 && curr == 1) res = i + 1; } return res; } long fibonacciModulo(long n, ...
ALGO
0.999985
4.483517
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-10-01T10:41:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e328dcfd575...
2961e354-3e8b-40ac-970f-cffdbe22f123
jordandong/mylintcodes
LINT_00189_FirstMissingPositive.cpp
/* Given an unsorted integer array, find the first missing positive integer. Example Given [1,2,0] return 3, and [3,4,-1,1] return 2. Challenge Your algorithm should run in O(n) time and uses constant space. Tags Expand Array */ class Solution { public: /** * @param A: a vector of integers * @ret...
ALGO
0.999927
4.856082
{ "github_metadata": { "branch": "master", "commit_count": 818, "repo_created_at": "2014-12-07T08:10:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c3c83ab...
4499bf2e-47cf-4a6a-a2aa-eea9b8b60030
ansunho123/problem-solving
0Ealgo1.cpp
// bubble sort 구현 O(n^2) /*int arr[10] = {3,2,7,116,62,235,1,23,55,77}; int n = 10; for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j++){ if(arr[j] >= arr[j+1]){ swap(arr[j], arr[j+1]); } } } */ // boj 11728번 배열 합치기 #include <iostream> using namespace std; int ans[2000002]...
ALGO
0.999997
3.794691
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2024-03-17T07:37:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef7be9a9...
cecfd954-d918-4c8f-9e0c-4f5bc98a5d4f
giorgiopizz/lab_particelle
primo_compito/istogrammi_Am.cpp
//c++ istogrammi_Am.cpp -o istogrammi_Am `root-config --cflags --glibs` #include <iostream> #include <fstream> #include <string> #include <TApplication.h> #include <TF1.h> #include <TH1.h> #include <TCanvas.h> #include <TStyle.h> #include <TFitResult.h> using namespace std; bool ReadData(vector<int> &values, string fi...
DATA
0.934615
3.694568
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-29T08:24:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36d7b105dc...
43d7badc-e684-4d12-977d-9b67afa84be5
ishandutta2007/codeforces-w
wild_hamster/normal/365/A.cpp
#include <iostream> #include <algorithm> #include <map> #include <vector> #include <cstring> #include <stdio.h> #include <sstream> #include <time.h> using namespace std; typedef long long ll; typedef double db; #define tr 1000000007 #define pb push_back #define mp make_pair #define fi first #define se second vector <ll...
ALGO
0.999629
3.528272
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eed8805380d...
67208c12-38e6-4aa5-aaa6-7725212f3980
gzshawnliang/competitive-programming
myCpps/soyaMilk_UVA11909.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <string> #include <queue> #include <vector> using namespace std; ifstream fin("soyaMilk_UVA11909.in"); ofstream fout("soyaMilk_UVA11909.out"); const double PI ...
ALGO
0.999317
3.307033
{ "github_metadata": { "branch": "master", "commit_count": 1963, "repo_created_at": "2019-01-17T06:33:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5902522...
5d43cdfb-30a4-41e7-9f8f-903ce20f9efd
M6894/cpp-discipline
block-2/04-count-repetitions.cpp
#include <iostream> #include <string> #include <map> #include <vector> #include <tuple> #include <set> using namespace std; enum class Lang { DE, FR, IT }; struct Region { string std_name; string parent_std_name; map<Lang, string> names; int64_t population; }; bool operator==(const Region& lhs,...
ALGO
0.978941
4.503078
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-01-21T10:22:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a9058b31...
881afd07-e71c-4066-9ae9-4478b3f8901c
Anchangun/LeetCode
Cpp/Number/7. Reverse Integer/cl_solution.cpp
#include "cl_solution.h" int cl_solution::reverse(int x) { long result = 0; bool flag = true; if (!fn_data_check(x)) return 0; flag = (x >= 0) ? true : false; if (!flag) { x *= -1; } while (x >= 10) { result += x % 10; result *= 10; x /= 10; ...
ALGO
0.999688
4.364213
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2020-11-14T16:40:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff101f96713...
45eee95f-f7a6-4450-996b-4ad206f1fd4f
Ssdghaghili/Operating-System-Course-Projects
CA3-MultyThreadImageFiltering/parallel/main.cpp
#include <iostream> #include <string> #include <vector> #include <chrono> #include <pthread.h> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #define MAX_NUM_THREADS 8 using namespace std; using namespace cv; const int KERNEL_MATRIX[3][3] = { {0, 1, 0}, {1, -4, 1},...
ALGO
0.996827
5.64781
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-04-18T13:32:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ead8260386...
bb354cda-e1b3-430e-a773-b8967b5cc37b
varuntyagiG/Queue
circularQueue.cpp
#include <functional> #include <iostream> #include <utility> using namespace std; class cicularQueue { public: int *arr; int front; int rear; int size; cicularQueue(int size) { this->size = size; this->front = -1; this->rear = -1; arr = new int[size]; } void push(int data) { if ((fr...
ALGO
0.972545
5.129161
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-02-27T20:09:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a79fb27f3bd...
14663a2b-dc69-41e3-a750-0acaf127e3cc
Ryo-Ura/LeetCode
easy/ClimbingStairs.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <math.h> using namespace std; /** * @todo should try this again * @brief Basically it's a fibonacci. * Runtime: 0 ms, faster than 100.00% of C++ online submissions for Climbing Stairs. * Memory Usage: 6 MB, less than 55...
ALGO
0.999951
4.951455
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2022-03-29T20:58:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "080558c1948...
5ce6be37-292f-41f9-9e67-860d95c81c18
MAZHARMIK/Interview_DS_Algo
Stack/Asteroid Collision.cpp
/* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=7isfomHzzno Company Tags : Uber, lyft Leetcode Link : https://leetcode.com/problems/asteroid-collision/ */ //Using a stack<int> (T.C : O(n)) class Solution { public: vector<int> asteroidCollision(vector<int>& ...
ALGO
0.99998
5.856259
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
d23fcccd-574b-4e22-8217-09db52be82bf
salvomob/Math_Visuals
pi/pi.cpp
#include <iostream> #include <fstream> #include<iomanip> #include<math.h> using namespace std; bool isInCircle(double x,double y); int main() { ofstream out("input2.txt"); long int num = 0; int w=400; int h = 400; int matrix[w][h] = {0}; double yes = 0; double no = 0; double pi = 0.0d...
ALGO
0.997762
3.438874
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-05-11T10:45:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f3c0f2c25...
fb3c005e-10fe-419e-843d-6372a1ff2962
1105Lakshya/DSA-TOPIC-WISE
16_BINARY_TREE/4_BUILD_FROM_LEVEL_ORDER.cpp
// INORDER PREORDER POSTORDER // LNR NLR LRN #include<bits/stdc++.h> using namespace std; class node{ public: int data; node* left; node* right; node(int d){ this->data=d; this->...
ALGO
0.999976
5.13338
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-07-12T17:47:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24a96ac5b709...
59b154c9-b319-42e9-abd5-af514a534c3f
MakinoRuki/Codeforces
R535/1108D.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <unordered_map> #include <cmath> #include <set> #include <map> #include <queue> #define N 200005 using namespace std; typedef long long ll; const ll mod = 1000000007LL; int n; string s; int dp[N][3]; int main() { ...
ALGO
0.99999
3.557178
{ "github_metadata": { "branch": "master", "commit_count": 3630, "repo_created_at": "2017-11-19T03:14:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d9c7c0...
9c78828c-1d39-4030-9a5d-b1600a452c49
sisrafilss/cse-fundamentals-lectures
Introduction to Algorithms & Problem Solving part - III/Module 9 More Problem Solving with BFS & DFS/Building_Teams.cpp
/* Problem Link: https://cses.fi/problemset/task/1668 We will solve this problem using Graph Coloring with DFS Input: 5 3 1 2 1 3 4 5 */ #include<bits/stdc++.h> using namespace std; const int N = 10e5; vector<int> adj_list[N]; bool visited[N]; int color[N]; bool dfs(int src) { visited[src] = true; for...
ALGO
0.999995
5.029708
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-09-10T04:42:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f45838b8c3...
78f593cd-544f-4d3e-b84f-d714ef78ec88
Nazarmalskij/Lb7
LB7.2/LB7.2.cpp
#include <iostream> #include <iomanip> #include <time.h> using namespace std; void Create(int** a, const int n, const int Low, const int High); void Print(int** a, const int n); void Calc(int** a, const int n, int k, int max, int low); int main() { srand((unsigned)time(NULL)); int Low = 7; int High = 65; ...
ALGO
0.999317
3.345806
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-22T19:15:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "893bc5fee1...
c283bc2f-bf05-43bc-b5b9-4a6ec3d3e5d9
vandit86/competitive-programming
codewars_16.cpp
// https://www.codewars.com/kata/5324945e2ece5e1f32000370/train/cpp #include<iostream> #include <string> using namespace std; std::string sum_strings(const std::string& a, const std::string& b) { string res = ""; char flag = 0; // set if sum of two num > 9 for (int i = a.size(), j = b.size(); i > 0 || j...
ALGO
0.999767
6.197931
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2021-02-10T14:51:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55ccb0251...
fb234c05-c392-4f2b-a096-2603316b9bc5
sanikoyes/godot
thirdparty/graphite/src/Position.cpp
/* GRAPHITE2 LICENSING Copyright 2010, SIL International All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of License, or (at yo...
TOOL
0.947745
5.734322
{ "github_metadata": { "branch": "master", "commit_count": 48784, "repo_created_at": "2014-03-11T05:13:41.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "godotengine/godot", "stars": 125, "forks": 20, "issues": 0, "pull_requests": 0 }, "file_meta": { "con...
8fc784d1-cebf-4fbf-a5e8-740701ae7d7d
grv747/Codevita-solutions
forestfire.cpp
#include<iostream> #include<queue> using namespace std; char forest[21][21]; int n,m; struct ele { int a,b; }; bool isvalid(int x,int y) { return (x>=0&&y>=0&&x<n&&y<m); } bool isdelim(ele temp) { return (temp.a==-1&&temp.b==-1); } int main() { cin>>n>>m; int x,y,i,j,count=0; cin>>x>>y; x--;...
ALGO
0.999946
3.483122
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-28T17:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfc471332b...
db8879f6-1898-48a8-8177-cd58c12bde71
mariauazam/CS340Dijkstra
dijkstra.cpp
/* Student Name: <NAME> Student ID: 200402217 Date: Wednesday, August 19, 2020 Purpose: Implement Dijkstra's Algorithm to find the least cost path from one node to all other vertices in a graph. Assumptions: All nodes/vertices are referred to by consectuive positive intege...
ALGO
0.999979
6.32431
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-08-20T03:09:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c180d3534...
4e5d23bb-9959-4a72-979f-48d674e64aeb
AnisaYasaroh/Laporan-Praktikum-Struktur-Data
Praktikum 3/Unguided2.cpp
#include <iostream> #include <iomanip> #include <string> using namespace std; class Node { // Deklarasi Class Node untuk Double Linked List public: string ProductName; int harga; Node* prev; Node* next; }; class DoublyLinkedList { // Deklarasi Class DoublyLinkedList untuk Double Linked List public: ...
TOOL
0.991953
5.469875
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-03-12T05:21:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "513fc2c1bfe...
abf8d98f-20eb-4c36-bf03-e61c4a3973df
RootGaurav/Leetcode
129. Sum Root to Leaf Numbers/129.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.999985
6.050497
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2024-04-11T02:24:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bad6f17c...
28aa2c2d-7805-46f5-9d2c-63bcbc829c5d
Atha2445/DSA-UNIT1
element insertion in array using array.cpp
Imagine you are developing a text editor application, and you need to implement a feature that allows users to insert a new character at a specified position in an array of characters. Write a program that takes input from the user, including the size of the array, the characters for the array, the position for ins...
ALGO
0.999904
4.599831
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-22T05:48:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88054ae7382...
812178cf-b45e-416e-9430-635fc3bb4952
raincross7/code-similarity
codes/train_code/problem465/problem465_438.cpp
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb emplace_back #define mp make_pair #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() const int32_t inf = 1001001001; const int64_t infll = 1001001001001001001ll; const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}...
ALGO
0.999975
5.044053
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a01f2b28cd97...
ec5b2276-bb65-4ae5-b4f5-f2e695ce9ccd
GiuPPon/UniGe
2023-2024/introduzione alla programmazione /laboratorio/eserciziario completo/parte 4/10_nPari.cpp
/* . Scrivere un programma che legge N interi in un array a di int (vedi leggiArrayInt). Quindi con un opportuno messaggio di output stampa il numero P dei numeri pari contenuti nell’array ed il numero D di quelli dispari (P e D sono quindi entrambi valori interi). [ File nPari.cpp ] */ #include <iostream> using name...
ALGO
0.995926
4.905356
{ "github_metadata": { "branch": "main", "commit_count": 323, "repo_created_at": "2024-08-09T14:07:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b599273b22...
c1f28f22-e631-4153-9384-a5967ca92981
odderikf/3d_graphics
rubiks_cube/main.cpp
#define GLM_ENABLE_EXPERIMENTAL #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> #include <glm/glm.hpp> #include <glm/mat4x4.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtc/constants.hpp> #include <glm/gtx/string_cast.hpp> #include <cmath> #include <initializer...
ALGO
0.921573
4.780104
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-09-08T10:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3cb57e82...
668f38c8-df25-4993-b3cb-1edfa47c247d
piedpiper358/data-structures-n-algorithms
block3/main/1521.cpp
#include <iostream> #include <sstream> #include <stdio.h> using namespace std; struct soldier { int num; soldier* next; }; inline soldier *NewSoldier(int num, soldier* next = NULL); inline void start(soldier* prev, soldier* first, int n, int k); int main(int argc, char *argv[]) { int n, k; //cin >> n ...
ALGO
0.999979
3.16194
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-09-21T15:47:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b812f407edb5...
9369264b-b718-47b5-9ca1-ec4f91f2c4bf
xenron/sandbox-vision-opencv
book/packt/Arduino.Computer.Vision.Programming/Chapter_05_Code/hull.cpp
/** * @function hull_demo.cpp * @brief Demo code to find contours in an image * @author OpenCV team */ #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace cv; using namespace std; Mat org,src; Mat src_gray; int ...
ALGO
0.997186
6.43664
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2016-07-26T11:49:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d62d4b5...
d175ff78-9715-4608-9a29-fd75fc4f7f1c
caryhooper/adventofcode
2022/8/8.cpp
#include <bits/stdc++.h> //std::stoi, size_t //Struct to keep track of the scenic score components for each Tree (part2) typedef struct { size_t up; size_t down; size_t left; size_t right; } scenic_score_t; //Tree class keeps track of location, height, and scenic value of each tree. class Tree{ ...
ALGO
0.999881
5.972165
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-12-08T10:22:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "198e98d60...
3bc5ee80-f036-4965-a78c-433f3735cf21
developerhimanshu/DSA-Questions
Dynamic Programming/98.LISTabulation.cpp
/* Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example, [3,6,2,7] is a subsequence of the array [0,3,1,6,2,2,7]....
ALGO
0.999988
5.545488
{ "github_metadata": { "branch": "main", "commit_count": 342, "repo_created_at": "2021-10-17T13:07:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70a97ffa6e...
2a3af76f-c44b-4137-a7a5-60326aa2f9de
DaleStudy/leetcode-study
longest-increasing-subsequence/obzva.cpp
/** * 풀이 * - 아래와 같은 배열 memo를 이용하여 이중 반복문을 실행하는 풀이입니다 * - memo[i]: nums[i]로 끝나는 subsequence 중에서 길이가 가장 긴 subsequence의 길이 * * Big O * - N: 배열 nums의 길이 * - Time complexity: O(N^2) * - Space complexity: O(N) */ class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int> memo; me...
ALGO
0.999995
6.166911
{ "github_metadata": { "branch": "main", "commit_count": 8009, "repo_created_at": "2024-04-19T01:20:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 121, "forks": 227, "issues": 75, "pull_requests": 18 }, "file_meta": { "content_id": "00fe...
fff596cc-eee5-448e-b1ff-5bc7d68f9b5c
stmbsnaasmf/STM_Projects
Elevators_Scheduling/Not_Sure_What_IX.cpp
#include <iostream> #include <stdlib.h> #include <time.h> #include <queue> using namespace std; //Play it safe kids. enum elevatorDirection { UP, DOWN }; class Node { public: int val; Node(int val) { this->val = val; } Node* next = NULL; Node* prev = NULL; }; class ElevatorQueue { public: Node* front...
ALGO
0.98999
3.728624
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-02-03T14:28:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "184e92acfb31...
a4df9860-cc51-47ed-b03c-9e62d9d606f7
Kazim68/DSA-labs
2nd Week/115.cpp
#include <stack> #include <vector> #include <string> #include <queue> using namespace std; // problem 1 class Solution { public: char open[3] = {'(', '[', '{'}; char close[3] = {')', ']', '}'}; bool isValid(string s) { stack<char> brackets; int idx = 0; for (int i = 0; i < s.len...
ALGO
0.999431
5.759471
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-10-20T11:53:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1fce69ff...
354da9dc-58f2-4fd0-b18d-eb28bbc2b39a
AhVir/LC
30.05.25/koko_eating_bananas.cpp
// https://leetcode.com/problems/koko-eating-bananas/ # define int2 long long class Solution { public: int minEatingSpeed(vector<int>& piles, int h) { int maxVal = *max_element(piles.begin(), piles.end()); cout << "maxVal: " << maxVal << endl; int l = 1, r = maxVal; int ans = IN...
ALGO
0.999885
5.434062
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-05-19T16:22:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b244e600dd4...
e527d55f-fda3-46e9-97cc-8c20dfa4b3b1
appliedtopology/ctl
tools/metis_to_graph_tool.cpp
/******************************************************************************* * -Academic Honesty- * Plagarism: The unauthorized use or close imitation of the language and * thoughts of another author and the representation of them as one's own * original work, as by not crediting the author. * (Encyclopedia Brit...
ALGO
0.95425
4.101799
{ "github_metadata": { "branch": "master", "commit_count": 548, "repo_created_at": "2014-08-21T19:50:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 60, "forks": 12, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b7ad6f0...
03aa8b31-a88f-4f27-b0a8-c3835cfc1c7f
daniel-ankit/Codechef
Practice/CHEFSTLT.cpp
#include<bits/stdc++.h> #include<algorithm> #include<bitset> #include<cstdlib> #include<iomanip> using namespace std; #define TEST int T; cin >> T; while (T--) #define int long long #define PB push_back #define PP pop_back #define MP make_pair #define MOD(n) n%1000000007 #define VLL vector <long long> #define FOR(i, ...
ALGO
0.99995
3.676075
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2021-09-19T12:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfce8b2d79a...
f2b354a7-48d4-46d1-a376-5c4bdf8bb805
sukiSion/CppDemo
five/five_question/seven.cpp
#include <iostream> #include <cctype> int main(int argc, char const *argv[]) { using namespace std; char ch; cout << "Enter word(q to quit)" << endl; int vowels = 0; int consonants = 0; int others = 0; bool isNewWord = true; bool isReadyExit = false; while (cin.get(ch)) { ...
ALGO
0.987793
3.767854
{ "github_metadata": { "branch": "cppDemo", "commit_count": 34, "repo_created_at": "2024-01-02T11:42:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d65e8dc...
c09cfa80-e191-4152-8f85-a2c86c14eed4
Avinash0308/Competitive_Programming
001/prac_ques/76.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Node{ public: Node * next; int data; Node(int x){ data = x; next = NULL; } }; class Solution { public: Node *compute(Node *head) { // your code goes here Node *prev = NULL; Node *h...
ALGO
0.999991
3.945462
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-07-14T21:02:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67c373b4f32...
ef82fed7-fed3-4f52-9474-e94b6f31de80
sanyamk0/LeetCode
Difficulty: Medium/Fractional Knapsack/fractional-knapsack.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Item { int value; int weight; }; // } Driver Code Ends // class implemented /* struct Item{ int value; int weight; }; */ class Solution { private: static bool comp(Item a, Item b) { double r1 = (double)a.valu...
ALGO
0.999972
5.42166
{ "github_metadata": { "branch": "main", "commit_count": 842, "repo_created_at": "2024-07-09T10:40:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1605002336...
75cd6ffe-8806-4807-95f8-9d328cc175f5
ColorfulOrangeCN/oicode
cf-574d2/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long inte; const static int maxn = 1e5 + 1; const static inte mods = 998244353; int A[maxn], cnt[11]; inte p10[11]; int cntBit(int x) { int c = 0; while(x) { ++c; x /= 10; } return c; } inline inte p2(inte x) {return x * x %...
ALGO
0.999915
4.370312
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2020-10-29T08:08:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4572022d...
0e0406d9-c479-45b7-bc78-3894143a4555
UPC-EnricBonet/trunk
kratos/applications/structural_application/z_legacy/custom_elements/pfem_contact_element3D_vel.cpp
/* ============================================================================== KratosStructuralApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 <NAME>, <NAME>, <NAME>, <NAME> <EMAIL> <EMAIL> <EMAIL> <...
TOOL
0.983004
4.413606
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2015-04-09T15:31:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "83f23adaa...
71691b2b-2e8d-4758-ab19-2fed2ff15a5d
FIT-HCMUTE-Learn/introductory-programming
Bai13Level10.cpp
#include <bits/stdc++.h> using namespace std; void input(int &m, int &n, int matrix[][100]); void matrix_from_left(int m, int n, int matrix[][100]); void swap(int &scan, int &b); void output(int m, int n, int matrix[][100]); int main () { int m,n; int matrix[100][100]; input(m,n,matrix); matrix_from_l...
ALGO
0.999982
3.467344
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-19T13:19:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70cfc5ea98e9d...
1c7e06f3-b17e-47b5-8f0b-4e09f1b7e873
st1page/ACMcode
2019Multi-UniversityTrainingContest4/1008.cpp
#include<cstdio> #include<algorithm> using namespace std; typedef long long ll; int gn(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||'9'<ch){if(ch=='-')f=-1;ch=getchar();} while('0'<=ch&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return f*x; } #define N 21234567 int val[112345]; struct data{ int x,id; }aa[112345];...
ALGO
0.999978
4.228264
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-07-25T04:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be78632126...
7566014b-3b04-4d5a-8516-f32e2a0a594a
PoisWu/coding
lc/3036. Number of Subarrays That Match a Pattern II/solution.cpp
#include <algorithm> #include <array> #include <bitset> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullpt...
ALGO
0.999978
5.668866
{ "github_metadata": { "branch": "main", "commit_count": 230, "repo_created_at": "2021-06-04T20:44:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a08c6fbfdd...
da8639d8-d649-46bb-b820-b62275747262
n-inja/kyoupro
src/gcj/gcj2018Ac.cpp
#include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <set> #include <stdio.h> #include <string> #include <utility> #include <vector> using namespace std; int main() { int t; cin >> t; for (int k = 0; k < t; k++) { long long n; double p;...
ALGO
0.999713
3.757746
{ "github_metadata": { "branch": "master", "commit_count": 468, "repo_created_at": "2017-07-18T01:13:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65d1d5a6...
18e3b84c-9953-4560-81f6-418e6707c5bf
jk-aero/raycasting-with-DDA
main .cpp
#include "raylib.h" #include<iostream> #include<cmath> #include<vector> //// // there are some minor issues with the code that is it only gives the output when staring point is changes // no matter at whatever end position the output cell value dont change // also the y cordinate outputting is one less than the actu...
ALGO
0.968737
3.86224
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-07-27T05:51:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2781273e66d6...
0f7f16a2-1515-4ead-8353-8abef6bc1838
Alegriabaile/3DPhotoAndroidNative
app/src/main/cpp/src_debug/debug_genCompactTri.cpp
// // Created by ale on 19-3-24. // // // Created by ale on 19-3-20. // #include <iostream> #include <genRts.h> #include "Frame.h" #include "i3d.h" #include "initInputData.h" #include "genFeatures.h" #include "genInitialGraph.h" #include "genKeyFrames.h" #include "genGlobalByMst.h" #include "DeformableProblem.h" #...
ALGO
0.974442
4.430989
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-07-28T13:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0296edca2...
e7c2c43b-8b7d-4651-8967-bbc32d4cb7fd
DaniStoyanova/DataStructuresAndAlgorithms-FMI
Sorts/Counting Sort/countingSortForVector.cpp
void CountSort(vector<int>& array, int size) { vector<int> output; vector<int> count; int max = array[0]; for (int i = 1; i < size; i++) { if (array[i] > max) max = array[i]; } for (int i = 0; i <= max; ++i) { count.push_back(0); output.push_back(0); ...
ALGO
0.999812
5.756669
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2021-10-27T18:24:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1f876f771...
ceee4f7d-0d00-48c5-9ed0-8786b18c1330
Vinsm-L/LeetCode_Problems
WEEK3/LongestPalindromicSubstring.cpp
class Solution { public: string longestPalindrome(string s) { int len = s.length(); int min = 0; // store the head of target substring int max = 0; // store the tail of target substring int i, j; for (int round = 0; round < len-1; round++) { // assume the length o...
ALGO
0.99995
5.20867
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-03-28T03:46:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57273c410...
650e95d4-343e-4530-acb9-036f025a8308
roto65/AdventofCode-2023
shared.hpp
#include <bits/stdc++.h> struct Pos { int x, y; Pos(const Pos& p) { x = p.x; y = p.y; } Pos(const int& X, const int& Y) { x = X; y = Y; } bool operator!=(const Pos& p) const { return x != p.x || y != p.y; } }; std::vector<std::string> readFile(std...
ALGO
0.943717
3.22227
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2023-12-01T10:40:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "970ad5c9e...
d5774bff-5ebf-473d-b789-a2cc8ad7931f
apache/cloudberry
src/backend/gporca/libnaucrates/src/statistics/CGroupByStatsProcessor.cpp
//--------------------------------------------------------------------------- // Greenplum Database // Copyright 2018 VMware, Inc. or its affiliates. // // @filename: // CGroupByStatsProcessor.cpp // // @doc: // Statistics helper routines for processing group by operations //------------------------------------------...
TOOL
0.975988
7.080176
{ "github_metadata": { "branch": "main", "commit_count": 71549, "repo_created_at": "2023-05-24T06:58:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1000, "forks": 167, "issues": 104, "pull_requests": 50 }, "file_meta": { "content_id": "6...
9114285d-64e0-47da-976d-f9415001ccbb
starseeker/SPOOLES
include/misc.h
/* misc.h */ #ifndef _misc_ #define _misc_ #include "cfiles.h" #include "DenseMtx.h" #include "InpMtx.h" #include "ETree.h" #include "Coords.h" #include "Graph.h" #include "MSMD.h" #include "GPart.h" /*--------------------------------------------------------------------*/ /* ---------------------------------------...
ALGO
0.996086
3.677951
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-02T06:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "694cf00b...
e2901397-6c7a-4ea3-a410-6ce38675f052
Vaa3D/v3d_external
v3d_main/cellseg/FL_filter3D.h
/* * Copyright (c)2006-2010 <NAME> (Janelia Farm, Howard Hughes Medical Institute). * All rights reserved. */ /************ ********* LICENSE NOTICE ************ This folder contains all source codes for the V3D project, which is subject to the following conditions i...
ALGO
0.995328
4.841413
{ "github_metadata": { "branch": "master", "commit_count": 4783, "repo_created_at": "2016-01-27T18:12:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 42, "forks": 39, "issues": 3, "pull_requests": 3 }, "file_meta": { "content_id": "4c5d46...
96918df3-61f9-4ada-8db2-9339db48bf93
Huvok/Competitive-Programming
Codeforces/300/300/B. Coach.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> #include <stack> #include <queue> #include <map> #include <functional> #include <queue> #include <bitset> #include <sstream> #include <set> #include <iomanip> #include <string.h> #include <unordered_map> #inc...
ALGO
0.999986
3.630401
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-06-23T02:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60ccd7e30...
ddc59ed8-a8ff-43f4-bbee-5aad635eb5fa
xehoth/OnlineJudgeCodes
BZOJ/BZOJ5105-礼物-二项式定理+矩阵快速幂.cpp
/** * Copyright (c) 2016-2018, xehoth * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by appl...
ALGO
0.999994
4.198683
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2017-08-26T02:49:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e84369b6...
6ce3c8ca-a8f3-448f-8ac2-94380aac872d
H-Shen/My_Code_Collection
Luogu/P2216.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // Bump Allocator static char buf[450 << 20]; void* operator new(size_t s) { static size_t i = sizeof buf; assert(s < i); return (void*)&buf[i -= s]; } void operator delete(void*) {} namespace IO { template<typename T> inline ...
ALGO
0.999434
3.77835
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2019-04-11T06:48:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c07144a...
a744d8ab-d1c3-470b-8132-ce3e6620eb81
eglrp/GSLAM-VINSMono
src/marginalization.cpp
#include "marginalization.h" Marginalization::Marginalization() : number_imu(0), number_img(0) { } VectorXd Marginalization::update(const MatrixXd &Ap, const VectorXd &bp, vector<int> &remove, const vector<int> &not_remove, int _start_imu, int _number_...
ALGO
0.989824
5.231621
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-07-24T05:31:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "077851297d...
04a51944-f6a8-4f10-b1a1-80e81206a1ac
pomelyu/LearnOpenCV
LearnOpenCV/src/L04/L04_1_Contour_Basic.h
// // L04_1_Contour_Basic.h // LearnOpenCV // // Created by <NAME> on 2018/8/5. // Copyright © 2018 <NAME>. All rights reserved. // #ifndef L04_1_Contour_Basic_h #define L04_1_Contour_Basic_h #include <stdio.h> #include <opencv2/opencv.hpp> #include "utils.hpp" #include "contour.hpp" using namespace std; using ...
TOOL
0.905437
4.019551
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-07-29T14:17:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3787a3bac...
f932d976-f305-4388-9dc7-6dcb36a78e07
josedmass/Compactador-de-Arquivos
TP/src/Descompactacao.cpp
#include <string.h> #include <stdio.h> #include "ArvoreHuffman.h" #include "ConversaoBinario.h" #include "Descompactacao.h" int NumAdicionado(std::string codigo) { char ch = BinToChar(codigo); int numadd = (int)ch - '0'; return numadd; } void descompactar(FILE* entrada, FILE* saida) { // Passo 1: pe...
ALGO
0.919135
3.485828
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-19T21:46:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f421bebf93ac...
02cdd390-026a-40ed-baaf-c28ca9776ebc
Omar-SH-1/calculator
calculator.cpp
#include <stdexcept> #include <cctype> #include <cstdlib> #include <vector> #include <iostream> // Выполняет операцию (+, -, *, /) double applyOperation(double a, double b, char op) { if (op == '+') return a + b; if (op == '-') return a - b; if (op == '*') return a * b; if (op == '/') { if (b =...
ALGO
0.991767
6.518571
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-12-10T07:50:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb7b740b15...
bfec14ea-fbaa-4161-a6eb-31d13cf4c974
niuez/cp-cpp-library
src/math/formal_power_series.hpp
#include <vector> using i64 = long long; std::size_t bound_pow2(std::size_t sz) { return 1ll << (std::__lg(sz - 1) + 1); } template<class fps_multiply> struct FPS { struct DFT { using C = typename fps_multiply::conv_type; std::vector<C> coef; DFT(std::vector<C> c): coef(std::move(c)) {} DFT clone(...
ALGO
0.998893
4.353421
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-10-28T07:11:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "881ca28...
b581dfd2-a4d7-4413-937f-acb7f33fba09
Manoj-T-V/DSA
Kadane's Algorithm - GFG/kadanes-algorithm.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // arr: input array // n: size of array //Function to find the sum of contiguous subarray with maximum sum. long long maxSubarraySum(int arr[], int n){ int maxHere = 0;...
ALGO
0.999777
5.810287
{ "github_metadata": { "branch": "main", "commit_count": 212, "repo_created_at": "2023-02-15T16:59:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8615f54f9...
eb5e55fb-5ce9-4fe2-9081-383614ea9327
optimalprimate/plantwater
soil_water.ino
#include <Wire.h> #include <Adafruit_MotorShield.h> #include "utility/Adafruit_MS_PWMServoDriver.h" Adafruit_MotorShield AFMS = Adafruit_MotorShield(); Adafruit_DCMotor *myMotor = AFMS.getMotor(1); //350-400 seems a good limit of dry. 1024 = dry, 1 = wet. void setup() { Serial.begin(9600); // set up Seri...
TOOL
0.932246
4.873408
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-12-11T10:46:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e2fea9737...
8bd63c09-1ab0-421a-a538-02b42811fd54
NgTienHungg/PTIT-Source
TRR 2/3_4_SoThanhPhanLienThong.cpp
#include <bits/stdc++.h> using namespace std; int n, x, res = 0; vector<vector<int>> e; vector<int> vs; void dfs(int u) { vs[u] = 1; for (int i = 0; i < e[u].size(); ++i) { int v = e[u][i]; if (vs[v] == 0) { dfs(v); } } } int main() { cin >> n; e.resize(n + 1);...
ALGO
0.999634
3.955934
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-07-04T02:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 130, "forks": 36, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bef0a1d...
234cfcd1-295c-4483-8da2-f56b30130a3a
TheRedHotHabanero/parprog_7sem
additional_tasks/nested_omp/additional_nested_omp.cpp
#include <omp.h> #include <iostream> int main(int argc, char *argv[]) { int nested = omp_get_nested(); if (nested <= 0) { omp_set_nested(1); // Enable nesting if off. Any non-nullable value turns nesting on omp_set_dynamic(0); // Enable changing number of threads which are available in future...
TOOL
0.996778
3.975442
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-09-24T12:28:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e36e0c18acc...
01073bd0-3557-40cb-a931-865882b3017c
Adibto007/C
guia 11/ejercicio 8.cpp
#include <stdio.h> int main() { int n, i; float compra, iva, total, pago, cambio; float suma_ventas = 0, suma_caja = 0; printf("Ingrese la cantidad de clientes: "); scanf("%d", &n); for (i = 1; i <= n; i++) { printf("\nCliente %d\n", i); printf("Ingrese el monto de la compra:...
TOOL
0.903577
4.247602
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-02-29T19:11:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddf013c8bd...
8465b4a4-d811-4ba3-b7f4-6d24de2be874
rmartinez96/Dijkstras-Algorithm
dump/minHeap.h
#pragma once #include <iostream> #include <vector> #include <algorithm> using namespace std; template <class thing> class minHeap { private: vector<thing> item; int parent(int i) { if (i == 0) return i; else if (i % 2 == 0) return(i - 1) / 2; else return i / 2; } int lchild(int i) { return i +...
ALGO
0.993643
3.349266
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-17T19:31:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f59d801487...
1a95dcc8-1f4e-4540-894b-b3ffa6e46bbb
ocfbnj/Exercises
luogu/P1030.cpp
#include <iostream> #include <string> #include <string_view> #include <memory> struct Node { Node(Node* l, Node* r, char c) : left(l), right(r), data(c) {} std::unique_ptr<Node> left; std::unique_ptr<Node> right; char data; }; std::string mid, last; void construct(std::unique_ptr<Node>& root, std::st...
ALGO
0.999842
4.958165
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-04-04T15:42:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f4c2fc4f...
e8b1b3ee-2f9f-4e55-ac17-937b935b277a
DyslexiaS/ComputerOrganization_2018
Cache/SRC/cache.cpp
#include <iostream> #include <string> #include <queue> #include <vector> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; char input_file[50] = "."; char output_file[50] = "."; queue<int> hit_ins, miss_ins; unsigned int ins_count; int* dir_array; vector<int>* V_four; vector<int> V_full; ...
ALGO
0.912959
3.829158
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-03-18T02:42:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e5599eb3...
8414c6e1-7200-402d-b63a-6c31e876410f
voidpunk/Advent_of_Code
2016/01/01.cpp
#include <fstream> #include <iostream> #include <vector> #include <sstream> #include <algorithm> int main (void) { std::string raw_input; std::fstream file; file.open("./input.txt", std::ios::in); if (file.is_open()) { while (getline(file, raw_input)) file.close(); }; raw_inp...
ALGO
0.999619
5.62231
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2022-07-26T01:06:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "724019b87c...
a7112104-6ed0-4536-910b-2fd2ab6ef614
ishandutta2007/codeforces-y
yuma_/normal/625/D.cpp
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; int memo[2][2][100000]; int N; string getans(vector<int>nums) { vector<int>anss; if (nums.size() % 2 == 0) { for (int i = 0; i < nums.size() / 2; ++i) { if (nums[i] == nums[nums.size() - i - 1]) { anss.push_...
ALGO
0.999853
4.046919
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "282f70f6fff6...
8dcbb5e0-4455-4952-9e1a-d10cfe1da0d6
xoyojank/nebula3
code/extlibs/OGDF/src/orthogonal/OrthoRep.cpp
/* * $Revision: 2566 $ * * last checkin: * $Author: gutwenger $ * $Date: 2012-07-07 23:10:08 +0200 (Sa, 07. Jul 2012) $ ***************************************************************/ /** \file * \brief Implementation of classes BendString and OrthoRep. * * \author <NAME> * * \par License: * This file...
ALGO
0.989129
5.999593
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-11-23T19:29:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 62, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef6aaf0e...
3ec81fc8-7a00-4433-921c-921efb80f0d9
Kadrick/PS
BOJ/src/16933.cpp
/*********************************** > File Name: 16933.cpp > Author: Kadrick, <NAME> > Created Time: 2021/10/12 20:45 > Description: BFS ***********************************/ #include <bits/stdc++.h> using namespace std; #define fastio \ ios::sync_with_stdio(false); \ cin.tie(0); #define endl '\n' ...
ALGO
0.999966
4.26772
{ "github_metadata": { "branch": "main", "commit_count": 316, "repo_created_at": "2021-05-08T07:57:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25d1bb7b4f...
7aa168e3-9e7b-4f53-ae4e-6db4f9ff6e67
acmeism/RosettaCodeData
Task/Kaprekar-numbers/C++/kaprekar-numbers-2.cpp
// Generate Kaperkar Numbers // // <NAME>. June 24th., 2012 // #include <iostream> int main() { const int Base = 10; const int N = 6; int Paddy_cnt = 0; for (int nz=1; nz<=N; nz++) for (unsigned long long int k=pow((double)Base,nz-1); k<pow((double)Base,nz); k++) if ((k*(k-1))%(Base-1) == 0) for (int n=nz;...
ALGO
0.994005
3.386786
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2013-04-08T20:08:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 518, "forks": 177, "issues": 12, "pull_requests": 3 }, "file_meta": { "content_id": "332bb92...
91fa2bc1-3443-4bb0-8d78-4b639ab4aad8
anuragpratap05/DSA
Dynamic_Programming/dp_revision1/class2/Count_number_of_ways_to_partition_a_set_into_k_subsets.cpp
#include <bits/stdc++.h> using namespace std; bool checkAllSetsFilled(vector<vector<int>> &sets) { for (vector<int> &curSet : sets) { if (curSet.size() == 0) return false; } return true; } void printSets(vector<vector<int>> &sets) { for (vector<int> &curSet : sets) { ...
ALGO
0.999842
4.931475
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-28T18:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b29948c63e3d...
76ddc2e4-df69-41ea-8bc2-db72b8c3b6ab
tianxiejack/qr_pro_360pano_main
src/lk/optical_flow_calculator.cpp
/* optical_flow_calculator.cpp * * Copyright (C) 2014 <NAME> * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #include <optical_flow_calculator.h> #include <iostream> #include <opencv2/video/tracking.hpp> #include <opencv2/imgproc/imgpr...
ALGO
0.990891
3.125528
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2019-06-11T10:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04daefa9...
23e28eb1-d648-49ee-bf02-35d794d2d16c
zhu-he/ACM-Source
CDOJ/Contest/67/D.cpp
#include <cstdio> #include <cstring> #include <stack> #include <vector> #include <set> #include <algorithm> using namespace std; struct Edge { int u, v; }; int pre[5000]; int low[5000]; int bccno[5000]; bool iscut[5000]; int c[5000]; vector<int> G[5000]; vector<int> bcc[5000]; stack<Edge> S; int CompilationErrorclo...
ALGO
0.999834
4.105581
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-04-06T06:52:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75f93c9d4...
a57cbb0d-4947-4fe7-bd65-8f7660a4fadc
Xushi8/Code
2024/July/niuke/15553_cp.cpp
#include <iostream> #include <cstdio> #include <cstring> #define ll long long using namespace std; const int maxn = 2e5 + 10; ll t, n, k, ans, a[maxn], sum[maxn], f1[maxn], f2[maxn]; void solve(); int main() { cin >> t; while (t--) { solve(); } return 0; } void solve() { memset(f1, -0x7...
ALGO
0.999963
4.248846
{ "github_metadata": { "branch": "main", "commit_count": 690, "repo_created_at": "2022-12-29T08:34:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad09b54551...
bf0089c3-c7d1-40b9-a816-eccce4903397
Omkarharkulkar/Design-and-Analysis-of-Algorithms
Bellmon-Ford Algo by DP.cpp
#include <iostream> #include <climits> #define INF INT_MAX // Structure to represent an edge in the graph struct Edge { int src, dest, weight; }; // Function to perform the Bellman-Ford algorithm void bellmanFord(Edge* edges, int V, int E, int src) { int dist[V]; // Initialize the distance array for...
ALGO
0.999981
5.709882
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-05-07T05:43:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04303e64e1c2...
7d681322-8430-4c71-8799-7680819ba314
amit-23-hub/Graph
Floyd Warshall.cpp
void shortest_distance(vector<vector<int>>&matrix){ // Code here int n = matrix.size(); // question me jaha path nhi diya tha vah -1 tha bs usi ko chnage kiye hai for(int i = 0 ; i<n ; i++){ for(int j = 0 ; j<n ; j++){ if(matrix[i][j]==-1){ mat...
ALGO
0.999975
5.075948
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-08-17T04:19:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a8e822be23...
dfa508f6-df27-4a03-a409-d2ee537a0a40
plumonito/dtslam
3rdparty/opencv-git/modules/imgproc/src/imgwarp.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.926311
6.541889
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-10-21T12:51:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 133, "forks": 55, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "651aed6...
abfe4e5e-c05e-4aa0-a823-e59484978fab
theodorekwok/codepractices
training.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; ll a[100000]; void solve(ll a[], int N, int P) { ll ans = INT_MAX; ll ps = 0; for (int i = 0; i < P; i++) { ps += a[i]; } ans = min(ans, a[P - 1]*P - ps); for (int i = P; i < N; i++) { ps -= a[i - P]; ...
ALGO
0.999946
4.893506
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-12T14:24:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1e8b74dd8d5...
1e12db9b-806a-4f0e-9274-48817d47ea9a
mejibyte/competitive_programming
UVa/12514 - Cookie/cookie.cpp
// Accepted using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include <deque> #includ...
ALGO
0.99969
4.165081
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2011-10-27T01:25:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 196, "forks": 66, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "e8269...
e88582c3-6adf-4eba-9ae0-a977bc931930
Varshit11/Data-Structures-and-Algorithms-Cpp
Graphs/25_course_schedule_2.cpp
/* C++ program to solve course schedule 2 problem Problem Statement - https://leetcode.com/problems/course-schedule-ii/ */ #include<bits/stdc++.h> using namespace std; bool dfs(int u, vector<bool> &visited, stack<int>& st, vector<int> adj_list[], vector<bool>& cur_stack){ if(!visited[u]){ visited[u] = tru...
ALGO
0.999988
5.885555
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2020-04-04T12:59:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07b07671...
4f5fbd9e-5368-409e-a36f-c6d552f94224
ethz-asl/kalibr
aslam_cv/aslam_cameras/include/aslam/BackProjection.hpp
#ifndef ASLAM_BACK_PROJECTION_HPP #define ASLAM_BACK_PROJECTION_HPP #include <sm/kinematics/UncertainVector.hpp> #include <sm/kinematics/UncertainTransformation.hpp> namespace aslam { struct BackProjection { EIGEN_MAKE_ALIGNED_OPERATOR_NEW /// \brief initialize both to zero with zero uncertainty BackProjectio...
ALGO
0.936796
6.872119
{ "github_metadata": { "branch": "master", "commit_count": 359, "repo_created_at": "2014-05-29T12:31:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4839, "forks": 1450, "issues": 101, "pull_requests": 17 }, "file_meta": { "content_id": "...
655a240e-1ddb-4353-912a-d62d67033e71
pengsun/AOSOLogitBoost
src/AOSOLogitBoost.hpp
#ifndef AOTOBoostSol2Sel2gain_h__ #define AOTOBoostSol2Sel2gain_h__ #include "MLData.hpp" #include <vector> #include <list> #include <queue> #include <bitset> // data shared by tree and booster struct AOSODatagain { MLData* data_cls_; cv::Mat_<double> *F_, *p_; // #samples * #class cv::Mat_<double> *L_; // #sam...
ALGO
0.984764
5.196921
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2013-07-09T05:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f17e1c85...
f9eef8c0-843b-4e28-9ba9-5530f29813fb
Nirvana1997/TestRepo
leetcode/57.插入区间.cpp
/* * @lc app=leetcode.cn id=57 lang=cpp * * [57] 插入区间 */ // @lc code=start class Solution { public: vector<vector<int>> insert(vector<vector<int>> &intervals, vector<int> &newInterval) { bool bNeedMerge = false; // 若合并过,最后需要判断是否需要向后继续合并 auto it = intervals.begin(); for (;...
ALGO
0.999934
6.145797
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2021-05-05T09:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76f4b5dba...