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
a930d6ac-1ac6-4682-8892-43aaf7983a44
saeeun9325/C_assignment
C언어 과제/5주차 3. 문자열7.cpp
#include <stdio.h> int main() { char input[200] = ""; // 최대 199자 문자열을 저장할 배열, 처음에 빈 문자열로 초기화함. int count[26] = { 0 }; // 알파벳 소문자의 출현 횟수를 저장할 배열, 모두 0으로 초기화 int ch; // 입력받은 문자를 저장할 변수 int i = 0; //인덱스 변수 while ((ch = getchar()) != EOF) { //getchar(): 사용자로부터 문자를 하나씩 입력받음. input[i++] = ch; ...
ALGO
0.9965
3.220998
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2024-08-31T14:02: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": "20d66988cd...
be586061-fda5-4b33-a2d3-531ed75f69e0
luckhoi56/girsLabBackEndEngine
src/nonhomogeneous/NHBetaSampleGenerator.h
// // File: $Id: NHBetaSampleGenerator.h 152 2005-01-24 13:04:33Z saulo $ // Revision: $Revision: 152 $ // Copyright: (c) 2002, <NAME> and <NAME>. All rights reserved. // #if !defined(AFX_NHBETASAMPLEGENERATOR_H__6493FE79_42D6_4A0B_9301_1F69AE4A8B01__INCLUDED_) #define AFX_NHBETASAMPLEGENERATOR_H__6493FE79_42D...
ALGO
0.943164
5.708324
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-06-19T22:09: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": "76ccc8390...
c7246e6d-3aae-4d5d-98e4-389a90e86212
poyilee1030/leetcode_practice
tries/tries/_0212_word_search_ii.h
#pragma once #include <iostream> #include <vector> #include <string> #include "define.h" using namespace std; class _0212_word_search_ii { TrieNode* root = new TrieNode(); public: vector<string> findWords(vector<vector<char>>& board, vector<string>& words) { for (int i = 0; i < words.size(); i++) { insert(w...
ALGO
0.999646
5.442733
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-10-04T12:35: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": "2025f857a9...
6dfaf482-9dd0-455a-bb6e-5a06ad0ccb35
ishandutta2007/codeforces-m
mustang98/normal/992/C.cpp
#include <bits/stdc++.h> #define F first #define S second #define prev azaza #define MP make_pair #define PB push_back using namespace std; typedef long long ll; typedef long double ld; const int max_n = 1, inf = 1000111222; ll mod = 1000000007; ld my(ll a, ll b) { ll res2 = a * (1 << b); ll res1 = res2 -...
ALGO
0.999969
4.114954
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "db079486c485...
179ab3aa-c878-42e5-b66d-a445b8cec3a7
marvalarva2929/Competitive_Programming
Codeforces/Problems/1969C.cpp
#include <bits/stdc++.h> #define int long long #define nl " \n" #define pi pair<int, int> #define ff first #define ss second using namespace std; const int mxn = 3e5+1; int a[mxn]; void solve() { int n, k; cin >> n >> k; vector<vector<int>> ans(n + 1, vector<int>(k + 1, 0)); int s = 0; for (int i = 1; i <= n; i...
ALGO
0.999832
4.32635
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2023-04-26T04:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d7956fe1...
ba174678-fb45-424a-9506-0079807c2ae5
ankitapuri/LeetCode-Solutions
Trees/106 Construct Binary Tree from Inorder and Postorder Traversal.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.999965
6.253393
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2021-09-19T04:37:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c62f40348...
7e538047-f283-46a0-ae4e-a3da2095ccc7
abhiXsliet/DSA-Busted-A-Complete-CPP-DSA-Series
Lecture 111 DP Day-10/combinationSumIV.cpp
//https://www.codingninjas.com/codestudio/problems/number-of-ways_3755252 #include <bits/stdc++.h> using namespace std; //Time complexity is exponential for this recursive solution int solveRec(vector<int>& num, int tar) { //base case if(tar == 0) return 1; if(tar < 0) return 0; int ...
ALGO
0.999988
5.507073
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2023-06-20T19:09:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b0b989f6b...
6dad83c0-1ae6-4640-8240-1a987f6d0e1b
seheonnn/Algorithm
codetree/Greedy/m 2개의 쌍.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n; vector<pair<int, int>> arr; int main() { cin >> n; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; arr.push_back({y, x}); } sort(arr.begin(), arr.end()); int left = 0, right = a...
ALGO
0.999973
4.315175
{ "github_metadata": { "branch": "main", "commit_count": 621, "repo_created_at": "2023-04-17T13:59:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8108dba046...
4a5bcde0-806a-41bc-beee-fb69ceca4241
aki-ph-chem/try_neetcode
neet_code_150_cpp/intervals/meeting_rooms_2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_map> // def of Interval class Interval { public: int start,end; Interval(int start, int end) { this->start = start; this->end = end; } }; class Solution { public: int minMeet...
ALGO
0.999976
6.030341
{ "github_metadata": { "branch": "main", "commit_count": 856, "repo_created_at": "2023-07-24T10:32: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": "2a9ef5bdaf...
8ed964be-ce39-4f23-b66d-0be75f6bb3be
denis-gubar/Leetcode
Hash Table/0311. Sparse Matrix Multiplication.cpp
class Solution { public: struct Data { int x; int y; int value; }; vector<vector<int>> multiply(vector<vector<int>>& mat1, vector<vector<int>>& mat2) { int M = mat1.size(), K = mat2.size(), N = mat2[0].size(); vector<Data> A, B; for (int i = 0; i < M; ++i)...
ALGO
0.999963
6.122075
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2019-10-28T13:05:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e25e8989...
1c96e8ad-7a38-4734-a6d4-df6fafe23ce6
tanpero/radon
src/bigint.cc
#include <bigint.h> Bigint::Bigint() noexcept { sign = 1; } Bigint::Bigint(long long v) { sign = 1; *this = v; } Bigint::Bigint(std::string & s) { sign = 1; fromString(s); } Bigint::Bigint(std::string & s, int base) { sign = 1; fromString(s, base); } void Bigint::operator=(const Bigint &v) { sign = v.si...
ALGO
0.997135
4.451831
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-11-23T02:52:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b889dd0dd...
b6f6b738-5832-42bd-b833-1096081c2bb5
l3vi-7/codeforcesLadder
4 - Codeforces Div. 2, A/66-70/childAndHomework.cpp
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define ll long long int #define REP(i, a, b) for(int i = a; i < b; i++) int main() { IOS; string a,b,c,d; cin >> a >> b >> c >> d; int lenB = b.length() - 2, lenC = c.length()...
ALGO
0.999972
3.032859
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-05-05T09:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ea46d6d11...
e1ac8442-5ad2-4f95-a458-3c3506a0b9f6
diffblue/2ls
src/ssa/array_index_analysis.h
/*******************************************************************\ Module: Analysis of expressions used as array indices Author: <NAME>, <EMAIL> \*******************************************************************/ /// \file /// Analysis of expressions used as array indices. /// L-expressions are captured per-lo...
ALGO
0.960491
7.617305
{ "github_metadata": { "branch": "master", "commit_count": 1547, "repo_created_at": "2016-04-19T16:51:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 48, "forks": 26, "issues": 55, "pull_requests": 4 }, "file_meta": { "content_id": "8069e...
863d12a4-9c60-48b4-a158-e63c5e3297fb
holahula/competitive-programming-solutions
codeforces/04.03.18/message.cpp
#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <unordered_map> using namespace std; #define NMAX 1000005 long long cost[NMAX] = {0}; string w[NMAX]; long long n, k, m, c, x, a, z; long long mc; string word; long long sum = 0; long long minC[NMAX]; unordered_map<string, int> map...
ALGO
0.999841
3.940331
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2018-03-17T00:48: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": "8bfa675cf...
102cf2c3-082d-47b4-bc1e-6130ec565e99
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Covicale
racional-MOD/src/racional_main.cc
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @author <NAME> * @date 06 jan 2020 * */ #include "racional.h" #include "tools.h" #include <fstream> int main(int argc, char** argv){ std::vector<Racional> all_rationals{...
TOOL
0.97883
4.491853
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-12-19T19:53:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a1400180e...
d5859e00-56cd-4517-a13e-0dfa49259d05
Bikubisw/Coding
DATA STRUCTURES AND ALGORITHMS/Linked_list/palindrome_of_linked_list.cpp
//Check if a linked list is a palindrome #include <iostream> class node{ public: int data; node * next; node(int data){ this->data=data; this->next=NULL; } }; using namespace std; node* takeinput(){ int data; cin>>data; node* head=NULL,*tail=NULL; while(data!=-1){ ...
ALGO
0.999933
4.698845
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-17T05:15:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebcd3f3997...
93fe41f0-1ea0-487c-830c-3cc2d0e8ac53
ihristova11/cpp-fundamentals
00.Basics/Exam/03.cpp
#include <iostream> #include <math.h> #include <iomanip> using namespace std; int main() { int ticketsNumber; char type[30], ticket[30]; char hasPhoto; cin.getline(type, sizeof(type)); cin.getline(ticket, sizeof(ticket)); cin >> ticketsNumber; cin >> hasPhoto; double sum = 0; if (type[0] == 'Q') { if (...
ALGO
0.956942
3.886759
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2019-07-07T12:05: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": "e9dd9c50c...
6136f7b8-b869-4792-9849-55a6a5b165b5
shelengovskaya/hse_cpp_tasks
contests/contest 4/D.cpp
#include <algorithm> #include <queue> #include <iostream> using namespace std; int main() { queue<int> first; queue<int> second; int x; int k = 0; for (size_t i = 0; i < 5; i++) { cin >> x; first.push(x); } for (size_t i = 0; i < 5; i++) { cin >> x; second...
ALGO
0.999901
3.464045
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-02-16T14:13: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": "a6c994a2c...
c21fcd88-b497-47fe-bdda-0cd85339df23
allenanswerzq/byteme
old/codeforces/random/test/a/a.cc
#include <bits/stdc++.h> using namespace std; #define x first #define y second #ifndef LOCAL #define trace(...) #endif typedef long long ll; struct dsu { int n; vector<int> e; dsu(int _n) : n(_n), e(n, -1) { } int size(int x) { return -e[find(x)]; } int find(int x) { return e[x] < 0 ? x : e[x]...
ALGO
0.999745
4.096825
{ "github_metadata": { "branch": "master", "commit_count": 810, "repo_created_at": "2017-06-16T09:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "341fe6d8...
bc64bf08-dbf6-4cc7-b7ca-9b09b8b66f5a
plqt/atCPC
C++/過去問/081B.cpp
#include <bits/stdc++.h> using namespace std; #define rep0(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define ll long long #define coYes cout << "Yes" << endl #define coYES cout << "YES" << endl #define coyes cout << "yes" << endl #define coNo cout << "No" << endl #define coNO cout ...
ALGO
0.999976
3.7226
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-07-12T13:52:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "90d6a7bd4...
b3287262-bed9-4934-a929-9ba8fbea73d5
Chenghao-Wu/SMolSAT
source/SMolSAT/mean_distance.h
/*Soft-Matter Molecular Simulation Analysis Toolkit (SMolSAT)*/ /*Written by <NAME>, modified from AMDAT written by <NAME>*/ #ifndef MEANDISTANCE #define MEANDISTANCE #include "system.h" #include <sstream> #include "analysis_onetime.h" #include "trajectories.h" using namespace std; class Mean_Distance: public Analy...
ALGO
0.997906
4.711027
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-08-08T13:18:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e349ecf6448...
999903cb-c08d-4127-ae60-68ce08888e93
yzz951029/leetcodePractice
5.cpp
#include<iostream> #include<string> using namespace std; class Solution { public: string longestPalindrome(string s) { int size = s.size(); int maxlen = 1; int index = 0; bool flag = 0; for (int i = 0; i < size; i++) { int start = 0; int len = singleCentreExpand(s, i,start); if (len>maxlen) { ...
ALGO
0.999863
4.742355
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-07-05T08:54: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": "ef6c58150...
f081074d-42cd-438d-9e45-1af82a2ea0ad
raul19ra/Estructura-de-Datos
Problema 3A/main.cpp
#include <iostream> #include <fstream> #include <algorithm> #include <unordered_map> #include <vector>; using namespace std; // COMENTARIO SOBRE LA SOLUCIÓN Y SU COSTE JUSTIFICADO //El problema se resuelve con un diccionario sin orden (unordered_map), pues no nos interesa/sirve para na...
ALGO
0.999954
4.170998
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-01-30T17:42: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": "f7d969dd358d...
dd1d43ed-2e84-42e9-80c7-ff1c7848a715
georgeadrila/Cpp-Advanced
vote.c++
#include <iostream> #include <string> using namespace std; const int MAX_CANDIDATES = 10; struct Candidate { string name; int votes; }; Candidate candidates[MAX_CANDIDATES]; int numCandidates = 0; void addCandidate(string name) { if (numCandidates < MAX_CANDIDATES) { candidates[numCandidate...
ALGO
0.990369
6.500048
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-07T15:36:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6195f7604e4a...
008f1116-7212-4d43-9eba-687f0986e4f3
lmorgan42/CS221CC
HW10 TSP part 2/tsp.cpp
// Traveling Salesman.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include "cities.h" #include "deme.h" #include "chromosome.h" #include <iostream> #include <fstream> #include <numeric> bool is_improved(const Cities& cities, const Cities::permutation_t& o...
ALGO
0.999775
5.249347
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2019-03-07T01:19: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": "2b1aa5002...
84775ef6-1bb3-40ad-b2ff-14f79a963c04
JerrySiRi/NJUAI_Learning_partial
C++/OJ的题目集/第三次上机测验-题目好/违规运动员.cpp
#include <iostream> using namespace std; /* 题目描述: 学校举办迷你马拉松,为了保证运动公平,每位选手佩戴的手环中有一个RFID标签 在经过传感器时,计算机会将记录传感器id、选手的号码及经过传感器的时间(时间采用24小时格式:HH MM SS) 本次运动一共有3个传感器,分别在在出发点、中间点和终点,对应的传感器id分别为0,1,2。 分析传感器的数据,输出有多少运动员违规。 违规的判断:(1)如果某个运动员完成某个半程的时间少于半小时,则判他可能利用了某种交通工具违规; (2)缺少中间点或终点的传感器数据。 输入说明:首先输入运动员的人数,接着输入若干行传感器数据,每行传感器数据:...
ALGO
0.99774
3.503055
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2023-11-09T12:36:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b4a96ce23...
5ea2f779-4e0b-4bd6-b3ae-f667bd40aff3
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/611347127/spherical_state.hxx
#pragma once #include <cstdio> #include <cmath> #include <algorithm> #include "energy_level.hxx" #include "display_units.h" #include "radial_grid.hxx" typedef struct energy_level_t<TRU_ONLY> spherical_state_t; int constexpr core=0, semicore=1, valence=2, csv_undefined=3; inline char const * csv_name(int co...
TOOL
0.972201
5.547868
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b89f1d79f1...
7e8fbbb8-377e-4e85-aa53-105e3490cf77
amirwebset/cobaaa
percobaan.cpp
#include <iostream> #include <limits> // Untuk numeric_limits using namespace std; // Fungsi untuk mencetak papan Sudoku void printBoard(int board[9][9]) { for (int row = 0; row < 9; ++row) { for (int col = 0; col < 9; ++col) { if (col % 3 == 0 && col != 0) cout << " | "; ...
ALGO
0.999065
6.497091
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-29T08:45: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": "330eb96ec2ab...
d26146b8-ecf6-4415-b881-06889f47c87e
hite5/Binary-Tree-Post-Order-Traversal
Post-Order-Binary-Tree-Traversal/Post-Order-Binary-Tree-Traversal/Source.cpp
#include <iostream> #include <vector> using namespace std; typedef struct TreeNode { int label; TreeNode* left, * right; TreeNode(int i) : label(i), left(nullptr), right(nullptr) {}; } TreeNode; // Build the tree out based off the two vectors. This may not be the most efficient approach. There is most li...
ALGO
0.999999
5.903467
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-03-27T15:08: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": "d97672d79e77...
de40e7d0-83bb-43e1-b283-241499432ecd
arangodb/arangodb
3rdParty/boost/1.78.0/libs/geometry/doc/src/examples/algorithms/for_each_segment_const.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example // Copyright (c) 2011-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_...
ALGO
0.981697
6.762
{ "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": ...
5b843b66-140f-4129-a799-8391155e1402
ikr/algo-practice
atcoder/2021/AtCoder_Condominium/solution.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; using vll = vector<ll>; using vvll = vector<vll>; template <typename T> constexpr int inof(const T x) { return static_cast<int>(x); } template <typename T> constexpr ll l...
ALGO
0.99988
3.519635
{ "github_metadata": { "branch": "master", "commit_count": 5422, "repo_created_at": "2016-06-23T07:28:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3b74b0...
88a671ce-eb60-461c-becc-8743def8c47c
walkccc/LeetCode
solutions/1552. Magnetic Force Between Two Balls/1552.cpp
class Solution { public: int maxDistance(vector<int>& position, int m) { ranges::sort(position); int l = 1; int r = position.back() - position.front(); while (l < r) { const int mid = r - (r - l) / 2; if (numBalls(position, mid) >= m) // There're too many balls. l = mid; ...
ALGO
0.999909
5.723979
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2019-02-23T15:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1254, "forks": 437, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebf2fe0...
e016178e-52df-489f-9f45-acc1aa230311
afrl-rq/OpenUxAS-SoI
src/DPSS/SegmentMap.cpp
// =============================================================================== // Authors: AFRL/RQQA // Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division // // Copyright (c) 2017 Government of the United State of America, as represented by // the Secretary of th...
ALGO
0.984608
4.977646
{ "github_metadata": { "branch": "develop", "commit_count": 713, "repo_created_at": "2017-05-07T15:04:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 78, "forks": 39, "issues": 13, "pull_requests": 2 }, "file_meta": { "content_id": "f1c07...
0657f06f-387e-406b-8cef-caccaca211b6
hitu1304/100DaysCodingChallenge
Day-46/Divisible-by-7.cpp
//Think of divisibility rule of 7 int isdivisible7(string num){ int n = num.length(), gSum = 0; if (n % 3 == 1) { num += "00"; n += 2; } else if (n % 3 == 2) { num += "0"; n++; } int i, GSum = 0, p...
ALGO
0.988521
3.792956
{ "github_metadata": { "branch": "main", "commit_count": 404, "repo_created_at": "2021-04-01T13:27:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56541cc248...
7b96f419-aacf-48df-8290-bae7dbbbf15e
equadras/CompetitiveProgramming
codeforces/round895/d.cpp
#include <bits/stdc++.h> using namespace std; #define int long long void solve(){ int n, x, y; cin >> n >> x >> y; int mmc = lcm(x, y); int pos = n / x - n / mmc; int neg = n / y - n / mmc; int npos = ((n - (n - pos+1) + 1) * ((n-pos+1) + n)) / 2; int nneg = ((neg - 1 + 1) * (1 + neg)) / 2;...
ALGO
0.999914
4.56948
{ "github_metadata": { "branch": "master", "commit_count": 413, "repo_created_at": "2023-09-05T15:37:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "743f368e...
d6809adc-54c4-4f56-8524-82164845b2f7
kasabuta/AtCoder
Question/198_old/SubmitFile198E.cpp
#include <string> #include <vector> #define SIZEOF(a) (sizeof(a)/sizeof(a[0])) #define repeat(itr, count) for(auto itr = 0; itr < count; itr++ ) std::vector<std::string> split(std::string str, const char* del); template <typename ... Args> std::string format(const char* fmt, Args ... args) { size_t len = std::sn...
ALGO
0.999803
4.811089
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-01-06T15:06: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": "b2d672a6c726...
c1971ed9-aaa0-4970-838b-0d78f5e12435
JDrilling/CS53-IntroToC-
hw6/vectormath.h
//<NAME> //vectormath.h //This is the header file for vectors.cpp #ifndef VECTORMATH_H #define VECTORMATH_H #include <iostream> #include <cmath> using namespace std; //Struct for a 3D vector. struct vector3D{ double xcoord; double ycoord; double zcoord; }; //Dec: Ouputs menu. //Pre: none //Post: ouputs the me...
ALGO
0.990821
4.077794
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-10-25T03:42: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": "fb5414eed1...
3b748dbc-4e08-488e-8fb1-84b69b1eee94
humazed/UriOnlineJudge-1
1263/1263.cpp
#include <iostream> #include <cstdio> using namespace std; int main(){ int c; unsigned int i; bool begin, match; int previous_letter, current_letter; string lower = "abcdefghijklmnopqrstuvwxyz"; string upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string line; while (getline(cin, line)){ ...
ALGO
0.999765
3.3695
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-06-24T11:49:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88cfe9e2d5...
52745516-0e3b-4e53-b4e7-86bf12fbce88
fhuaquisto21/EDII
Laboratorio/Huffman/main.cpp
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <stack> #include <vector> class Code { public: char character; int count; Code(char ch, int cn): character(ch), count(cn) {} Code() {} bool operator <(Code cd2) { if (this->count < cd2.count) { re...
ALGO
0.999821
3.798532
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-11-03T03:15: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": "63414187b8a9...
ce4d0d03-94b2-4720-9374-4887c64cd0cb
sihyun98/2020Algorithm
백준/Easy/16165_걸그룹 마스터 준석이.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { // initialize variables int n, m, num, quiz; string group, name; vector<vector<string> > girl; vector<string> ans; // input cin >> n; cin >> m; girl.assign(n, vector<string>()); for (int i = 0; i ...
ALGO
0.999921
3.694554
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-01-15T15:48: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": "4e3d0b76a...
b0977cae-1176-4e30-b7ed-647410d05e6b
SchoIar/HackerRank
30 Days Of Code/day26/main.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int dateReturned, monthReturned, yearReturned, dueDate, dueMonth, dueYear, fine = 0; //Dates returned: ...
ALGO
0.998842
4.138629
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-12-01T23:44: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": "c48c7993ea9...
b91ba6b2-dae7-4234-8b15-502d3d3dff87
HeyAvijitRoy/Data-Structure
Fibonacci Seriese Array, Random Number, Quick Sort and Breaking the array process/fibonacci seriese, random function, quick sort.cpp
// // main.cpp // Group Assignment - 1 // // Created by <NAME> on 9/2/19. // Copyright © 2019 <NAME>. All rights reserved. // // #include<iostream> #include<cstdlib> #include<ctime> #include <fstream> #include <iomanip> using namespace std; ofstream outFile("output.txt"); // Function for Fibonacci series int fib...
ALGO
0.999736
5.065728
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-10-22T06:01: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": "0994c9086...
7625408c-3138-480b-819e-13696910ec6b
hanminghui/MHAlgorithms
offer/06_print_list_reverse.cc
/******************************************************************* Copyright(c) 2016, <NAME> All rights reserved. Distributed under the BSD license. (See accompanying file LICENSE.txt at https://github.com/zhedahht/CodingInterviewChinese2/blob/master/LICENSE.txt) ******************************************************...
ALGO
0.998014
5.15081
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-04-20T02:07:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9aef687d...
0d59c4ca-d9b1-4214-9c4e-f5b22c8d98a6
SatvikSingh/DSA-practice-problems
sort-an-array/sort-an-array.cpp
class Solution { public: void merge(vector<int>& nums, int start, int end, int mid) { int i = start, j = mid+1, k = 0; vector<int> temp(end-start+1); while (i <= mid and j <= end) { if (nums[i] <= nums[j]) { temp[k] = nums[i]; k++; ...
ALGO
0.999998
6.092456
{ "github_metadata": { "branch": "main", "commit_count": 1029, "repo_created_at": "2021-07-07T11:25:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "658b0d2af...
eb5b26ff-5131-4ae1-be4c-1efc8e1afe9c
lucper/stringology
sorting/test_counting_sort.cpp
#include <iostream> #include <string> void bad_counting_sort(int a[], int n, int R) { int occ[R+1] = {0}; int occ_pred[R+1] = {0}; int aux[n] = {0}; for (int i = 0; i < n; ++i) occ[a[i]]++; for (int val = 1; val <= R; ++val) occ_pred[val] = occ_pred[val-1] + occ[val-1]; for (...
ALGO
0.999866
5.302751
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2023-08-18T17:31: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": "19396602d...
80ddddf2-1b9d-4def-be5d-445a9d629161
trinhminhtriet/leetcode
solutions/3300-3399/3367.maximize-sum-of-weights-after-edge-removals/Solution.cpp
class Solution { public: long long maximizeSumOfWeights(vector<vector<int>>& edges, int k) { int n = edges.size() + 1; vector<vector<pair<int, int>>> g(n); for (auto& e : edges) { int u = e[0], v = e[1], w = e[2]; g[u].emplace_back(v, w); g[v].emplace_back...
ALGO
0.999963
5.607486
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-12-09T17:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d4e6d...
232cec10-2d90-4642-9103-188337584389
kamyu104/LeetCode-Solutions
C++/find-the-closest-palindrome.cpp
// Time: O(l) // Space: O(l) class Solution { public: string nearestPalindromic(string n) { const auto l = n.size(); unordered_set<long long> candidates; candidates.emplace(static_cast<long long>(pow(10, l)) + 1); candidates.emplace(static_cast<long long>(pow(10, l - 1)) - 1); ...
ALGO
0.999936
6.395824
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
6c5a1a77-281e-4fd9-8689-efcfbace8972
s-dylan-kim/advent_of_code
src/2023/d22.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <chrono> #include <algorithm> using namespace std; bool sortbyz(const tuple<int, int, int, int, int, int>& a, const tuple<int, int, i...
ALGO
0.998467
3.730268
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-01-06T19:58:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6be6df294a...
8a74e533-3524-4a49-83a2-018121f98931
copyrightpoiiiii/cf-record
练习/JLOI130.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define maxn (1000000+5) #define mod 1000000007 int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=10*x+ch-'0';ch=getchar();} return x*f; } ll readll(){ ll x=0,f=1...
ALGO
0.999945
4.262286
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-06-23T08:50: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": "6ed574cf7...
1d0c0f95-7ea2-43ed-a076-d066aa3afdd9
saxenaakshit/DSA
dsa_course/binary_search-I/binary search in 2d(level-II)/simple_bs.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; void inp(int arr[][3],int n){ for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>arr[i][j]; } } } bool binary_search1(int arr[][3],int n ,int row,int key) { int start=0; int end=n-1; int mid=start+((end-start)/2); while(start<=...
ALGO
0.999917
4.257741
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2022-06-03T19:40: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": "b44fff79a...
7f8a895e-95ca-4298-a424-3045e4695928
cmuparlay/parlaylib
examples/nbody_fmm.h
#include <cmath> #include <algorithm> #include <array> #include <string> #include <utility> #include <vector> #include <complex> #include <parlay/alloc.h> #include <parlay/parallel.h> #include <parlay/primitives.h> #include <parlay/sequence.h> #include "helper/spherical.h" using parlay::sequence; // ***************...
ALGO
0.999961
5.816077
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2019-12-10T19:52:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 369, "forks": 71, "issues": 17, "pull_requests": 3 }, "file_meta": { "content_id": "351fd...
2831aec6-0390-4a73-b3e9-9fa0f1f246bf
hyeokbini/programmers-baekjoon
프로그래머스/2/1829. 카카오프렌즈 컬러링북/카카오프렌즈 컬러링북.cpp
#include <vector> #include <map> #include <queue> #include <cmath> using namespace std; vector<int> solution(int m, int n, vector<vector<int>> picture) { int number_of_area = 0; int max_size_of_one_area = 0; bool vis[m][n]; for(int i = 0; i < m; i++) { for(int j = 0; j < n; j++) { ...
ALGO
0.999895
5.513943
{ "github_metadata": { "branch": "main", "commit_count": 354, "repo_created_at": "2024-04-02T11:26: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": "f5cff1d8ab...
a0727242-0341-4cf4-8fff-2369f3f65de6
mnsalim/Cracking_Coding_Interview
LiveTests/LiveTest_Module_10_Greedy.cpp
#include <bits/stdc++.h> using namespace std; // Structure for an BoxType which stores // noOfBox & corresponding noOfUnitPerBox of BoxType struct BoxType { int noOfBox, noOfUnitPerBox; // Constructor BoxType(int noOfBox, int noOfUnitPerBox) : noOfBox(noOfBox), noOfUnitPerBox(noOfUnitPerBox) { } }; // Compar...
ALGO
0.999454
4.614637
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-07-31T16:44: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": "39f1d5f9957...
66a34e95-50d5-4f32-8d4b-a59a722aafbe
MahakPatel/LeetCode
0034-find-first-and-last-position-of-element-in-sorted-array/0034-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { // // using binary search // vector<int> temp; // int first = firstOccurance(nums, nums.size(), target); // if (first == -1) { // temp.push_back(-1); // temp.push_back(-1); ...
ALGO
0.999958
6.509948
{ "github_metadata": { "branch": "main", "commit_count": 2941, "repo_created_at": "2024-05-29T21:50:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcbd3459c...
ee2a486f-3107-4625-81e6-88bb65c0791f
Lhongpei/ipps-drl
utils/IPPS_ENV_CPP_v2/main.cpp
#include "env.h" #include "io.h" #include "state.h" #include "constant.h" #include "greedy.h" #include <filesystem> #include <fstream> #include <string> #include <chrono> namespace fs = std::filesystem; int main() { std::string folder_path = "kim"; std::string prob_folder = std::string(PROJECT_ROOT_DIR) + fold...
ALGO
0.999653
4.376709
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-08-16T10:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2417c08c5e...
9ad226e9-392f-40f7-86f9-08cd61cfbf47
tuaha-at7/Tik-Tak-Toe
Tic Tac Toe.cpp
#include<iostream> #include<conio.h> #include<windows.h> #include<string.h> #include<stdlib.h> #include<iomanip> using namespace std; char board[9]={'-','-','-','-','-','-','-','-','-'}; char current_player='X'; string player_1,player_2; bool gameplay=true; bool winner =true; void is_board() { system("Color A"); cout...
ALGO
0.987406
3.212414
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-28T16:36:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26689395fd82...
972428df-cb36-48a4-b52b-448d5de1160e
pandey-satyam/Power-Efficient-Intensity-Control-Light-Monitoring-System
FinalCode_Logic_Arduino.ino
//Code by <NAME>, <NAME>, Vamshi, Harsha #define triac_gate 8 #define pot A0 #define iot A1 int ldr=0; int app=0; bool ZC = 0; uint16_t alpha; int value=0; void setup(void) { pinMode(triac_gate, OUTPUT); digitalWrite(triac_gate, LOW); attachInterrupt(0, ZC_detect, CHANGE); // Enable exter...
TOOL
0.95912
5.387495
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-19T22:40: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": "11780b039265...
69b7c4c8-1d8e-4a19-b8cb-b236b71ee1fe
onebelowall1218/flamapp.ai-assignment-2
q1_queens.cpp
#include<bits/stdc++.h> using namespace std; class Solution{ private: void backtrack(int row, int n, vector<string> &board, vector<bool> &cols, vector<bool> &diag1, vector<bool> &diag2, vector<vector<string>> &result){ if(row==n){ result.push_back(board); return; } ...
ALGO
0.999955
5.588151
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-06-02T07:45:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a71ae536174...
cd78faad-6039-44f7-b81c-b45e1c85480b
nachodz/tpdatos2do2012
TpDatos/src/Booleano/Booleano.h
#ifndef BOOLEANO_H_ #define BOOLEANO_H_ #include <iostream> #include <fstream> #include <string> #include <sys/time.h> #include <algorithm> #include <list> #include "../Comun/mapaBits.h" #include "../Normalizador/Normalizador.h" #include "../Constantes.h" #include "../ArbolBMas/ArbolBMas.h" #include "../ArbolBMas/El...
TOOL
0.97067
3.730899
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2015-03-13T02:34:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70d445e2...
612ccef4-602c-40ea-b50c-5668f27c9176
iiunlris/LeetCode
029.cpp
class Solution { public: int divide(int dividend, int divisor) { assert(divisor); if(0 == dividend) return 0; int flag = 0; if(dividend > 0 && divisor < 0) flag = 1; if(dividend < 0 && divisor > 0) flag = 1; long long ret = 0; ...
ALGO
0.999736
5.845217
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-02-23T10:09: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": "ea1a2939ad...
bbf0c1a0-6325-41ab-a731-314406a4059f
ishandutta2007/codeforces-t
tfg/normal/899/F.cpp
#include <iostream> #include <string> #include <set> #include <cstdio> const int ms = 200200; std::set<int> pos[256]; int fw[ms]; void upd(int x) { for(; x < ms; x += x & -x) { fw[x]++; } } int qry(int x) { int ans = 0; for(; x > 0; x -= x & -x) { ans += fw[x]; } return ans; } int get_pos(int x) { int ...
ALGO
0.999982
3.750425
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "3951c1c5d15b...
b6051ba5-4173-4310-be31-7d4618bf13da
tiandiyijian/myLeetcode
23.cpp
#include <iostream> #include <vector> using namespace std; /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; ...
ALGO
0.999882
5.991597
{ "github_metadata": { "branch": "master", "commit_count": 883, "repo_created_at": "2020-04-27T07:28: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": "c8e02987...
571d9184-87af-4d9b-87f9-426e049d6907
iYiYaHa/coding-practices
lc-archived/cpp/82.remove-duplicates-from-sorted-list-ii.cpp
/* * @lc app=leetcode id=82 lang=cpp * * [82] Remove Duplicates from Sorted List II */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class SolutionA { // Original answer public: ListNode *deleteDupli...
ALGO
0.999968
5.9189
{ "github_metadata": { "branch": "master", "commit_count": 577, "repo_created_at": "2018-09-23T16:28:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c60d22c...
bad71dac-ef52-498e-bc4e-00351a5b34dc
sueshinkr/42seoul
cpp/cpp02/ex03/main.cpp
#include "Point.hpp" void print_triangle(Point const a, Point const b, Point const c, Point const point) { for (int y = 50; y >= 0; y--) { for (int x = 0; x <= 50; x++) { if ((x == roundf(a.getx()) && y == roundf(a.gety())) || (x == roundf(b.getx()) && y == roundf(b.gety())) || (x == roundf(c.getx()) ...
ALGO
0.989921
4.785195
{ "github_metadata": { "branch": "main", "commit_count": 343, "repo_created_at": "2022-03-09T15:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6d09242a0...
efbb36c6-463a-42bc-9ed5-816c23372e7d
axelparmentier/ElectricalVSP-ColumnGeneration
latticeRCSP/latticeRCSP/Resources/DistributionTools/TruncatedLognormalDistribution.cpp
// // TruncatedLognormalDistribution.cpp // latticeRCSP_v2 // // Created by <NAME> on 15/12/2015. // Copyright © 2015 <NAME>. All rights reserved. // #include "TruncatedLognormalDistribution.h" #include <cmath> double TruncatedLognormalDistribution::sqrt2 = sqrt(2); double TruncatedLognormalDistribution::defaultM...
ALGO
0.995062
5.748605
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-01-16T15:52:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28113a1ab23e...
d2b19946-93f9-40f8-b70b-9b6f790f5b36
anurag-shekhar/Competitive-Programming
BinarySearch/LongestTreePath/211.cpp
/* **************************************************************** * Author : <NAME> * Email : <EMAIL> * * Github : https://github.com/anurag-shekhar * LinkedIn : https://www.linkedin.com/in/anurag-shekhar/ * * File Name : 211.cpp * Created on : Fri Jun 04 2021 ***********************************************...
ALGO
0.999935
4.510787
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2021-05-07T22:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "264928e4...
7b988159-3974-482f-88f2-d46e7d0841ef
codesahib/ds-algo
Lab Assignments 2nd Year/linkedListInsert.cpp
#include<iostream> #include<stdio.h> using namespace std; struct node* Start=NULL; int count=0; //Function declarations struct node* createNode(); void insertNode(); void deleteNode(); void showNodes(); //Declaring Node struct node { int info; node* link; }; //Creating Node struct node* createNode() { struct...
ALGO
0.999905
4.124133
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-02-07T18:22: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": "c911e37ec...
aaaefde6-907f-4224-876c-b347d0938986
Seulwoo/SSU_LikeSeal-Study-Group04
Algo/2020-10/1007/seulwoo_2.cpp
#include <iostream> #include <map> #include <queue> #include <string> using namespace std; int main(void) { long long s, t; scanf("%lld %lld", &s, &t); if (s == t) { cout << 0; return 0; } map<long long, string> visit; queue<long long> bfs_queue; if (s*s<=t && visit.count(s*s) == 0) { bfs_que...
ALGO
0.999951
3.826604
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2020-08-29T05:49:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba79f8df...
dd072d9a-8017-4751-b4d4-947cdfe2d459
lingxiaoli94/interactive-hex-meshing
hex/src/optim/HexComplexDeformer.h
#pragma once #include "common.h" #include <geomlib/TriangularMeshSampler.h> #include <geomlib/generalized_projection_info.h> #include <torch/torch.h> #include "models/HexComplex.h" #include "models/TriangularMesh.h" #include "optim/DistortionEnergy.h" namespace hex { class HexComplexDeformer { public: enum class...
ALGO
0.983383
6.316386
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-09-07T15:39:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 180, "forks": 22, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "4c2d01fd...
560e5886-fbe2-407a-b94f-524df5f54cee
MicahSpikah/advent-of-code-2022
8b.cpp
#include "parse_input.h" advent_t advent( std::vector< std::string > const& input ) { std::vector< std::vector< int > > heights; for( auto const& l : input ) { heights.push_back( {} ); for( auto const& c : l ) { heights.back().push_back( c - '0' ); } } ...
ALGO
0.999601
5.450469
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-12-09T07:44: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": "1860afe93a8...
623c7332-c058-4dd8-810c-088a5079eaeb
Garrus5009/Spring23
matrix.cpp
/****************************************************************************** * FILE: matrix.cpp * DESCRIPTION: * A Pthreads program which demonstrates one safe way * to read input from a text file and output to a new file. * AUTHOR: <NAME> * LAST REVISED: 03/31/23 ************************************************...
ALGO
0.998706
4.951884
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-04-07T19:28: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": "65706df5fa0e...
48c866d6-c72d-4da9-9ca4-be55cd1fd6e0
duylonggg/Toan-roi-rac-2-CodePTIT
TRR3004.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() ios::sync_with_stdio(false); cin.tie(nullptr); #define endl '\n' short n, s; set<short> adj[101]; bitset<101> vis; inline void DFS(short u) { vis[u] = true; for (short v : adj[u]) if (!vis[v]) DFS(v); } inline void...
ALGO
0.999811
4.174393
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-01T16:45: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": "e82797fbb623...
86c0b680-6d92-42e4-aae6-613b7196c887
mdarikrayhan/Competitive-Programming
codeforces/627/B.cpp
#include<bits/stdc++.h> #define int long long using namespace std; const int N = 2e5 + 10 ; int l[N] , r[N] , cl[N] , cr[N] , n , a , b , k , q , tree[N]; signed main() { //freopen(".in","r",stdin); //freopen(".out","w",stdout); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> k >> b >> a >> q ; ...
ALGO
0.997975
3.659575
{ "github_metadata": { "branch": "master", "commit_count": 8052, "repo_created_at": "2022-05-15T11:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40e159...
ed339804-4d2d-4250-8a6c-21de5a5c0fd9
punipuni21/competitive-programming
AtCoder/ABC/ABC051-100/ABC051/D.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cctype> #include<utility> #include<string> #include<cmath> #include<cstring> #include<queue> #include<map> #include<set> using namespace std; #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for...
ALGO
0.999619
3.804276
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2019-04-01T11:29: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": "77346547...
db64105e-2e1f-4350-8e5d-57ff2b39088c
ed28311/DITCamera
str/config_loader.cpp
#include "config_loader.hpp" DITCameraTool::ConfigLoader::ConfigLoader() { json config; }; DITCameraTool::Config DITCameraTool::ConfigLoader::GetJsonConfig(std::string file_path, std::string config_argument, std::vector<std::string> global_config_member) { return DITCameraTool::Config(); }; DITCameraTool::Co...
TOOL
0.910674
5.811952
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2022-05-13T10:59:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1eb76379447...
8276818b-b0c3-4071-963a-83e960f787c5
vikashmishra464/competitiveCoding
leetCode/minimumTimeDifference.cpp
// Question Link: https://leetcode.com/problems/minimum-time-difference/description/?envType=daily-question&envId=2024-09-16 // Question: // 539. Minimum Time Difference // Solved // Medium // Topics // Companies // Given a list of 24-hour clock time points in "HH:MM" format, return the minimum minutes difference betwe...
ALGO
0.999716
6.24304
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2024-09-03T21:28:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a79e5649e1...
1c9d1bd6-6aab-4400-9f2d-9cee29f841b3
MuhammadJoyHussain/Linear-Linked-List
bubbleSort.cpp
#include<bits/stdc++.h> using namespace std; void PrintArray(int array[], int size) { for (int i = 0; i < size; i++) cout << array[i] << " "; cout << endl; } int main() { int size; cin >> size; int array[size]; for (int i=0; i<size; i++) { cin >> array[i]; } cout <...
ALGO
0.999906
4.508109
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-08-22T08:51: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": "06b8bd684c...
27b62743-90b7-4855-b743-f821e177be9d
hameem008/Competitive_Programming
Codeforces_and_others/CleaningthePhone.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define gap ' ' typedef long long ll; typedef long double lld; const ll infinite = INT32_MAX; bool pff(ll mid, ll cnt_1, ll cnt_2, vector<ll> &point1, vector<ll> &point2, ll m) { ll num = mid; ll max_m = 0; for (int i = 0; i <= cnt_2; i++) ...
ALGO
0.99999
4.294569
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-02T07:22: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": "2ab5a74b8bf7...
05f72288-665f-4dd9-91bc-b1200d2b80fe
Michuk02/Algorytmy-i-Struktury-Danych
P04 Michał Kruczek/projekt 3/projekt3.cpp
#include <iostream> using namespace std; class Stos//struktura danych jako obiekt { private: int wierzcholek; int tab[6]; public: Stos()//konstuktor-tworzy tablice na stosu { wierzcholek=-1;//wierzcho³ek stosu for (int i=0;i<6;i++) { tab[i]=0; } } ...
ALGO
0.919359
4.259387
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-11-11T10:25: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": "e6a7fe33e95...
6c17019d-384e-471a-ad05-293ac818d31d
frankylin1111/1081ML
MyCpe/uva10101.cpp
/* 2019/9/14 UVA 10101 一顆星 --Bangla Numbers 1. Presentation error -- 必須使用第47行的%4d固定輸出格式 46行的cout 會有格式上的問題. 2. 參考網路上的解答 -- 自定 function compute(unsigned long long n); 3. -- 加油!! */ #include <iostream> #include <cstdlib> using namespace std; void compute(unsigned long long n) { unsigned long long ...
ALGO
0.999456
3.153711
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2019-09-15T03:08: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": "ff3a3a6c3...
4458b2fc-a8de-4abe-a32b-04c62aa202e0
ishandutta2007/codeforces-c
clovers/normal/1452/G.cpp
/* the vast starry sky, bright for those who chase the light. */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define mk make_pair const int inf=(int)1e9; const ll INF=(ll)5e18; const int MOD=998244353; int _abs(int x){return x<0 ? -x : x;} int add(int x,int y){x+=y; ret...
ALGO
0.999932
3.983205
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a87ac7fc9328...
6bfe189d-1081-48c5-ba31-dc3c72797cf4
JovinLim/PerlinNoiseSurfaceGenerator
Source/Cavern/Private/Utils/Noise.cpp
#include "CavernGenerator.h" #include <iostream> #include <stdlib.h> #include <random> int ACavernGenerator::Noise(int seed) { srand(seed); return (rand()); } float fade(float t) { return t * t * t * (t * (t * 6 - 15) + 10); } float lerp(float t, float a, float b) { return a + t * (b - a); } float...
TOOL
0.982955
4.797473
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-03-09T14:38:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "03055b1ec...
b3096571-eb3e-497a-b013-13a193668be2
zcoderz/cppAlgorithms
trees/LargestBST.h
// // Created by usman on 9/16/22. // #ifndef CPPALGORITHMS_LARGESTBST_H #define CPPALGORITHMS_LARGESTBST_H #include <algorithm> #include <limits> using namespace std; class LargestBST { public: struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNo...
ALGO
0.999912
6.770905
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2021-10-20T00:44:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0733b3cb...
2e3afb10-c2f7-45bc-89da-8e7de0b19296
N1k1ta-white/SDA_2023-2024
leetcode/DAG 120.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <stack> using namespace std; class Graph { unordered_map<int, vector<int>> edges; unordered_map<int, int> val; unordered_map<int, int> dist; int size; static int hash(int i, int j) { return i * 201 + j; } int...
ALGO
0.999968
5.266923
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2023-11-01T18:07: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": "a0424ce07...
5a8f9b48-d7a8-4e31-af16-14b2a3d9bcff
hjee02018/cc-
vector/vector_누적점수계산.cpp
// https://school.programmers.co.kr/learn/courses/30/lessons/118666 #include <string> #include <vector> #include <map> using namespace std; string solution(vector<string> survey, vector<int> choices) { string answer = ""; map<string, int> res; for (int i = 0;i < choices.size();i++) { string...
ALGO
0.999921
5.138383
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2021-06-28T08:03:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5705ef00fa...
104d18fe-b415-4055-9c8d-764d00a20a1b
mochizuku/stamp_folding
check_fold.cpp
// check_fold.c // // // <NAME> //========================================================= using namespace std; #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <map> #include <algorithm> #include "check_fold.h" int _DEBUG_DISP3 = 0; // -------------...
ALGO
0.998466
3.839694
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-05-01T03:26: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": "f923735a81...
6c9d5892-a4ad-44b3-a7cc-a13b53cefa05
AlkaDas991/DSA
Poly_add.cpp
#include<iostream> #include<string.h> #include<algorithm> #define max 5 using namespace std; int cnt{0}; typedef struct poly{ int coeff; int exp; struct poly *next; }Poly; void select_sort(Poly* p){ Poly* max_add=p; Poly* ptr; int max_ele,temp; while(p->next!=NULL){ max_ele=p->exp; ...
ALGO
0.999754
3.55408
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-19T05:26:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7490175b2dd...
a820746a-faee-4b6e-bde3-e7c986dbb0ed
black-shadows/InterviewBit-Topicwise-Solutions
Arrays/Alternate positive and negative elements.cpp
vector<int> Solution::solve(vector<int> &A) { int size = A.size(); int posStartIndex = 0, i, j, temp; for (i = 0; i < size; i++) { if (A[i] < 0) { int temp = A[i]; for (j = i; j > posStartIndex; j--) { A[j] = A[j-1]; ...
ALGO
0.999992
4.84095
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2018-06-16T10:05:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 363, "forks": 217, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "9c41...
b4b61cee-b8bb-41fa-ba4b-77a7c34079b0
adekang/c-demo
07paixu/maopaopaixu.cpp
#include <stdlib.h> #include <time.h> #include <string.h> #include <stdio.h> typedef int ElemType; typedef struct { ElemType *elem; //存储元素的起始地址 int TableLen; //元素个数 } SSTable; void swap(ElemType &a, ElemType &b) { ElemType tmp; tmp = a; a = b; b = tmp; } void ST_Init(SSTable &ST, int len) { ST.TableL...
ALGO
0.999877
4.193585
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2024-03-29T11:25: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": "8d98658b...
3729ee21-141e-471f-8fd4-a6cde72ea629
GSuvorov/SentimentAnalysisService
Sources/Core/cpp/NdxProcessor/stat_eval.h
#pragma once #include ".\index_stat_storage.h" #include ".\collection_containers.h" #include ".\index_container_nodes_s.h" #include ".\arg_complex.h" #include ".\arg_res.h" namespace SS { namespace Core { namespace NdxSE { namespace NdxProcessor { namespace Extracting { namespace Logics { //--------------------------...
ALGO
0.956547
6.492411
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2017-04-05T07:10:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "273fee15c...
233b7752-aeb9-44c3-a2ec-c9bca371c864
lingjiankong/leetcode
363. Max Sum of Rectangle No Larger Than K.cpp
// *** // // Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum // is no larger than k. // // Example: // // Input: matrix = [[1,0,1],[0,-2,3]], k = 2 // Output: 2 // Explanation: Because the sum of rectangle [[0, 1], [-2, 3]] is 2, // and 2...
ALGO
0.999873
7.02628
{ "github_metadata": { "branch": "master", "commit_count": 391, "repo_created_at": "2018-07-20T00:36:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d724cd94...
e762a132-8aba-4b98-8efe-78aae56a0167
supriya759694/Code-CPP
mat.cpp
#include <iostream> using namespace std; class graph { private: int v_count; int e_count; int **adj; public: int v_counting(); int e_counting(); void createGraph(int, int); void printgraph(); }; void graph::printgraph() { for (int i = 0; i < v_count; i++) { for (int j = 0; j <...
ALGO
0.999632
5.343174
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-06T07:04:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "258d94c88267...
4cfb91fd-963b-4fc3-8966-998edc1bf34f
suzumiyayuhi/GrayHistory
Cpp_primer/chapter_17/p638/标头.h
#pragma once #include<vector> #include<memory> #include<map> #include<set> #include<fstream> #include<string> #include<strstream> #include<sstream> #include<tuple> #include<iostream> using namespace std; struct TextQuery { public: TextQuery() {} TextQuery(ifstream&); tuple<string, shared_ptr<vector<string>>, shared...
TOOL
0.951381
3.000997
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-11-28T15:11: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": "5b37934445...
b6e5711c-47c2-4823-8be2-be8a8be42c42
ANIIIIII/HLS_final_project
src/16-bit/encrypt.cpp
#include "encrypt.h" ap_uint<4> sbox(ap_uint<4> out){ #pragma HLS inline switch(out){ case 0: out = 0xc; break; case 1: out = 0x5; break; case 2: out = 0x6; break; case 3: out = 0xb; break; case 4: out = 0x9; break; case 5: out = 0x0; break; case 6: out = 0xa; break; case 7: out = 0xd; break; case 8: out = ...
ALGO
0.999915
3.470101
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2021-05-23T02:58: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": "61538d7bb14...
7093fc52-6f28-4eda-8d3d-34bb9baaf5d5
pamta/Perceptron1
Perceptron.cpp
/* This code is a Perceptron, a type of neural network. Explanation of the project: The program does not know the mathematical functions neither the process. The goal for this network is to get the right value without knowing any of the functions. But here is the process anyways: I will introduce 3 random values...
TOOL
0.900725
3.236742
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-01-03T00:55: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": "a2efa5ebd...
85d15b3e-af13-4d7b-a3cd-47dcb5ad413e
pngdrift/Labs_PSTU_2024
Sem_2/Classes/5/Triad.cpp
#include "Triad.h" #include <iostream> Triad::Triad(void) { first = second = third = 0; } Triad::~Triad(void) { } Triad::Triad(int f, int s, int t) { first = f; second = s; third = t; } Triad::Triad(const Triad &triad) { first = triad.first; second = triad.second; third = triad.third; } ...
TOOL
0.923585
4.651258
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2024-11-10T07:19: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": "951393d6b56...
e40bc1dc-78c3-4d41-acdb-04688590df84
itagar/HoleFilling
HoleFilling.cpp
/** * @file HoleFilling.cpp * @author <NAME> * * @brief A program that perform hole filling for an image. */ /*-----= Includes =-----*/ #include <iostream> #include <deque> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <cmath> #include <random> #include "Pixel.h" #include "...
ALGO
0.969437
5.360567
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-12-27T17:24: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": "aa17b0a67...
6107bf81-3fdb-4840-9bb4-0068cecd06f0
vladpower/3d_tiny_render
app/src/main/jni/tools/rotation.cpp
#include "rotation.hpp" #include "matrix.hpp" #include <cmath> // sf::Vector3f turnCam(sf::Vector3f camPos, sf::Vector3f &camUp, Matrix4 matView, float radius, float angleX, float angleY) // { // // float x0 = camPos.x, y0 = camPos.y, z0 = camPos.z; // // float A = -rad * z0, B = 0, C = x0 * rad, D = -rad; // ...
TOOL
0.907496
4.924692
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-11-18T10:28: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": "37c7b54e43...
99bf192e-c1bd-464f-9748-345604c5d18c
hg-ian-choi/coding-test
leetcode/algorithms/412_fizz_buzz/main.cpp
#include <vector> using namespace std; class FizzBuzz { public: vector<string> fizzBuzz(int n) { vector<string> result; for (int i = 1; i <= n; i++) { if (i % 3 == 0 && i % 5 == 0) { result.push_back("FizzBuzz"); } else if (i % 3 == 0) { resu...
ALGO
0.999911
6.616175
{ "github_metadata": { "branch": "main", "commit_count": 1317, "repo_created_at": "2022-10-13T11:57: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": "7d5e5e618...
809d1db8-87eb-4057-9b3e-b4ede14162d9
user17d/Avalia-o4
Avaliação 4/Questao10/main.cpp
#include <iostream> #include <stdlib.h> using namespace std; //Entrar com dois números que indiquem o limite inferior e superior de um intervalo. // Exibir os números impares entre o intervalo. int main() { int n1; int n2; cout << "Digite um numero"<<endl; cin >> n1; cout << "Digite um numero"<<...
ALGO
0.997266
3.615284
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-21T02:27: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": "e1c6824c9880...