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
30bd9a0f-f8ab-442b-a3c8-3d282816174e
WiserZhou/DataStructure
Solution1/algorithm/栈和队列/队列/链式队列.cpp
#include <stdio.h> #include <stdlib.h> #define OK 1 #define ERROR 0 #define OVERFLOW -2 // 队列结点的数据类型,这里假设为int typedef int QElemType; // 队列结点的结构体 typedef struct QNode { QElemType data; struct QNode *next; } QNode, *QueuePtr; // 链式队列的结构体 typedef struct { QueuePtr front; // 队头指针 QueuePtr rear; // 队尾指针...
ALGO
0.998255
4.167025
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2023-08-30T05:50:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c60c9de20...
45d07082-2a0f-4c50-abe2-3b93e6745840
vectorch9/baekjoon
2500/2580.cpp
#include <cstdio> #include <vector> using namespace std; // Simulation + Back-Tracking vector<pair<int,int>> blank; int board[9][9]; bool rows[9][9],cols[9][9],box[9][9]; bool flag; void solve(int idx){ if(idx >= blank.size()){ flag = true; for(int i = 0; i < 9; ++i){ for(int j = 0; j <...
ALGO
0.999936
4.697513
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2021-01-18T06:56: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": "fdae2bdaa4...
b3332db4-d8b5-4fbe-b812-00007e140555
walterjgsp/algorithms
C++/problems/0053_interval_list_intersections.cpp
// Problem Statement // Given two lists of closed intervals, each list of intervals is pairwise disjoint // and in sorted order. // // Return the intersection of these two interval lists. // // (Formally, a closed interval [a, b] (with a <= b) denotes the set of real numbers // x with a <= x <= b. The intersection of ...
ALGO
0.999833
6.205137
{ "github_metadata": { "branch": "master", "commit_count": 560, "repo_created_at": "2017-04-18T12:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4a72cda4...
1ba24a90-1e2f-43c2-b3b6-efbdc7c1acdc
burns801/Notes
AOAPC-I/Volume 5. Dynamic Programming/uva_10069.cpp
//Clibrary: #include<cassert> #include<cctype> #include<cerrno> //#include<cfenv> #include<cfloat> //#include<cinttypes> #include<ciso646> #include<climits> #include<clocale> #include<cmath> #include<csetjmp> #include<csignal> #include<cstdarg> //#include<cstdbool> #include<cstddef> //#include<cstdint> #include<cstdio>...
ALGO
0.999833
4.49684
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2013-09-16T21:50:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "526d13c6...
36b01585-29d9-4b89-8104-2bf2779fc900
pvlbzn/algorithms
sort/insertion_sort/insertion_sort.cpp
// This implementation follows CLRS book in therminology and definitions, // while implimentation may be different from a given pseudocode due to // adaptation for particular language. // // Insertion-Sort(A) // // <NAME> 2017 #include <cstdlib> #include "insertion_sort.hpp" /** * Insertion-Sort(A) implementation. ...
ALGO
0.999984
5.639407
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2017-03-03T16:08: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": "a31a0e1e4...
ea0af17f-9d54-4b74-80b4-349d5ebfbea0
thfavre/webserv
srcs/request/HTTPRequest.hpp
#ifndef HTTPREQUEST_HPP #define HTTPREQUEST_HPP #include <iostream> #include <map> #include <set> #include <vector> #include <list> #include "CGIHandler.hpp" #include "../Configuration/ConfigParse.hpp" #define MAX_PATH_LENGTH 4096 #define LINE_END "\r\n" #define UPLOAD_FOLDER "./webpage/images/" class HTTPRequest { p...
WEB
0.903828
4.433229
{ "github_metadata": { "branch": "main", "commit_count": 166, "repo_created_at": "2023-11-03T15:21:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f99a514e76...
8a059042-e527-4931-bbb2-f9379fb8af01
kidclone3/CP
OnlineJudge/CSES/StringAlgorithm/Word Combinations2.cpp
#include <bits/stdc++.h> using namespace std; struct Vertex { int next[26]; bool leaf = false; Vertex() { fill(begin(next), end(next), -1); } }; vector<Vertex> trie(1); void add_string(string &s) { int v = 0; for(char ch: s) { int c = ch - 'a'; if (trie[v].next[c] == ...
ALGO
0.99997
4.368351
{ "github_metadata": { "branch": "cp", "commit_count": 3, "repo_created_at": "2020-11-17T04:04: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": "dc25af670b036a...
ebc1aa50-4037-4f27-8e2a-3d5b4adf237b
adityasarvaiya/coding
Codeforces/568/Extra_Element.cpp
#include <bits/stdc++.h> using namespace std; int util(vector <pair<int, int>> A, int n) { if (n <= 3) {return 1;} sort(A.begin(), A.end()); int d1,d2,d3, diff, f = 1, diff_so_far = 0, diff_index; d1 = A[1].first - A[0].first; d2 = A[2].first - A[1].first; d3 = A[3].first - A[2].first; ...
ALGO
0.99997
4.013223
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2018-12-31T12:40: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": "489e22e1e...
1e4c41b0-a7bb-4aaf-ad76-8b93d6011743
Afrinaee/Virtual-Machine-Learning
header.h
#ifndef HEADER_H #define HEADER_H #include <iostream> #include <iomanip> #include <fstream> using namespace std; class VirtualMachine { public: unsigned char reg[7]{}; unsigned char memory[64]{}; bool overflow, underflow, zeroflag, carryflag; int counter; void printArray(const unsigned char *arr...
TOOL
0.904459
3.121117
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-03T04:31: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": "b73139caafb6...
61a516a9-c8d8-46c6-b271-7ae80f41435a
adarsh-bunny/CodingSpace
BackTracking/sudoku.cpp
class Solution { public: bool isSafeInBoard(vector<vector<char>>& board,int row,int col,int num) { int rowFactor= row-(row%3); int colFactor= col-(col%3); for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { if(board[i+rowFactor][j+colFactor]== num+'0')...
ALGO
0.999742
6.407583
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-12-19T18:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a7977decc09...
a7974dd0-93e1-4807-b9bc-10f3a6271ee0
mzry1992/workspace
contest/The 10th UESTC Programming Contest Preliminary/Darwin.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using namespace std; const double eps = 1e-8; int cmp(double a,double b) { if (fabs(a-b) < eps) return 0; if (a < b) return -1; return 1; } struct Point { double x,y; Point(){}; Point(double _x,...
ALGO
0.999516
3.41781
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40: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": "977f91ae3...
2e646158-c0ee-4fc1-90c5-044f4f61ea26
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29588530_64023190.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define pii pair<int,int> #define ll long long int #define fill(space,a) memset(space,a,sizeof(space)) #define endl "\n" #define optimize() ios_base::sync_with_stdio(0); #define MOD 1000000007 ll fi...
ALGO
0.999971
3.818697
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "aca6af14f...
b9a20353-256d-4afb-89e6-393904aee385
for-l00p/cses
introductory-problems/1068-weird-algorithm.cpp
/* Weird Algorithm https://cses.fi/problemset/task/1068 Consider an algorithm that takes as input a positive integer n. If n is even, the algorithm divides it by two, and if n is odd, the algorithm multiplies it by three and adds one. The algorithm repeats this, until n is one. For example, the sequence for n=3 is as ...
ALGO
0.999916
4.467438
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-08-04T04:25: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": "f48e73557...
f6e1b99b-7bf5-4ba3-8a8e-80a976e39eac
SwenneHacks/myCpp
notes/day7.cpp
#include <iostream> #include <map> #include <vector> #include <list> template <typename T > T max (T const &x , T const &y){ return((x >= y) ? x : y); } int main(){ int a = 21; int b = 42; std::cout << "Max of " << a << " and " << b << " is "; std::cout << max<int>(a,b) << std::endl; float ...
ALGO
0.981521
4.054509
{ "github_metadata": { "branch": "main", "commit_count": 314, "repo_created_at": "2022-04-20T15:38: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": "a9afe95493...
8e2fc5db-e7e5-40b3-bfbb-306e50a0aca4
geoffgeorgein/CP
1/745A1.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() #define rall(x) x.rbegin(),x.rend() #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define F first #define S second #define ll ...
ALGO
0.999965
4.514388
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-08T09:05: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": "1dc232aa0374...
f17512dc-0f33-47ba-9805-9dc6f4c29a52
ndhuynh02/NMLT-LTNC
LTNC/code/tong trai = tong fai.cpp
/* Cho mảng có n phần tử. Có hay không chỉ số i sao cho tổng trái bằng tổng phải (không tính số ai), tức (a0 + … + ai-1) = (ai+1 + … + an-1). Nếu có thì in ra “YES", nếu không thì in ra “NO". Đầu vào: Dòng đầu nhập vào số phần tử của mảng n Dòng thứ 2 nhập vào giá trị các phần tử của mảng Đầu ra: "yes" ...
ALGO
0.999983
4.434729
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-09-08T02:53: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": "d83b7f75e37...
e63bf60a-91da-4d5f-bf91-1bd2eca5336f
Subhadip757/DSA-Journey
C++/Projects/Library/LibraryManagementSystem.cpp
#include <bits/stdc++.h> #include <fstream> #include <cstdlib> using namespace std; class Books { public: int id; char name[120]; char author[120]; bool available; void getBooks() { available = true; cout << "\nEnter id: "; cin >> id; cout << "\nEnter name: "; ...
TOOL
0.910359
4.645391
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-03-06T07:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac026cccf50...
8856a40f-0882-43aa-a359-7fcbcbd7caef
ToshihideMatsuda/atcoder
programs/ABC/ABC200-299/ABC200-250/ABC200/B.cpp
#include <bits/stdc++.h> using namespace std; #define debug false typedef long long ll; #define rep(i,n) for(ll i = 0; i < n; i++ ) #define reps(i,m,n) for(ll i = m; i < n; i++ ) #define INF 1 << 30 #define MINF -1*(1 << 30) #define INF_LL 1LL << 60 #define MINF_LL - (1LL << 60) #define MOD 998244353 #i...
ALGO
0.999882
4.283937
{ "github_metadata": { "branch": "master", "commit_count": 444, "repo_created_at": "2022-02-28T00:05: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": "71bc0e6a...
d0996f39-e50c-482e-bf6b-9bc03429713f
Sai-Venky/TraversalWithC
challenges/heap/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows.cpp
// https://leetcode.com/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows /* Code - Note use of map to store visited/ Can be set of vectors Logic - Heap */ class Solution { public: int kthSmallest(vector<vector<int>>& mat, int k) { int m=mat.size(), n=mat[0].size(), sum=0; priority_qu...
ALGO
0.999986
6.548069
{ "github_metadata": { "branch": "master", "commit_count": 530, "repo_created_at": "2020-05-03T14: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": "9858a7d7...
d7ca5dfa-89fb-4fad-842b-95464589a1b0
ravish1729/algorithms-and-codes
stable match problem/stable_matching.cpp
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int check_engage(int engaged[][2],int select_women,int n) {int i; for(i=0;i<n;i++) {if(engaged[i][1]==select_women){return engaged[i][0];}} //return men to whom women is eng...
ALGO
0.999754
3.818793
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-02-10T22:40:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7aa43bfef9...
ac4c182e-2d61-43da-ad4d-b9fa11462ed7
ddyeon/IT-DA-4rd
study/C++/week09/BOJ_3190_백다연.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> #include <map> #include <deque> using namespace std; //3109 뱀 //이동한칸에 사과가 있으면 먹고 꼬리는 움직이지 않음 //사과 없으면 몸길이는 변하지 않지만 꼬리칸 비워줌. int n, k; int L, X, C; int times =0; deque <pair<int,int>> dq; int arr[101][101] = { 0, }; int dy[4] = {0, -1, 0,...
ALGO
0.999954
3.741645
{ "github_metadata": { "branch": "main", "commit_count": 374, "repo_created_at": "2021-03-13T10:38:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3ff7655f9...
a7bfdf80-8894-4bb3-b469-1dadc9f0c5bb
YassinHemdan/leetcode
random/2684.cpp
class Solution { private: int dx[3] {-1, 0, 1}; vector<vector<int>> dp; bool isValidMove(int i, int j, int preI, int preJ, vector<vector<int>>& grid){ int rows = (int)grid.size(); int cols = (int)grid[0].size(); return i > -1 && j > -1 && i < rows && j < cols && grid[i][j] > grid[pr...
ALGO
0.99999
5.894961
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-01T08:32:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45a18c37aacb...
3b6f55d4-3ea1-4e29-a35f-f3cf6188ed8d
T4H5iN/Data-Structures
TheoryCodes/Class3b.cpp
// Data Structure Theory on 1/29/2024. // Created by mdti0 on 2/10/2024. // Left Shifting #include <bits/stdc++.h> using namespace std; int main() { int n, i; cout << "Enter array size: "; cin >> n; int a[n + 1]; a[0] = {}; cout << "Enter " << n << " numbers: "; for (i = 1; i <= n; i++) {...
ALGO
0.999925
4.687426
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2024-01-29T18:27: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": "a290aa41dd...
ef184cb3-cd0d-45b0-a7c6-48d99289e6cb
bokonist/hacker-rank
other/circle-summation-improved.cpp
//https://www.hackerrank.com/challenges/circle-summation #include "bits/stdc++.h" using namespace std; /* useful utility macros */ #define MIN(a,b,res) ((a)>(b))? (res)=(b):(res)=(a) #define MAX(a,b,res) ((a)<(b))? (res)=(b):(res)=(a) #define printArray(a,l,n) for(ll(i)=(l);(i)<ll(n);i++) { cout<<(a[i])<<' ';} #define ...
ALGO
0.999991
3.349855
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2016-11-23T13:24: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": "25f5fd71e...
7e798c94-1075-434a-aae8-95bcdf5f5321
priyanshubhatt11/Leetcode
0386-lexicographical-numbers/0386-lexicographical-numbers.cpp
class Trie{ public: Trie *child[10]; bool isEnd; Trie(){ for(int i=0;i<10;i++){ child[i] = NULL; } isEnd = false; } }; class Solution { public: Trie *root; Solution(){ root = new Trie(); } void insert(Trie *root, int n){ ...
ALGO
0.999708
6.045853
{ "github_metadata": { "branch": "main", "commit_count": 2269, "repo_created_at": "2022-09-02T06:46: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": "2f9e15bfb...
5376685f-040f-48ec-9369-03f9e3141300
Naveen142005/Leetcode-problems
1405-Longest-Happy-String.cpp
static const int __ = [](){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }(); class Solution { public: string longestDiverseString(int a, int b, int c) { string f,s,t; int fc,sc,tc; vector<pair<int,string>> p = {{a,"a"} , {b,"b"} , {c,...
ALGO
0.999978
4.444479
{ "github_metadata": { "branch": "main", "commit_count": 157, "repo_created_at": "2024-08-01T05:09: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": "f8519ab41e...
0bc695da-8545-4de1-a9d3-169054ab8ce6
kostaskonstantakis/Custom-Alpha-Compiler
avm.cpp
#include <iostream> #include <fstream> #include <vector> #include <stdlib.h> #include <map> #include "phase5.h" const char *VmopcodeToString(vmopcode opc) { const std::map<vmopcode, const char *> OTS{ {assign_v, "ASSIGN\t"}, {add_v, "ADD\t"}, {sub_v, "SUB\t"}, {mul_v, "MULTIPLY\t"},...
TOOL
0.979192
4.27022
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-07-27T12:22: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": "f77f7ba167...
ab1d471c-f362-4feb-9f4e-810683b4e192
nayuta1019/AtCoder
ABC/ABC041-050/ABC049/D/D.cpp
/** ABC049 2019/04/25/ 未完成 **/ #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() inline int toInt(string s) {int v; istringstream sin(s);sin>>v; return v;} ...
ALGO
0.999945
3.740475
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-02-16T07:17: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": "221d2a5904...
18679ab0-4217-42db-9f0b-2be3ed5fb28f
CandiceYu8/Class_Project
DataStructure/Stack/main.cpp
#include <iostream> //#include "stack.h" #include "stack.cpp" using namespace std; int main() { int n, i; double item; MyStack<double> numbers; cout << "There is an integer n followed by n decimal numbers." << endl; cout << "The numbers will be printed in reverse order." << endl; cin >> n; ...
ALGO
0.998856
4.14725
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-12-26T12:39:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96cd2facdb...
54639401-68f0-4f25-8492-476950ec4ef3
bleh05/compprog
codeforces/1416/B.cpp
// Problem : B. Make Them Equal // Contest : Codeforces - Codeforces Round #673 (Div. 1) // URL : https://codeforces.com/contest/1416/problem/B // Memory Limit : 256 MB // Time Limit : 1000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; typedef long lon...
ALGO
0.999028
3.764336
{ "github_metadata": { "branch": "master", "commit_count": 742, "repo_created_at": "2020-12-21T22:34:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b042c16...
dcc5c7f5-1fcd-4f9f-9909-e552eecb9eec
yutanoma/surface-filling-curve-flows
modules/src/medial_axis.cpp
#include "modules/medial_axis.h" #include <geometrycentral/surface/trace_geodesic.h> #include <modules/exact_geodesics.h> #include <modules/surface_point_to_cartesian.h> #include <modules/get_tangent_basis.h> #include <knn-cpp/knncpp.h> namespace modules { int closestPointIndex( const Vector3 &p, const kn...
ALGO
0.999476
6.225004
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-21T14:19:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 6, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "bb0aa13bd7...
a36b1c72-c33a-41c3-be35-3ef761d14ba8
ck89119/Algorithm
LeetCode/554.cpp
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << __LINE__ << " : "<< #x << " = " << (x) << endl #define clr(a, x) memset(a, x, sizeof(a)) //0:0, -1:-1, INF:0x3f, -INF:0xc0 #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define lowbit(x) x & (-x) typedef long long ll; typedef pair<i...
ALGO
0.999695
4.582617
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2015-01-30T05:58:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55a079ed3...
c4469a2f-25d3-4879-ac2b-20ee475bae8f
ferranmafe/CEABOT-2017
stairs/iri_ceabot_stairs/src/ceabot_stairs_alg_node.cpp
#include "ceabot_stairs_alg_node.h" CeabotStairsAlgNode::CeabotStairsAlgNode(void) : algorithm_base::IriBaseAlgorithm<CeabotStairsAlgorithm>(), walk("walk_client"), tracking_module("headt_client"), action("action_client"), stairs("stairs_client") { //init class attributes if necessary //this->loop_rate_ ...
TOOL
0.966674
4.393947
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2017-08-16T11:15:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72f28d60...
1bb6f41c-d3a2-4fcf-8276-bd97e813849d
kookoo9999/codetree-TILs
240410/싸움땅/battle-ground.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Player { int x, y, num, dir, base_stat = 0, gun_stat = 0, point = 0; bool haveGun = false; }; vector<Player> p; vector<int> map[21][21]; int player_map[21][21]; int dx[] = { -1,0,1,0 }; int dy[] = { 0,1,0,-1 }; int n, m, ...
ALGO
0.999938
4.275279
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2024-04-09T13:20: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": "5a01982ce...
8d423eca-0c8f-488b-8296-4a79b0706bbf
chia-he/LeetCode-Practice
1.TwoSum.cpp
/* 1. Brute Force: Using two layers of for loops, we can iterate over all the numbers in the given array. Check for equality with the target through pairwise summation. Time: O(n^2), Space: O(1) 2. Hash Table: Put all number into a hash map. Using a for loop to find complement of n...
ALGO
0.99999
6.248834
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2024-02-18T18:05: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": "db9630427...
2fc52987-09fb-4784-afee-fb63078df8a9
nyeongna/PS_C
15684_사다리조작/r1.cpp
#include <bits/stdc++.h> using namespace std; /* https://yabmoons.tistory.com/47 */ int n, m, h; int ladder[300][30]; int ans = 2147000000; void Input() { cin >> n >> m >> h; int i, j, x, y; for (i = 1; i <= m; i++) { cin >> x >> y; ladder[x][y] = 1; } } int ladderGame() { ...
ALGO
0.999855
3.359564
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-11T07:26:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b244b48070...
7bb4d9d8-0d8c-4130-9154-ff2cab782191
AntonBankevich/LJA
src/projects/repeat_resolution/mdbg_topology.hpp
// // Created by <NAME> on 10/14/21. // #pragma once #include "common/verify.hpp" #include "dbg/sparse_dbg.hpp" #include "sequences/sequence.hpp" #include <functional> #include <graphlite/graphlite.hpp> #include <graphlite/serialize.hpp> #include "mdbg_seq.hpp" namespace repeat_resolution { // ---------- RRVertexPr...
ALGO
0.969466
7.280291
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2021-01-22T20:09:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 116, "forks": 18, "issues": 25, "pull_requests": 4 }, "file_meta": { "content_id": "4aa2c7...
d8214a9d-61f6-4807-8038-b8128b00102b
Itfly/leetcode
Sprial Matrix II.cpp
class Solution { public: vector<vector<int> > generateMatrix(int n) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<vector<int> > matrix(n, vector<int>(n)); int cnt = 1, num = n*n; int first = 0, last = n; while (cnt <= num) { ...
ALGO
0.999913
5.150317
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2014-10-28T01:07: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": "e64b3c21...
9b80a6f2-ee48-4581-878e-6f822c37626c
sushskvnitn/ds_algo
practice/450 DSA/arrays/day2/minimize_the_mXIMUM_DIFFERENCE_BETWEEN_HEIGHTS_OF_ARRAY.CPP
//day 2 // Given an array arr[] denoting heights of N towers and a positive integer K, you have to // modify the height of each tower either by increasing or decreasing them by K only once. // After modifying, height should be a non-negative integer. Find out the minimum possible // difference of the height of sho...
ALGO
0.999941
4.329627
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2022-01-14T20:08:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0c222d23...
c75ea085-20ef-4aec-8821-86fd7b44621d
Abhisek-Ray99/Ds-Algo-code
BinaryTree/Largest-subTree-sum-in-a-BinaryTree.cpp
// Largest subTree Sum in a BinaryTree #include<iostream> #include<queue> using namespace std; template<typename T> class BTNode{ public: int data; BTNode *left; BTNode *right; BTNode(T data){ this->data = data; left = NULL; right = NULL; ...
ALGO
0.999991
5.411585
{ "github_metadata": { "branch": "master", "commit_count": 312, "repo_created_at": "2020-11-23T10:56:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce910652...
9c328d73-a846-484c-8818-5917060397f9
fand/gdust
src/DUST.cpp
#include "DUST.hpp" #include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <cassert> #include <cmath> #include "common.hpp" #include "config.hpp" #include "ckernel.hpp" DUST::DUST(const TimeSeriesCollection &collection, const CPUIntegrator::Method me...
ALGO
0.909792
4.632791
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2013-01-12T07:56: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": "fc9e7949...
b2096cd3-a99b-4804-9383-a1a1cbdfea99
sguzwf/Algorithms
neighbor_search/src/SegmentTree.cpp
#include<iostream> #include<vector> #include<cassert> #include<random> #include"SegmentTree.h" #include"Particle.h" using std::vector; StaticSegmentTree::~StaticSegmentTree() { if (_leftTree) { delete _leftTree; } if (_rightTree) { delete _rightTree; } _leafValues = nullptr; ...
TEST
0.994879
4.475814
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2016-02-04T05:54: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": "c52e2dc60...
e8ac00e8-9787-4777-9c56-86315542fa9c
microsoft/DiskANN
include/pq.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include "utils.h" #include "pq_common.h" namespace diskann { class FixedChunkPQTable { float *tables = nullptr; // pq_tables = float array of size [256 * ndims] uint64_t ndims = 0; // ndims = tr...
TOOL
0.949272
6.011361
{ "github_metadata": { "branch": "main", "commit_count": 283, "repo_created_at": "2020-06-18T06:18:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1411, "forks": 305, "issues": 136, "pull_requests": 70 }, "file_meta": { "content_id": "bb0...
9eb62268-2ab3-42aa-b74f-b27298270688
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/Runtime/Renderer/Private/GPUFastFourierTransform.h
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. /*============================================================================= GPUFastFourierTransform.h: Interface for Fast Fourier Transform (FFT) on GPU. =============================================================================*/ #pragma once #inc...
TOOL
0.96083
6.387671
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
08acf9c7-e536-4fa4-8cc3-8daf9010e439
AweShantanu/LeetCode
0290-word-pattern/0290-word-pattern.cpp
#include <unordered_map> #include <sstream> #include <vector> #include <string> class Solution { public: bool wordPattern(string pattern, string s) { unordered_map<char, string> mp; // Map to track pattern character to word mapping // Split the string s into words vector<string> words = s...
ALGO
0.999164
6.649823
{ "github_metadata": { "branch": "main", "commit_count": 667, "repo_created_at": "2023-08-24T12:25: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": "a30d01c8cf...
60fc9080-bfc5-4540-9d6e-1fb107dbd0d2
prashantgupta8feb/Singly-Linked-List
LL_deleting_given_Position.cpp
//Deleting at a given position #include<iostream> using namespace std; class Node{ public: int data; Node *next; }; //Declaring global head pointer Node *head_ref = NULL; //Function to push elements in LinkedList void Push(Node **head_ref,int data){ Node *new_node = new Node(); new_node->data=data; new_node->ne...
ALGO
0.999889
4.748913
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-07-14T17:41: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": "78c18d8c8...
77cadb27-e216-4262-86cf-c13e4b5166c9
HaochenLiu/My-POJ
1183.cpp
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <cstdio> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <hash_map> #include <iostream> #include <iomanip> #include <list> #include <map> #include <numeric> #inclu...
ALGO
0.99986
3.13919
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2015-09-24T07:24: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": "4e9fdcb1...
91f3e0f2-6b33-483b-bffd-b65297aeffbe
nirmeet-baweja/cpp-practice
algorithms/google-interview.cpp
#include<iostream> #include<vector> #include<utility> using namespace std; template<typename T> void display_2Dvector(vector<vector<T>> v) { for(int i=0;i<v.size();i++){ for(int j=0;j<v[i].size();j++) cout<<v[i][j]<<" "; cout<<endl; } } pair<int, bool> travel(vector<vector<char>>& skiMap, int r, int c, int...
ALGO
0.999649
4.489962
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-02-01T15:18: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": "9e55f537aed...
903c8ec9-145f-4891-bf17-933b17131096
Archrahkshi/twisted-edwards
calc.cpp
#include "calc.h" namespace NTL { // Проективные координаты для искривлённой формы Эдвардса // http://hyperelliptic.org/EFD/g1p/auto-twisted-projective.html Point transform(const Point &P) { Point Q; if (P.Z != 0) { Q.X = MulMod(P.X, InvMod(P.Z, p), p); // x=X/Z Q....
ALGO
0.99972
5.010816
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-10-19T18:41: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": "394f8cef0...
26151289-d49c-4a2a-954c-987bd94d53d5
igor-muram/NumericalMethods
DirectMethods/LUDecomposition/Matrix.cpp
#include "Matrix.h" using namespace std; void InputSize(int& N, int& ALSize) { ifstream in("input/Size.txt"); in >> N >> ALSize; in.close(); } void Input(int& N, int& ALSize, real *DI, real *AL, real *AU, real *b, int *IA) { ifstream in("input/DI.txt"); for (int i = 0; i < N; i++) in >> DI[i]; in.close(); ...
ALGO
0.999667
3.395912
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2019-09-14T10:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "317a82af...
7c738f8c-fffd-4df4-a4a5-4d71d6f686bf
fuzzyaxioms/mbie-pomdp
main.cpp
#define ARMA_DONT_USE_WRAPPER #include <iostream> #include <fstream> #include <vector> #include <stdlib.h> #include <algorithm> #include "planning.hpp" using namespace std; double logmul (double a, double b){ return a + b; } double logadd (double a, double b){ double m = max(a, b); if (exp(m...
ALGO
0.999823
3.28089
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2013-12-04T20:53:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fa37d321...
0d6b6044-72da-4500-ab20-6b56a785aed2
andreyvarlamov/leetcode-cpp
0002-add-two/add_two.cpp
#include <iostream> #include <vector> struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; //class Solution //{ //public: // ListNode* addTwoNumbers(ListNode* l1, L...
ALGO
0.999894
6.076771
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-12-22T05:43:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe26304cfd20...
3ddf7ec7-e64c-4031-aae1-9c17dec73d30
yeonie/Algorithm
b_1942/b_1942/main.cpp
// // main.cpp // b_1942 // // Created by 이동연 on 2021/01/26. // #include <iostream> #include <string> using namespace std; int main(){ string startTime, endTime; int big=0, small=0; int chai = 0; int count = 0; cin>>startTime>>endTime; // cin>>endTime; int si1, boon1, cho1; ...
ALGO
0.999525
3.982992
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-07-07T04:29: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": "df533014d...
21d4b01e-eae5-43a6-a41c-1c2b60d3653d
evilbateye/stegosum
analysis/samplepairs.cpp
#include <QImage> #include <QColor> #include <QtCore/qmath.h> #include <QDebug> #include "samplepairs.h" SamplePairs::SamplePairs() { } /** * Code inspired by Digital Invisible Ink Toolkit project by <NAME> (http://diit.sourceforge.net/) * @brief SamplePairs::analyse * @param image * @param color * @return */ v...
ALGO
0.962468
5.011348
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2013-04-27T12:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5048a9a9e...
f744ee21-6c3d-43b6-a1b8-9cdf50491094
DimaTrushin/Typing-Analysis-RAD
UnitParallelFor.cpp
//--------------------------------------------------------------------------- #pragma hdrstop //--------------------------------------------------------------------------- // Include //--------------------------------------------------------------------------- #include "UnitParallelFor.h" //--------------------------...
ALGO
0.941244
5.685644
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-03T11:06: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": "e8e45a765a...
c78796f9-005c-45d2-8403-212e51792b84
pri1712/codefoces
Div2_922C.cpp
#include <bits/stdc++.h> #include <algorithm> #include <vector> #include <cmath> #include <map> #define ci(n) cin>>n #define co(n) cout<<n #define nl '\n' #define LLMAX LLONG_MAX #define r0 return 0 #define rall(x) (x).rbegin(), (x).rend() #define all(x) (x).begin(), (x).end() #define printstr(s) for(int i=0;i<(int)s.s...
ALGO
0.999697
3.470065
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-11-16T04:45: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": "280d04fa6329...
cb974712-7b83-43fc-a18e-8107d7b0cb11
jonh14lk/Competitive_Programming
Graph/flow_with_minimum_capacities.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define int long long int #define endl '\n' #defin...
ALGO
0.99994
4.600121
{ "github_metadata": { "branch": "master", "commit_count": 363, "repo_created_at": "2020-01-03T00:42:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 91, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4e4f7...
c05132d7-a9fe-4f90-9a61-031439ea2a28
katpercent/GameEngine3D
src/utils/utils.cpp
#include <string> #include <vector> #include <cmath> #include <limits.h> #include <algorithm> #include "../../include/core/vec4.hpp" #include "../../include/core/Triangle.hpp" #include "../../include/utils/utils.hpp" #include "../../include/core/Camera.hpp" #ifdef _WIN30 #include <direct.h> #define getcwd _get...
ALGO
0.988869
6.193079
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-03-16T20:56:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73834466895...
a3a8c167-53b8-4638-a0b5-f384766cdae8
autowarefoundation/autoware_core
localization/autoware_ekf_localizer/src/state_transition.cpp
// Copyright 2022 Autoware Foundation // // 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 agree...
ALGO
0.990429
7.464231
{ "github_metadata": { "branch": "main", "commit_count": 414, "repo_created_at": "2021-11-19T03:03:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 94, "forks": 87, "issues": 24, "pull_requests": 24 }, "file_meta": { "content_id": "73497f0...
c488f9d3-0182-44e4-b494-e1b323a7aff1
potato3d/grid
src/CpuGrid.cpp
#include "CpuGrid.h" #include <vr/stl_utils.h> bool sphereOverlapsAabb( const vr::vec3f& boxMin, const vr::vec3f& boxMax, const vr::vec3f& center, float radius ) { float s; float d = 0.0f; //find the square of the distance //from the sphere to the box for( int i = 0 ; i < 3 ; ++i ) { if( center[i] < boxMin[i...
ALGO
0.96679
6.050116
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-02-13T12:46:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0571a736d31d...
e7a0e419-267e-4590-b617-7c69bf160815
VITA-Group/SLaK
cutlass/include/cutlass/convolution/threadblock/implicit_mma_singlestage.h
/*************************************************************************************************** * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without *modification, are permitted provided that the following conditions are met...
ALGO
0.999026
7.472162
{ "github_metadata": { "branch": "SLAKandLargeKernelKD", "commit_count": 111, "repo_created_at": "2022-05-25T13:13:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 276, "forks": 22, "issues": 4, "pull_requests": 0 }, "file_meta": { "conten...
a8636972-7545-484f-ac7a-6ebd0ce5b67a
snehaM2210/Programming-Practices
HackerRank-30 days of Code/Day-18/Day-18.cpp
#include <iostream> #include <vector> #include <deque> using namespace std; class Solution { //Code private: vector<char>stack; deque<char>queue; int p = 0; int q = 0; public: char pushCharacter(char c){ stack.push_back(c); return NULL; } char enqueueCharacter(cha...
ALGO
0.999949
5.713815
{ "github_metadata": { "branch": "main", "commit_count": 462, "repo_created_at": "2020-10-19T06:02: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": "a5da7fec94...
92462fe1-2c91-4c3f-a20a-5d565612a750
nackdai/aten
src/libaten/volume/medium.h
#pragma once #include <nanovdb/NanoVDB.h> #include "defs.h" #include "material/material.h" #include "math/ray.h" #include "math/vec3.h" #include "misc/tuple.h" #include "renderer/pathtracing/pt_params.h" #include "sampler/sampler.h" #include "volume/phase_function.h" namespace AT_NAME { class HomogeniousMedium {...
ALGO
0.988011
6.725491
{ "github_metadata": { "branch": "main", "commit_count": 3252, "repo_created_at": "2017-02-07T08:51:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 57, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfb89a4b...
3bdcd65c-e7cb-4c01-88eb-e06c5d4238f2
v-spath/diamond-blastn
src/stats/score_matrix.h
/**** DIAMOND protein aligner Copyright (C) 2013-2022 Max Planck Society for the Advancement of Science e.V. <NAME> Eberhard Karls Universitaet Tuebingen Code developed by <NAME> <<EMAIL>> This program is free software: you can redistribute it and/or modify it und...
ALGO
0.939588
6.642622
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-03-03T21:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ed615cc2ba8...
a981d271-01a2-4ca5-94e4-81076a763c1c
ppprok/dual
src/dual/WeightBoundsPruning.cpp
#include "WeightBoundsPruning.h" #include <limits> void WeightBoundsPruningCallback::Call(DualizationNode& node) { switch (node.type) { case NodeType::BacktrackNode: { Weight w = GetWeight(node.lastColumn); node.weight -= w; if (!IsDefaultWeight(node.lastColumn)) ...
ALGO
0.980675
4.90414
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-11-01T20:16: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": "3ef701db2...
63a230d7-6c62-4a2d-88af-abb5e991f187
smay1613/ITEA-Tests
src/Lesson3/HomeworkImpl.cpp
#include "Homework.h" #include <set> #include <map> #include <algorithm> #include <sstream> std::vector<std::string> getUniqueWords(const std::string & text) { std::vector<std::string> words_vector; std::set<std::string> words_set; std::string word; std::stringstream str_stream; st...
ALGO
0.985113
3.866125
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-05T14:33: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": "9601e1070...
2f899bfa-35f2-4cda-8e7e-39df5221bf0b
nevilleq/bayesRCM
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 1<PASSWORD> #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_ge...
ALGO
0.996888
4.687973
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-10-19T20:07: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": "c478027a44a...
41ffb063-6bd4-47a5-a912-ed34a585c677
Sejik/SignalAnalysis
prev_work/opensource/fMRI/FSL/fsl/src/fabber/fwdmodel_dsc.cc
/* fwdmodel_dsc.cc - Implements a convolution absed model for DSC analysis <NAME>, FMRIB Image Analysis Group Copyright (C) 2008 University of Oxford */ /* Part of FSL - FMRIB's Software Library http://www.fmrib.ox.ac.uk/fsl <EMAIL> Developed at FMRIB (Oxford Centre for Functional Magneti...
ALGO
0.982623
5.812654
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-06-24T05:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "559423f8c...
3f83b22b-27d3-4018-bfa3-ac7dc8b3eb13
schost/TFT
src/CTFT_exponents.cpp
#include "CTFT.h" /*-----------------------------------------*/ /* returns the exponents ki such that */ /* n = sum_i 2^k_i */ /*-----------------------------------------*/ long * CTFT_exponents(const long nn){ long i = weight(nn); long * vec = new long[i+1]; if (nn == 0){ vec[0...
ALGO
0.999417
4.093641
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-06-04T02:23:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9758daf653...
69f6fbfe-0879-48c6-b78d-a88fd4b4daa2
AbstractLee/Hikari-swift-llvm
llvm/lib/CodeGen/MachinePipeliner.cpp
//===- MachinePipeliner.cpp - Machine Software Pipeliner Pass -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.968063
6.163935
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-05T15:06:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a55a616c2f4...
8385fec6-ae74-4d89-ad98-c3b8621944a1
ib13/Coding-Practice
GFG 2/kth-largest-element.cpp
#include <bits/stdc++.h> using namespace std; void kthLargest(int *arr, int n, int k) { priority_queue<int, vector<int>, greater<int>> pq; if (k > n) { for (int i = 0; i < n; i++) { cout << -1 << " "; } cout << endl; return; } for (int i = 0; i < ...
ALGO
0.999841
4.414229
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-04-12T11:38: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": "59bcebc8f...
a118a851-cc76-4d26-bd38-aac63c11278e
shilx544/leetcode
数组/209. 长度最小的子数组.cpp
class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { if (nums.empty()) { return 0; } int result = INT_MAX; for(int i = 0; i < nums.size(); ++i) { int count = 0; int sum = 0; int j = i; while (sum < s && j...
ALGO
0.999969
6.308359
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2020-06-09T12:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa75fe2b...
57577901-e7d1-47e9-a1f4-454778ad3861
lilykju/algostudy
2018/0525_topological_sorting/gameDev_daeun.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; int main() { int n, b; cin >> n; vector<int> constructionT(n); vector<int> additionalT(n); vector<vector<int>> adjList(n); vector<int> indegree(n); for (int i = 0; i < n; i++) { cin >> constructionT[i]; cin >>...
ALGO
0.99983
3.876781
{ "github_metadata": { "branch": "master", "commit_count": 322, "repo_created_at": "2018-01-09T17:20:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 42, "pull_requests": 0 }, "file_meta": { "content_id": "3c73fd5...
3ca4540d-33a3-4abb-a8cc-42b283a59b87
0xPolygon/zkevm-prover
src/utils/key_utils.cpp
#include <bitset> #include "scalar.hpp" #include "zklog.hpp" #include "exit_process.hpp" #include "zkassert.hpp" using namespace std; // Get 256 key bits in SMT order void splitKey (Goldilocks &fr, const Goldilocks::Element (&key)[4], bool (&result)[256]) { bitset<64> auxb0(fr.toU64(key[0])); bitset<64> auxb1...
ALGO
0.987034
4.651449
{ "github_metadata": { "branch": "main", "commit_count": 3081, "repo_created_at": "2021-11-08T11:01:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 240, "forks": 164, "issues": 107, "pull_requests": 29 }, "file_meta": { "content_id": "e36...
1568f75c-cba1-408e-a90f-940e56e1b909
liyupi/poj
simulation/2996.cpp
// http://poj.org/problem?id=2996 // 2993的cp题,字符串拼接 #include <iostream> #include <string> #include <sstream> using namespace std; const int ROW = 17; const int COL = 33; char chess[ROW + 1][COL + 1]; stringstream wStrs[100]; stringstream bStrs[100]; void store(int i, int j, bool upper) { char c = chess[2 * i]...
ALGO
0.998901
3.720851
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2019-04-01T15:36:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9c79eb54...
fbc9a2c3-dd12-45ad-b0ff-b9e4da4af476
tgustafson2/Leetcode75
C_Plus_Plus/251-500/p443.cpp
#include <vector> #include <string> using namespace std; class Solution { public: /** * @brief We use a modified sliding window approach where instead of two pointer we use * a char representing the start of the window to optimize lookup time * * @param chars * @return int */ ...
ALGO
0.99998
6.178317
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2025-01-23T03:39: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": "6ec2b43b699...
444e5a1f-b86d-47ea-9453-c1f0f6241cc2
nur21horin/jan-25
386A.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<int> prices(n); for (int i = 0; i < n; ++i) { cin >> prices[i]; } int winner_index = 0; int highest_price = prices[0]; for (int i = 1; i < n; ++i) { if...
ALGO
0.999957
4.721529
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-02-03T14:48: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": "5d4ff17b3a7...
a0a18019-2a59-4470-bec8-d57559cbe05f
zionmultiplayer/Client
Source/Vector.cc
#include "Zion/Vector.hh" #include <math.h> template<typename T> static inline T Max(T a, T b) { return (a > b ? a : b); } void Zion::Vector3F::operator =(CVector cvector) { this->x = cvector.x; this->y = cvector.y; this->z = cvector.z; } Zion::Vector3F::operator CVector() { CVector cvector; ...
ALGO
0.977202
5.065914
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-27T01:50:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9efd57d615cc2...
bee7a46b-2876-4a4f-ba78-1ac68fc2584d
pravinb11/Cpp_beginner
tut5_pointers_part3.cpp
#include <iostream> #include <vector> void double_data(int *int_ptr); void double_data(int *int_ptr) { *int_ptr *= 2; // *int_ptr = *int_ptr * 2; } void swap(int *a, int *b){ int temp = *a; *a = *b; *b = temp; } void display (const std::vector<std::string> *const v){ for (auto str: *v...
TOOL
0.992015
4.699214
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-10-07T17:11: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": "ec476568f9b...
f7c1e816-0688-4b64-9a97-be61dfaf810a
yu2000324/for-c-code
SearchBinaryTree.cpp
#include <stdio.h> #include <stdlib.h> typedef struct BinrayTree { int data; BinrayTree *lchild, *rchild; } TreeNode, *Tree; void CreatBinrayTree(Tree *T) { int MyNum; scanf("%d", &MyNum); if (MyNum == -1) { (*T) = NULL; } else { (*T) = (TreeNode *)malloc(sizeof(TreeN...
ALGO
0.99996
3.199336
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-06-08T15:33:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c129efc5f...
01d8360e-5a6b-4ebc-8333-bbf1e23f7b0d
jhpark0126/BOJ-Study
1697.숨바꼭질(BFS).cpp
#include <iostream> using namespace std; int map[100001]; bool visited[100001]; int queue[100001]; int front = 0; int rear = 0; int cnt = 0; int _size() { return rear - front; } int BFS(int N, int K) { if (N == K) return 0; else { queue[rear++] = N; visited[N] = true; while (front < rear) { int siz...
ALGO
0.999922
4.056868
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-02T06:49: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": "b8b38519fc...
aede87db-8090-44e1-ab2b-c73c1f9c7ec7
yashag24/DSA
DP/25_LOngestSubsequence.cpp
#include<bits/stdc++.h> using namespace std; ///////////////simple//////////////////////// int solve(int n,int i,int m,int j ,string s,string t ){ if(i>=n || j>=m ) return 0; if(s[i]==t[j]) { return 1 + solve(n,i+1,m,j+1,s,t); } return max(solve(n,i+1,m,j,s,t),solve(n,i,m,j+1,s,t)); } int lcs(string s, st...
ALGO
0.999992
5.608463
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-11T09:14: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": "7db7492654b2...
c094623a-fe23-4736-bca7-a63395d0a763
dionyziz/crypto-algorithms
rsa/rsa.cpp
#include <cstdio> #include "bignum.h" #include "euclid.h" #include "miller_rabin.h" using namespace std; num n, p, q, e, d; const int KEY_SIZE = 6; const num LOWEST_KEY = 1 << KEY_SIZE; const num HIGHEST_KEY = (1 << (KEY_SIZE + 1)) - 1; void generateKey() { num p = randomPrime(LOWEST_KEY, HIGHEST_KEY); num q = ...
ALGO
0.999863
4.238039
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-05-04T21:14:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c5cee9854...
b52874e7-c4ff-42cf-9854-035cadfedc10
laurentkneip/opengv
include/opengv/absolute_pose/methods.hpp
/****************************************************************************** * Author: <NAME> * * Contact: <EMAIL> * * License: Copyright (c) 2013 <NAME>, ANU. All rights reserved. * * ...
ALGO
0.998315
6.664358
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2013-08-10T03:56:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1069, "forks": 355, "issues": 43, "pull_requests": 14 }, "file_meta": { "content_id": "a...
3c667389-fdeb-4471-9e4d-56e0d589205e
mkwkw/Algorithm-practice
Algorithm_Practice/c++/2025년/14499.cpp
#include <iostream> #include <vector> using namespace std; //주사위의 다음 위치 pair<int,int> nextPos(int d, int x, int y) { int nextX = x; int nextY = y; switch(d) { case 1: nextY += 1; break; case 2: nextY -= 1; break; case 3: ...
ALGO
0.999958
4.877527
{ "github_metadata": { "branch": "master", "commit_count": 555, "repo_created_at": "2021-01-18T13:16: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": "e93c954d...
24ad78c1-9786-4462-bb1c-0bfd548fdfde
Manzi-Cedrick/more-dsa
tree/tree_level_add_retrieve.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; template <typename T> class Node { public: T data; Node *left; Node *right; Node(T data) { this->data = data; left = NULL; right = NULL; } }; void printTreeNode(Node<int> *root) { cout << roo...
ALGO
0.999457
4.513452
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2022-09-29T06:32:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "926266d6e1...
a2b90e6b-d0bb-4e92-8626-5ac7c584281d
edisonhello/waynedisonitau123
Contest/Opencup/XXII/Korea/C.cpp
#include <bits/stdc++.h> using namespace std; set<int> stg[500005]; int main() { int d, n; cin >> d >> n; vector<pair<vector<int>, int>> trees; for (int i = 0; i < d; ++i) { vector<tuple<int, int, int>> edg; for (int i = 1; i < n; ++i) { int u, v , w; cin >> u >> v >> w; edg.emplac...
ALGO
0.99999
4.163463
{ "github_metadata": { "branch": "master", "commit_count": 411, "repo_created_at": "2017-08-26T10:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6f1139...
5624a7a5-f9f7-4431-a37e-b0cfc3919cdf
ZeroNerodaHero/USACO-Training-Gateway
6.2/cal.cpp
/* ID: billyz43 PROG: calfflac LANG: C++11 */ #include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <cstring> #include <unordered_map> #include <list> #define MAXN 100005 using namespace std; std::ifstream in("calfflac.in"); std::ofstream out("calfflac.out"); string s = "",tmp; int long...
ALGO
0.999904
3.463984
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2018-08-07T01:08: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": "04b49bdda...
c865f3e4-6a8a-4097-b6de-5566e09187ff
KAIST-VCLAB/EgocentricReconstruction
delta/dmc/include/dmc/video_util.hpp
#pragma once #include <iostream> #include <fstream> #include <iomanip> #include <chrono> #include <string> #include <vector> #include <opencv2/opencv.hpp> void load_frame_rt(std::vector<Eigen::Matrix4f>* frame_rt, std::string rt_path){ std::ifstream rt_stream(rt_path); std::string line; std::vector<float> token...
DATA
0.952585
4.526751
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-04-05T06:43:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 124, "forks": 17, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "f63bfc9...
4ecf4e8d-38b2-46bc-9ecd-193fb5d45933
ChurchillV/Cpp-Coding-Challenges
Highest_Lowest/main.cpp
#include <string> #include <vector> #include <bits/stdc++.h> // Given a string of space separated numbers, return the highest and lowest numbers // 1 - Iterate through the string // 2 - Push each number into a vector using the spaces as delimiters // 3 - In the end, return the highest and lowest values in the vector...
ALGO
0.999653
5.34733
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-04-21T21:38: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": "3396fc9167e...
c65a1ffe-c2ee-4004-89c4-ddf374ff50d8
Sanzo00/ACM
ACcode/HDU/HDU5934.cpp
#include <bits/stdc++.h> const int maxn = 1e5 + 5; const int inf = 1e9; using namespace std; pair<long long,long long> a[maxn]; vector<long long> g[maxn]; long long d[maxn]; int c[maxn], cost[maxn]; int dfn[maxn], low[maxn], Stack[maxn], inStack[maxn], belong[maxn], in[maxn], ts, cnt, len; int dis(int x, int y) { long...
ALGO
0.999928
4.099634
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2019-03-11T02:23:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b9d791c...
78fbb81f-ba9c-4fa4-9cfd-151fa6e9b0c0
NicolasJott/Binary-Search-Tree
BSTDictionary.h
#pragma once #include <cstdint> #include <stdexcept> #define GET_COUNT(n) (((n) == NULL_INDEX) ? 0 : counts[n]) #define GET_HEIGHT(n) (((n) == NULL_INDEX) ? 0 : heights[n]) static const uint32_t NULL_INDEX = 0xffffffff, DEFAULT_INITIAL_CAPACITY = 16; template <typename KeyType, typename ValueType> c...
TOOL
0.994876
5.699493
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-11-30T21:42: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": "ea9c1bfd47...
a02a4e4e-3f04-459e-9b00-abb57231b199
isaiahpfisher/moser-circle-problem
Moser Circle Problem/comparisons.cpp
#include "header.h" // returns true if one and two represent the same integer value bool equal(vector<int> one, vector<int> two) { one = removeExtraZeros(one); two = removeExtraZeros(two); // checks the easy case where the sizes differ if (one.size() != two.size()) return false; // compares the vectors digit by...
ALGO
0.933186
4.855745
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-11-09T18:55: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": "73c28763d2...
4ccde4f1-7fbf-400a-914b-300c89a275fe
J-Henny/Lab3
LinkedBag.cpp
/** ADT bag: Link-based implementation.*/ #include "LinkedBag.h" #include "Node.h" template<class ItemType> LinkedBag<ItemType>::LinkedBag(): itemCount(0), headPtr(nullptr){} template<class ItemType> LinkedBag<ItemType>::LinkedBag(const LinkedBag<ItemType>& aBag){ itemCount = aBag.itemCount; Node<ItemType>*...
TOOL
0.928872
4.474965
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-25T18:11: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": "2e51faf38f...
a88baea1-93f0-4981-bb66-f62299e7a2d2
isaaclo97/programacion-competitiva
Problemas/UVA/11152.cpp
#include <bits/stdc++.h> #define INF 0x3f3f3f3f #define EPS 10e-8 #define PI acos(-1.0) using namespace std; double perimeter(double ab, double bc, double ca) { return ab + bc + ca; } double area(double ab, double bc, double ca) { // Heron's formula, split sqrt(a * b) into sqrt(a) * sqrt(b); in implementation d...
ALGO
0.999578
4.094573
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-06-26T17:15:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26b44d7f1494...
098f2a6d-51c7-4e35-a36c-f0b2be560452
savan-najmaddin/AIS_Oppgave
include/Logic.hpp
/** * @brief this class is responsible for the inverse kinematics and targetpositions */ #ifndef LOGIKK_HPP #define LOGIKK_HPP #include "Eigen/Core" #include <vector> struct Joint { float angle; float length; explicit Joint(float ang = 0.0f, float len = 1.0f);//explicit for å forhindre feil konverter...
ALGO
0.931573
3.822373
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2024-10-08T09:07:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "30fa7b46e1...
f42e624f-5100-44c4-b2d9-03892a18fca6
frozenca/DPV
6/6-30.cpp
#include <memory> #include <array> #include <unordered_set> #include <unordered_map> #include <cassert> #include <limits> #include <iostream> static constexpr std::size_t num_chars = 4; static constexpr std::size_t len_seq = 4; static constexpr double score_inf = std::numeric_limits<double>::max() / 3.0; struct Node ...
ALGO
0.999876
5.547
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-05-29T08:15: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": "9dcad2fe1db6...
20fcc87c-48ec-41bb-a9aa-9b13b3b92afc
INFORMSJoC/2022.0004
src/source_code/PESC/ObjGrad.cpp
#include <math.h> #include "cg_user.h" #include "Common.h" double myvalue ( double *x, INT n ) { double f, dist, overlap, SumR; double x_i, x_j, y_i, y_j, z_i, z_j; INT I, J, i, j; f = 0.0; // The sphere si is denoted by (x_i,y_i,z_i), and the sphere sj is denoted by (x_j,y_j,z_j),...
ALGO
0.999936
3.553882
{ "github_metadata": { "branch": "main", "commit_count": 179, "repo_created_at": "2023-01-05T15:09:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ab170aec7f...
af071aa0-3dd4-4c70-9aad-1f11b7c93a41
rtake/atcoder
atcoder.jp/abc160/abc160_e/Main.cpp
# include <bits/stdc++.h> typedef long long lint; using namespace std; #define rep(i,n) for (lint i=0; i<(lint)(n);i++) lint gcd(lint x, lint y) { return (x==0)? y : gcd(y%x,x); } lint lcm(lint x, lint y) { return x/gcd(x,y)*y; } lint P(lint n, lint k) { return (k==1) ? n : n*(P(n-1,k-1)); } lint mod=1000000007; lin...
ALGO
0.999932
3.18377
{ "github_metadata": { "branch": "master", "commit_count": 671, "repo_created_at": "2020-05-09T03:18: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": "b915b651...
781cd266-a28e-4219-bbdc-e6c62d1ae16b
OrigenesZhang/-1s
codeforces/gym/2018 Chinese Multi-University Training - Nanjing U Contest/CF102192L.cpp
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define ROF(i, a, b) for (int i = (a); i >= (b); i--) #define chkmax(a, b) a = max(a, b) #define chkmin(a, b) a = min(a, b) #define _1 first #define _2 second using namespace std; using ll = long long; const int maxn = 51234; int T, n; in...
ALGO
0.999685
3.315016
{ "github_metadata": { "branch": "master", "commit_count": 1525, "repo_created_at": "2017-02-01T16:05:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6824822...