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
0b8ba6b9-36c7-4b88-9dd3-c352d42b1ae8
0x4f5da2/Algorithm
uva227.cpp
#include<iostream> #include<cstring> using namespace std; int main(){ int posx, posy; int m[8][8]; char str[1000]; bool e = false; int cnt = 1; bool first = true; while(true){ bool illegal = false; for(int i=0;i<5;i++){ cin.getline(str, 950); if(str[0...
ALGO
0.999357
3.34865
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-05-20T16:36: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": "c2d21ded7f...
f8cc4ef3-cb48-4074-8487-a9690cb2629f
dorodnyyDmitry/myRep
3dtask.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int random(int range) { return rand()%(range+1); } int main() { srand(time(NULL)); int mainArray[100][100]; int subArray[10000]; int mainArraySize; int subArraySize; int r; int temp; int counter = 0; ...
ALGO
0.998619
3.01175
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-01-27T19:46:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8906f2999...
9b2c8035-42cb-44b8-bf07-e54bc8fc5b83
Yauhenii/Algorithms
Problem 0.2/Problem 0.2/main.cpp
#include <fstream> class BinarySearchTree{ private: //fields struct Node{ //fields long long value; long long height; long long depth; Node* left; Node* right; //constructor Node(long long value){ this->value=value; left=NU...
ALGO
0.999702
4.404129
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-09-19T08:19: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": "6dd61c5e0...
ae93efff-03c7-46bc-9d9a-fd9c6fb68cd5
anshumang/leetcode75
medium-1466-reorder-routes-to-make-all-paths-lead-to-the-city-zero.cc
🧠 Key Insight: Think of this as a graph traversal (BFS or DFS). For each edge, if it's going away from 0, it needs to be reversed. You can model the graph as bidirectional for traversal, but track the original direction separately. ✅ C++ Code (DFS Approach): #include <vector> #include <unordered_set> using namespa...
ALGO
0.999987
5.986638
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2025-06-20T02:56:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4426edf29e4...
21e3ce27-7f03-4f6d-84ed-8b64b638f49a
IshanRakte/LeetCode-Solutions
0515-find-largest-value-in-each-tree-row/0515-find-largest-value-in-each-tree-row.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.999928
6.508072
{ "github_metadata": { "branch": "main", "commit_count": 2310, "repo_created_at": "2022-04-29T15:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "158eca728...
be400ad3-8b42-459d-8213-87f8f2534c0c
Thalisson-Alves/Competitive-Programming
submissions/AtCoder/abc233/f.cpp
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "debug.cpp" #else #define dbg(...) #endif using ll = long long; struct UFDS { vector<int> ps, sz; int components; UFDS(int n = 0) : ps(n), sz(n, 1), components(n) { iota(ps.begin(), ps.end(), 0); } int find(int x) { return (x == ps[x...
ALGO
0.99996
4.009336
{ "github_metadata": { "branch": "main", "commit_count": 1114, "repo_created_at": "2023-05-15T00:16:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfc4920d9...
437740e4-e3ea-4526-b0b3-e54ec75e372d
esxgx/oj-pastebin
hdu4_B.cpp
/* ID:esxgx1 LANG:C++ PROG:hdu4_B */ #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; double Ai[57]; #define eps 1e-8 int main(void) { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif int T; scanf("%d", &T); while(T) { int n; sc...
ALGO
0.999798
3.510404
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-08-11T18:51: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": "6bd28cf9c...
dbf2ab28-15ff-4da6-bd9e-083c0bde59f9
KimmiGYH/LeetCode_Notes_Public
Solutions_1001-2000/1310_XOR Queries of a Subarray_子数组异或查询/cpp_3_树状数组.cpp
class Solution { public: int t[30005]; int n; vector<int> xorQueries(vector<int>& arr, vector<vector<int>>& queries) { n = arr.size(); memset(t, 0, sizeof t); vector<int> res; for (int i = 0; i < n; ++i) add(i + 1, arr[i]); for (auto& q : queries) { ...
ALGO
0.999965
5.933188
{ "github_metadata": { "branch": "master", "commit_count": 1342, "repo_created_at": "2020-09-02T06:15: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": "9c1e5e4...
51268922-8822-4947-9a00-7a520e4007f4
andialexandrescu/FundamentalAlgorithms_Lab
colocviu_AF/main.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <queue> #include <vector> #include <stack> using namespace std; ifstream fin("graf.in"); // echipele joaca conform unui program de prioritati <=> sortare topologica // insa trebuie in cazul in care o echipa poate fi introdusa pe stiva (are grad 0) s...
ALGO
0.999993
4.699154
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-11T18:56:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4533ae44fae4...
f8509384-28dc-487e-a709-d44c2ba2c332
ajaykundu/codechef-long-challenge-solution
Jan 2018/KCON.cpp
#include <iostream> using namespace std; long long maxsubarry(long long arr[],long long n) { long long uptomax = arr[0]; long long currmax = arr[0]; for(long long i=1;i<n;i++) { currmax = max(arr[i],currmax + arr[i]); uptomax = max(uptomax,currmax); } return uptomax; } long long lms(long long arr[],long l...
ALGO
0.999867
3.9956
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-06-09T10:02: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": "9ebd214ba...
343f2a06-b902-4a94-9eba-61f909601917
KsKarim7/Algorithm-with-CPP
Problem solving/mod 7.5/ques_no_2.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e3 + 5; vector<int> adj[N]; bool visited[N]; int level[N]; void bfs(int s) { queue<int> q; q.push(s); visited[s] = true; level[s] = 0; while (!q.empty()) { int u = q.front(); q.pop(); for (int v : adj[u]) ...
ALGO
0.999978
3.671937
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2023-11-12T19:16: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": "8ecbd65fc8...
63ae5580-c649-4133-b832-3f675679f6c0
suryapratap64/Dsa-source-code
17.Tree/preorfertraversalofBST.cpp
// Helper function to construct BST from preorder traversal BinaryTreeNode<int>* solve(vector<int>& preorder, int mini, int maxi, int& i) { // Base case: If the index is out of bounds or the value is outside the range if (i >= preorder.size() || preorder[i] < mini || preorder[i] > maxi) { return NULL; ...
ALGO
0.999993
6.517627
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-25T12:46:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8db6f9cb686c...
7a6a2daa-ea45-47ac-bf84-8e38a336d2b7
ashrutarora/DSE
Semester_3/(DS)-Data_Structures_Lab/L06/INFIX/infix2postfix.cpp
#include <iostream> #include <cstdio> using namespace std; #define MAX 100 class Stack { int top ; char arr[MAX]; public: Stack(){ top = -1; } bool isEmpty(){ if(top == -1) return true; else return false; } bool isFull(){ if(to...
ALGO
0.999789
4.550784
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2022-10-10T11:17:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9dff04ff2...
7d4d25f6-8860-4350-bd8f-cc859277d415
jujubebat/problem-solving
cpp/Baekjoon Online Judge/DivideAndConquer/3649로봇 프로젝트 (2).cpp
#include<algorithm> #include<vector> #include<cstring> using namespace std; int arr[1000000]; int x, n; vector<int> v; int ret = -1; // idx번째 블록과 합쳤을때 길이가 x가 되는 블록을 이분탐색으로 찾는다. void find(int idx) { int low = 0, high = n; while (low <= high) { int mid = (low + high) / 2; int size = arr[idx] + arr[mid]; // 두 블...
ALGO
0.999929
3.431852
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2020-02-26T06:23:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "217752a6...
b3445f39-7b36-4082-8e31-4bdfab55c362
ripper121/RoboTrickler
Firmware/Arduino-Libs/QuickPID/examples/PID_AdaptiveTunings/PID_AdaptiveTunings.ino
/****************************************************************************** PID Adaptive Tuning Example One of the benefits of the PID library is that you can change the tuning parameters at any time. This can be helpful if we want the controller to be agressive at some times and conservative at others....
ALGO
0.994816
6.55187
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2023-06-11T14:02:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d4882ae0d...
1d868dd3-a249-4f37-86dd-1dd150e81238
TomDev234/algorithms_cpp
test/test_mergesort.cpp
// // test_mergesort.cpp // algorithms_tests // // Created by Tom on 04.09.23. // #include "test_mergesort.hpp" #include "mergesort.hpp" #include "is_sorted.hpp" #include <iostream> using namespace std; int test_mergesort() { cout << "Merge Sort\n"; cout << "----------\n"; vector<int>originalArray = { 45...
TEST
0.906489
5.567505
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-08-09T16:44: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": "e3a5e21c33a...
cd7c24e6-612c-4871-9988-5ebe42897a91
3larvas/algorithm_test
algorithm_test_/algorithm_test_/sma_7837_새로운게임2.cpp
//// https://www.acmicpc.net/problem/17837 //#pragma warning(disable : 4996) //#include <stdio.h> //#include <queue> //using namespace std; // //struct player_info { // int r, c, f, d; //}; //struct map_info { // int type; // deque<int> player_list; //}; //player_info player_list[11]; //map_info map[13][13]; //int N, K...
ALGO
0.999309
3.97825
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-02-19T15:58: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": "e5c2d1fbe...
54439a78-e81e-4385-8f88-66d5a0e20f89
animesh363/java02
c++love/ArrysStrings/stringarray.cpp
#include <iostream> using namespace std; // int getlength(char name[]){ // int count = 0; // for(int i = 0; name[i] != '\0'; i++ ){ // count++; // } // return count; // } // int main(){ // char name[20]; // cout <<"Enter your name:` "<< endl; // cin>> name ; // // name[2]= '\...
ALGO
0.930933
3.442224
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-03-03T14:05: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": "b6226b9c16...
d2890648-b3c2-4cb0-a403-bf24eb622574
atknbskr/DSA2
Q11.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool isValidAllocation(vector<int>& A, int n, int m, int mid) { int students = 1; int pages = 0; for (int i = 0; i < n; i++) { if (A[i] > mid) return false; if (pages + A[i] > mid) { stud...
ALGO
0.999988
5.540079
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-27T19:01: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": "c1f9b659ca15...
932aab27-5907-4ec7-a837-9f783f276590
mayank992/Codeforces-Solutions
611C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define ull unsigned long long int #define mod 1000000007 #define pb push_back #define pop pop_back #define mp make_pair #define ALL(v) v.begin(), v.end() int dp[501][501] = {0}; void solve(char mat[500][500], int r, int c) { for(int i = 2; ...
ALGO
0.999656
3.899464
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-03-20T18:18: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": "6e9e02444...
12d2a2ed-a042-4467-b8e7-5c9f4987ce27
2hyunjinn/Algorithm
Baekjoon_1244.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstring> #include <cstdlib> using namespace std; int n; //스위치 개수 100 이하 int student; // 학생 수 100이하 int info[101][2]; // 학생의 성별, 지정숫자 int state[101] = { 0 }; // 스위치의 상태 /* 남학생 */ // 스위치번호가 자기가 받은 수의 배수이면 상태 바꿈 void male(int num, int i) { if (i * num > n) r...
ALGO
0.99988
3.604649
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2022-01-20T15:00: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": "0238cd2933...
65ac9e06-2c42-4772-8b54-e88f0eb06875
Youssef18118/Photoshop-Filters
CS112-203-2nd-S5-S6-20210854-20210779-20210542-A3-FULL.cpp
// FCAI - Programming 1 - 2022 - Assignment 3 // Program Name: CS112-203-2nd-S5-S6-20210854-20210779-20210542-A3-FULL.cpp // Last modification date: 19/4/2022 // Author1 and ID and Group: <NAME>, 20210854, Group A // Author2 and ID and Group: <NAME>, 20210542, Group A // Author3 and ID and Group: <NAME>, 202107...
TOOL
0.97005
3.729627
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-22T19:39: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": "55c82b22d7dd...
ce752ed0-fa23-4385-bfef-537bba84d21a
hoanghl/University
3rd year homework/OS/Assignment_2_1/DataStructure.hpp
/* * Tommy * October 27, 2018 */ #ifndef QUEUE_HPP_ #define QUEUE_HPP_ #include <string.h> #include <iostream> #include "process.hpp" using namespace std; class Node{ public: struct process * _data; Node * _next; Node(struct process * data): _data(NULL), _next(NULL){ _data = data...
ALGO
0.998603
4.798389
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2019-03-25T14:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "fcd7fe6e8...
aad563d8-5941-4257-95df-36c7a58d4d4c
sefakrkmaz55/DinamikBellekYonetimi
DinamikBellekYonetimi/Yurutucu.cpp
#include "DinamikBellekYonetimi.h" #include <iostream> using namespace std; int main() { /*Gİzemli ve şanslı matrisler için boyut istedik*/ int satir1, satir2, sutun1, sutun2; cout << "Satir giriniz: "; cin >> satir1; cout << endl; cout << "Sutun giriniz: "; cin >> sutun1; cout << endl; cout << "Satir girin...
TOOL
0.986761
3.5841
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-02-04T00:24:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b188c0acba...
4626a728-bdc3-4592-880d-33f6cfc84ddb
otnim/Competitive-Programming
Algo & DS Library/Min Max Sub Array using Trie.cpp
#include <bits/stdc++.h> using namespace std; #define LL long long int #define ULL unsigned long long int #define pii pair<int, int> #define pLL pair<LL, LL> #define pb push_back #define ff first #define ss second #define SZ 1000055 #define LIM 2000005 #define base1 129 #define base2 1...
ALGO
0.999895
4.226758
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-15T00:33: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": "19a0dbefac69...
11d3dab4-c96c-46c2-84ab-5a21009a9223
drmeister/legacy-externals-clasp
boost/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 <NAME>, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST...
ALGO
0.99955
7.168209
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2014-07-04T03:06:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 10, "issues": 3, "pull_requests": 5 }, "file_meta": { "content_id": "58bb91...
ee566fa8-cbc5-4c68-b9b4-8b299b93fb0d
Norumai01/Data_Algorithm
Graphs_Test/graph.cpp
/* Graph read from file, and represnted as adjacency list. * Each entry in the file is an edge represented as <source vertex, destination vertex, edge weight> To implement DFS and BFS traversals on the graph. Note that there is more than one right order of BFS and DFS vertices */ #include <iostream> #include <sstrea...
ALGO
0.999821
4.950597
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2022-09-06T00:37: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": "870e4709478...
40b19cd2-3731-45be-99e5-ec17cec6a522
5109100090/PT
tes2.cpp
#include<stdio.h> #include<string.h> char stack[50]; int index=0; int operand(char symbol) { if(symbol=='(' || symbol==')' || symbol=='#') return 1; else if(symbol=='+' || symbol=='-') return 2; else if(symbol=='*' || symbol=='/') return 3; else if(symbol=='^' || symbol=='$') ...
ALGO
0.999918
4.02281
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-01-01T16:10: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": "7d4ccb84a7b...
70be4318-b405-4c06-9e98-fb511b45e39d
sifakis/CS639S23_Demos
DenseAlgebra/GEMM_Test_0_6/MatMatMultiply.cpp
#include "MatMatMultiply.h" #include "mkl.h" void MatTranspose(const float (&A)[MATRIX_SIZE][MATRIX_SIZE], float (&AT)[MATRIX_SIZE][MATRIX_SIZE]) { mkl_somatcopy( 'R', // Matrix A is in row-major format 'T', // We are performing a transposition operation MATRIX_SIZE, // ...
ALGO
0.99718
5.877521
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-01-26T17:38:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "bc33c6083a...
62658ee0-8d03-45ef-8494-9a2b8882c530
santr4/DSA-2.0
striver/Dynammic Programming/tut9.cpp
// 63. Unique Paths II class Solution { public: int uniquePathsII(vector<vector<int>> &v, int i, int j, vector<vector<int>> &dp) { if (i < 0 || j < 0 || v[i][j] == 1) { return 0; } if (i == 0 && j == 0) { return 1; } if (dp[i][j] !...
ALGO
0.999947
5.653246
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2024-05-04T10:27: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": "83f299cc40...
18a2ade2-8aa8-42e6-8139-f2541b7ae2fb
Lzww0608/CacheReplacementPolicies
include/utils/time_wheel.h
/* @Author: Lzww @LastEditTime: 2025-06-28 23:10:00 @Description: 多层级高精度时间轮 (Hierarchical High-Precision Timing Wheel) @Language: C++17 */ #ifndef TIME_WHEEL_H #define TIME_WHEEL_H #include <iostream> #include <vector> #include <list> #include <chrono> #include <functional> #include <memory> #include <thread> #includ...
TOOL
0.963177
7.144787
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2025-06-18T14:27: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": "c44b4d41df7...
701969ef-55e9-4181-b106-989f1673e81f
HarshCasper/NeoAlgo
C-Plus-Plus/dp/JobSchedulingWithMaxProfit.cpp
/* Query : Job Scheduling with Maximum Profit (using Recursion) Task: We are given X number of Jobs and their starting time, end time, and profit value of accomplishing them. We have to find the maximum profit of any subset of them such that there is no overlapping between the time durations of the jobs. Input is th...
ALGO
0.999608
4.612381
{ "github_metadata": { "branch": "master", "commit_count": 7521, "repo_created_at": "2020-06-24T16:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 887, "forks": 1041, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35...
aa6edfa6-4360-4cf3-aa3d-1e46c028f3e0
MattMohaupt/WordlessGame
main.cpp
#include <iostream> #include <ctime> #include <fstream> #include <vector> #include <cassert> #include <cctype> using namespace std; //defines the content of the dictionary void dictionarydefining(vector<string> &dict){ ifstream stream; stream.open("dictionary.txt"); assert(stream.fail() == false); dict.clear()...
TOOL
0.969617
3.592816
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-12T00:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0e1859129e6...
fd04b35a-30f4-4558-849e-62bf9c8308ce
mesiddhantcodes/Pre-Placement-Training-Program
Lecture01/01_Question.cpp
// <aside> // 💡 **Q1.** // Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. // You may assume that each input would have exactly one solution, and you may not use the same element twice. // You can return the answer in any order. // **Example...
ALGO
0.999894
5.794103
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-06-19T11:59: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": "dc6e2b8e4af...
d938dc04-a6f1-409d-8e3a-76656fdddebe
FrankEBaru/uHunt
920 (N3) - Basic Geometry/v1.cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; struct punto{ int x, y; }; double distancia(punto p, punto q){ double r2=(p.x-q.x)*(p.x-q.x) + (p.y-q.y)*(p.y-q.y); return sqrt(r2); } double superficie2(punto p, punto q, int altura){ //Se asume p es mas alto que q y alt...
ALGO
0.999475
3.770822
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-15T02:36: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": "367faa55c3...
92e58690-6cdd-4b0d-9521-85c9e525677c
ishandutta2007/codeforces-a
adamant/normal/771/B.cpp
#include <iostream> #include <vector> #include <map> #include <queue> #include <set> #include <string> using namespace std; int readInt() { int x; std::cin >> x; return x; } std::string readString() { std::string s; std::cin >> s; return s; } std::string gen(int i) { std::string s= ""; s += ('A' + ...
ALGO
0.999877
3.778462
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd2924f7602a...
956e7c50-9766-4a77-bc43-a278f9b0e419
mornhuang/example
c++/数据结构/OpenGL/景深.cpp
#include<windows.h> #include<math.h> #include<GL/gl.h> #include<GL/glu.h> #include<GL/glaux.h> #pragma comment(lib,"opengl32") #pragma comment(lib,"glu32") #pragma comment(lib,"glaux") typedef struct { GLfloat x; GLfloat y; }jitter_point; #define MAX_SAMPLES 66 jitter_point j2[]= { {0.246490,0.249999}, {-0.2464...
ALGO
0.955157
4.404902
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2013-11-06T22:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94fac79a...
7df7b975-c2ef-4589-9d11-6363b5b73240
sysu-compsci/cscv
cscv-src/cscv/cscv.hpp
#pragma once #include <set> #include "base/basic_definition.hpp" #include "base/string_table.hpp" #include "cscv/compute.hpp" #include "ct/ct_image.hpp" #include "data/data_container.hpp" enum class Timer_type { // common process for part computing, pre-process PART_INIT, // SoA (y = Ax) GET_BLOCK_X...
CONFIG
0.972214
4.860514
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-02-19T16:24:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0615c8c09b6...
5f8ca472-ee13-4f4d-88db-e2e5a6c75faa
danidim13/Listas-TP1-Estructuras
include/ListaOrdenada_Array.h
#ifndef LISTAORDENADA_ARRAY_H #define LISTAORDENADA_ARRAY_H #include <cstdlib> #include <iostream> using namespace std; /* Clase que implementa el modelo Lista Ordenada * mediante un arreglo de elementos. * El tipo de elemento se define mediante un template. */ template <typename E> class ListaOrdenada { public: ...
ALGO
0.967757
5.298425
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2017-05-12T05:00:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f03a40e36...
26957d01-e86c-44da-9b7e-715c19a8ff4a
mejibyte/live-archive
4219 - Bora Bora/4219.cpp
/* Problem: 4219 - Bora Bora Author: <NAME> (http://blogaritmo.factorcomun.org) */ using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstd...
ALGO
0.999933
3.848935
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2008-08-12T01:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb99b02...
f636f8af-4ae3-4646-921e-6398365783c0
MRT4R1KUL1SL4M/Code-in-Uni
CSE-304/Halleys.cpp
#include <bits/stdc++.h> using namespace std; double fof(double x) { return pow(x, 3) - (x)-1; } double dof(double x) { return (3 * pow(x, 2)) - 1; } double ddof(double x) { return 6 * x; } void HalleyMethod(double a, double b, double error) { if (fof(a) * fof(b) >= 0) { cout << "Invalid"...
ALGO
0.999873
4.142477
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-19T17:36: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": "be1731aa6bde...
83308b34-5a61-4a98-b63e-443e3cc017db
maahirai/atcoder_solver
panasonic2020/d.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; using vll=vector<ll>; using vi=vector<int>; template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} //pow(llpow,modpow...
ALGO
0.999496
3.219774
{ "github_metadata": { "branch": "master", "commit_count": 290, "repo_created_at": "2019-11-01T14:01: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": "f16c1b57...
2b79c0d6-be65-4c2c-998e-4e5b1cac6117
todorkrastev/software-university
C++/M04_OOP/L03_CodeOrganizationAndTemplates/Lab/Solutions/P04_SplitAndJoin/SplitAndJoinMain.cpp
#include "Join.h" #include "Split.h" #include <iostream> #include <string> #include <vector> class Song { private: std::string name; int lengthSeconds; public: Song() {} Song(std::string name, int lengthSeconds) : name(name), lengthSeconds(lengthSeconds) {} std::string getName() const { return this->name; }...
ALGO
0.982943
4.473055
{ "github_metadata": { "branch": "main", "commit_count": 5585, "repo_created_at": "2021-04-06T12:43:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee90603b2...
3a880a3c-1e14-4eb9-8923-c419a20937c6
encrypted-def/basic-algo-lecture
0x07/solutions/10866.cpp
// Authored by : BaaaaaaaaaaarkingDog // Co-authored by : - // http://boj.kr/82805c43b7ff48adb21a37403d55f736 #include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(0); deque<int> DQ; int n; cin >> n; while (n--) { string q; cin >> q; if (q == "push_bac...
ALGO
0.995845
4.563531
{ "github_metadata": { "branch": "master", "commit_count": 1862, "repo_created_at": "2020-02-19T10:47:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2560, "forks": 601, "issues": 1, "pull_requests": 4 }, "file_meta": { "content_id": "92...
b9b19b94-a84f-425c-950c-54365a2eb1c9
acckaufman/Integer-Tree-Operations-Demo
Solution Files/W7_PA1/W7_PA1_Source.cpp
//This program demonstrates operations on a binary tree. #include <iostream> #include "BinaryTree.h" using namespace std; int main() { //Let's keep it simple and try our binary tree operations using integers. cout << "Now creating a tree of ints. Adding the following values, in this order: 5, 8, 21, 3, 45, 34, 1, 6...
ALGO
0.998984
5.166881
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-06-01T18:34: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": "9227457c96...
9a7e52f8-4593-41d6-b817-804b9fb580c3
gladysdeepak/College_Club_Manager
main.cpp
#include <iostream> #include <algorithm> #include <map> #include <vector> #include<string> #include "newclub.h" using namespace std; void top_clubs(int n, map<string, map<string, Club*>>& clubs) { int ch, flag = 0; vector<Club*> club_list; while (1) { cout << "Enter\n1.Cultural Club\n2.Competitive...
TOOL
0.909777
4.183775
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-12T05:13:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0cfa4421847...
24163efe-77ac-4eb5-82c9-a39afd5c111f
AmanouToona/ABC
ABC190/D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll cusum(ll left, ll right) { ll res = (left + right) * (right - left + 1) / 2; return res; } int main() { ll N; cin >> N; if (N % 2 == 1) { int ans = 0; ll right = 1; while(true) { i...
ALGO
0.999884
3.557595
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2020-06-14T11:43: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": "c81b148e...
682021f8-0441-46ed-86ea-2922795bd40c
lum7na/ACM
LUOGU/P3271_6468349.cpp
// luogu-judger-enable-o2 #include <bits/stdc++.h> using namespace std; inline int read() { int f = 1; int x = 0; char ch = getchar(); while (ch < '0' || ch > '9') { f = (ch == '-') ? -1 : 1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); } re...
ALGO
0.999974
4.566421
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-05-10T09:49: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": "1ba76d1b7c8...
f1ae21be-7371-4b77-a3db-b58c583e7f95
Gresthorn/UWB_COORDINATE_GENERATOR
Sources/routemath.h
#ifndef ROUTEMATH_H #define ROUTEMATH_H #include <qmath.h> #include "structures.h" class routemath { /** * @brief The following class is used to compute the position of * specific object in given time. Each route represents one * object. Depending on speed, by using the method step(time) ...
ALGO
0.931804
5.113194
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-12-09T08:59:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de7d546020...
daaf8976-43dd-44e6-aea6-2ea640a78ecb
richoux/LearningErrorFunctions
explored/eo/include/eoVariableLengthCrossover.h
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // eoVariableLengthCrossover.h // (c) GeNeura Team, 2000 - EEAAX 1999 - <NAME> 2000 /* This library is free software; you can redistribute it and/o...
ALGO
0.924644
4.225741
{ "github_metadata": { "branch": "master", "commit_count": 433, "repo_created_at": "2019-06-05T05:57:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f24058f...
1cf0cf00-8702-4b57-9f68-562b49cb4718
nabobery/PROJECT-MADS
LeetCode/1201 - 1300/1289.cpp
// 1289. Minimum Falling Path Sum II // Solution 1 using Top Down DP (Recursion + Memoization) // Time complexity: O(n^3) // Space complexity: O(n^2) // The idea is to maintain a dp array of size n x n where dp[i][j] represents the minimum falling path sum ending at (i, j). // The base case is when i = 0, dp[i][j] = g...
ALGO
0.999996
6.362202
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2022-03-04T16:30: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": "375b7ebc0c...
7f0cc9c4-dac0-4b32-b52c-63f44c8581da
dtegunov/tom
Oscar3/c++Picker/include/arpack++/armat.h
/* ARPACK++ v1.0 8/1/1997 c++ interface to ARPACK code. MODULE ARMat.h Generic matrix template with a matrix-vector product. ARPACK Authors <NAME> <NAME> <NAME> Dept. of Computational & Applied Mathematics Rice University Houston, Texas */ #ifndef ARMAT_H #define AR...
TOOL
0.943588
5.077746
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-01-27T23:22:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f781e3d83...
45da449a-0ef7-4857-9735-825a3866ce27
matthewrdev/Software-Renderer
SoftwareRenderer/SoftwareRenderer/Vector3.cpp
//**************************************************************************** //** //** Vector3.cpp //** //** Copyright (c) 2010 <NAME> //** //** Author: <NAME> //** Created: 06/2010 //** //**************************************************************************** #include <iostream> #include <cmath> ...
TOOL
0.984535
6.411415
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-23T12:19:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5235a76b68...
73f7f9fd-0fc5-4bde-89da-62b486318a3b
MudassirQureshi7987/DSA-in-CPP
Linked List/doublyLinkedList.cpp
#include<iostream> using namespace std; class Node { public: int data; Node* next; Node* prev; //constructor Node(int data) { this->data = data; this->prev = NULL; this->next = NULL; } ~Node() { int value = this->data; if(this->next!=NULL) { delete next; next ...
ALGO
0.998942
4.763385
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2025-01-14T07:28:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d75cdbe4f...
71e9d73c-aead-4d8b-8ee7-0623c5e14ba3
TimKingNF/leetcode
editor/cn/_22.lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof.h
//输入一个链表,输出该链表中倒数第k个节点。为了符合大多数人的习惯,本题从1开始计数,即链表的尾节点是倒数第1个节点。例如,一个链表有6个节点,从头节点开始, //它们的值依次是1、2、3、4、5、6。这个链表的倒数第3个节点是值为4的节点。 // // // // 示例: // // 给定一个链表: 1->2->3->4->5, 和 k = 2. // //返回链表 4->5. // Related Topics 链表 双指针 #include "header.h" namespace LeetCode_22 { struct ListNode { int val; ListNode *next; ...
ALGO
0.999741
5.743206
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-07-09T06:35:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6dae72190...
4aeaf7cf-8c0e-4c85-9831-e51856b388a0
AreHumphrey/FEFU_1st-course
2_semester/OAiP/Cats/02A.cpp
#include <fstream> using namespace std; class Heap { private: const static int MAX_SIZE = 1000000; int HeapArr[MAX_SIZE], size; public: Heap() { size = 0; } int Parent(int), leftChild(int), rightChild(int); int Delete(), ShowSize(), ShowMainParent(); void Insert(int), Sort(int),...
ALGO
0.999989
4.592
{ "github_metadata": { "branch": "master", "commit_count": 391, "repo_created_at": "2022-12-28T13:17:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f0b42502...
2d49d0b5-8858-4949-b672-c7c0eb99d8c3
Prabhat-Kumar-42/Coding_Practice
UVA/uva_10765_Doves_and_Bombs.cpp
//UVA 10765 Question Solution #include <iostream> #include <algorithm> #include <vector> using namespace std; class Doves_and_Bombs { private: vector<vector<int>> stations; vector<int> dfs_num, dfs_low, visited, parent, is_art_pt; int dfs_counter, root, root_children, no_of_stations_to_delete; v...
ALGO
0.999883
4.931269
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-05-27T16:03: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": "455945b725f...
0a7e46c0-9f48-4a8a-a14e-2b59303d8b77
vai-shalimishra/DSA
Symmetric.cpp
#include<iostream> using namespace std; template<class S> class ST { public: int size; S*arr; // declaring an array ST(); //default constructor int set(const int& i,const int& j,const S&val); //const int &->a reference to an int object which happens to be const void get(const int& i,const int& j); ...
ALGO
0.998433
3.579652
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-07T15:05: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": "3d8f48f27b52...
e5ce950c-8fa7-4a2d-9c75-d4478031c02a
vrandakaushik/CS141
lab6q2b.cpp
// library #include <iostream> //namespace using namespace std; /*write a program with a function that takes 2 int parameters adds them returns the sum */ //define anew function before the driver function int sum(int a,int b){ //the new function with its parameters return(a+b); //the statement that we need in...
ALGO
0.985059
4.814405
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-09-05T14:12: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": "afff49a415...
b1d23a7a-f2b9-4cb8-940b-b7d935fa8feb
slam-code/cartographer
mapping_3d/scan_matching/ceres_scan_matcher.h
/* * Copyright 2016 The Cartographer Authors * * 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 applicable law...
ALGO
0.955641
7.411603
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-07-05T13:18:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 334, "forks": 158, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "90598...
f7f42c37-4246-4d0d-8bae-657c8c954cd2
gdahia/ufba-mata53
allprobs/cf-687a.cpp
#include <bits/stdc++.h> using namespace std; bool dfs(const int v, vector<int> * adj, vector<int> & vcolor, const int color) { vcolor[v] = color; bool colorable = true; for (int u : adj[v]) if (vcolor[u] == color || !(vcolor[u] || dfs(u, adj, vcolor, -color))) { colorable = false; break; } return colora...
ALGO
0.999893
4.082705
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2017-06-06T17:54: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": "f94e61906...
c4fba13d-919d-4894-b912-b29e70f0dd02
xfoxfu/SYSU-Homework
DCS295/lab2/src/prod_strassen.cpp
#include "matrix_extended.hpp" #include "matrix_truncated.hpp" #include "product.hpp" #include <cmath> #include <iostream> Matrix sprod(Matrix &lhs, Matrix &rhs) { // let mut out = SimpleMatrix::new(n, n); if (lhs.m() != lhs.n() || rhs.m() != rhs.n() || lhs.n() != rhs.m()) { throw std::logic_error( "un...
ALGO
0.984868
6.36215
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2020-05-03T03:43:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bfb245ab3...
57486329-faa7-4d57-a62b-c67618a41f59
antEater3005/DSA-Questions
Linked_List/4.cpp
#include <iostream> using namespace std; class node { public: int data; node *link; }; node *head = NULL; void InsertBeg(int val) { node *ptr = new node(); ptr->data = val; ptr->link = head; head = ptr; } void InsertEnd(int val) { node *ptr = new node(); node *temp = head; ptr->dat...
ALGO
0.999847
4.582026
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-29T13:25: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": "4fed2f61e1...
48eaad5a-b4a4-4ec5-a51e-477c5cfa154b
arangodb/arangodb
3rdParty/boost/1.78.0/libs/graph/example/neighbor_bfs.cpp
//======================================================================= // Copyright 1997, 1998, 1999, 2000 University of Notre Dame. // Authors: <NAME>, <NAME>, <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE...
ALGO
0.999618
5.847089
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
61e39f9b-c565-4ca9-a542-495de9cb0a98
glennlopez/Cpp.Playground
tools/gcfCalc_euclid/calcPrime.cpp
//This is a prime number calculator using Euclids Algorythm #include <iostream> #include <vector> //#include "calcGCF.cpp" //<-- used in calcFactorsOf.cpp (Euclids Algo) using namespace std; int calcPrime(int x){ int uNum, i, j, gcf_num, temp; bool isPrime; uNum = x; vector<int> multiples(uNum); //<-- stores ...
ALGO
0.999361
4.270386
{ "github_metadata": { "branch": "master", "commit_count": 1869, "repo_created_at": "2015-11-10T16:22:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c99f16...
4b0c8e70-4fa2-49b2-8449-d83f1e7a98e2
Richagogde03/DSA_WITH_CPP
code140.cpp
#include <bits/stdc++.h> using namespace std; //Program to find all the elements that appear more than ” n/k ” times. //order of N*N // void findEle(int n, int arr[], int k) // { // int div = n/k; // int visited[n] = {0}; // for(int i=0; i<n; i++) // { // int count=1; // if(visited[i]...
ALGO
0.999971
4.11537
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-18T09:40: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": "3c75cbcd821c...
767b6be7-ff3c-4e18-9b69-43bcd5de075e
iqkazim/lorawan
aloha-throughput_updated.cc
/* * This script simulates a complex scenario with multiple gateways and end * devices. The metric of interest for this script is the throughput of the * network. */ #include "ns3/end-device-lora-phy.h" #include "ns3/gateway-lora-phy.h" #include "ns3/end-device-lorawan-mac.h" #include "ns3/gateway-lorawan-mac.h" #...
TEST
0.987721
4.693092
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-02-28T11:56: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": "e04f0afe45f...
68153ee1-8ac4-4dcb-9202-7ffc8d8f2c3c
FarukIb/My-Competitve-Programming-Solutions
CSES/digit_queries/main.cpp
#include <bits/stdc++.h> #define mp make_pair #define all(a) a.begin(), a.end() using namespace std; typedef long long ll; typedef pair<int, int> pii; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int q; cin >> q; string out; for (int i = 1; i < 2000; i++) out += to_stri...
ALGO
0.999537
3.713684
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2021-06-18T12: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": "03233eeb2d1...
f622fd8c-d823-48d1-932c-1336e953d5dc
realkiwitae/aoc
2015/day5/day5.h
#include <iostream> #include <assert.h> #include <fstream> #include <sstream> #include <vector> namespace aoc2015{ namespace day5{ bool isnice(std::string s); bool isnice2(std::string s); std::string solvedayp1(std::string p); std::string solvedayp2(std::string p); void run...
ALGO
0.998072
4.677517
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2023-01-03T10:33: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": "f7f6f47cf1...
2916435d-7a89-49a9-a9ea-db0703809ea7
MattFor/RayTracer
include/Math/Vec3.h
// // Created by MattFor on 13.04.2024. // #ifndef RAYTRACER_VEC3_H #define RAYTRACER_VEC3_H #include <cmath> #include <random> #include <ostream> const double infinity = std::numeric_limits <double> ::infinity(); inline double rand_double () { // Modern c++ is great static std::mt19937 generator; static std::...
ALGO
0.905055
6.550817
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-04-13T17:10: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": "d4d6d4899...
cb5939e0-a545-4a1b-9179-acc2262a8422
mikejcooper/Computer-Graphics---Raytracer
Ray_make/Source/Raytracer.cpp
//// //// Raytracer.cpp //// Lab2 //// //// Created by <NAME> on 21/04/2017. //// Copyright © 2017 <NAME>. All rights reserved. //// //// //#include "Raytracer.hpp" //#include "Intersection.hpp" //#include "Ray.hpp" // // // // // // //int raysCast = 0; // // //Color RayTracer::castRay(const Ray& ray) { // raysCas...
ALGO
0.946937
5.354802
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-02-10T00:22: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": "569d69def...
2333e434-a413-4d7e-b1e6-b4be4d793ef2
NiccoDorn/RL_Exploration
2D-Grid-Optimization/project/env copy.cpp
#include <iostream> #include <algorithm> #include <unordered_set> #include "env.h" EnhancedCityPlanningEnv::EnhancedCityPlanningEnv(int rows, int cols) : rows_(rows), cols_(cols), episode_length_(0), cache_valid_(false), max_actions_per_episode_(200) { grid_.resize(rows_, std::vector<int>(cols_)); std::ra...
ALGO
0.999331
3.993363
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-07-07T10:30: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": "a7f0f641b7e2...
a6b461c5-b8ee-4cc2-8068-8ce213b6ed23
Soveer-Shah18/cpp_Linked_List_questions
reverse_list_recursion.cpp
//reversing the linked list using recursion #include<iostream> #include<vector> using namespace std; class Node{ public: int data; Node *next; Node(int value) { data = value; next = NULL; } }; //Recursive Function Node * CreateLinkedList(int arr[],int index,int n) { if(in...
ALGO
0.999993
5.926046
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-23T07:19: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": "35a11563f545...
bbe8dbc3-2b11-40ce-afc9-ae2165531ce3
satyasaibhushan/Advent-of-Code-2024-Cpp-Solutions
01/sol.cpp
#include <iostream> #include <vector> #include <fstream> #include <utility> #include <map> using namespace std; void solve(vector<int> A, vector<int> B) { int n = A.size(); sort(A.begin(), A.end()); sort(B.begin(), B.end()); int ans = 0; for (int i = 0; i < n; i++) { ans += abs(A[i] - B[i...
ALGO
0.99993
4.162178
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-05-08T06:54: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": "d9b3fc8f7b5...
9ade95b7-d9bd-40d6-990a-d37d769981f7
czartur/competitive_programming
contest/863_d3/b.cpp
#include <bits/stdc++.h> using namespace std; #define db(x) cerr << #x << " == " << x << endl #define dbs(x) cerr << x << endl #define st first #define nd second #define pb push_back #define mp make_pair #define cl(x,y) memset(x, y, sizeof(x)) #define endl '\n' typedef long long ll; const int INF = 0x3f3f3f3f; const...
ALGO
0.999727
4.127283
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2019-06-09T19:47: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": "475d738e1...
8bea4688-ad68-4b38-926e-985994759af6
It4innovations/mesio
src/wrappers/metis/w.metis.cpp
#ifdef HAVE_METIS #include "metis.h" #endif #include "w.metis.h" #include "esinfo/eslog.hpp" #include "esinfo/config.h" #include <algorithm> using namespace mesio; bool METIS::islinked() { #ifdef HAVE_METIS return true; #endif return false; } esint METIS::call( const METISConfiguration &options, esint verti...
ALGO
0.987338
6.113554
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-09-01T08:56:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2c81c45aee...
4b0919dd-b4e9-42d7-8a09-fceff6127a80
Jaeminiman/Algorithm
Jaemin/Jongman1/Brute Force/BF_테트로미노_14500/14500/소스.cpp
#include <iostream> #include <string> // #include <algorithm> // 입력받을 때, getline하고, std::erase()할 때, 필요했던 것인데 안썼음. #include <sstream> // sstream : string을 공백을 기준으로 자를 때 사용 #include <vector> using namespace std; int N, M; int board[500][500]; // 10^6 B = 1 MB int max_total = 0; int total; const int tetroDirection[4][2...
ALGO
0.999769
4.337113
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2022-06-29T05:07:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3ff7c8ab3...
f9e6fa95-7b4f-48bc-9f61-42c02b35ea2f
rikuya6/ICPC_learning
AOJ/0103.cpp
#include<iostream> using namespace std; #define REP(i, j) for(int i = 0; i < j; i++) void hit(int &score, int &base) { base++; if(base >= 4){ score++; base--; } return; } bool game(string event, int &score, int &base, int &out) { if(event == "HIT"){ hit(score, base); }else if(event == "HOMERU...
ALGO
0.999275
3.824554
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2016-02-19T14:20: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": "d254147e...
165a837a-f347-4f7d-b8d3-7db8da9c2007
wangbb13/wangbb13.github.io
LuoGu/level4/4-4/P2051.cpp
// (a + b) % c = (a % c + b % c) % c // (a * b) % c = ((a % c) * (b % c)) % c /* * name: <NAME> * solution: DP */ #include <iostream> using namespace std; typedef unsigned long long ull; const int MAXN = 100 + 1; const int GUN = 2 + 1; const ull MOD = 9999973; int comm[MAXN][GUN]; inline ull add(ull a, ull b) { ...
ALGO
0.99999
3.79007
{ "github_metadata": { "branch": "master", "commit_count": 340, "repo_created_at": "2015-07-05T08:20: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": "6c2f3a32...
7de2774b-29a6-41b6-a773-f8d41fb04232
Gyu-Park/Algorithm-problems
Problems/PathWithMinimumEffort.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; // solution using Dijkstra's Algorithm class Solution { public: int directions[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; int minimumEffortPath(vector<vector<int>> &heights) { // maximum absolute diffe...
ALGO
0.999977
5.651547
{ "github_metadata": { "branch": "main", "commit_count": 537, "repo_created_at": "2021-12-14T15:37:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04e4ea929e...
25d7cfbf-b30e-477a-9a07-4433748e04c2
xiaochuanle/Falign2
src/app/map/pore_c_aux.cpp
#include "pore_c_aux.hpp" using namespace std; static const double kSubOvlpFrac = 0.8;//0.8; size_t gNumRescueMapQ = 0; void dump_rescue_mapQ() { fprintf(stderr, "rescue mapQ: %zu\n", gNumRescueMapQ); } static void s_set_mapQ_ddf_sc(PoreCInitHit* a, int c) { const int verbose = 0; pdqsort(a, a + c, [](c...
ALGO
0.993317
4.274469
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-07T13:57:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d1d26e02ca4...
553013f9-98b5-4fd0-8edc-2e76495ca67e
annorthriver/leetcodes
NUM-108.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999996
6.333434
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2024-01-27T01:30: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": "95157b4a3a6...
13c2def7-714f-448d-9202-0a2f225d8591
leopeng1995/acplusplus
数据结构/树/最近公共祖先/LCA3.cpp
#include <iostream> using namespace std; struct Node { struct Node *left, *right; int key; }; Node* newNode(int key) { Node *temp = new Node; temp->key = key; temp->left = temp->right = NULL; return temp; } struct Node *findLCAUtil(struct Node* root, int n1, int n2, bool &v1, bool &v2) { if (root == NU...
ALGO
0.999935
5.789984
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2016-09-13T09:18:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2da08914...
a025960e-53a9-4ba0-b191-6bd60e8e18c5
ayushnegi449/DSA_SolvedProblems
Dynamic Programming/Array/5c.Ninja's Training Tabulation.cpp
#include <bits/stdc++.h> using namespace std; int solve(vector<vector<int>> &points) { int N = points.size(); int taskDO = points[0].size(); vector<vector<int>> dp(N + 1, vector<int>(taskDO + 1, -1)); dp[0][0] = max(points[0][1], points[0][2]); dp[0][1] = max(points[0][0], points[0][2]); dp[...
ALGO
0.99996
4.586677
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-19T06:13: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": "b8e405eb9317...
dc144893-0e26-4e79-980e-c00f1e4e9906
Chaotic-calm/Practice_CPP
merge_into_third_array.cpp
#include <iostream> using namespace std; int main() { int A[9], B[6], size1, size2, size, i, j, k, C[15]; cout << "Enter Array 1 Size: "; cin >> size1; cout << "Enter Array 1 Elements: "; for (i = 0; i < size1; i++) { cin >> A[i]; } cout << "Enter Array 2 Size: "; cin >> size2...
ALGO
0.999827
4.825403
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-08-11T13:33:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94135274b10...
be654b15-5ce8-48c5-a6c5-9fc1c4409f22
IvanIsCoding/CompetitiveProgramming
DMOJ/coci15c4p2.cpp
// <NAME> // Solution to https://dmoj.ca/problem/coci15c4p2 #include <bits/stdc++.h> #define endl '\n' using namespace std; const int ALPHABET_SIZE = 26; vector<int> frequencia; int atual, delta, last, antigoatual; int mod_sum(int x, int a) { return (((x + a) % ALPHABET_SIZE) + ALPHABET_SIZE) % ALPHABET_SIZE; } ...
ALGO
0.999611
4.456088
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2018-04-30T13:58:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 85, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d62af6...
09dd981a-3138-477c-9dd5-9ca1e0dc4c09
OpenFOAM/OpenFOAM-dev
src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\...
ALGO
0.929066
6.603323
{ "github_metadata": { "branch": "master", "commit_count": 8589, "repo_created_at": "2014-12-10T15:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1770, "forks": 642, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6c...
0d2036c9-7b2b-4f86-ae1e-8c93febd18c5
ymtzeng/T2TopPlusPhoton
interface/SolutionOfWNeutrino.h
#ifndef SolutionOfWNeutrino_H #define SolutionOfWNeutrino_H #include <iostream> #include "TLorentzVector.h" #include <math.h> void SolutionOfWNeutrino(TLorentzVector vlep,float MET, float METPhi, float wmass, float& nuz1, float& nuz2) // // Purpose: Solve for the neutrino longitudinal z-momentum that makes // ...
ALGO
0.991415
4.561639
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-05-07T13:41:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55d6761586...
a4a252ac-bfd9-48c6-98b5-a8e7eebdc874
kyyyyyyyyyyyyyy/praktikumc--Sms1
sixth/laprakmodul6(3).cpp
#include <iostream> using namespace std; // Fungsi untuk menghitung jumlah digit dari bilangan int hitungDigit(int bilangan) { int jumlahDigit = 0; // Menghitung jumlah digit dengan membagi bilangan hingga mencapai 0 while (bilangan != 0) { bilangan /= 10; // Menghapus digit terakhir ...
ALGO
0.99964
5.833637
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-10-28T03:47: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": "99e57d741eb7...
cf7689d9-1012-43ac-910b-fefe4d9ef454
durgesh-agrhari/Prepinsta-top-100-codes-with-solutions
Part 2 Basic Coding/5 Binary to Octal conversion .cpp
//C++ Program //binary to octal conversion #include <iostream> #include <math.h> using namespace std; //Function to convert binary to octal int convert(long binary) { int octal = 0, decimal = 0, i = 0,rem; //converting binary to decimal while(binary != 0) { ...
ALGO
0.997296
4.597393
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-09-07T15:33:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1f04e6ed1a5...
a62c2803-9333-4e9c-993f-bc6b8d66d323
Araenn/OOP_Initiation
TD1/cpp/divisible.cpp
#include "divisible.h" int min(int a, int b) { return a < b ? a : b; } void updatePosition(int &min, int &max) { if (min > max) { int cached = min; min = max; max = cached; } } int max(int a, int b) { if (a > b) { return a; } else { return b; } } void afficher(struct Divisible t) { std::cout << ...
ALGO
0.988912
4.722799
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-10-13T13:36: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": "abe26dfc3fc4...
4adb0657-3ccf-4860-87e9-24cf5e1eae11
jrmuizel/mozilla-cvs-history
tools/trace-malloc/leaksoup.cpp
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
TOOL
0.97697
5.703506
{ "github_metadata": { "branch": "master", "commit_count": 205211, "repo_created_at": "2011-02-18T20:41:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4df...
7bb3dfae-7909-45b8-b40b-4301ab1e90ef
DrZhang818/my-first-project
Problems/School/3.11热身赛/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef pair<int,int> PII; typedef unsigned long long ull; constexpr ll inf = 1e18; void solve() { ll a, b, c; cin >> a >> b >> c; ll ans = -inf; ans = max(ans, a + b + c); ans = max(ans, a * b * c); ans = m...
ALGO
0.999817
5.738604
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-07-05T09:35:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5163f17fe9...
e3cbc439-8ed2-49b4-9dc2-4e732e927ef8
omnisepher/TheVillage_UE5_WWise
Plugins/Wwise/Source/AkAudio/Classes/GTE/Mathematics/IntrRay3Sphere3.h
// <NAME>, Geometric Tools, Redmond WA 98052 // Copyright (c) 1998-2020 // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // Version: 4.0.2019.08.13 #pragma once #include <Mathematics/IntrIntervals.h> ...
ALGO
0.995664
7.488043
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-06-23T11:59:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68ab51c2d6...
f5438967-47b6-4a36-b8f7-09fc7430e611
IgnaOromendia/Competitve-Programming-Problems
solutions/building_teams.cpp
#include<iostream> #include<vector> using namespace std; // Constants const string IMPOSSIBLE = "IMPOSSIBLE"; // Variables int n, m; vector<vector<int> > adj; vector<bool> visted; vector<int> color; void dfs(int v, int p = -1) { visted[v] = true; for (int u : adj[v]) { if (!visted[u]) { ...
ALGO
0.999994
4.324313
{ "github_metadata": { "branch": "main", "commit_count": 252, "repo_created_at": "2023-07-18T21:06: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": "9b7bf91c64...
f8b25c58-7511-40b0-aa03-58098e181c28
deepakkasera/Algorithms
Dynamic Programming/LongestPalindromicSubseq.cpp
#include <bits/stdc++.h> using namespace std; //Time Complexity is O(n^2) //Space Complexity is O(n^2) int longestPalindromicSubsequence(string s,int n){ int dp[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ dp[i][j]=0; } } for(int i=0;i<n;i++) dp[i][i] = 1; for(int l=2;l<=n;l++){ for(int i=0;i<n;i++)...
ALGO
0.999986
5.042242
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2016-08-31T18:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "487f05a93...
862043e3-42e1-4ff6-8ce6-0276b5b9d3b9
coderSomya/Competetive-Programming
1700-1900 rated/goodString.cpp
/* problem link->https://codeforces.com/problemset/problem/1678/B2 */ #include <bits/stdc++.h> using namespace std; int oddsum(vector<int> &v, int a, int b){ int sum=0; for(int i=a; i<=b; i+=2){ sum+=v[i]; } return sum; } int evensum(vector<int> &v, int a, int b){ int sum=0; for(int i=a...
ALGO
0.999658
3.985166
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2023-02-24T07:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa549673...
fdb31f8a-858d-44cd-a8b2-eff0ce704517
liangkang233/leetcode-cpp
213.打家劫舍-ii.cpp
/* * @lc app=leetcode.cn id=213 lang=cpp * * [213] 打家劫舍 II */ #include <iostream> #include <vector> using namespace std; // @lc code=start // 与198题差不多,多一个首尾相连的限制 class Solution { public: int rob(vector<int>& nums) { int ans = 0; if(nums.size() <= 3) { for (int i = 0; i < nums.size(...
ALGO
0.999954
5.360288
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-10-27T07:39: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": "567e894bed2...
5a3e52bf-ca4d-43af-b8c6-7c1161277e80
cfeck/imagezero
predict.h
#ifndef IZ_PREDICT_H #define IZ_PREDICT_H 1 #include "intmacros.h" namespace IZ { #define UNUSED(x) { x = x; } template<typename Sample = unsigned char> class Predictor3med { public: static int predict(int x, int y, int xy) { int dx, dy, dxy, s; dy = x - xy; dx = xy - y; dxy = x ...
ALGO
0.997882
6.374947
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2015-03-18T21:37:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 22, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2835aa1...
c933342f-0cef-4ba8-8066-e052bf4c9b2f
Invisible2569/C-Basic
48_constructor_derived_inheritance.cpp
// #include<iostream> // using namespace std; // class base1 // { // int a, b; // public: // base1(int x, int y) // { // a = x; // b = y; // cout<<"Calling constructor base_1...."<<endl; // } // void base1_display() // { // ...
TOOL
0.912383
5.098999
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-14T15:16: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": "b1e84fdb3764...