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
dbb435ae-024a-4062-b657-03ca5d8bb26d
KanadShee-18/Data-Structure-and-Algorithms
01_ARRAYS/01_EASY/03_Check_If_array_sorted_and_rotated.cpp
// Check if array is sorted and also check sorted and rotated: #include <bits/stdc++.h> using namespace std; // Just sorted check: // TC: O(N) for single pass bool isSorted(vector<int> &nums) { for (int i = 1; i < nums.size(); i++) { if (nums[i] >= nums[i - 1]) { } else ...
ALGO
0.999984
6.233819
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-08-03T12:45: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": "78a23319c6ba...
1981f02b-3fda-4f64-a4f2-6eaa33da29e7
ishandutta2007/codeforces-i
i_love_tigersugar/normal/436/C.cpp
#include<bits/stdc++.h> #define MAXK 1313 #define MAXS 13 #define FOR(i,a,b) for (int i=(a);i<=(b);i=i+1) #define REP(i,n) for (int i=0;i<(n);i=i+1) #define FORE(i,v) for (__typeof((v).begin()) i=(v).begin();i!=(v).end();i++) #define fi first #define se second using namespace std; typedef pair<int,int> ii; clas...
ALGO
0.999943
3.085552
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "037e416c7824...
b83cdc09-5ce6-4c1b-9e91-f4c68cfb8752
myunbin/PS
MISC/E_Exam_Study_Planning.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC target("fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") #define fileio() freopen("input.txt","r",stdin); freopen("output.txt","w",stdout) #define fio() ios_base::sync_with_std...
ALGO
0.999828
3.966589
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2022-05-06T06:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77c217efb...
b448470a-208d-4ec9-b73e-d0d82361f3b6
ishandutta2007/codeforces-d
degwer/normal/538/E.cpp
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; vector<int>pat[200000]; vector<int>ko[200000]; bool flag[200000]; int cnt = 0; void dfs(int node) { if (flag[node])return; flag[node] = true; for (int i = 0; i < pat[node].size(); i++) { if (!flag[pat[node][i]]) { ko[node].push_back(...
ALGO
0.999444
3.70866
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ce143d4480a...
712d43b1-1016-4fe7-94f7-08dd5999e264
cppnuts-yt/CppNuts
Data Structures/tree/floodfill.cpp
#include<iostream> #include<vector> #include <fstream> using namespace std; using namespace std; // int gcount = 0; vector<vector<bool>> visited; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<bool> vb; typedef vector<vb> vvb; int DFS(int x, int y, vvb& visited, int n, int m, vvi& mat, int& gcount...
ALGO
0.999969
4.611878
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-07-01T14:03:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 65, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f74996...
1681017c-c8a6-40ab-93f8-d4aa97e7f270
git-bauerseb/comp-programming
codeforces/gym/math/g_jumps.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; // Constants #define MOD 1'000'000'007 // Simple types #define ll long long #define ld long double // Aggeragte types #define pii pair<int,int> #define pll pair<long,long> #define vi vector<int> #define vl vector<long> ...
ALGO
0.999913
4.366517
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2023-01-21T14:32: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": "bae82b6fb3...
47e3e1e3-dc4f-43cb-b29d-66177f9e5223
MiriamMarinS/SudoQ
src/sudo.cpp
#include <iostream> #include <vector> #include <tuple> #include <algorithm> #include "cell.h" #include "utils.h" using namespace std; int main() { // Example sudoku matrix int grid[9][9] = { {3, 0, 6, 5, 0, 8, 4, 0, 0}, {5, 2, 0, 0, 0, 0, 0, 0, 0}, {0, 8, 7, 0, 0, 0, 0, 3, 1}, ...
ALGO
0.999463
6.261468
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-09-06T10:02:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ec228e4e5...
724e842c-dea8-4479-ac41-83eade035c54
Shubham21012001/Linked_List
Doubly_linked_list_Deletion.cpp
#include <iostream> #include <vector> using namespace std; class node { public: int data; node *next; node *back; public: node(int data1, node *next1, node *back1) { data = data1; next = next1; back = back1; } }; node *arr_to_doubly_ll(vector<int> arr) { node *head ...
ALGO
0.999834
4.88958
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-12-20T06:53:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "078ed1247f1...
4eba5c69-cfe7-408b-b104-8e247e0cd9a4
Hemant2A2/Codeforces
AppleTree.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <math.h> #include <vector> #include <utility> #include <stdio.h> #include <string> #include <tuple> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <stack> #include <queue> #include <deque> using namespace std;...
ALGO
0.999721
3.728548
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-10-02T13:21: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": "275ecb83fa08...
1714294b-580d-402d-8541-d7120ccfdd98
summerschulte1/hw3
logicsim/gate.cpp
#include <vector> #include <random> #include <iostream> #include "gate.h" #include "wire.h" Gate::Gate(int num_inputs, Wire* output) : m_output(output), m_inputs(num_inputs), m_delay(0), m_current_state('X') { } Gate::~Gate(){} void Gate::wireInput(unsigned int id, Wire* in) { if(id < m_inputs.size()) ...
TOOL
0.986825
5.478297
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-25T21:52:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0955d91d86cb...
aa3ea498-8e5c-47a6-840c-1b6c8b1326d8
kritimalik9/ProblemSolving
Multithreading/LinkedList3.cpp
#include <bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode* next = nullptr; // IMP_NOTE: MUST DO INITIALIZATION ListNode* prev= nullptr; }; class List { public: ListNode* head = nullptr; int N=0; public: void push_back(int val) { ListNode* node = new ListNode()...
ALGO
0.999985
4.632208
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-03-10T20:16: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": "54ee96f23a10...
6403dbca-4bf7-44a3-b411-582db21e83c0
dhananjayamandal/Numerical-Method
secant.cpp
#include<stdio.h> #include<math.h> float f(float x); // prototype of given function to find the root of that eqn. int main() { float a,b,c,d,e,error; int count=1,n; printf("\n\nEnter the values of a and b:\n"); //(a,b) must contain the solution. scanf("%f%f",&a,&b);// accepting the two initial guess val...
ALGO
0.999988
3.425803
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-02-15T12:05: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": "9c89784392...
59057c07-2964-4f11-9359-18ae188f08e1
cduckling/Competitive-Programming
Codeforces/subsequpd.cpp
#include <iostream> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <algorithm> #include <numeric> using namespace std; #define tc ll t; cin >> t; while (t--) solve(); #define io ios_base::sync_with_stdio(false); cin.tie(NULL); #define all(a) (a).begin(), (a).end() #define pb...
ALGO
0.999959
4.537675
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2024-09-28T16:31:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b41b63a34...
ab6ba520-1322-42f4-9f45-7293b0978d8a
siggraphcontact/rigidBodyTutorial
src/solvers/SolverBoxPGS.cpp
#include "solvers/SolverBoxPGS.h" #include "contact/Contact.h" #include "rigidbody/RigidBody.h" #include "rigidbody/RigidBodySystem.h" #include <Eigen/Dense> SolverBoxPGS::SolverBoxPGS(RigidBodySystem* _rigidBodySystem) : Solver(_rigidBodySystem) { } void SolverBoxPGS::solve(float h) { // TODO Implement a PGS...
ALGO
0.999604
4.361959
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-05-30T19:54:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 116, "forks": 13, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "a7aa3109...
1b59c571-a893-4eb7-bfcd-206aa6f251fd
hanbaocheng/LeetcodeTest
app/src/main/cpp/CombinationSum.cpp
// // Created by <NAME> on 3/13/18. // #include "Solution.h" /** * For example, given candidate set [2, 3, 6, 7] and target 7, A solution set is: [ [7], [2, 2, 3] ] * @param candidates * @param target * @return */ void findCombination(vector<vector<int>> &ret, map<in...
ALGO
0.999977
6.262082
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-12-05T21:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d75f15f43...
7831a131-ba4d-49fe-9a0b-7d4fd734aeb3
TuYe05/PT4_CPP_helper
Tree91.cpp
#include "pt4.h" using namespace std; /* Tree91. A pointer P1 to the root of a nonempty general tree and an integer L (≥ 0) are given. Output the values of nodes of the level L and their amount N (nodes must be ordered from left to right). If nodes of the level L are absent then output 0. Tree91.给出了一个指向非空一般树根的指针P1和一个...
ALGO
0.999974
4.68096
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-05-27T18:30:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d63023d690...
9cfea9ce-b78d-4775-8881-5271ae534728
partho-das/CompetitiveProgrmming
Library/LCA.cpp
#include<bits/stdc++.h> using namespace std; const int MAX = 100005; int sparse[MAX][18]; int par[MAX],L[MAX]; int node; vector<int>v[MAX]; void build(){ memset(sparse, -1 , sizeof sparse); for(int i=1;i<=node;i++){ sparse[i][0]=par[i]; } for(int j=1;1<<j <=node ;j++){ for(int i=1;i...
ALGO
0.999966
4.551543
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-03-30T08:21: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": "f0f48639f491...
e06f887c-313b-4492-af28-e05347159160
AnantaDey/PW_DataScience_PPT
Assignment01/problem2.cpp
/*<aside> 💡 **Q2.** Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which are not equal to val. Consider the number of elements in nums which are not equal to val be k, to get accepted,...
ALGO
0.999944
6.150797
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-06-21T18:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34f9ae72b10...
1675f76e-59fd-4031-9964-a5a7d63ba97c
catrom/Sort-Algo-Comparision
Source/Function.h
#include <iostream> #include <conio.h> #include <vector> #include <windows.h> #include <fstream> #include <chrono> // high resolution timing #include "SortAlgorithm.h" // Lấy dữ liệu các loại input (Ngẫu nhiên, tăng dần, giảm dần) void getInput(); // Hàm gọi đến thuật toán sắp xếp, căn cứ vào chỉ số index void SortT...
ALGO
0.999348
3.720143
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-09T14:19:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a96dfdef4c...
34230bf3-91eb-4ab1-b970-d9900e793f94
keshavjaiswal39/Coding-Block-Algo-plusplus
Unordered Maps STL.cpp
#include<bits/stdc++.h> #include<unordered_map> #include<cstring> using namespace std; int main() { unordered_map<string,int> um; // Insert um.insert(make_pair("Mango",100)); // map takes data in a pair // or pair<string,int> p; p.first="Apple"; p.second=120; // or um.insert(p); // or um["Banana...
ALGO
0.984129
3.325624
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-03-12T04:51:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a279993264...
7087eaa0-5865-4a7e-b1cf-c19094952293
AkiyamaKunka/leetcode-sde-algorithm
Data Structure & Algorithm /Graph/经典水库题 Kruskal.cpp
class Solution { // https://leetcode-cn.com/problems/optimize-water-distribution-in-a-village/submissions/ // 这道题的精华在于选一个水源,建立和所有node的连接。既满足水库必须 > 0的条件,又将建立水库的消耗和建立管道的权值同化,用Kruskal解决 int * fa; void init(int n){ fa = new int[n + 1]; for(int i = 0; i < n + 1; i++){ fa[i] = i; ...
ALGO
0.999991
5.411668
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2021-05-10T11:11:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46aacdf4b9c...
b169bbe7-c4f6-4999-a8ef-91e4cbf730be
MrityunjayNPandey/vscode
CP/B_Shoe_Shuffling.cpp
/** * codeforces: _joKer_0 * codechef: joker_0000 * created: 31-05-2022 20:16:00 **/ #include <bits/stdc++.h> using namespace std; #define endl "\n" #ifdef DEBUG #include "algo/debug.h" #else #define debug(...) #define print(x) #define dclear(x) #endif #define free freopen("input.txt","r",stdin);freope...
ALGO
0.999933
4.469738
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2022-01-11T10:38:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0b7936a...
34d19a52-45c4-48b5-920e-7c3348fe50d4
rem4ik4ever/leet-code
127.word-ladder.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; class Solution { public: bool canConvert(string s1, string s2) { int idx1 = 0, idx2 = 0; int skip = 1; while (idx1 < s1.length()) { if (s1[idx1] != s2[idx2] && skip > 0) ...
ALGO
0.999977
5.223367
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-05-11T03:55:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5215712e0...
052769c4-6e10-49c5-99ea-826229da2fbb
nhocki/programming
online_judge/12442 - Forwarding Emails/forwarding_email.cc
#include<algorithm> #include<iostream> #include<iomanip> #include<iterator> #include<sstream> #include<fstream> #include<cassert> #include<cstdlib> #include<cstring> #include<climits> #include<cctype> #include<cstdio> #include<vector> #include<string> #include<utility> #include<cmath> #include<queue> #include<deque> #i...
ALGO
0.999679
4.058886
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2011-09-26T20:21:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4144453f...
9bb55904-78c8-43b7-80a4-17d0ea4602e7
AjajAlam1399/data-structure_and_algorithms
Tree/AVLTree-Deletenode.cpp
#include <iostream> using namespace std; int globslspace = 5; class TreeNode { public: int data; TreeNode *left; TreeNode *right; TreeNode() { data = 0; left = right = NULL; } TreeNode(int data) { this->data = data; left = right = NULL; } }; class ...
ALGO
0.999885
4.282086
{ "github_metadata": { "branch": "master", "commit_count": 731, "repo_created_at": "2022-08-13T11:41:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "600b43ac...
ef7f4728-be21-4d27-92df-42cbbb47a52f
HannahJHan/BlueNoiseSampling
18-utk-master/src/samplers/BNLDS_optimizer_PCF_Random_2dd.cpp
#include "SamplerBNLDS_optimizer.hpp" #include "../parameters/ParamParser_getopt.hpp" #include "../io/fileIO.hpp" #include <chrono> #include "runSampler.hpp" using namespace utk; typedef double T; #define D 2 typedef Point<D, T> P; typedef SamplerBNLDS_optimizer S; int main(int argc, char** argv) { ParamParser_get...
ALGO
0.986339
4.990402
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-10-20T09:26: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": "152f7f92fe...
17be29a7-b17d-4277-a7d4-9b27e8585deb
yuran1811/Competitive-Programming
C++/LQDOJ/STONEFROG2.cpp
// https://lqdoj.edu.vn/problem/stonefrog2 #include <bits/stdc++.h> #define waitt first #define cost second using namespace std; const int N = 1e5 + 5; int n, k; long long a[N], f[N]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> k; for (int i = 1; i <= n; i++) cin >> a[i]; ...
ALGO
0.999923
4.019777
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2021-09-30T08:11: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": "7f2f022568...
f8f145f3-fc9f-43e1-9b87-7a51901b77af
parrotfish813/Object-Oriented-Programming-Class
Homework/Assignment 4/Brandon_Townes_Prob1_Assignment4.cpp.cpp
#include <iostream> #include <string> using namespace std; template<typename T> T minimum(T arr[], int size) { //Assigning the first element of the array to a temp variable T temp = arr[0]; //Comparing the first element of the array to every other element to find the smallest element of the array fo...
ALGO
0.999517
5.336627
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-01-17T01:20:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b61a93a9dd3...
4d763c70-6adc-49ed-9ab5-6fac3dbf10f1
emscripten-core/emscripten
test/third_party/box2d/Box2D/Dynamics/Contacts/b2Contact.h
/* * Copyright (c) 2006-2009 <NAME> http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * inclu...
ALGO
0.952461
7.542522
{ "github_metadata": { "branch": "main", "commit_count": 28770, "repo_created_at": "2011-02-12T05:23:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26684, "forks": 3407, "issues": 1918, "pull_requests": 396 }, "file_meta": { "content_id"...
554b0785-37fd-4fb1-ba5e-0cacb896e8a7
mazicwong/ACM_code
code/basic/acm_class/1003.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 5000+5; typedef struct mazic { int l; int w; bool vis; }mm; int cmp(mm a, mm b) { if (a.l == b.l) return a.w < b.w; return a.l < b.l; } int main() { mazic mm[maxn]; int t; cin >> t; int n; while (t--) { ...
ALGO
0.999956
3.628796
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2017-02-16T17:26:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9053964...
b3bf4e00-fa2a-4b5c-bf34-2e0bd458e991
primatelabs/orion
include/orion/conv_clip_polyline.h
// Copyright (C) 2002-2005 <NAME> (http://www.antigrain.com) // Copyright (c) 2004-2021 Primate Labs Inc. // All rights reserved. // // Use of this source code is governed by the BSD 3-Clause License that can // be found in the LICENSE file. // polyline clipping converter // There an optimized Liang-Basky algorithm is...
ALGO
0.996792
5.509178
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-11-18T16:43:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "867022245e08f...
9f5f004f-0d2e-4dec-b626-e7645ee173f5
madhav-bits/Coding_Practice
leetNextPermutation.cpp
/* * //**************************************************************31. Next Permutation.****************************************************** Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange i...
ALGO
0.999972
6.198608
{ "github_metadata": { "branch": "master", "commit_count": 1813, "repo_created_at": "2017-10-08T23:36:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4af392c...
4c5b9246-3b35-4710-be1c-5b9248ef40dc
JkUzumaki/C-_02_2020
vector.cpp
// Self implementation of // the Vector Class in C++ #include <bits/stdc++.h> using namespace std; class vectorClass { // arr is the integer pointer // which stores the address of our vector int* arr; // capacity is the total storage // capacity of the vector int capacity; // current is the numbe...
ALGO
0.903711
4.877044
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-02-05T12:23:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a7a4b42dc...
985f06e4-6e8e-4df4-a294-ad332a16d532
warxhead1/module-sentinel
test/complex-files/cpp/Generation/Features/ContinentalFeatureSystem.cpp
module; #include <cmath> #include <algorithm> #include <random> #include <thread> #include <future> #include <atomic> #include <functional> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif module ContinentalFeatureSystem; import NoiseFactory; import NoiseInterface; import GLMModule; namespace PlanetGen::Gen...
TOOL
0.937146
5.255105
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-07-14T04:18: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": "861299a45...
91e4d2cb-3868-44df-877c-ef332f1e4075
sushi-small/dhoj
上课测试代码/第三周-第一次测试/problem6.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode* next; ListNode() : val(0), next(NULL) {} ListNode(int x) : val(x), next(NULL) {} ListNode(int x, ListNode* next) : val(x), next(next) {} }; ListNode* findtail(ListNode* head) //寻找链表的尾结点 { ...
ALGO
0.999937
4.157688
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-11T13:12: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": "b664e7fd3704...
71336023-33e4-4f2a-b5c8-2e80e64b77c9
Hanson-Wang-chn/MyDataStructure
#Schoolwork/PolishCal/PolishCal.cpp
// PolishCal.cpp - This file contains the declaration of the PolishCal function. // Created by 王海生 on 2024/3/8. // Copyright (c) 2024, East China Normal University. All rights reserved. #include "PolishCal.h" char get_command() { char command; bool waiting = true; cout << "Select command and press <Enter>...
TOOL
0.978257
4.490274
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-26T14:57: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": "938488dea201...
4362898f-a928-4c72-a550-5fe777a0186c
kikalore/tutorato-programmazione1-24-25
10-29/3.cc
/* Scrivere una procedura che presi in ingresso le dimensioni $M$, $N$ della matrice $(MxN)$ e un vettore di dimensione $N$, aggiunga il vettore ad ogni riga della matrice: ``` Mat[3][4] = [ [1,2,3,4], [5,6,7,8], [9,0,1,2] ] V[4] = [1,2,3,4] Res[3][4] = [ [2,4,6,8], [6,8,10,12], [10,2,4,6] ] ``` */ #in...
ALGO
0.998656
5.31974
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-09-23T15:52:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7877a6337c9...
3dbf6fa2-7659-462e-9615-30684650afb5
martelkv/FYS3150-martelk
Prosjekt_2/test.cpp
#include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <string> #include "time.h" #include <ctime> #include "armadillo" using namespace arma; #include <iostream> #include <cmath> #include <math.h> //#include "jacobi.h" // use namespace for output and input using namespace std; // outpu...
ALGO
0.999672
3.736436
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-09-09T09:36:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "808f755199...
fb752a78-d3dc-4c0c-bde1-a83a41710cc8
Werevector/MetroidVania
Source/CollisionBox.h
#pragma once #include "SDL.h" #include <vector> enum DIRECTION{ UP, DOWN, LEFT, RIGHT }; class CollisionBox{ public: CollisionBox(SDL_Rect CollBox, int x, int y){ mBoundingCollBox = CollBox; mCollPointsOrigin = { //Top of head { -CollBox.w / 4, -CollBox.h/2 }, { CollBox.w / 4, -CollBox.h/2 ...
TOOL
0.912016
4.372862
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-08-18T15:18:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d4f1c38f4...
7de1c92c-de49-41e0-85d5-a4dc35e0a983
LokeshvarKr/cpp
codingNinja/recursion/printPermutation.cpp
/* Print Permutations - String Given a string, find and print all the possible permutations of the input string. Note : The order of permutations are not important. Just print them in different lines. Sample Input : abc Sample Output : abc acb bac bca cab cba */ //better approach #include <iostream> #include <s...
ALGO
0.999982
5.416417
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-03-20T08:24:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcb77bc7b...
3b60896b-b31a-450c-a3f1-86e923ecb6b3
HKUST-Aerial-Robotics/EPSILON
core/common/inc/common/solver/ooqp_interface.h
#ifndef _CORE_COMMON_INC_COMMON_SOLVER_OOQP_INTERFACE_H__ #define _CORE_COMMON_INC_COMMON_SOLVER_OOQP_INTERFACE_H__ #include <Eigen/Geometry> #include <Eigen/StdVector> #include <Eigen/SparseCore> #include <algorithm> // std::max #include <cmath> // std::abs #include <limits> // std::numeric_limits namespa...
ALGO
0.997238
6.840831
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-09-20T08:27:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 718, "forks": 252, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "bfca4...
da69eea5-57b3-4ffc-b0c2-a0dd8e51e320
sukrithanda/ece1747-Assign1
game_benchmark_1747/src/client/AStar/MinHeap.h
/*************************************************************************************************** * * SUBJECT: * A Benckmark for Massive Multiplayer Online Games * Game Server and Client * * AUTHOR: * <NAME> * Politehnica University of Bucharest, Bucharest, Romania * <EMAIL> * * TIME AND PLACE: * ...
ALGO
0.994785
4.975467
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-10-17T21:38:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28fefa88d...
4ce858c4-70c1-4bf6-9999-29978ae0c270
Ping-Group-UCSC/denmat_dynm_development
src_v4.5.7/evolve_eph_linear.cpp
#include "ElectronPhonon.h" void electronphonon::evolve_linear(double t, complex** dm, complex** ddmdt_eph){ MPI_Barrier(MPI_COMM_WORLD); /* ostringstream convert; convert << mp->myrank; convert.flush(); MPI_Barrier(MPI_COMM_WORLD); // seems necessary! Otherwise fname is not created for non-root processes string ...
ALGO
0.993527
4.150661
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2020-07-22T02:49:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9c88f67d4a...
0fcfbe03-608a-44be-b69b-4741727cb58f
GeneratedRandomly/codespace
DSA/PA4/Pattern Matching/2tle.cpp
#include <stdio.h> #include <cstring> using namespace std; const int MOD1 = 1000000241; const int MOD2 = 1000000933; const int BASE1 = 31; const int BASE2 = 37; char **T; // 主矩阵 int M, N, g_m, g_n, g_k; char **P; // 目标矩阵 int **S1; // 子矩阵的第一哈希值,表示T(i,j)开始的m*n矩阵的哈希值 int **S2; // 子矩阵的第二哈希值,表示T(i,j)开始的...
ALGO
0.998918
3.36816
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-05-16T07:56: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": "0f99f351544...
db3693b7-78b2-4a21-91ad-482b7ad99777
nolan0801/Competitive-Programming
VNOJ/nksgame.cpp
/* link problem: https://oj.vnoi.info/problem/nksgame Author : vidut_206_CNH */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> p32; typedef pair<ll, ll> p64; typedef pair<double, double> pdd; typedef vector<ll> v64; typedef vector<int> v32; typedef v...
ALGO
0.999995
3.878738
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2021-12-21T06:10:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7e1527d0b...
3eb7f3c7-0a87-4257-a0bb-cf9aa386c743
Haricharan1212/CP
oldcode/Counting_Grids.cpp
// Haricharan #include <bits/stdc++.h> using namespace std; #define int long long int #define vi vector<int> #define vii vector<vector<int>> #define vb vector<bool> #define pi pair<int, int> #define si set<int> #define rep(var, l, r) for (int var = l; var < r; var++) int mod = 1e9 + 7; int binexp (int b){ int a ...
ALGO
0.999977
4.295565
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2022-10-13T03:47:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8759d9a52...
850a2707-c000-491c-966e-f40c99e46a6d
kjnh10/pcw
work/atcoder/abc/abc039/C/answers/62024_satanic0258.cpp
#include <bits/stdc++.h> #define INIT std::ios::sync_with_stdio(false);std::cin.tie(0); // VAR(int, x); #define VAR(type, ...)type __VA_ARGS__;Scan(__VA_ARGS__); template<typename T> void Scan(T& t){std::cin >> t;} template<typename First,typename...Rest>void Scan(First& first,Rest&...rest){std::cin>>first;Scan(rest......
ALGO
0.999524
3.441053
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-05-23T15:03:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ad3436f3...
8d4f2ced-6d31-48da-8dc4-ad62069f5f1f
AyushPandey1502/LeetCode-Questions
0002-add-two-numbers/0002-add-two-numbers.cpp
class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { int carry = 0; ListNode* head = new ListNode(0); ListNode* current = head; while(l1 != NULL && l2 != NULL){ int sum = l1->val + l2->val + carry; current->next = new ListNode(sum % 1...
ALGO
0.999963
6.318657
{ "github_metadata": { "branch": "main", "commit_count": 4101, "repo_created_at": "2023-08-09T06:53: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": "5106886bd...
49a8d599-e03f-461a-b844-5f1864f43397
asen-krasimirov/SDA-Course-FMI-2024
lecture_examples/lecture02/quickSort.cpp
#include <iostream> #include <vector> using namespace std; int partition(vector<int>& arr, int low, int high) { int pivot = arr[high]; int i = low; for (int j = low; j < high; ++j) { if (arr[j] <= pivot) { swap(arr[j], arr[i++]); } } swap(arr[i], arr[high]); retu...
ALGO
0.999789
5.798254
{ "github_metadata": { "branch": "master", "commit_count": 256, "repo_created_at": "2023-10-13T18:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea4a4835...
ace57663-5927-4bb6-a848-d8232120cde0
moltenguy1/deusexmachina
Tools/Src/CreatorIDE/EngineAPI/AI/Navigation/NavMesh.h
#pragma once #ifndef __CIDE_NAV_MESH_H__ #define __CIDE_NAV_MESH_H__ #include <StdDEM.h> #include <kernel/nprofiler.h> #include <Recast.h> namespace Game { class CEntity; } class nMesh2; class nChunkLodNode; class nChunkLodTree; class CRecastContext: public rcContext { protected: //nProfiler Prf[RC_MAX_TIMERS]; ...
TOOL
0.918563
6.1443
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-05-20T06:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "65ab6f3cc0...
3b4b1b5c-4cd5-48d8-9ea3-6d8235017220
mpeychev/competitions
ioi/2011/ricehub.cpp
#include <iostream> #include <stdio.h> using namespace std; typedef long long LL; const int MAXR = 100100; int r, l; LL b, x[MAXR], sum[MAXR]; int ans; void read() { scanf("%d %d %lld", &r, &l, &b); for(int i = 1; i <= r; i ++) { scanf("%lld", &x[i]); sum[i] = sum[i - 1] + x[i]; } } in...
ALGO
0.999848
3.517567
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2015-03-23T16:37: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": "598175f20...
aa2ad597-a53a-4536-9be2-31cec8ac29ef
kamalkansal27/Data-Structures-and-Algo-in-CPP
Graph/BipartiteGraph.cpp
// Uncolored - -1, Red - 0, Blue - 1. #include<bits/stdc++.h> using namespace std; void color(int u, int curr, vector<vector<int>> &adj, vector<int> &col,vector<bool> &vis, bool &Bipart) { if(col[u] != -1 and col[u] != curr) Bipart = false; return; col[u] = curr; if(!vis[u]) vis[u] = true; else return...
ALGO
0.999984
5.114119
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2022-10-26T10:47: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": "71c00718...
2369907c-8aff-4ef7-a3d9-759ad40697c1
tkludwig/algos_cpp
quicksort.cpp
#include <iostream> #include <vector> #include <math.h> void printvec(const std::vector<float> & fvec) { std::cout << "[ "; for(auto fvit = fvec.begin(); fvit<fvec.end(); fvit++) { std::cout << (*fvit) << " "; } std::cout << "]"<<std::endl; } int partition(std::vector<float> & A, int p, int r) { float...
ALGO
0.999934
5.169509
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-04-25T03:44: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": "48131667c4...
4f4b7d08-c4d2-4db5-9b4b-d1a3d9307f0b
gy2649263674/leetcode
code/438.find-all-anagrams-in-a-string.cpp
/* * @lc app=leetcode.cn id=438 lang=cpp * @lcpr version=30204 * * [438] 找到字符串中所有字母异位词 * * https://leetcode.cn/problems/find-all-anagrams-in-a-string/description/ * * algorithms * Medium (53.45%) * Likes: 1509 * Dislikes: 0 * Total Accepted: 509.1K * Total Submissions: 952.2K * Testcase Example: '"...
ALGO
0.99996
6.777128
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-07-13T08:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e1535ebd07...
3526c0b1-2322-4dd3-9b9a-733daf5c7ff6
iamsile/ACM
Customer support.cpp
#include <iostream> #include <map> using namespace std; int main() { int n; map<int, int> word; while (cin >> n&&n) { word.clear(); int i,num,x,y,sum=0; for (i=0; i<n; i++) { cin >> num >> x >> y; if (x==1) { word[num]++; if (...
ALGO
0.998164
3.381879
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-09-09T05:27:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99a561218c...
26aedf47-ad44-445b-a564-2a09fb44d312
gitrider/wxsj2
EngineSDK/ThirdParty/VSInclude/cgal/CGAL/Matrix.h
// Copyright (c) 2000 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under // the terms of the Q Public License version 1.0. // See the file LICENSE.QPL distributed with CGAL. // // Licensees holding a valid commercial licens...
TOOL
0.956512
5.340842
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-08-26T14:38:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7457ce667...
672f7919-978b-467c-840d-706d3cc6fcdf
quiver-team/torch-quiver
srcs/cpp/include/quiver/quiver.cpu.hpp
#pragma once #include <algorithm> #include <random> #include <quiver/common.hpp> #include <quiver/quiver.hpp> #include <quiver/sparse.hpp> #include <quiver/zip.hpp> #include <ATen/Parallel.h> #include <iostream> namespace quiver { // sample at most k elements from [begin, end), returns the sampled count. template <typ...
ALGO
0.994149
5.942133
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2020-08-17T11:32:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 302, "forks": 37, "issues": 21, "pull_requests": 0 }, "file_meta": { "content_id": "fe3827c...
784f0d07-d4da-4ae0-ab06-5ac9b3a01f45
hogisim314/algorithm
프로그래머스/3/49189. 가장 먼 노드/가장 먼 노드.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> #include <memory.h> #include <queue> using namespace std; vector<int> node[20002]; int dist[20002]; int visited[20002]; int top, maxx=0, cnt; int nodeNum; void bfs() { memset(visited, -1, sizeof(visited)); queue<int> q; visited[1]...
ALGO
0.999404
4.559042
{ "github_metadata": { "branch": "main", "commit_count": 404, "repo_created_at": "2023-09-16T10:10:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0d14f6ee8...
58be7fd6-85b5-42cc-890c-0c4c1ae6ccf5
trialley/CGLAB
实验01:有方有圆/main.cpp
//#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" ) #include<GL/glut.h> #include<math.h> #include<cstdlib> #include<iostream> using namespace std; /*debug专用宏定义*/ #ifdef DEBUG #define dprintf printf #else #define dprintf /\ /printf #endif // DEBUG const GLfloat PI = 3.1415926; //PI GLfloat...
TOOL
0.988339
4.436119
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-12-17T14:18:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3860308bc...
1d8cb863-4e46-40fd-936c-d3064d00d34f
ksaveljev/UVa-online-judge
11857.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class UnionFindDisjointSets { public: UnionFindDisjointSets(int size); int findSet(int a); bool isSameSet(int a, int b); void unionSet(int a, int b); int numDisjointSets(); int sizeOfSet(int a); private: int siz...
ALGO
0.999963
4.472536
{ "github_metadata": { "branch": "master", "commit_count": 788, "repo_created_at": "2011-04-04T11:43:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 106, "forks": 69, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "0bb78...
6ef26f1d-1e19-4f9a-ba09-2c7170c7be4e
zzz136454872/leetcode
swapPairs.cpp
/* @author f4prime * @email <EMAIL> * @aim a plain model for leetcode */ #include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<stack> using namespace std; //#define testMod #ifdef testMod void test() { } #endif #ifndef testMod struct ListNode { int val; Li...
ALGO
0.999997
5.164712
{ "github_metadata": { "branch": "master", "commit_count": 1358, "repo_created_at": "2020-02-14T08: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": "2014a23...
66311fd7-5157-42bf-bde2-00bbb7d0d599
CollegeBoi123/CG
LINEDDA.CPP
#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <math.h> #define ROUND(a) ((int)(a + 0.5)) void lineDDA(int xa, int ya, int xb, int yb) { int dx = xb - xa, dy = yb - ya, steps, k; int xmax = getmaxx(), ymax = getmaxy(); float xIncrement, yIncrement, x = xa, y = ya; ...
ALGO
0.985909
4.21475
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-08T18:43:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97bd1f11a912...
5c5b9c2d-56f8-47ba-b92a-9d36beeb6866
Kuldeepagrahari/Programming-DSA-Shell-BashScripting-OOPS
algos/n_meetings.cpp
#include<bits/stdc++.h> using namespace std; int maxMeetings(int start[], int end[], int n) { // Your code here vector<pair<int,int>>vp; for ( int i = 0; i < n ; i++ ){ vp.push_back({ end[i], start[i] }); } sort( vp.begin(), vp.end()); int a...
ALGO
0.999996
4.977262
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2024-02-02T15:45:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9914d67fa5...
88990d0c-738a-4fbd-9541-8100b0667365
udaykk83/DSA
Binary Tree/Count_SumToGivenValueBT.cpp
#include<bits/stdc++.h> using namespace std; class TreeNode{ public: int data; TreeNode *left; TreeNode *right; }; TreeNode* createNode(int key){ TreeNode* nn=new TreeNode(); nn->data=key; nn->left=NULL; nn->right=NULL; return nn; } int findCountOfSumHelper(TreeNode* root, int &ans, ...
ALGO
0.999986
5.209181
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-08-03T11:27: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": "25d65f2d3a1...
bacc32b3-8a16-44fc-9a9e-f7e587efbae4
mikanbox/Atcoder
Contest/abc240/c.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> using namespace std; #define ll int64_t template <class T> void Swap(T &r, T &l) { T tmp = r; r = l; l = tmp; } template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (T &x : vec) ...
ALGO
0.99999
4.527699
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-09-19T06:44:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6c5cf60117a...
06112e49-f82a-4d78-a45d-eef40b06e91a
TheAlgorithms/C-Plus-Plus
greedy_algorithms/jump_game.cpp
/** * @file * @brief [Jumping Game](https://leetcode.com/problems/jump-game/) * algorithm implementation * @details * * Given an array of non-negative integers, you are initially positioned at the * first index of the array. Each element in the array represents your maximum * jump length at that position. Deter...
ALGO
0.999543
6.018125
{ "github_metadata": { "branch": "master", "commit_count": 1738, "repo_created_at": "2016-07-16T10:19:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 32391, "forks": 7439, "issues": 10, "pull_requests": 23 }, "file_meta": { "content_id": ...
110bbafe-51a6-4d80-9127-13465ff1ff08
rakhayudhis/Strukdat_Modul-4
unguided1.cpp
#include <iostream> using namespace std; struct Node { string nim; string nama; Node *next; }; Node *head = NULL; Node *tail = NULL; void init() { head = NULL; tail = NULL; } bool isEmpty() { return head == NULL; } void insertDepan(string nama, string nim) { Node *baru = new Node; b...
ALGO
0.998424
4.262737
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T14:51:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cac9c249f52d...
f9626108-e727-48a6-a53c-55f20e11aba1
RafaelGranza/KNN-Core-for-Heart-Disease-Diagnosis
main.cpp
#include "src/knn_core.h" #include "src/knn_core.cpp" #include "src/entity.h" int main(int argc, char const *argv[]) { knn_core knn; double buf_d; char buf_c; for (int k = 1; k < 250; ++k) { FILE* file = fopen("src/heart.csv","r"); char header[512]; entity ent; fscan...
DATA
0.993765
4.357553
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-02-02T20:30:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1f7e46e8468...
be33eb8c-f76b-41f5-a8a0-cb45579198e9
gianfranco7/CI0117-2020-S2
proyectos/super-mario-mpi/Models/mario.cpp
#include <iostream> #include <vector> #include <map> #include "../Models/world.cpp" using namespace std; //Class that simulates a player that the user can take control of or not class Mario { int id; int chosenid; int attackingId; int attackerId; int mostCoinsId; int leastCoinsId; int locat...
ALGO
0.975246
3.129738
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2020-09-04T14:44: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": "8e639447...
ea9b4cf4-f059-469b-b9be-3cb9c2f56171
AkmalPratama/cf
476/A.cpp
#include <iostream> using namespace std; int main() { int k, n, s, p; cin >> k >> n >> s >> p; int totalPlane = k * n; int res = s * p; if (n < s) { if (k >= p) { if ((k % p) == 0) { cout << (k/p) << endl; } else { cout << (k/p)+1 << ...
ALGO
0.999673
3.757313
{ "github_metadata": { "branch": "master", "commit_count": 211, "repo_created_at": "2018-05-26T07:47: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": "1d6cc1d6...
c5e2f887-99d1-4d36-bed6-684a3c82cd89
ah744/CryoControl
tools/source/LinkerLeafsOnly.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cctype> #include <map> #include <string> #include <bitset> #include <vector> #include <sys/stat.h> #include <unistd.h> using namespace std; bool debugLinker = false; vector<string> callStack; inline bool file_exists (const string& name){ struct ...
TOOL
0.979515
3.669619
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-07-27T05:43:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "852bdda11...
45daae57-0044-43cf-993f-820a124cf90f
pdovy/crypto-challenges
challenges/challenge6.cxx
/* * Break repeating-key XOR - Matasano Crypto Challenge 1.6 * See: http://cryptopals.com/sets/1/challenges/6/ */ #include <fstream> #include <iostream> #include "convert.h" #include "frequency.h" #include "xor.h" #include <string.h> #include <limits> #include <vector> #include <cassert> #include <algorithm> std::...
ALGO
0.996734
4.918449
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2014-08-13T02: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": "f2b437146...
cb92b0c9-6f0e-40d8-a66c-eb78c37efcbe
koth/elements-of-programming-interviews
2-for-all.cpp
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved. #include <algorithm> #include <cassert> #include <deque> #include <iostream> #include <limits> #include <random> #include <string> #include <vector> using std::boolalpha; using std::cout; using std::default_random_engine; using std::deque;...
ALGO
0.989892
5.667442
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-03-30T01:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 14, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "243c78a...
3155cef5-a631-4202-bcbe-81477c80871f
KurodaKanbei/ACM
Template of other teams/NewMeta/src/二次剩余.cpp
void multiply(int &c, int &d, int a, int b, int w, int MOD) { int cc = 1LL * a * c % MOD + 1LL * b * d % MOD * w % MOD; cc %= MOD; int dd = 1LL * a * d % MOD + 1LL * b * c % MOD; dd %= MOD; c = cc, d = dd; } // answers are x and MOD - x bool solve(int n, int &x, int MOD) { if (MOD == 2) { return x = 1, true; } i...
ALGO
0.99999
4.123135
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2017-04-06T12:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaaba2488...
b95db4d3-68ea-4f47-ad9d-e8b02d8e602b
mdarafat1819/UVA
324 - Factorial Frequencies.cpp
#include <bits/stdc++.h> using namespace std; string mul(string num1, string num2) { int len1= num1.length(), len2 = num2.length(), k, carry; string ans, mul; for(int i = 0; i < len1 + len2; i++) ans.push_back('0'); for(int i = len2-1; i >= 0; i--) { k = len2 - (i + 1), carry = 0; ...
ALGO
0.999618
3.820579
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-12-25T15:51: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": "ca4901d8a...
87d72f47-3ef9-41fa-a841-41409a6f9aa5
ckw1219/CK
leetcode_problem/string_caculate.cpp
#include<string> #include<iostream> #include<vector> #include<stack> /* 计算中缀表达式的字符串数值 */ int caculate(std::string); int string_to_int(std::string s); std::string change(std::string s); int main() { std::string ss = "1*3+2*3"; int res = caculate(ss); std::cout << res << std::endl; std::string s1 =...
ALGO
0.999957
3.842851
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-12-03T01:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70873492d...
9e40f722-7bb0-4532-b77a-443a0589f831
amirants/Aproximation2
help.cpp
// #include "condition.cpp" #include <stdlib.h> #include <iostream> static double* f_arr; static double* f_arr2; static double* coeffs2; static double* d2; static double* x_arr; double f( double x ); void splitting_x( int n, double* x_arr, double a, double b ){ int i; double dlt = (b - a)/(n - 1); for (i...
ALGO
0.999484
3.473828
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-04-16T07:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed038247a5...
69e57b01-ecf0-4067-9c95-2c2b51e9d4ba
denixsucks/dxstl
math/math.h
#pragma once #include "../core.h" NAMESPACE namespace math { // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __constexpr float PI = 3.14159265358979323846f; __constexpr float E = 2.71828182845904523536f; __constexpr float SQRT_2 = 1.41421356237309504880f; __constexpr float SQRT_3 = 1.73...
ALGO
0.944447
6.609946
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-12-22T15:17:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f6a7fc7ec...
2426d641-741b-4489-9035-48d4607dd7b9
wg-perception/tod
src/common/maximum_clique.h
/* * Software License Agreement (BSD License) * * Copyright (c) 2009, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must reta...
ALGO
0.999199
4.213209
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2012-01-06T19:22:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1a25724...
75b04b2b-50c1-4747-95be-43144b8932e6
merrell42/model-synthesis
src/propagator/PropagatorAc3.cpp
// Copyright (c) 2021 <NAME> #include "PropagatorAc3.h" PropagatorAc3::PropagatorAc3( InputSettings* newSettings, int* newPossibilitySize, int* newOffset ) : Propagator(newSettings) { settings = newSettings; possibilitySize = newPossibilitySize; offset = newOffset; numLabels = settings->numLabels; size = setti...
ALGO
0.99589
5.827531
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-07-21T23:54:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 184, "forks": 18, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5d818e...
00f1880d-7de4-4134-ad07-112e25bbf9eb
Darren2340/local_gnuradio
gnuradio/gr-atsc/lib/GrAtscTrellisEncoder.cc
/* -*- c++ -*- */ /* * Copyright 2002 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option...
TOOL
0.912888
7.536566
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-07-14T23:30: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": "d0700a9d28...
36191694-36df-432b-ac9a-3ae3f1cd2cf1
jizhendong94/Cpp_for_leetcode
ShuXueJiQiao/you_xu_array_list_qu_chong.cpp
/* 如何高效的对有序数组和 链表去重 */ int removeDuplicates(vector<int>& nums) { int n = nums.size(); if(0 == n) return 0; int slow = 0,fast = 1; while(fast<n){ if(nums[fast] != nums[slow]) { slow++; nums[slow]=nums[fast]; } fast++; } //长度为索引 + 1 return s...
ALGO
0.999532
4.773201
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-04-23T12:06:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4becaf475f5...
9b008772-6027-4350-995b-572c5975a33c
brianchiang-tw/HackerRank
CPP/Classes/Class and Object/class_and_object.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <cassert> using namespace std; # include <numeric> // Write your Student class here class Student { private: vector<int> scores; public: void input() { for( int i = 0 ; i ...
ALGO
0.999888
4.077713
{ "github_metadata": { "branch": "master", "commit_count": 337, "repo_created_at": "2019-12-03T12:19: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": "d0e15fea...
0a5b2a03-43bd-4ae9-b948-a84e69887dc3
Sandro095/PAF
vjezbe6/zad4.cpp
#include <iostream> using namespace std; int main() { const int Nx = 2; const int Ny = 3; double Mat[Nx][Ny]; double q[2]; Mat[0][0] = 2.0; Mat[0][1] = 3.0; Mat[0][2] = 2.5; Mat[1][0] = 1.3; Mat[1][1] = 3.0; Mat[1][2] = 2.5; cout << "Matrica: " << endl; for (int i = 0; i < Nx; i++) { for (int j = 0; j < Ny; j+...
ALGO
0.999972
3.721245
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-03-07T19:03:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "87aab969e16...
2c82aded-c222-4847-9b5f-4451b1f2ec4e
Shuttles/HZOJ-C
3.提高组/49.czy.2.cpp
/************************************************************************* > File Name: 47.czy.1.cpp > Author: 少年宇 > Mail: > Created Time: 2021年01月13日 星期三 17时58分33秒 ************************************************************************/ #include <cstdio> #include <cstdlib> #include <iostream> #include <algorit...
ALGO
0.999912
4.157404
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2019-07-21T13:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b103423e...
c7ac3ba7-6ab1-4e83-bc2e-0ca21906b760
Zhouyuxuan12138/smartcar-four-wheeled-vehical9
HITSIC_MK66F18_MCUX/source/team_elec.cpp
#include "team_elec.hpp" uint32_t ADC[8]; int LV_Temp[2][SampleTimes]; int LV[2]={0,0}; int AD[2]={0,0}; void LV_Sample(void) // ad采集函数 { //ADC[0]=SCADC_Sample(ADC0,0,23);//这里只有两个电感,所以这个只有两行 ADC[1]=SCADC_Sample(ADC0,0,12); /*ADC[2]=SCADC_Sample(ADC0,0,13); ADC[3]=SCADC_S...
TOOL
0.905512
3.025008
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2020-11-09T15:15: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": "6bcf64cd...
d113d150-3ab0-4a03-abb0-977a2325ff55
swastik1510/LeetCode
1662.Check_If_Two_String_Arrays_are_Equivalent.cpp
class Solution { public: bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) { int i = 0; // Index for word1 int j = 0; // Index for word2 int m = 0; // Index for the current character in word1 int n = 0; // Index for the current character in word2 while ...
ALGO
0.999782
6.519898
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2023-06-18T16:04: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": "d1160428fc...
ae58f668-3c48-4a83-b6ee-c57a9f75e7ca
farmerboy95/CompetitiveProgramming
AtCoder/AtCoder159-ABC-F.cpp
/* Author: <NAME> Status: AC Idea: - Firstly, let's solve this problem, count the number of ways to get a subsequence of init array length N that it has sum equal to S - This is a classic problem. Let dp[i][j] is number of ways to get a subsequence of array [1..i] that it has...
ALGO
0.999978
4.719736
{ "github_metadata": { "branch": "master", "commit_count": 867, "repo_created_at": "2019-09-04T15:35:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fcf3a1a...
fea6b6e7-99a1-4d4d-88f8-889ef24c1370
OpenXRay/xray-16
Externals/OPCODE/OPC_Matrix4x4.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 4x4 matrices. * \file IceMatrix4x4.cpp * \author <NAME> * \date April, 4, 2000 */ //////...
ALGO
0.999767
5.380256
{ "github_metadata": { "branch": "dev", "commit_count": 8240, "repo_created_at": "2014-09-05T04:28:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3256, "forks": 472, "issues": 220, "pull_requests": 23 }, "file_meta": { "content_id": "195...
02e062ca-946d-4af9-b675-c7ac4cd52187
Afif718/Debugging-My-Fears
3_Basic_Data_Structures/10_Module_7_More_Singly_LinkedList_Operations/4_delete_node_at_any_position_IMPORTANT.cpp
#include <bits/stdc++.h> using namespace std; // Define a Node class for each element in the linked list class Node { public: int val; // Stores the value Node* next; // Points to the next node // Constructor to initialize node value and set next to NULL Node(int val) { this->val = ...
ALGO
0.999888
5.707604
{ "github_metadata": { "branch": "master", "commit_count": 326, "repo_created_at": "2025-04-18T16:53:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ec95c9d...
096475f0-61ce-4b41-943a-aad4274e522f
Noodle96/EstructuraDeDatos
listas/test/example.cc
#include<iostream> #include<fstream> #include<cstdio> using namespace std; class Student { int admno; char name[50]; public: void setData() { cout << "\nEnter admission no. "; cin >> admno; cout << "Enter name of student "; cin.getline(name,50); } void showData(...
TOOL
0.983997
3.623512
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-08-27T00:27:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19835bc53...
44d1a40e-c2bd-4e9a-bbb5-d5789514da04
dongseoki/Studying-algorithms
FromACMRepo/dongseoki/Algorithm Trouble Solving Strategy/Algorithm Trouble Solving Strategy/5052_phone.cpp
#include <iostream> #include <string.h> #include <vector> #include <stdio.h> #include <stdlib.h> using namespace std; bool flag; struct Trie { char char_x; bool finish; //끝나는 지점을 표시해줌 Trie* next[26]; //26가지 알파벳에 대한 트라이 Trie(int x) : char_x(x), finish(false) { memset(next, 0, sizeof(next)); } ~Trie() { ...
ALGO
0.999847
4.394202
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2019-01-01T10:59:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8918b0d4...
04b4a104-8a10-4f56-9da1-e938a4d58322
DooooH/algo_srcs
PJE_study/recursion/word_conversion.cpp
#include <bits/stdc++.h> using namespace std; int minimum = -1; stack<string> s; bool is_convertable(string from, string to) { int diff = 0; if (from.compare(to) == 0) return false; for (int i = 0; i < from.size(); i++) { if (from[i] != to[i]) { if (diff == 0) diff = 1; else return false; } ...
ALGO
0.999972
4.318784
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-11T04:26:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e891a7d0...
d288000c-d374-4ee2-8260-08b05c98a464
ajinkyab03/Bhaiyya_Wedding
coding Ajinkya/deleSing.cpp
#include<iostream> using namespace std; class Node { public: int d; Node *next=NULL; Node(int d) { this->d=d; this->next=NULL; } }; void insertAtHead(Node *&head,int d) { Node *temp=new Node(d); temp->next=head; head=temp; } void deleteAtPos(Node *head,int pos) { Node *curr=head; ...
ALGO
0.999816
4.005237
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-21T14:16: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": "917cfde7e673...
e853e733-1105-4eae-8312-8ff2e55eddcc
fatemehkarimi/codeforces-solutions
codeforces-839C.cpp
//https://codeforces.com/problemset/problem/839/C //C. Journey #include <iostream> #include <iomanip> #include <vector> using namespace std; double DFS(vector <vector <int> > & Tree, vector <bool> & visited, int root, int level, double prob) { visited[root] = true; int non_visited = 0; for(auto a : Tree[...
ALGO
0.999843
4.172724
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-05-24T15:15: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": "2e291be13...
ec3b0e72-1a94-4672-a4a0-6fdbaece0e56
you68681/Width-based_backward_search
LAPKT-public/planners/ff-ffparser/src/main.cxx
/* Lightweight Automated Planning Toolkit Copyright (C) 2012 <NAME> <<EMAIL>> <NAME> <<EMAIL>> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any...
ALGO
0.998741
5.00442
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-05-23T13:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13ee9bc3ddf...
63417fa5-be5a-41e0-9ea2-c215f4dd9b36
MegaShow/college-programming
Homework/Data Structures and Algorithms/FYM/Exercise/1003.cpp
// 1003. Width of Binary Trees #include <cstdio> #include <queue> using namespace std; typedef int T; struct treeNode { T data; struct treeNode *left, *right; treeNode(T d, treeNode *l=NULL, treeNode *r=NULL):data(d),left(l),right(r){}; }; int width(const treeNode * root) { if (root == NULL) return 0; que...
ALGO
0.999935
4.677275
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2017-12-19T07:23:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92c833adc...
c8e99462-fc84-4f32-87c8-dc9a20ad4067
thucvu2001/c-dsa
#5.SapXepTimKiem/Bai1.1.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; bool cmp3(string a, string b) { if (a.size() != b.size()) return a.size() < b.size(); else return a < b; } bool cmp4(pair<string, int> a, pair<string, int> b) { if (a.second != b.second) return a.second > b.second; ...
ALGO
0.999996
3.765918
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-04-23T04:55:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ab423799...
19b5f163-cade-4b6e-bf24-54d00e94c572
Starfy100/BinarySearchTree
bst/bstmain.cpp
#include <iostream> #include <string.h> #include <fstream> #include "node.h" using namespace std; /* Written By: Starfy100 Binary Search Tree Program will create a binary search tree Inputs can be read in from a user or file Nodes are placed right or left based on if their value is higher or lower than the root Progr...
ALGO
0.995652
3.095106
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-02-28T22:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7f3eb250...
0538c6f1-4ed4-451a-885a-7678026c395e
kaydenpham27/Competitive-Programming
Solutions/ICPC/Asia Pacific/2024-2025/Championship/L.cpp
// FPTU UWR // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") // #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #include<bits/stdc++.h> using namespace std; #define i64 long long #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() const int MAXN = 4e5 + 10; con...
ALGO
0.999786
5.13996
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-01-05T08:05:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecee2716a7a...