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
3c43b342-3ded-4817-b901-2fbffac53fb4
Schwarf/algorithms
dynamic_programming/test/test_trapping_rain_water.cpp
// // Created by andreas on 26.11.22. // #include "gtest/gtest.h" #include "trapping_rain_water.h" class SetupTrappingRainwater : public testing::Test { protected: std::vector<int> landscape1{0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1}; static constexpr int expected_water1{6}; std::vector<int> landscape2{4, 2, 0, ...
TEST
0.959293
6.869922
{ "github_metadata": { "branch": "main", "commit_count": 2112, "repo_created_at": "2022-01-13T17:55:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18ecf1983...
8661cf82-552f-4b2d-83d1-3a33921d80ee
GameFoundry/bsf
Source/Foundation/bsfUtility/ThirdParty/simdpp/detail/insn/i_max.h
/* Copyright (C) 2011-2014 <NAME> <<EMAIL>> Distributed under 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 LIBSIMDPP_SIMDPP_DETAIL_INSN_I_MAX_H #define LIBSIMDPP_SIMDPP_DETAIL_INSN_I_MAX_H #ifndef...
ALGO
0.988722
7.162246
{ "github_metadata": { "branch": "master", "commit_count": 5221, "repo_created_at": "2018-03-15T10:17:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1752, "forks": 194, "issues": 99, "pull_requests": 8 }, "file_meta": { "content_id": "fa...
4f46fc67-75e9-49fb-a245-df1c36ae3475
leejoey0921/baekjoon
백준/Gold/32249. 보드게임/보드게임.cc
#include <bits/stdc++.h> using namespace std; int A[11][1000001], B[11][1000001]; void calc(int as, int abs, int bs, int bbs) { int a = as; int b = bs; if (abs > 0) a--; if (bbs > 0) b--; if (a <= b) { cout << "Alice\n"; } else { cout << "Bob\n"; } } int main() { cin.tie(0...
ALGO
0.999968
4.281965
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-06-18T13: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": "44bc65ddde2...
064b9511-f7c9-4f20-aa49-126b32b318e5
Naman-27072004/DSA
DSA Code/2.Recursion/9.factorialofano.cpp
#include <iostream> // Include the iostream library for input and output using namespace std; // Use the standard namespace to avoid using std:: prefix // Function to calculate the factorial of a number using recursion int fact(int n) { if (n == 0) // Base case: if n is 0 { return 1; // Return 1 (fact...
ALGO
0.999839
5.870703
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-02-27T11:34:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cda6bc286119...
f15d2e3d-6185-43e8-981e-237a3100a780
dbdbais/Solved_Problem_Storage
SWEA/D4/1210. [S/W 문제해결 기본] 2일차 - Ladder1/[S/W 문제해결 기본] 2일차 - Ladder1.cpp
// // Created by newbi on 2023-11-03. // #include<iostream> #include<cstring> #include <vector> using namespace std; vector<int> ans; int src; int dy[]={1,-1}; int ladder[101][101]; pair<int,int> dest; bool out(int x,int y){ return (x <0 || y <0 || x >= 100 || y >= 100 ); } void input(){ for(int i=0;i<100;i++...
ALGO
0.999735
3.888795
{ "github_metadata": { "branch": "main", "commit_count": 666, "repo_created_at": "2023-10-29T07:08: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": "512134cf3e...
20d9b2eb-7bd5-4efe-bb3e-0cc598c82ca8
anubansal17/Coding-Career-Journey
RoadMap/31_LCAInBinaryTree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // As given p and q will always exist in the tree, so we need not validate that TreeNode* LCA(TreeNode* root, TreeNode* p, T...
ALGO
0.999977
6.755125
{ "github_metadata": { "branch": "master", "commit_count": 901, "repo_created_at": "2020-02-09T14:11: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": "0e6a5324...
0f77fafd-36f1-41a2-8421-0b275774d377
yoyoqq/CodeForces
2467. Most Profitable Path in a Tree.cpp
class Solution { public: int mostProfitablePath(vector<vector<int>>& edges, int bob, vector<int>& amount) { int n = amount.size(); tree.resize(n); visited.assign(n, false); for (vector<int> edge : edges){ tree[edge[0]].push_back(edge[1]); ...
ALGO
0.999903
4.702
{ "github_metadata": { "branch": "main", "commit_count": 486, "repo_created_at": "2024-03-01T13:04: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": "5df2ada067...
787afdfc-8b31-44a1-ad60-385a90074b0f
cliu268/cs201
hw6a/q1.cpp
// A. The Sea of Trash // https://www.xinyoudui.com/contest?courses=350&books=253&pages=6568&fragments=11884&problemId=8010&pattern=0 /* Description: You will become sad if you fall into the sea of trash. But Boy Ma is planning not to. Boy Ma gives you a map of the Sea of Trash. It has n rows (from 1 to n) and m column...
ALGO
0.999972
4.665462
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2021-09-14T13:22:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d15cee09400...
313a4af6-9aad-41ee-aa8b-aecfe497ca29
yongeun13/algorithm
민코딩/Union Find-끊어진 트리.cpp
#include <iostream> #include <vector> using namespace std; int parent[200001]; int sub[200001]; vector<int>ans; struct query { int sel, C, D; }; //query 저장용 벡터 vector<query>v; int Find(int x) { if (parent[x] == x) return x; return parent[x] = Find(parent[x]); } void Union(int a, int b) { int pa = Find(a); int ...
ALGO
0.999842
4.363448
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2023-02-14T03:35:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20fd1098373...
788942be-0f37-40f3-b648-9e4cd4f3c2b6
miracl/MIRACL
source/pk-demo.cpp
/* * Example program demonstrates 1024 bit Diffie-Hellman, El Gamal and RSA * and 168 bit Elliptic Curve Diffie-Hellman * * Requires: big.cpp ecn.cpp */ #include <iostream> #include "ecn.h" #include "big.h" #include <ctime> //using namespace std; /* large 1024 bit prime p for which (p-1)/2 is also prime ...
ALGO
0.997856
4.584915
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2012-11-06T01:20:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 683, "forks": 243, "issues": 67, "pull_requests": 12 }, "file_meta": { "content_id": "7158...
60029294-5e50-475d-bedc-d256973d371c
Sakamoto45/Semestr_6
C++/HypothesisTestingExample/example/main.cpp
#include "../src/nb_bernoulli.h" #include "../src/nb_table.h" #include "../src/nb_inverse.h" #include "../src/chisquare.h" #include <ctime> #include <algorithm> #include <iostream> using namespace std; int main() { std::mt19937 rand_gen(time(nullptr)); vector<double> probabilities; // How to get neg...
ALGO
0.996516
4.566815
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-03-05T20:18: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": "c4fe90c96cb...
6de2e3e0-4ff0-41ec-9e01-3d91f97098d4
sripriyaagarwal16/DSA-Basic_to_hard_level
PriorityQueue/ksmallestnumber.cpp
#include<iostream> #include<queue> uaing namespace std; std::vector<int> kSmallest(int arr[], int n, int k) { // Use a max heap to keep track of the k smallest elements std::priority_queue<int> pq; // Insert the first k elements into the max heap for (int i = 0; i < k; i++) { pq.pus...
ALGO
0.999995
6.48403
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-07-28T12:28:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9d955e146...
210f8ed2-aaaf-41de-b140-ee8a64d3bc0a
FahadHeiji/Course-Projects-PA
FP/Algorithm-02/Problem___26__50/Problem__48/Pro-48.cpp
#include <iostream> #include <string> #include <cmath> using namespace std; void setProgramHeader(string title) { cout << "\n\t\t\t\t" << title << "\n\n\t\t\t"; for (int i = 0; i < title.length() + 18; i++) { cout << "-"; } cout << "\n\n"; } float readInput(string Message) { float numb...
ALGO
0.998241
3.698586
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-27T11:30:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39b7112dc3e2...
48e1ba67-d20b-4817-a577-a87fb8241728
ishandutta2007/codeforces-b
batman/normal/631/D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double inline ll tavan(ll a,ll n,ll mod) {ll p=1;while(n>0){if(n%2){p=p*a;p%=mod;}n>>=1;a*=a;a%=mod;}return p%mod;} #define N (201*1000) #define INF ((ll)1e15) #define MOD ((ll)1e9+7) ll n,m,ans; vector <pair<ll,char> > v,v2,v2_; ll lp...
ALGO
0.99991
3.69349
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9655e46bc82...
eb7d440d-d10d-4546-a49f-55e9acc5c028
KaitoIshizuka/etrobo2017
ItemMove.cpp
#include "ItemMove.h" #include "util.h" //懸賞まで行く void ItemMove::run(){ wc.setPWM(10); //基準となる地点の値を取る startRight = wc.getCount(0); startLeft = wc.getCount(1); startAve = (startRight + startLeft) / 2; //後退 while(1){ wc.setPWM(-10,0); wc.setPWM(-10,1); nowRight = wc.getCount(0); nowLeft = wc.getCount...
TOOL
0.989815
3.698356
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2017-06-27T00:18:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2426422a8...
f0e9a14e-31ea-4d71-9238-a4f8869b4797
ldslds449/LeetCode
1335/main.cpp
/* * @lc app=leetcode id=1335 lang=cpp * * [1335] Minimum Difficulty of a Job Schedule */ #include <vector> #include <cstring> #include <iostream> using namespace std; // @lc code=start class Solution { public: int table[301][11]; int dfs(vector<int> &jobDifficulty, int idx, int d){ // cerr << i...
ALGO
0.999953
6.125511
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-11-25T17: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": "14bf117575...
31a613d3-ade9-4518-a5bd-f7417ca2d4bb
MerajBighamian/programming
searching_for_2_numbers.cpp
#include <iostream> using namespace std; int main() { int numbers[10][10]; int choose_number_1, choose_number_2; int number_existed_1 = 0, number_existed_2 = 0; // get items of array from user cout << "please enter number of array : " << endl; for (int i = 0; i < 10; i++) { for (in...
ALGO
0.998951
4.835788
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-02-20T16:57: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": "56d4ee768...
5026018a-84c5-4bf7-b5ea-d3c53ef10ab0
apluscs/Codeforces
0100/0140/A/Solution.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; #define ll long long #define fi first #define se second #define pb push_back #define ALL(v) v.begin(), v.end() #define FOR(a, b, c) for (int(a) = (b); (a) < (c); ++(a)) #define FORN(a, b, c) for (int(a) = (b); (a) <= (c);...
ALGO
0.999812
3.607057
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2019-02-18T21:53:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b10db97fe...
9f5b6729-b16a-48fb-92c4-f867823069e9
MingshanJia/DataFlowAnalysis
CloneBen/google_code/27/3/tamer.eldeeb_1_1.cpp
#include <iostream> #include <algorithm> #include <fstream> #include <cmath> #include <string> #include <vector> using namespace std; vector<int> towns[100]; int cars[100]; int main() { ifstream cin("BR-large.in"); ofstream cout("BR-large.out"); int C; cin >> C; for(int cc = 1; cc<= C; cc++) { int N,T; cin >...
ALGO
0.999746
3.792666
{ "github_metadata": { "branch": "master", "commit_count": 802, "repo_created_at": "2019-10-14T10:49: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": "ad155f35...
4d8824ce-a526-4c71-bd7c-288f3d8389c2
DucDuc2004/DSA-Assignments
Week13/W13_ex_Tree_bieuthuc.cpp
#include <iostream> #include <string> using namespace std; struct Node { string value; Node* left; Node* right; Node(string val) : value(val), left(nullptr), right(nullptr) {} }; struct Stack { Node* nodes[100]; int top; Stack() : top(-1) {} void push(Node* node) { if (top...
ALGO
0.999947
4.343899
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-10-16T03:51: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": "23436f3d3ad...
f157dbcb-d7a4-4424-836e-36c0cd2a8ac3
DarioArzaba/CPPStandAlonePrograms
Practice Files/E09-P13.cpp
/* El número aproximado del número de Euler “e” se puede obtener con la siguiente fórmula: e = 1 + 1/1! + 1/2! + 1/3! + 1/4! + 1/5! +…..+1/n! Utilizando esta fórmula elabore un algoritmo que solicite un valor entero “n” validando que esté entre 1 y 10. Posteriormente calcule el valor aproximado de e mediante un ciclo q...
ALGO
0.999087
3.761376
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-03-30T18:37:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d95d77304f...
4e9d8a61-9764-4e87-9f6d-03a3136cbf68
sagarsingla14/Codechef
sam-and-substring.cpp
#include <bits/stdc++.h> #define ll long long int #define mod 1000000007 using namespace std; ll gcdExtended(ll a, ll b, ll *x, ll *y); ll modInverse(ll b, ll m) { ll x, y; // used in extended GCD algorithm ll g = gcdExtended(b, m, &x, &y); // Return -1 if b and m are not co-prime if (g != 1) ...
ALGO
0.999938
4.67411
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-09-16T18:20: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": "79cabdc9f4...
fe183c45-fdf1-417d-8418-62253896664d
OmarGitHubDev/Stacks-AI-Homework
Main.cpp
//<NAME> //tidy #include <iostream> #include <string> #include <vector> #include <time.h> using namespace std; class cl_poped; class less_than; class cl_state; class cl_expansion; class cl_heap; /* the following function will take from the main the info about all stacks in each initial and final cases this function ...
ALGO
0.999695
3.178639
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-09-20T08:07: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": "515fdd3928...
b387bf43-2c3f-45c5-b5ca-87d9d1e2b2ad
Fedorchuk-Valeria/6-laba
3 ind.cpp
///////// 11 вариант. 3 индивидуальное. #include <iostream> #include <math.h> using namespace std; int main() { int N; int digit_number = 1; ///// Cоздаём переменную, которая будет отвечать за степень (-1), то есть за знак (+\-) числа. int sum = 0; cout << "Enter amount of elements: "; cin >> N...
ALGO
0.999751
3.75304
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-12-18T23:04: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": "9c190229509...
e10575fa-d3d1-4289-a1fa-a4b67b3bd5c7
PancakeTAS/lsfg-vk
include/config/config.hpp
#pragma once #include <vulkan/vulkan_core.h> #include <filesystem> #include <chrono> #include <cstddef> #include <string> namespace Config { /// lsfg-vk configuration struct Configuration { /// Whether lsfg-vk should be loaded in the first place. bool enable{false}; /// Path to Lossl...
CONFIG
0.957576
6.692379
{ "github_metadata": { "branch": "develop", "commit_count": 220, "repo_created_at": "2025-06-28T08:52:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2129, "forks": 43, "issues": 7, "pull_requests": 2 }, "file_meta": { "content_id": "f13...
0a28e908-629a-465f-93b2-c060665ca35c
uchiha-satyam/Codes
Serialize and Deserialize a Binary Tree - GFG/serialize-and-deserialize-a-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node *buildTree(string str) { // Corner Case if (str.length()...
ALGO
0.999475
6.465463
{ "github_metadata": { "branch": "main", "commit_count": 1522, "repo_created_at": "2023-03-28T17:13: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": "db077d098...
ab2d229b-3bb7-40cc-9e1e-26f7cfe4e195
albertogg023/GraphProblemsAlgorithms
code/deep-first-search-to-scape-maze.cpp
#include <stdlib.h> // Funcion exit #include <string.h> // Funcion memset #include <iostream> // Variables cin y cout #include <sstream> // separador de cadenas #include <list> // Listas de adyacencia #include <queue> // Cola con el recorrido realizado using namespace std; #define MAX_NODOS 20000 ////////////////...
ALGO
0.998987
4.67849
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-10-24T12:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f784af266...
1e0936bc-f32f-4334-bb00-a92790fee26c
HideakiImamura/MyCompetitiveProgramming
ARC089/c.cpp
// // Created by 今村秀明 on 2018/02/21. // #include <stdio.h> #include <cmath> int const max_N = 1e5; int main() { int N, x[max_N + 1], y[max_N + 1], t[max_N + 1]; x[0] = 0; y[0] = 0; t[0] = 0; scanf("%d", &N); for (int i = 1; i <= N; ++i) { scanf("%d %d %d", &t[i], &x[i], &y[i]); } ...
ALGO
0.999968
4.425384
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-29T13:28:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c67c60cdf0...
3d7aa02a-0db3-4413-9817-351faf8227d5
AMReX-Astro/STvAR
Source/AmrCoreAdv.H
#ifndef AmrCoreAdv_H_ #define AmrCoreAdv_H_ #include <string> #include <limits> #include <memory> #ifdef _OPENMP #include <omp.h> #endif #include <AMReX_AmrCore.H> #include <AMReX_BCRec.H> #include <AMReX_ParallelDescriptor.H> #include <AMReX_ParmParse.H> #include <AMReX_MultiFabUtil.H> #include <AMReX_FillPatchUti...
ALGO
0.963273
6.054996
{ "github_metadata": { "branch": "main", "commit_count": 613, "repo_created_at": "2019-10-24T17:39:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2754ccaed7...
a7f2e31d-df32-4db8-a2dc-28e39fe44f8e
bitsai/book-exercises
Accelerated C++/chapter11/analysis.cc
#include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <stdexcept> #include "Vec.h" #include "Student_info.h" #include "grade.h" #include "median.h" using std::accumulate; using std::back_inserter; using std::domain_error; using std::endl; using std::ostream; ...
ALGO
0.997863
6.423567
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2010-08-24T01:45:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 431, "forks": 265, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c49...
84b7893c-ae55-4ba6-95ff-30b2fe018c75
ImperishableMe/codeforces-practice
cf-round-651/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; double INF = 1e100; double EPS = 1e-12; typedef long long int ll; typedef pair < int,int > PII; typedef ...
ALGO
0.999991
4.309096
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-03-16T15:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "8ad998cc8...
cd0b0811-b695-45b5-94e7-b18ebf1bde92
1WINgFIRE1/VsCODE
c++ tutorial/Heap/Kth_largest.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; //TC=>O(NlogN) SC=>O(N) N=> no of elemnt in array void kth_largest(vector<int> arr, int k) { //MIN-HEAP => for kth "LARGEST" // MAX-HEAP => for kth "SMALLEST" priority_queue<int, vector<int>, greater<int>> pq; //insert k-element in to pq ...
ALGO
0.999947
4.60166
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-03-09T11:42: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": "f9aebb4eb85...
d54f81ca-04c5-4ad9-af69-9c2805ab00fb
vincentRedDuck/Interview
automated_grading_system/lab7/studentCode/lab7-2/stu110511172.cpp
#include<iostream> using namespace std; void fillarray_1(char encoder_1[],int length,char code[]){ for( int i=0; i<length;i++){ if(i%2==0){ encoder_1[i/2] = code[i]; } } } void fillarray_2(char encoder_2[],int length,char code[]){ for( int i=0; i<length;i++){ if(i%2==1){...
ALGO
0.997749
3.418711
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-03-04T12:07: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": "127f654b15...
9bbf5d76-3cab-4cbd-be79-02714d676fb3
YuZhe-CN/AdventOfCode
2021/Advent11.cpp
#include "Advent11.h" #include<iostream> #include<list> using std::string; using std::cout; using std::endl; using std::vector; using std::ifstream; using std::list; struct Point { int row; int col; Point(int x, int y) { row = x; col = y; } Point(unsigned x, unsigned y) { row = x; col = y; } }; bo...
ALGO
0.996637
3.307292
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-12-02T15:54: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": "5027518b892...
561b3c43-867d-4b1b-8cf4-8f2ee2c27163
NguyennGiang/CP_tutorial
Competitive Programming 3/Deque/valerityAndDeque.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n, tc; cin >> n >> tc; deque <int> q; for (int x, i = 0; i < n; i++){ cin >> x; q.push_back(x); } pair <int, int> ans[n]; for (int i = 1; i < n; i++){ int x = q.front(); q.pop_front(); int y = q.fr...
ALGO
0.999957
3.850252
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-09-05T08:33:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45393615a1...
bc10f353-be4f-4e1a-a43b-af2d23dd976f
ChavezLv/MyCode
mycode/PROJ/2021/39_works_by_myself/searchEngine/10Se_example/Spell4.1/Cache.cc
#include "Cache.h" #include <algorithm> #include <fstream> #include <sstream> #pragma comment(lib, "lib_json.lib") #include "json/json.h" using std::ifstream; using std::ofstream; using std::stringstream; namespace wd{ Cache::Cache(int num) :_num(num) { } Cache::Cache(const Cache& rhs){ _hashmap=rhs._hashm...
TOOL
0.946935
3.699953
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2021-10-19T00:19: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": "fb8f81a4e8...
4e9c1f6a-7f6b-4011-8035-3bff796f88f3
yooshnn/PS
bojSolution/16_/16877.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; int dp[3000030]; int fibo[]{ 1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309 }; int main() { ios::sync_with_stdio(0); cin.tie(0); dp[0] = 0; ...
ALGO
0.999894
3.763979
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-09-11T13:25:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dd23cb4f...
cea6fbea-133c-4a2e-b1ff-02e741af5d9e
angmars/p3-euchre
Player.cpp
// Project UID 1d9f47bfc76643019cfbf037641defe1 #include <iostream> #include "Player.h" #include <cassert> #include <algorithm> using namespace std; class SimplePlayer : public Player { private: vector<Card> hand; string player_name; public: SimplePlayer(string name){ player_name = name; } ...
ALGO
0.976219
6.419566
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2023-02-21T04:30: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": "361650bcb81...
ad3236f1-9fdf-4aff-a834-3a97b73a8b7c
airy-beam/uva-oj
Skiena Revilla/1 Getting started/10196 Check The Check/Unit1.cpp
//--------------------------------------------------------------------------- #include <iostream> enum FIELDS { empty, wPawn, wKnight, wBishop, wRook, wQueen, wKing, bPawn, bKnight, bBishop, bRook, bQueen, bKing, out }; FIELDS board[12][12]; FIELDS Piece(char l) { switch ( l ) { ...
ALGO
0.999124
4.309331
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-06-06T12:09: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": "95ffccbead...
ce4880c3-4d57-42db-a94e-78a895a771f3
isuvrac/VRAC_REU_Programming
snippets/3_operators.cpp
#include <iostream> int main() { /* ---------------------------------------- Operators are used to perform operations on variables and values ---------------------------------------- */ // Arithmetic operators ---------------------------------------- int a = 5; int b = 2; ...
TOOL
0.979066
4.957883
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-04-03T18:52:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76b73b48a1a...
a5701dcc-769f-4e6d-969b-d770a9b96158
frankantony/leetcode-solution
shortest_path_binary_matrix.cpp
class Solution { public: int shortestPathBinaryMatrix(vector<vector<int>>& grid) { int len = grid.size(); if (grid[0][0] == 1 || grid[len-1][len-1] == 1) return -1; queue<vector<int>> q; vector<int> dx {-1, 0, 1}; vector<int> dy {-1, 0, 1}; q.push...
ALGO
0.999995
5.676437
{ "github_metadata": { "branch": "main", "commit_count": 311, "repo_created_at": "2022-11-03T10:49: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": "3a8f4df0c6...
2c6f0fa6-35a3-4862-8e69-71e60fad70fe
Oneflow-Inc/oneflow
oneflow/user/kernels/grid_sample_kernel_util.cpp
/* Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
DATA
0.935485
6.902944
{ "github_metadata": { "branch": "master", "commit_count": 9549, "repo_created_at": "2017-02-11T06:09:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9355, "forks": 1008, "issues": 444, "pull_requests": 186 }, "file_meta": { "content_id":...
070067ea-9a8c-4412-9aa9-4b7f634a0369
okrikunof/Computational-Mathematics
lab2/NewtonMethod.h
#ifndef NEWTON_METHOD_H #define NEWTON_METHOD_H #include <vector> #include "Functions.h" #include "matplotlibcpp.h" namespace plt = matplotlibcpp; class NewtonMethod { public: static double FindRoot(const std::vector<double> &segment, short functionChoice) { double x0 = 0; switch (functionChoice...
ALGO
0.999987
5.327373
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-04-09T19:46: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": "fc75d511f00...
45f72965-891f-4c5c-b18b-f2b441751a93
Navy10021/CODE_is_ART
string/count_anagram_substring.cpp
#include <bits/stdc++.h> using namespace std; // Count of total Anagram Substrings. // "xyyx" -> {x, x} {y, y} {xy, yx} {xyy, yyx} #define MAX_CHAR 52 int char_to_num(char c){ return c - 'A'; } int cnt_anagram_substr(string str){ int n = str.length(); // 1. Store substring conunt using MAP map<vector<...
ALGO
0.999899
4.733545
{ "github_metadata": { "branch": "main", "commit_count": 1837, "repo_created_at": "2023-04-14T06:18: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": "1f1f20f45...
ebe7e9a5-3b18-420e-9fdc-d7bced1ebe40
alim-buet/CPCodes
Codes/C_Two_Movies.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<int> firstMovie(n), secondMovie(n); // Read inputs for (int i = 0; i < n; i++) cin >> firstMovie[i]; for (int i = 0; i < n; i++) cin >> secondMovie[i]; // Counting positive, neutral, and negative reviews ...
ALGO
0.999994
5.399271
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-04-22T13:46: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": "2ea9b0a1cb3...
f9640666-327e-4205-b948-01ea8b76ff7b
jiiink/DataStructure
STL_2023_List_자료구조의_모든_것_1a/STL_5100___List_iterators_1e/Iterator_400___Circular/Circular___180___Joseph_k__using_advance_.cpp
#include <bits/stdc++.h> #include <stdio.h> using namespace std; #define mout(msg,C) cout<<"\n"<<msg<<": ";for(auto w:C) cout << " "<<w; int main(){ list<int> people(11) ; list<int>::iterator itlast, itfirst ; int jcnt, jump = 3 ; // 건너뛰는 jump의 칸의 수를 조절 함. iota( people.begin(), people.end(), 1 ...
ALGO
0.999679
3.608502
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-08-23T07:47: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": "8f419b7568...
99ae9bed-afdd-4098-8bf6-f4bd5c0d75ad
PaddlePaddle/Paddle
paddle/phi/kernels/cpu/c_scatter_kernel.cc
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
TOOL
0.962378
6.952685
{ "github_metadata": { "branch": "develop", "commit_count": 54743, "repo_created_at": "2016-08-15T06:59:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23037, "forks": 5770, "issues": 1009, "pull_requests": 823 }, "file_meta": { "content_...
6feab770-63b7-435b-b9db-7a718c95c63b
18Rutuja/CrackYourPlacement-
day15/reverse.cpp
#include <iostream> // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(nullptr) {} }; class Solution { public: ListNode* reverseBetween(ListNode* head, int left, int right) { if (left == right) return head; ListNode* temp = h...
ALGO
0.999996
6.137838
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-07-18T11:42: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": "3736290ccfe...
8b7c123d-9028-43b4-8efc-cad07f240531
aomiki/ssau-general-programming
1year/1semester/LR/Info/Individual_hw.cpp
#include <iostream> #include <fstream> #include <unordered_map> #include <algorithm> using namespace std; int main() { ifstream input; input.open("INPUT.txt"); int n; input >> n; long* coords = new long[n]; for (int i = 0; i < n; i++) { input >> coords[i]; } unordered_...
ALGO
0.999893
4.367697
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-10-16T05:08: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": "55802a667aa...
5d83c762-7ec4-4d46-aa7d-19a7e725ca15
Huy1311/bai-tap
Bai_2.cpp
#include<iostream> #include<iomanip> using namespace std; class giaovien { private: char ht[30]; char cn[20]; char bc[15]; int tuoi; float bl; float lcb; int bac; public: friend istream& operator >>(istream& nhap, giaovien& a) { nhap.ignore(); cout << "Nhap ho ten: "; nhap.getline(a.ht, 30); cout << "\...
TOOL
0.979905
3.289862
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-04T14:10: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": "f745590b0f...
96137a1d-e32c-4283-aafa-92c26d3fa882
injoon149/codetree-TILs
240710/독서실의 거리두기 4/study-cafe-keeping-distance-4.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n; cin >> n; string s; cin >> s; vector<int> v; vector<int> v4; for(int i = 0; i<s.size(); i++) { v.push_back(s[i] - '0'); } for(int ...
ALGO
0.999987
3.825806
{ "github_metadata": { "branch": "main", "commit_count": 1143, "repo_created_at": "2024-03-29T14:19: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": "e9155d8d3...
7c45c7bc-e68f-4342-bbe0-3d3490ed7cf2
pourzand/AS-OCT
simplemind/simplemind/dependencies/include/PCL/include/pcl/misc/CovarianceMatrixGenerator.h
#ifndef PCL_COVARIANCE_MATRIX_GENERATOR #define PCL_COVARIANCE_MATRIX_GENERATOR #include <vnl/vnl_matrix_fixed.h> namespace pcl { namespace misc { template <int Dimension> class CovarianceMatrixGenerator { public: CovarianceMatrixGenerator() { reset(); } void reset() { for (int r=0;...
ALGO
0.957162
6.592257
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2023-08-21T18:18: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": "6b2acc53f47...
3fc9a3f7-9929-4f37-acb1-36992c698e64
ttlast/ACM
DP/oi/bit seg dp/hdu 3450BIT.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; #define lowbit(x) ((x)&(-x)) const int P = 9901; const int maxn = 100000; int bit[maxn*4],n,d,cn; int a[maxn],b[maxn*4]; void Update(int index,int n,int val) { while(index <= n) { bit[index] += val...
ALGO
0.999899
3.415063
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-03-29T04:47:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "fc652d023d...
9e79e1a3-22df-4cb7-9156-a4a9aadf2474
nik09877/Competitive_Programming-DSA
B/binary_search_B_Sifid_and_Strange_Subsequences.cpp
#include<bits/stdc++.h> #define REP(i,n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int,int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 #define endl '\n' const double PI = 3.1415926535897...
ALGO
0.999789
3.963407
{ "github_metadata": { "branch": "master", "commit_count": 349, "repo_created_at": "2021-05-10T11:10:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6efcb264...
bc9a80d5-c49a-4383-bafd-dc6abfda057b
spranjal3301/Coding
Competitive Programming/Data Structure & Algorithmes/Ques/Array/Rotate_Matrix.cpp
#include <bits/stdc++.h> using namespace std; void transpose() { vector<vector<int>> matrix = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}}; for (int i = 0; i < matrix.size(); i++) { for (int j = i; j < matrix[0].size(); j++) { ...
ALGO
0.999969
5.152346
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2023-07-06T07:39:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8196fc562...
a2893a98-4879-4e14-8c00-cb6e29269d38
ArvindTitiyal/Competitive-Programming
Intro to C++/Conditionals and Loops/9. Find power of a number.cpp
Find power of a number Write a program to find x to the power n (i.e. x^n). Take x and n from the user. You need to print the answer. Note : For this question, you can assume that 0 raised to the power of 0 is 1 Input format : Two integers x and n (separated by space) Output Format : x^n (i.e. x raise to the power n)...
ALGO
0.999977
5.528567
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-09-18T07:23:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e3f7d2ecc3...
a53caf7c-bf75-414b-9070-6159c8770846
trungdlp/BaiTap-CSLT
276.cpp
#include<iostream> #include<cmath> using namespace std; void nhap (int a[], int &n) { do { cout<<"\nNhap so phan tu: "; cin>>n; if(n <= 0 || n > 1000) { cout<<"\nSo phan tu khong hop le. Xin kiem tra lai !"; } }while(n <= 0 || n > 1000); for(int i = 0; i < n; i++) { cout<<"Nhap a["<<i<<"]: "<<i; ...
ALGO
0.999544
3.552707
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-12-04T12:29:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "184ab171e8...
69c442fc-c662-49e0-83f4-d365717ef822
ajimenezh/Programing-Contests
Topcoder/SpecialCells.cpp
#include <iostream> #include <sstream> #include <vector> #include <string.h> #include <algorithm> #include <utility> #include <set> #include <map> #include <deque> #include <queue> #include <cmath> #include <cstdlib> #include <ctime> #include <cstdio> #include <stdio.h> using namespace std; #define rep(it,s) for(__ty...
TEST
0.999775
4.093491
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2013-07-29T18:45:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdbec0b58...
102567a0-874b-4ded-b13f-d6c5d04d9a15
llwwns/leetcode_solutions
234#palindrome-linked-list/solution.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool isPalindrome(ListNode* head) { ListNode *p, *q, *r; int len = 0, i; for(p = head; p!=NULL; p=p->next) l...
ALGO
0.99988
5.83084
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2015-07-16T08:45: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": "3c6807ff5...
03bd4fe5-bc00-4ff7-8edd-a2af236bc87c
przemekpastuszka/miscs
c++/analiza_numeryczna/pracownia3/playground.cpp
/******************************************************************************************** * <NAME> * Nr albumu 233 186 * <NAME> 2010/2011 - pracownia nr 3, zad. 23 ********************************************************************************************/ #include <iostream> #include <vector> #include <cstdli...
ALGO
0.999856
4.010183
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-10-14T15:16: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": "949d39526f...
f5a99a0d-2a61-442a-a0eb-fe0f59203fd2
Em-Ott/chessGame
chessFunctions.cpp
#include "chess.h" /* This file has: Board initalization, board creation, processing of the user moves, pawn promotion, and finding the king */ void boardInitalization (char board[]){ for (int i = 0; i < 64; ++i){ board[i] = '_'; } board[0] = 'r'; board[1] = 'h'; board[2] = 'b'; board...
ALGO
0.964295
4.169713
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-03-09T03:53: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": "250d6a35b0b...
49d15287-1ea3-4f3e-a67d-8fd7bb497bed
maciejewiczow/aisd
AlgorytmyIStrukturyDanych/LinkedList.h
#pragma once #include <iostream> template<typename T> class LinkedList { struct Node { Node* next; T value; Node() : value(), next(nullptr){}; Node(const T value) : value(value), next(nullptr){}; }; Node* head; public: // STL container traits using value_type = T;...
TOOL
0.992904
5.761202
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-11-18T19:56: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": "ef810f928...
0ac3379a-b718-4d84-ac1d-63d56b4f0e81
pierrejacob/debiasedhmc
src/logistic.cpp
#include <RcppEigen.h> using namespace Rcpp; // [[Rcpp::export]] double logistic_logtarget_c(NumericVector chain_state, const NumericVector & Y, const NumericMatrix & X, double lambda){ int p = X.cols(); int n = X.rows(); double alpha = chain_state(0); NumericVector beta(p); for (int j = 0; j < p; j++){ ...
ALGO
0.999299
6.560484
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-08-30T03:13:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43e674c1b0...
e20fcdda-2415-4273-9ef5-264471128f16
AlienceGG/LeetCode-3
problems/041.First_Missing_Positive/AC_array_n.cpp
/* * Author: illuz <<EMAIL>[at]<EMAIL>> * File: AC_array_n.cpp * Create Date: 2015-01-28 09:38:55 * Descripton: Brute force. This will use O(n) space && O(n) time. */ #include <bits/stdc++.h> using namespace std; const int N = 0; class Solution { public: int firstMissingPositive(int A[], int n) ...
ALGO
0.999916
3.405538
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2017-02-27T15:37:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "507280fb...
bfbe934f-d1d4-4d4d-b668-3e2ce8fdd7d0
timprepscius/mailiverse
cpp/Lib/xcode-botan/Botan-1.10.3/src/engine/openssl/bn_powm.cpp
/* * OpenSSL Modular Exponentiation * (C) 1999-2007 <NAME> * * Distributed under the terms of the Botan license */ #include <botan/internal/openssl_engine.h> #include <botan/internal/bn_wrap.h> namespace Botan { namespace { /* * OpenSSL Modular Exponentiator */ class OpenSSL_Modular_Exponentiator : public Modular_E...
ALGO
0.929324
6.491023
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2013-07-14T15:49:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fb52351...
9a88675b-d1a8-4645-9d16-2de188ce3401
aat52/Pitt-ENGR012
C++/Final Practice/Review1.cpp
#include <stdio.h> #include <stdlib.h> int user_choice(); void math(int, int, int[], int[], int[], int[]); int main() { FILE *infile; char filename[50]; do { printf("Enter file name: "); scanf("%s", filename); infile=fopen(filename, "r"); }while (infile==NULL); int x[50], y[50], z[50], status...
TOOL
0.934256
3.359883
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-06-16T22: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": "0408d525bb3...
ff4319af-47a1-4f0c-80b2-34e32815feeb
cpaca/BombeBruteForce
Deductions/Deduction.h
// // Created on 4/9/2023. // #ifndef BOMBEBRUTEFORCE_DEDUCTION_H #define BOMBEBRUTEFORCE_DEDUCTION_H #include <string> /** * This class stores all of the information about a Deduction. * Convention: * If position (cell, mines) is True, then there COULD be [mines] mines in cell [cell] * It's not guaranteed that...
ALGO
0.995424
6.394076
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2023-03-21T19:15: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": "6018b66e42f...
b5c0395c-e46b-47b3-94c6-f9f1571e33f5
sonnymayta/Cplusplus
Punteros-arryas/program.cpp
#include <iostream> using namespace std; int main() { int cifras[] = {10, 20, 30}; // Un array es básicamente un puntero al primer elemento de un array cout << cifras << endl; cout << *cifras << endl; int *ptr_cifra = cifras; cout << ptr_cifra << endl; cout << *ptr_cifra << endl; ...
ALGO
0.964037
4.423346
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-04-09T14:32: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": "562d4019199...
c5868cf2-08b3-40ff-9991-319d751a6225
xLLLxLLLx/xLLLx
vg/fd/hld/B.cpp
#include<bits/stdc++.h> #define fr(i,x,y) for(int i=x;i<=y;++i) #define rf(i,x,y) for(int i=x;i>=y;--i) #define LL long long #define lson x<<1 #define rson x<<1|1 using namespace std; const int N=3e4+10; struct data{ int nt,to; }a[N<<2]; int cnt=0,res=0,n,m; int v[N<<2],sum[N<<2]; int head[N],dep[N],w[N],f[N],sz[N],s[...
ALGO
0.999975
4.035354
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2019-01-26T00:16: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": "34bbbde36...
0ca62ca9-4d25-4f07-bb10-c0b68217c5bd
Tomraydev-WFiIS/OOP1
week09/lab09.cpp
/* Celem zadania jest przećwiczenie szablonów funkcji. W tym celu napiszemy funkcje: - wybierającą minimum (smaller) i maximum (larger) z dwóch wartości, zarówno typów wbudowanych, jak i zdefiniowanych przez nas, - znajdującą położenie danego elementu w tablicy (find) Dodatkowo stowrzymy klasę Rational (reprez...
ALGO
0.969041
4.522652
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-02-19T20:43:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5ba85dc6b...
bb6ed085-c15a-49b0-9afb-88d26f82b462
Humayan-Kabir/Problem-Solving
cf/contest/837/d/d.cpp
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم * Author: zyxw * Time: 2020-03-17 21:28:17 * SUST-15 **/ #include<bits/stdc++.h> #define mod 1000000007 #define mx 200007 using namespace std; typedef long long int LL; int dp[2][201][5001], was = 0; struct Solution { void solve() { int n, k; cin >> n >>...
ALGO
0.99998
4.358619
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2019-09-09T20:31:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "163ce193...
692e8547-2ae5-4906-94f4-9b4ff605e25f
CoderYuvi/SRM-DAA-E-LAB
Level 1/S-2 Sorting Techniques/APJ_AbdulKalam.cpp
// <NAME> (1st Principal Scientific Adviser to the Government of India). He passed away on 27 July 2015. May he rest in peace. This problem is dedicated to APJ Abdul Kalam. He will be in our hearts, always. // Actor Vivek plan to build an Educational Trust for poor students. Initially the total number of student is 0 a...
ALGO
0.998111
3.830117
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-11-02T13:33:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8029e090b4...
2a3d587e-684a-43b7-b142-029b8fb79ff7
thesidjway/optimal-visual-servoing
src/DynamicWindowSampler.cc
/* Optimal Visual Servoing Copyright (C) 2018 <NAME>, <NAME> 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 2 of the License, or (at your option) any later version. Th...
TOOL
0.993021
6.486111
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2018-10-17T20:16:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a3992e59...
75dacd90-8b05-4219-ba5a-60c4e824b0a7
BabaSambar/Codeforces-Questions
ICPC Qualification Round/ICPC Qual1.cpp
// WA #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define mp make_pair #define ff(s, f) for(ll i=s; i<=f; i++) #define fr(s, f) for(ll i=s; i>=f; i--) #define ffi(s,f) for(ll i=s; i<=f; i++) #define ffj(s, f) for(ll j=s; j<=f; j++) #define tc ll t; cin>...
ALGO
0.999936
4.298663
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-10-30T14:10: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": "f67a3dc4410...
4fdc00d5-335b-4311-9eb5-334feb03cb75
rishavjnv12/Code-backup
graph/graph.cpp
#include <bits/stdc++.h> #define cout(x) cout<<x<<endl; using namespace std; class Graph{ private: vector<vector<int>>g; int edges; int vertex; void dfsUtil(vector<bool>&,int at); public: void addEdge(int l,int r); int edge_count(); int vertex_count(); ...
ALGO
0.999825
4.134088
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-08-19T15:37: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": "fd7aa9e36...
875350e2-fb6f-41d8-96b5-c56efba49e03
marcorighini/tbdannotation
TBDCalibration/src/Utils.hpp
/* * Utils.hpp * * Created on: 08/jul/2013 * Author: alessandro */ #ifndef UTILS_HPP_ #define UTILS_HPP_ #include <vector> #include <opencv2/opencv.hpp> #include "Parameters.h" using namespace cv; using namespace std; /* * Class Utils: a collection of util functions */ class Utils { public: static con...
TOOL
0.995225
6.481182
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-01-27T15:24:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "279f174180...
c45cb3a4-f6cb-4545-ba32-38d773661ff9
enigm4tik/advent-of-code
2024/day19.cpp
/* * Advent of Code - 2024 * Day 19 */ #include "aoc_utility.h" bool isItPossible(std::pair<std::string, std::vector<std::string>> &colorCombo) { std::string color = colorCombo.first; std::vector<std::string> blocks = colorCombo.second; std::set<size_t> allpos; for (std::string &block: blocks) { std::vector...
ALGO
0.987845
5.190053
{ "github_metadata": { "branch": "main", "commit_count": 308, "repo_created_at": "2021-12-02T11:05: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": "0e72826bf6...
0e880293-3a12-4474-9670-d1f3b4999eea
marko-nikolic01/DS-A_leetcode
Problems/1408. String Matching in an Array/1408_string_matching_in_an_array_cpp/main.cpp
#include <iostream> #include <vector> using namespace std; vector<string> stringMatching(vector<string>& words) { vector<string> result; for (short i = 0; i < words.size(); ++i) { for (short j = 0; j < words.size(); ++j) { if (i != j && words[j].find(words[i]) != string::npos) { ...
ALGO
0.997342
5.539814
{ "github_metadata": { "branch": "main", "commit_count": 717, "repo_created_at": "2024-08-06T11:25: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": "1c66fac155...
7bbc7557-3493-4463-93a5-9e9df4fc8700
xiaoxindada/magisk_bins_ndk
native/src/base/misc.hpp
#pragma once #include <pthread.h> #include <string> #include <functional> #include <string_view> #include <bitset> #include <random> #include <cxx.h> #include "xwrap.hpp" #define DISALLOW_COPY_AND_MOVE(clazz) \ clazz(const clazz&) = delete; \ clazz(clazz &&) = delete; #define ALLOW_MOVE_ONLY(clazz) \ clazz(c...
TOOL
0.941569
6.890468
{ "github_metadata": { "branch": "main", "commit_count": 426, "repo_created_at": "2022-02-03T13:32:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 64, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b11a87af...
5b7fb016-793e-4779-8af3-98d529a14e4f
apache/joshua
jni/kenlm_wrap.cc
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
TOOL
0.96887
6.905263
{ "github_metadata": { "branch": "master", "commit_count": 4256, "repo_created_at": "2016-03-25T07:00:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 108, "forks": 63, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b791e...
5f27bdaa-594d-4d1e-a24e-be0625a5c81d
jbongard/ISCS
Code/m3wheel/optimizer.h
/* The algorithm that optimizes the robots. This can be replaced with whatever optimization algorithm the user prefers. This one instantiates a hill climber. The genomes are encoded as two-dimensional matrices with each element in the range [0,1]. */ #ifndef _OPTIMIZER_H #define _OPTIMIZER_H #include "matrix.h" ...
ALGO
0.999341
4.065921
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2011-08-17T14:45:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "953f46f44c...
ef6812e1-6bba-423a-92d3-1ed681c8846c
adamsiedlecki/iss_cwiczenia
task1/task1.ino
int ENA = 5; // left motor int ENB = 6; int IN1 = A0; int IN2 = A1; int IN3 = A2; int IN4 = A3; int powerLeft = 150; int powerRight = 130; int leftChanges = 0; int rightChanges = 0; const float changesToCmFactor = 857.22; // 42.0 *20.41; double changesCmRatio = 20.41 / 42.0; double leftDistanceCm = 0; double ...
ALGO
0.966072
4.942165
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-10-13T21:24:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d57d637f9b7...
1c99f996-de4f-4916-9cfc-a2ce6586a530
KaiqueSantos720/C-LG1
Sala 8/Exercício da Agenda.cpp
#include <stdio.h> #include <conio.h> #include <locale.h> #include <string.h> #include <stdlib.h> struct cadastro{ char nm[50], e[50]; int nt, id; }; struct cadastro c[5]; int i, j, x; char aux[50]; int rotentrada() { for (i=0; i<5; i++){ printf("%i - Informe o Nome:\n", i); fflush(stdin); fgets(c[i].nm,...
TOOL
0.932516
3.008263
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-11T15:02: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": "f022178853ed...
b252e0e4-1a76-4a88-8eeb-fab3cb81c1a2
abdirakhman/Olymp
BOI/2018/polygon/main.cpp
/** <KEY> */ #include <cstring> #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <queue...
ALGO
0.999874
3.776566
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-10-02T05:57:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91ec6effb...
1752f98d-023e-475a-91e0-83b6332d61cf
Shoyeb45/CompetitiveProgramming
Codeforces/Contest/ICPC-practice/PreliminaryRoundPracticeVirtual/A.cpp
#include<bits/stdc++.h> using namespace std; #define range(x) (x).begin(), (x).end() #define NFS ios_base::sync_with_stdio(false); cin.tie(NULL); typedef long long ll; template<typename T> void debug(string v1, T t1) { cout << v1 << ": " << t1 << "\n"; } template<typename T, typename K> void debug(string v1, T t1, stri...
ALGO
0.999985
4.628739
{ "github_metadata": { "branch": "main", "commit_count": 1085, "repo_created_at": "2024-01-22T14:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e006ed4e4...
1a95c38e-5957-4cad-bb36-66fba01f9a69
Ahmedsabib/Phitron_Problem_Solving_Club
Week - 4/Day - 10/A. Food for Animals.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false), cin.tie(nullptr); int tc; cin >> tc; for (int cs = 0; cs < tc; ++cs) { long long a, b, c, x, y; cin >> a >> b >> c >> x >> y; long long p = x - a, q = y - b; if (a <= x && b <...
ALGO
0.999492
4.011882
{ "github_metadata": { "branch": "main", "commit_count": 559, "repo_created_at": "2023-06-16T17:23: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": "de0b50ec93...
462240e4-9e88-4852-8931-2b2dacb45306
sneha390/DSA_Track
Hackerrank/karpekarModify.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'kaprekarNumbers' function below. * * The function accepts following parameters: * 1. INTEGER p * 2. INTEGER q */ void kaprekarNumbers(int p, int q) { bool flag = 0; for(int i ...
ALGO
0.998983
5.564653
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2023-12-23T04:54: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": "0556c37b...
9adfc11f-58d6-4115-ad2b-cc66102650e3
yunshengtian/Assemble-Them-All
simulation/externals/bfgs/lbfgsb.cpp
/************************************************************************* NEOS, November 1994. (Latest revision June 1996.) Optimization Technology Center. Argonne National Laboratory and Northwestern University. Written by <NAME> in collaboration with <NAME>, <NAME> and <NAME>. Contributors: * <NAME> (ALGLIB pr...
ALGO
0.999997
5.667556
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-09-19T16:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 176, "forks": 20, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f743c28e...
67f12430-8b5d-4e68-852a-349db9299582
zyn10/heap-Insertion-Merging-cpp-opp
HeapProject/main.cpp
// // main.cpp // HeapProject // // Created by Zain 👻 on 31/10/2021. // //===========================================================// //=========== Heap Creation Using Left-ist Tree ===========// //===========================================================// #include <iostream> #include<iomanip> #include<strin...
ALGO
0.999767
3.643284
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-10T04:11: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": "f9a02fc31f99...
3e9427b9-79a6-4fb3-8cdf-0ceddebcb3ca
CGAL/cgal
Spatial_sorting/doc/Spatial_sorting/CGAL/Hilbert_sort_2.h
namespace CGAL { /*! \ingroup PkgSpatialSortingFunctionObjects The function object `Hilbert_sort_2` sorts iterator ranges of `Traits::Point_2` along a Hilbert curve by recursively subdividing at the median or the middle, depending on the `PolicyTag` (see Section \ref sechilbert_sorting for more information on the pol...
ALGO
0.999972
7.24132
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
db8cff31-ba1c-4afa-b532-967449acade4
vskarleas/ROB4-S8-Cpp_Course
TD/18-02-2025/crtp.cpp
// Implementing the rectangle class using the CRTP principle (Curiously Recurring Template Pattern (CRTP) is a C++ design pattern that enables static (compile-time) polymorphism. ) #include <iostream> // Base class using CRTP template <typename Derived> class Shape { public: int area() const { return ...
TOOL
0.933869
7.075237
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-01-29T07:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9ffb426df7...
8963e43d-9482-4eb5-a15d-874958649759
ishandutta2007/codeforces-v
vercingetorix/normal/1228/F.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999341
3.608787
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "4018d9191867...
fdbd6e3e-3bb9-491f-a9c6-4b2279b311e2
karinarinv/Tugas1_124240047_C
124240047_Tugas1_SIC.cpp
#include <iostream> #include <iomanip> using namespace std; int menu; char pilihan; string kodeCari, namaCari; struct Roti { string nama; string kode; int harga; }; Roti daftarRoti[] = { {"Bika Ambon", "001", 300000}, {"Brownies", "002", 200000}, {"Lapis Legit", "003", 350000}, {"Roti Blu...
TOOL
0.997351
4.457731
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-08T03:57: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": "84929748e623...
0bd83f46-f102-43f0-95bd-f6710d48f1ff
DemoWo/cpp
old-modul/Sorting/main.cpp
#include <iostream> void heapify(float numbers[], int n, int i){ int largest = i; int left = 2 * i + 1; int right = 2 * i + 2; if (left < n && numbers[left] > numbers[largest]) largest = left; if (right < n && numbers[right] > numbers[largest]) largest = right; if (largest !=...
ALGO
0.999938
4.855646
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2022-08-12T10:43: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": "57781c855b2...
2c64a2c4-27a1-4576-bc6b-2de8d9a9c54f
razimantv/leetcode-solutions
Solutions/M/maximum-number-of-non-overlapping-palindrome-substrings/Solution.cpp
// https://leetcode.com/problems/maximum-number-of-non-overlapping-palindrome-substrings/ class Solution { public: int maxPalindromes(string s, int K) { int n = s.size(); vector<vector<int>> edge(n + 1); for (int i = 0; i < n; ++i) { for (int j = i, k = i; j >= 0 and k < n and s[j] == s[k]; --j, +...
ALGO
0.999945
6.533998
{ "github_metadata": { "branch": "main", "commit_count": 675, "repo_created_at": "2022-08-26T01:12:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 145, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "126c729...
553097bd-b35c-4817-9b20-28a06f2842fb
dovechkin/25-spring-205-arity-tree
deflate_unpack.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <fstream> #include <iostream> #include <map> #include <sstream> #include <string> #include <unordered_map> #include <vector> using namespace std; struct Match { size_t distance; size_t length; char next_char; Match(size_t d, size_t l) : dista...
ALGO
0.993457
4.333399
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-03-09T19:43: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": "3b21b6b116f...
88f7c72e-8ba9-4870-ab7f-770d0b1487a8
johannesgerer/jburkardt-cpp
vandermonde_interp_2d/vandermonde_interp_2d.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> using namespace std; # include "vandermonde_interp_2d.hpp" //****************************************************************************80 int triangle_num ( int n ) //*******************************************************************...
ALGO
0.999605
5.560268
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-02T14:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c4a61f2...
665edd4e-84e6-4b29-9590-00ea8461a42a
NyaaDoodle/cfg-algorithms
cfg.cpp
#include "cfg.h" #include "extras.h" #include <iostream> #include <cstdlib> ControlFlowGraph::ControlFlowGraph(unsigned int vertex_count, Vertex entry) : Graph(vertex_count) { this->entry = entry; } ControlFlowGraph ControlFlowGraph::create_from_input() { unsigned int vertex_count = get_vertex_count_from_input(); ...
ALGO
0.998815
4.556227
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-19T16:10: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": "31b9225856b...
a2973827-124a-434c-a3cd-480981a91ebb
ashishpapanai/DSA_Practice
lec_015(17th nov)/keypad_comb.cpp
#include<iostream> #include<vector> using namespace std; string words[] = {"_","+-/","abc","def","ghi","jkl","mno","pqrs","tuv","xyz","*()%","\"#@$"}; vector<string>keypad(string str){ if(str.length() == 0){ vector<string>base; base.push_back(""); return base; } char ch = str[0...
ALGO
0.999574
4.069088
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-25T17:29: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": "ff021f5c92...
bf39e183-19e0-4f9f-8730-33a6e649bcaf
GraGLeS/GraGLeS_3D
src/ggLS.cpp
/* GraGLeS 2D A grain growth simulation utilizing level set approaches Copyright (C) 2015 <NAME>, <NAME> 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 Lice...
ALGO
0.918738
5.148419
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-01-20T09:42:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46854dbca5...