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
a6e58bcd-aa2b-4dac-93e1-c60ef0a4d6b1
NickSacoman/Personal-Projects
SNAKE_Source/Snake.cpp
#include "pch.h" #include <iostream> #include <conio.h> #include <Windows.h> using namespace std; /** * Basic snake game, O represents head of snake while the increasing tail is represented by o's. * Collect the F - fruits to grow the snake and increase the score until game over. **/ bool gameOver; // Game board const...
TOOL
0.995933
5.158839
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-11-28T03:06: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": "2c82aef5a7...
0cb400e9-facb-4b77-9df6-6d07f09c0429
joey2005/CodeLibrary
A-Piece-of-Code/Intersection_of_Circle_and_Polygon.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100024; const double eps = 1e-8; const double pi = acos(-1.0); struct Point { double x, y; Point() { x = y = 0; } Point(double x, double y): x(x), y(y) {} Point operator +(const Point &a) const { return Point(x + a.x, y + a.y); } Point...
ALGO
0.995393
3.753489
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2016-08-12T00:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "017f141b7...
56aaa002-fabb-48f6-8a13-b5f01fba1d76
zisan23/Data-Structure-and-Algorithm---CSE2101
Sort/Inversion_count.cpp
/* Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the inversion count is 0,but if the array is sorted in reverse order, the inversion count is the maximum. { Total inversion count = The number of inversions in the left half and right...
ALGO
0.99999
4.619119
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-01-30T09:03:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e5047532ce...
c22c0fdc-1b82-4bdf-ae3a-eda5337a7377
GNLimerence/CProgramming
rmp.cpp
#include <iostream> #include <cmath> using namespace std; int n; int M[30][1000000]; int A[1000000]; // Hàm để tiền xử lý và xây dựng mảng M để thực hiện các truy vấn tìm giá trị nhỏ nhất trong khoảng void preprocessing() { // Khởi tạo M với giá trị -1 for (int j = 0; (1 << j) <= n; j++) { for ...
ALGO
0.999994
5.858319
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-10-04T06:15:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d38bcc16...
6a34ff1e-aff4-449d-81a0-179ef70782f2
showmic96/Online-Judge-Solution
CodeForces/208D/10294225_AC_30ms_1892kB.cpp
// In the name of Allah the Lord of the Worlds. #include<bits/stdc++.h> using namespace std; typedef long long ll; struct myStruct{ ll value , idx; } data[5]; bool cmp(myStruct A , myStruct B) { return A.value > B.value; } int main(void) { cin.tie(0); int n; cin >> n; vector<ll>v; ...
ALGO
0.999985
3.140213
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2019-12-26T03: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": "a520283f8...
ed271c7f-5493-4bef-8f07-a93fee68610c
Ewenwan/MVision
opencv_app/Basic/common/mat_mask_operations.cpp
/* 矩阵掩码操作 利用滤波器核(掩码矩阵) 对矩阵的各个像素重新计算,根据周围像素之间的关系 掩模矩阵控制了旧图像当前位置以及周围位置像素对新图像当前位置像素值的影响力度。 用数学术语讲,即我们自定义一个权重表。 【1】不属于传统的增强对比度,更像是锐化 自己利用 C语言的下标[]访问 实现 【2】内部函数实现(估计利用了多线程,比较快) filter2D( 输入Mat I, 输出Mat K, 位深 I.depth(), mask矩阵 kern );// 输入Mat I 输出Mat K 位深,mask矩阵 */ #include <opencv2/core.hpp> #include <opencv2/core...
TOOL
0.92149
4.510887
{ "github_metadata": { "branch": "master", "commit_count": 3396, "repo_created_at": "2017-09-24T06:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8384, "forks": 2800, "issues": 17, "pull_requests": 2 }, "file_meta": { "content_id": "...
88073d34-a14e-4a23-af40-e03a667adf59
NVlabs/timeloop
pat-public/src/pat/pat.cpp
/* Copyright (c) 2019, 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: * * Redistributions of source code must retain the above copyright * notice, this list of cond...
ALGO
0.996887
5.883142
{ "github_metadata": { "branch": "master", "commit_count": 938, "repo_created_at": "2019-04-13T01:58:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 409, "forks": 119, "issues": 68, "pull_requests": 1 }, "file_meta": { "content_id": "65fb...
c256f4e7-a6d8-4ff4-90f9-49da9db31c39
Lagos-Ren/Self_Improvement
Luogu/B2136/B2136/B2136.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #define ll long long using namespace std; const int N = 10086; int Prime[N]; inline bool is_Prime(int n) { if (n == 0 || n == 1)return false; if (n == 2 || n == 3)return true; if (!(n % 2))retu...
ALGO
0.999509
4.205
{ "github_metadata": { "branch": "master", "commit_count": 325, "repo_created_at": "2024-01-25T14:50: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": "b8bb01be...
c65d4b3d-1e69-4c7e-821e-11d1eb662516
arnabxero/Online-Judge-Problems-Solution
UVA/10931/24749697_WA_0ms_0kB.cpp
///**************** <NAME> ****************/// ///********** North East University Bangladesh **********/// ///****************** ID: 190103020028 ******************/// ///********************* 20th Batch *********************/// ///**************** Session: Spring-2019 ****************/// ///********* Current Semester...
ALGO
0.999607
3.780475
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-12-25T14:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b70c6486505...
f3b65ca7-f986-4ec9-a512-8bad122e7dbe
hitlar240/Code
practice/middle_element_linked-list.cpp
#include<bits/stdc++.h> //#include<iostream> using namespace std; class Node { public: int val; Node* next; Node(int val) { this->val = val; next = NULL; } }; void insert_at_tail(Node* &hd, Node* &tl) { while(true) { int v; cin>>v; if(v == -1) ...
ALGO
0.999692
3.375612
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2023-05-22T09:19: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": "27a78b70f4...
b6284631-9a75-4f33-9944-1981a00272e1
zakilo/pat2
1025.cc
#include <iostream> #include <cstdio> #include <fstream> #include <vector> #include <algorithm> using namespace std; struct Testee { string num; int score; int ln, lr, fr; // location number, local rank, final rank }; bool operator< (const Testee &t1, const Testee &t2) { if(t1.score != t2.score) return t1.scor...
ALGO
0.999353
3.218298
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-03-06T10:32:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "992fcef6aa...
bbf354ff-95d7-48f9-8349-66bc72f8fb86
bobcaoge/my-code
C++/排序/链表/归并排序.cpp
#include "Node.h" #include "utils.cpp" template <typename T> void merge_sort(Node<T>* start, Node<T>* end) { if (start == end) { return; } int length = get_length(start, end->next); Node<T>* mid = start; for (int i = 1; i < length / 2; i++) { mid = mid->next; } merge_sort(start, mid); merge_sort(mid->next, ...
ALGO
0.999897
5.202119
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-03-20T10:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "60057076a...
ec29cdef-527b-46d6-be92-fcaa7ad333a7
Nurnobi101/line-flow-robot
Team_LAN.ino
int enb = 9, inc = 7, ind = 6; //right motor int ena = 10, ina = 5, inb = 4; //left motor int c_s1, c_s2, c_s3, c_s4, c_s5, c_s6; int button = 11; int buttonstate = 0; //calibration int dif_const = 350; int dif1, dif2, dif3, dif4, dif5, dif6; int fr1, fr2, fr3, fr4, fr5, fr6; int er1, er2, er3, er4, er5, er6; int...
ALGO
0.989822
3.248817
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-11T15:54: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": "c096dea826...
993463e3-2543-4141-8def-a3ca5fa1112b
e-liah/Prog2-FA3
Act3-6.cpp
#include <iostream> #include <string.h> using namespace std; void displaySplit(); int main() { cout << endl; displaySplit(); cout << endl; return 0; } void displaySplit() { char name1 [100]; char *store; char mark = ' '; int start, end; cout << "Enter a string: "; cin.get(name1, 100); cin...
TOOL
0.999075
3.500494
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-02-25T02:52: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": "50ca9943e9f9...
2c44ab4e-0d4d-42cc-a949-3e4f9918a02c
hdhhdh/DH_algorithm
programmers_sorting_02.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; bool cmp(string a, string b) //a와 b를 2가지 방법으로 합쳐서 큰 숫자를 만들 수 있도록 return { //ex) a = 3, b = 34 a + b = 334, b + a = 343 -> 343가 더 큼 return a + b > b + a; } string solution(vector<int> numbers) { ...
ALGO
0.999922
5.751799
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2019-08-06T04:49: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": "6f38cea1e...
3e5dcbeb-4b67-40a8-b5f6-4d6b8c268e78
caleb-cargill/UC-Data-Structures-Group-12
Lab 11/Graph.h
#pragma once #include <string> #include "LinkedList.h" using namespace std; class Graph { private: int numberOfVertices; int topVertex = 0; // Node holding a linked list of edges struct GraphVertex { // Linked list of vertexes that this connects with LinkedList<int>* adjacents; // The integer vertex valu...
ALGO
0.986738
4.947806
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2020-01-23T20:37: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": "b2b89157a...
43ff0b03-3f60-4ef2-b1c8-a9e02f7c750f
inrusakov/CppProjects
Sort Comparison/Application/SelectionSort/SelectionSort.cpp
#include "ReadWriter.h" #include <chrono> using namespace std; bool check(int* arr, int n) { for (size_t i = 1; i < n; i++) { if (arr[i - 1] > arr[i]) { return false; } } return true; } void selectionSort(int* arr, int size) { for (int i = 0; i < size - 1; ++i)...
TEST
0.98928
4.14015
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-06-02T12:11: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": "bf5dce69a71c...
a08c51c3-a611-45df-8a22-f316115ae4e4
moelgzar/Bank-System
clsBankClient.h
#include <iostream> #include <string> #include <fstream> #include <vector> #include <string> #include "clsString.h" #include "Person.h" using namespace std; class clsBankClient : public clsPerson { private: enum eMode { EmptyMode = 0, UpdateMode = 1, AddNewMode = 3, DeleteMode =...
TOOL
0.96487
4.535623
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-18T09:05: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": "3d06e86bd810...
2afa35a6-63b5-481b-8cc2-1213481763a5
Sumitkk10/CP-Solutions-Archive
CodeForces/GNU C++17/1534C/124765360.cpp
#include <bits/stdc++.h> #define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define ll long long int #define ld long double using namespace std; const int N = 1e6 + 5; const int MOD = 1e9 + 7; ll parent[N]; ll find(int a){ while(1){ if(a == parent[a]) return a; else{ ...
ALGO
0.999909
4.199117
{ "github_metadata": { "branch": "main", "commit_count": 1538, "repo_created_at": "2022-06-02T10:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7863f1c8...
3b4a021a-56f6-4b67-9fd1-21471ab793fe
gellistvan/Advanced-Cpp
modules/03_Memory/05_optimizing_and_performance_tuning/252_blending_data_with_avx.cpp
#include <iostream> #include <immintrin.h> // AVX intrinsics void avxBlendExample() { float dataA[8] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f}; float dataB[8] = {8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f}; float result[8]; // Load data into AVX registers __m256 vecA = _mm256_lo...
ALGO
0.911175
5.398243
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-09-05T06:22:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2786673f...
0d0bdc09-f11e-47d2-aee8-7da0e681ccf5
nizi24/AtCoder
ABCPastQuestions/abc118/d/main.cpp
#include <bits/stdc++.h> using namespace std; using i64 = int64_t; using ll = long long; using lint = long long; typedef vector<long long> vint; typedef pair<long long, long long> pint; #define MD 1000000007 #define INF INT32_MAX / 2 #define INF64 INT64_MAX / 2 #define EPS 0.001 #define REP(i, n) for (int i = 0; i < n;...
ALGO
0.999989
3.645155
{ "github_metadata": { "branch": "master", "commit_count": 1059, "repo_created_at": "2021-01-10T08:43: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": "b7b4ff8...
8631e024-357d-48e2-8b31-2478441d5386
rezasnai/Implementation-queue
main.cpp
#include <iostream> #include <vector> #include <regex> #include<string> using namespace std; //create template for generalize the QUEUE template<class T> class Queue; template<class T> class Priority_queue; ///class node template<class T> class Node { friend class Queue<T>; // this means queue class can acsess to ...
ALGO
0.999887
4.48762
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-05-29T11:20: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": "f11d47c608c7...
d7896bad-f6f5-416b-a5d5-797bca2357c5
16abhip/DSA-problems
Stack & queue/StackUsingLL.h
// Node class class Node { public: int data; Node* next; Node(int data) { this -> data = data; next = NULL; } } // stack using LL class Stack { int size; Node* head; public: Stack() { head = NULL; size = 0; } int getSize() { ...
ALGO
0.999548
4.460762
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-06T04:42: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": "453c5d3aeaa7...
2d33f742-924f-42bd-be36-873a0cca10b7
dwinner/nativeTech
cpp/classes/exercises/cmpPersonExplicit/main.cpp
#include <iostream> #include <array> #include <vector> #include <format> #include <algorithm> #include "Person.hpp" static constexpr const auto empLen = 4; using namespace std; using namespace HR; Person create_person(); void move_op_check(); void cmp_check(); int main() { cmp_check(); return 0; } Person ...
TOOL
0.960818
5.365525
{ "github_metadata": { "branch": "master", "commit_count": 881, "repo_created_at": "2016-03-25T07:26:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 14, "pull_requests": 1 }, "file_meta": { "content_id": "0486e16...
523fe27f-844a-4383-8b96-0462fefc8c8d
KoraSystemPro/grupa-16-50
2. godina/01. Online/2. cas/4.cpp
#include <iostream> using namespace std; /* Napisati program koji za uneti pozitivan cetvorocifreni broj: (a) izracunava proizvod cifara (b) izracunava razliku sume krajnjih i srednjih cifara (c) izracunava sumu kvadrata cifara (d) izracunava broj koji se dobija zapisom cifara u obrnutom poretku (e) izracunava broj k...
ALGO
0.995555
3.810953
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2019-09-30T17:44:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8347568a8...
442ca176-6e62-4382-8375-da7b4fc9b7d4
mnpham2101/ProgrammingPractice
12. LGE CodeJam/2020 Online Round 2/Problem F _ Balanced Bracket Sequence/DP_BalanceBrackets.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int possible(string& str, int s, int e) { if (str[e] == ')' && (str[s] == '(' || str[s] == '*')) { return 2; } else if (str[e] == ']' &&(str[s] == '[' || str[s] == '*')) { return 2; } else if (str[e] == '}' &&(s...
ALGO
0.999341
4.318723
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2022-07-07T02:57:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c95a2805e08...
79adf4f3-e037-404e-a5a2-01e41367efe7
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/06/0612/personal_submission/cf666b_tsreaper.cpp
#include <bits/stdc++.h> #define MAXN 3000 using namespace std; typedef pair<int, int> pii; int n, m; vector<int> e[MAXN + 10]; int dis[MAXN + 10][MAXN + 10]; vector<pii> vec1[MAXN + 10], vec2[MAXN + 10]; void bfs(int S) { memset(dis[S], -1, sizeof(int) * (n + 3)); queue<int> q; q.push(S); dis[S][S] = 0;...
ALGO
0.999983
3.275139
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "b62e...
c9cb218a-c066-4d33-8876-410efd7c1e70
ishandutta2007/codeforces-a
al.cash/normal/474/F.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <cstring> #include <cstdio> #include <cmath> #include <ctime> #include <complex> #include <numeric> #include <bitset> #include <vector> #include <string> #include <queue> #include <map> #include <set> using namespace std; #define all(a) (a).begin(),...
ALGO
0.999702
3.956274
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34890dd27943...
bca23056-bee9-4857-9b14-1a881a920f71
ECruz25/Arboles
Practica_Para_Examen/arbol.cpp
#include "arbol.h" Arbol::Arbol() { this->inicio = NULL; this->hijo_derecho = NULL; this->hijo_izquierdo = NULL; pila_operaciones.push('+'); } Arbol::Arbol(QString valor) { this->valor = valor; this->inicio = NULL; this->hijo_derecho = NULL; this->hijo_izquierdo = NULL; } void Arbol::...
ALGO
0.998876
4.261707
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-05-21T07:00: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": "c74e5d3939...
14e83282-be6e-44ea-bcef-b9979cdb38e9
o3de/o3de
Gems/PhysX/Common/Code/NumericalMethods/Source/Eigenanalysis/Solver3x3.cpp
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include <algorithm> #include <cmath> #include <AzCore/std/algorithm.h> #include <LinearAlgebra....
ALGO
0.999725
7.293734
{ "github_metadata": { "branch": "development", "commit_count": 26515, "repo_created_at": "2021-04-05T06:38:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8421, "forks": 2320, "issues": 3293, "pull_requests": 98 }, "file_meta": { "conten...
ac455d8f-0475-4e47-9578-8b678da3086e
edu-rinaldi/Iris-Recognition
SegmentationModule/Segmentator/src/Hough/HoughSegmentator.cpp
#include "Hough/HoughSegmentator.h" #include "ImagePreproc.h" #include "Normalization.h" #include <opencv2/highgui.hpp> #include <algorithm> #include <execution> #include <mutex> namespace hough { HoughSegmentator::HoughSegmentator(int finalSize) : mFinalSize(finalSize) { } SegmentationData HoughSegmentator::Segmen...
ALGO
0.997815
5.510629
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2020-08-09T08:02:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c49f6b5f216...
b445ed8c-7927-4bb0-ac5f-9d232ca8c583
prprprpony/oj
cf/622E.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <queue> #include <utility> #define D first #define U second #define P first using namespace std; typedef pair<int,int> pii; typedef pair<int,pii> pip; const int maxn = 5.4e5; vector<int> g[maxn]; int solve(int u) { queue<pip> q; q.push({1, pii(1,u)}); ...
ALGO
0.998459
3.6605
{ "github_metadata": { "branch": "master", "commit_count": 1116, "repo_created_at": "2015-11-24T14:16:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbb95da...
5637832a-4033-43ee-8b56-7f89eedfdd44
MollHarmen/AdventOfCode
Archive/2022/Day5.cpp
#include <iostream> #include <stack> #include <string> #include <vector> #include "Utils/FileIO.hpp" typedef std::stack<char, std::vector<char>> Stack; typedef std::vector<Stack> Cargo; void MoveFromStackToStack(const int from, const int to, Cargo& cargo) { cargo[to].push(cargo[from].top()); cargo[from].pop(...
ALGO
0.999708
6.566112
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-12-01T08:17: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": "1295a1367e0...
d4f78633-0167-43bd-8c13-1c0e6aa116bb
maZymaZe/maze-Python-learning-luogu-cpp-py-
LeetCode/jii44.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999996
6.232052
{ "github_metadata": { "branch": "master", "commit_count": 2987, "repo_created_at": "2020-02-16T02:06:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e1c29b...
124d0ab0-12cf-483f-b852-0d3f4fa30085
yesxiaoyu/Coding
leetcode 分类刷题/11、动态规划/专题2 买卖股票最佳时机/leetcode-188 k笔交易(6)/Solution.cpp
// Author : lihongyu // Time : 2019-12-16 #include<bits/stdc++.h> using namespace std; // leetcode-188 k笔交易 // 思路:动态规划 找到状态转移方程 // 范式一次交易由买入和卖出构成,至少需要两天。 // 所以说有效的限制 k 应该不超过 n/2,如果超过,就没有约束作用了,相当于 k = +infinity // 参考:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/solution/yi-ge-fang-fa-tuan-mie-6-d...
ALGO
0.999956
5.321523
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2019-11-15T02:31: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": "3e5d46385...
c61fa557-f81c-4651-a7ef-528501bda2e0
digression99/2017_Algorithm
leet_695.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; class Solution { public: int offset[4][2] = { {0, 1}, {1, 0}, {0, -1}, {-1, 0}, }; int getArea(vector<vector<int> > &grid, int starti, int startj) { int are...
ALGO
0.999971
5.63172
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2017-07-01T11:58: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": "35b87b30...
ca08b799-19b0-4f3f-b2de-16fb29767349
ctSkennerton/bam2graph
main.cpp
#include <iostream> #include <fstream> #include <map> #include <vector> #include <seqan/bam_io.h> #include <seqan/sequence.h> #include <seqan/stream.h> #include <seqan/arg_parse.h> #include "version.h" typedef seqan::FormattedFileContext<seqan::BamFileIn, void>::Type TBamContext; struct Options { int upper; ...
DATA
0.949457
3.492703
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-01-01T04:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3da8796...
718903f1-32fd-46df-baab-5b1a844287ab
VIJAY7488/Competitive-Programming
1950C - Clock Conversion.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while(t--){ char ch1, ch2, ch3, ch4, ch5; cin >> ch1 >> ch2 >> ch3 >> ch4 >> ch5; int hour = (ch1 - '0') * 10 + (ch2 - '0'); //ch1 - '0': This converts the character ch1 to its corresponding integer value. ...
ALGO
0.996137
4.529389
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-07-05T11:15: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": "49f8604085d5...
4506b4cd-628b-4a0b-b35a-2e52baa32863
mike10004/stasm4
apps/swas/fm29.cpp
// fm29.cpp: calculate the FM29 measure of fitness // // Copyright (C) 2005-2013, <NAME> #include "stasm.h" #include "fm29.h" namespace stasm { // xres and yres are x,y resolutions. A small value means the fit must be // more accurate at that point in that direction. Points with zero xres // entries are ignored. t...
ALGO
0.995277
6.240509
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2013-12-11T16:25:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f2bec2124...
4e01c241-be70-4aec-bfc5-e41dc77eeb90
OloieriAlexandru/University
Cryptography/Lab5-RC4/RC4.cpp
#include "RC4.h" void RC4::ksa() { for (int i = 0; i < 256; ++i) { state.push_back(i); } j = 0; for (int i = 0; i < 256; ++i) { j = j + state[i] + key[i % key.size()]; std::swap(state[i], state[j]); } i = j = 0; } unsigned char RC4::updateInternalState() { ++i; j += state[i]; std::swap(state[i], state[...
ALGO
0.995577
5.137424
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-05-29T18:54:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "5b2204534...
958d3f68-517a-4371-ab68-b741f8402fc3
ishandutta2007/codeforces-s
shoemakerjo/normal/825/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { bool poss = false; char grid[10][10]; string line; for (int i = 0; i < 10; i++) { cin >> line; for (int j = 0; j < 10; j++) { grid[i][j] = line[j]; } } for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { if (grid[i][j]!='.') cont...
ALGO
0.999797
4.423702
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "2de367015c9f...
8b6e96eb-8bc2-450c-b7dd-800b117bb349
certik/nektar
library/SolverUtils/UnsteadySystem.cpp
/////////////////////////////////////////////////////////////////////////////// // // File UnsteadySystem.cpp // // For more information, please see: http://www.nektar.info // // The MIT License // // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA), // Department of Aeronautics, Imperial Coll...
ALGO
0.9846
5.501117
{ "github_metadata": { "branch": "master", "commit_count": 7893, "repo_created_at": "2015-07-31T15:36:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "246cb8...
0dcfc677-5dbb-4e8c-99d2-f8883e8d6da0
be-in/csad
include/bt/math/matrix4f.h
/* * matrix4f.h * * Created on: 13.08.2013 * Author: <NAME> <<EMAIL>> */ #ifndef MATRIX4F_H_ #define MATRIX4F_H_ #include <bt/functions.h> WARNING_DISABLE; OPTIMIZE_ON; namespace bt { class matrix4d; class quaternionf; /** * @class matrix4f * * @ingroup math * @brief matrix4f - The matrix in the f...
ALGO
0.954697
5.715128
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-11-08T16:49:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb18ba2cfdaf...
e5230dbb-cf8f-4f45-aefe-d241f49d72e7
Quancoder260503/Programming-Contest-Solution
CODEFORCES/Cards.cc
#include <bits/stdc++.h> using namespace std; const int MOD = 998244353; int64_t mod_pow(int64_t a, int64_t b, int64_t p) { int64_t res = 1; while (b > 0) { if (b & 1) res = (res * a) % p; a = (a * a) % p; b >>= 1; } return res; } int64_t mod_inv(int64_t a, int64_t p) { return mod_pow(a % p, ...
ALGO
0.99997
5.052966
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-26T07:27: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": "9683328bf0ba...
f547d9ed-ecf5-47ec-b7e1-c3a56bc40310
felixcodin/data-structures-and-algorithms
C++/Linked-Lists/ReverseLinkedList.cpp
//Given the beginning of a singly linked list head, reverse the list, and return the new beginning of the list. #include <iostream> using namespace std; struct Node { int data; Node *pNext; }; struct LinkedList { Node *pHead; Node *pTail; }; LinkedList *createLinkedList() { LinkedList *ll = new ...
ALGO
0.999948
5.368994
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2024-12-12T02:06:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bddfbea1a...
179b12ab-d94c-457f-bd64-7171fe90160e
lev4rT/technopark2020autumn
seminar1.cpp
#include <iostream> #include <sstream> #include <assert.h> template <class T> class Queue { struct Node { T value; Node* next; Node(const T& val) : value(val), next(nullptr) {} }; public: Queue() : head(nullptr), tail(nullptr) { } ~Queue() { while ...
ALGO
0.999904
4.748554
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-10-28T22:04:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ced83f7febfb...
f86adf21-6a9e-4a9e-858e-2e2f4494864b
ishandutta2007/codeforces-j
jiangly/normal/1626/E.cpp
#include <bits/stdc++.h> using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; std::cin >> n; std::vector<int> c(n); for (int i = 0; i < n; i++) { std::cin >> c[i]; } int tot = std::accumulate(c.begin(), c.end(), 0); ...
ALGO
0.99979
4.616323
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42: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": "87684335c4da...
93ed86cf-7548-42e0-892e-b3c0eaf81b0a
koosaga/olympiad
KOI/tst20_train.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using pi = pair<int, int>; #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() const int MAXN = 250005; vector<int> gph[MAXN]; int par[18][MAXN], dep[MAXN]; vector<pi> fars[MAXN]; int far[MAXN], pfar[MAXN]; void dfs(int x, int p){...
ALGO
0.999825
4.489407
{ "github_metadata": { "branch": "master", "commit_count": 361, "repo_created_at": "2015-11-06T16:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 285, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8129...
3672ce6b-8fc1-465c-a960-a8c3bb2fc766
cescgina/AdventOfCode
2015/day13/pr2/pr2.cpp
#include <map> #include <vector> #include <string> #include <fstream> #include <utility> #include <iostream> #include <algorithm> #include <unistd.h> typedef std::map<std::string, int> weight_map; typedef std::map<std::string, weight_map> santa_map; typedef std::vector<std::string> nodes; void parse_command(const std...
ALGO
0.997828
4.064771
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-11-30T15:52: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": "71f85378...
c87784a2-bd88-4ec9-8058-ff7a7e76343e
0x3mr/Zewail
CSAI-251 | Algorithms/Practice/Recursion/gridPaths/main.cpp
#include <iostream> using namespace std; /* Problem: Count the number of unique paths in an n x m grid from the top-left corner to the bottom-right corner, where you can only move right or down. Example: - For a 2x2 grid, there are 2 possible paths: 1. Right -> Down 2. Down -> Right - For a 2x3 gri...
ALGO
0.999931
6.708428
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2024-10-04T16:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbf3f254b3...
b625e72a-c219-428f-91f4-600e59abd4a6
Stichting-MINIX-Research-Foundation/minix
external/bsd/libc++/dist/libcxx/test/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
TEST
0.988912
6.444927
{ "github_metadata": { "branch": "master", "commit_count": 7153, "repo_created_at": "2014-10-03T08:10:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3236, "forks": 1099, "issues": 93, "pull_requests": 25 }, "file_meta": { "content_id": "...
8f2b7342-49e7-4072-aaa8-c20bc6613fc7
davheld/precision-tracking
src/motion_model.cpp
/* * motion_model.cpp * * Created on: Jan 23, 2013 * Author: davheld * */ #include <boost/math/constants/constants.hpp> #include <precision_tracking/motion_model.h> using std::max; namespace precision_tracking { namespace { const double pi = boost::math::constants::pi<double>(); } // namespace Mot...
ALGO
0.98814
7.292349
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2014-10-08T23:49:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 146, "forks": 76, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "77170...
249deb75-dee3-42a1-95d7-021655c6cf75
chelseafandev/LeetCodeProblems
Medium/PopulatingNextRightPointersinEachNodeII.cpp
/* Given a binary tree struct Node { int val; Node *left; Node *right; Node *next; } Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL. Initially, all next pointers are set to NULL. Example 1: Input: root = [1,2,3,4,5,null,7] Ou...
ALGO
0.999964
6.131312
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2021-04-10T05:01: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": "6cc24d59d8...
89925c20-5876-4aff-a3f9-b4159f617ad4
vsallaberry/privgold-pandora
vegastrike/boost/1_28/boost/preprocessor/comparison/equal.hpp
#ifndef BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP #define BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP /* Copyright (C) 2001 * <NAME> * http://www.housemarque.com * * Permission to copy, use, modify, sell and distribute this software is * granted provided this copyright notice appears in all copies. This * software is ...
ALGO
0.938634
6.019702
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2021-12-23T23:43:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb54e494...
8d791448-cbd8-4ba8-a2bb-f89af0605f6f
Futaba-Kosuke/AOJ
ITP1/ITP1_9_D.cpp
#include<iostream> #include<string> using namespace std; int main () { string str; cin >> str; int q; cin >> q; for (int i = 0; i < q; i++) { string order; cin >> order; // cout << "Scan order" << endl; int a, b; cin >> a >> b; // cout << "Sca...
ALGO
0.999122
4.694278
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-04-26T06:15: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": "9f896f0ec5...
0dfafee5-d546-4cc7-8817-127bec1194e1
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/09_22859_8.cpp
#include <iostream> #include <string> #include <cmath> #include <fstream> using namespace std; long long solve(string s) { int count = 0, numbers[128]; memset(numbers, -1, sizeof(numbers)); bool visited[128] = {0}; for (int i = 0; i < s.length(); i++) if (!visited[s[i]]) { count++; visited[s[i]] = true;...
ALGO
0.999718
4.077088
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eec4dcb65...
9830dc49-db93-4170-9cf9-1f0f382d84d0
Saiyangodgoku1/start-450
Step-14(Graph)/5.Minimum Spanning Tree/05.number_of_operation_to_make_network_connected.cpp
/* QUESTION: Given an undirected graph represented by `n` nodes and a list of edges `edge`, find the minimum number of edges to remove in order to make the graph a tree. If it's not possible to make the graph a tree, return -1. APPROACH: 1. Implement a Disjoint Set data structure to keep track of connected components ...
ALGO
0.999941
6.272996
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2024-06-28T08:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9914e679ca2...
488458fd-fd5d-43ce-badd-84a8ab19f518
michael80hou/leetcode
unclarified/3sumClosest.cc
#include <iostream> #include <cassert> #include <unordered_map> #include <vector> #include <algorithm> using std::vector; using std::unordered_multimap; using std::unordered_map; using std::pair; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { int res = nums[0] + nums[1] + ...
ALGO
0.999985
6.005664
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-05-08T02:45:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d76e92a58...
3fb035a2-1a7e-4de2-9dc9-d82a9d588e51
shangc1016/leetcode
src/greedy/greedy.cpp
#include "greedy.h" #include <algorithm> #include <cmath> #include <cstdlib> #include <vector> namespace leetcode { int findContentChildren(vector<int>& g, vector<int>& s) { sort(g.begin(), g.end()); sort(s.begin(), s.end()); int count = 0; int i = 0, j = 0; while (i < g.size() && j < s.size()) { if (s...
ALGO
0.999797
5.050598
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-02-11T13:43:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "004ac627698...
bbedc016-4318-4f64-9be1-0693e1fd60b3
Rohan7546/Coding_Ninjas_Competitive_Programming
Advance_Graph/monk_and_islands.cpp
/* Monk and the Islands Send Feedback Monk visits the land of Islands. There are a total of N islands numbered from 1 to N. Some pairs of islands are connected to each other by Bidirectional bridges running over water. Monk hates to cross these bridges as they require a lot of efforts. He is standing at Island #1 and ...
ALGO
0.999906
4.375741
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-07-06T08:43:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "120c1a0984e...
38acab83-1f53-4593-a124-4d7b491e1236
Md-Merazul-Islam/Algorithm
20-module- Assignment 03/Building.cpp
// #include <bits/stdc++.h> // using namespace std; // class Edge // { // public: // int a, b, w; // Edge(int a, int b, int w) // { // this->a = a; // this->b = b; // this->w = w; // } // }; // bool cmp(Edge a, Edge b) // { // return (a.w < b.w); // } // const int N = 1e5...
ALGO
0.999962
5.000803
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-08-27T06:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68f69a09113...
c4b9836d-7519-4623-b354-891774594b70
ishandutta2007/codeforces-u
uryuuu/normal/1389/C.cpp
#include<iostream> #include<stdio.h> #include<cstdio> #include<vector> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<string> #include<stack> #include<set> #include<map> #include<bitset> #include<unordered_map> #include<time.h> #include<cstdlib> typedef long long ll; //#pragma comment(li...
ALGO
0.99959
3.680705
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "21490ceced52...
f765bca3-1512-4d63-a951-268faa863070
hujiese/CPP-Extends
STL算法/06.search_n.cpp
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; template<class T> void FillValue(T& vect, int first, int last) { if(last >= first) { for(int i = first;i < last;i++) { vect.insert(vect.end(), i); } } else { ...
ALGO
0.99983
4.3199
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-02T12:13:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ada66d864...
354c8624-c7ca-499e-9495-fd528a42dd20
Deepug116/MineSweeper
main.cpp
#include <SFML/Graphics.hpp> #include <fstream> #include <iostream> #include <sstream> #include <vector> #include "board.h" #include "TextureManager.h" #include "random.h" using namespace std; using namespace sf; void CountMines(Board& board) { for (auto i = 0; i < board.Height; i++) { for (auto j = 0; j ...
TOOL
0.971598
4.66502
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-05T18:57: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": "fee8400a6e84...
c1cd3b67-14ee-4897-910c-992d4c5fdd8e
ifiaposto/Mutually-Regressive-Point-Processes
src/polyagammaSampler/PolyaGammaPar.h
// -*- mode: c++; -*- //////////////////////////////////////////////////////////////////////////////// // Copyright 2012 <NAME>, <NAME>, and <NAME>. // This file is part of BayesLogit. // BayesLogit is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License as pu...
ALGO
0.998823
4.775878
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-10-26T14:03:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f431cb932...
0489b207-4b6b-4779-a652-f3b8ce7c8d28
gtcasl/gpuocelot
tests/cuda2.2/tests/BicubicTexture/bicubicTexture-host.cpp
/* * Copyright 1993-2008 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * * This source code is subject to NVIDIA ownership rights under U.S. and * international Copyright laws. * * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOU...
ALGO
0.96873
4.745625
{ "github_metadata": { "branch": "master", "commit_count": 1716, "repo_created_at": "2015-03-18T21:40:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 288, "forks": 69, "issues": 49, "pull_requests": 2 }, "file_meta": { "content_id": "51bf...
fe1fb851-5cfe-40a3-b129-4f970b243689
VisualIdeation/ATR-Vessel
source/Templatized/Tesseract.cpp
/*********************************************************************** Tesseract - Policy class to select appropriate cell algorithms for a given data set class. The order of vertices in a tesseract is bit-wise, such that the LSB corresponds to the first coordinate axis, and the MSB corresponds to the last coordinate...
ALGO
0.984723
5.79486
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2011-08-06T18:25:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e82f090c95...
1d492049-d4a0-44c7-acb8-94759bf6c1ee
vijayanand-vasudevan/basecodes
Vector.h
// test #include <iostream> #include <cstring> #include <algorithm> // for qsort and bsearch template <typename T> class Vector { public: T* data; size_t size; Vector(size_t s) : size(s) { data = new T[size]; } Vector(const T* d, size_t s) : size(s) { data = new T[size]; ...
ALGO
0.998856
6.020506
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-09-22T18:00: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": "52497f8792...
28c072ac-4c72-4270-92db-f236a1497008
twestura/yarn-cloth-sim
src/Simulator/Source/IMEXIntegrator.cpp
// // IMEXIntegrator.cpp // Visualizer // // Created by eschweickart on 2/24/14. // // #include "IMEXIntegrator.h" #include "Simulator_Prefix.pch" DECLARE_PROFILER(); // Initialization of static struct IMEXIntegrator::IMEXIntegrator(std::vector<RodEnergy*>& energies, Rod& r) : Integrator(r, energies) { // Fill ...
ALGO
0.999164
5.771446
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2014-08-19T15:19:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef3d7146e...
01fd23ce-17cb-42aa-960a-7bf88d39b4e9
slk000/newbie
leetcode/1901_find-a-peak-element-ii.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> findPeakGrid(vector<vector<int>>& mat) { int m = mat.size(); int n = mat[0].size(); // 以行号i进行二分 int l = 0, r = m-1; int mid = 0; int idx = -1; while (l < r) { ...
ALGO
0.999975
5.321913
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2016-08-22T14:47: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": "daae37545...
e0489e61-f54c-45a8-abd2-30c189be27ea
mmelnich/lapackpp-add_gemqrt
src/orgbr.cc
// Copyright (c) 2017-2022, University of Tennessee. All rights reserved. // SPDX-License-Identifier: BSD-3-Clause // This program is free software: you can redistribute it and/or modify it under // the terms of the BSD 3-Clause license. See the accompanying LICENSE file. #include "lapack.hh" #include "lapack/fortran....
ALGO
0.929103
6.687731
{ "github_metadata": { "branch": "master", "commit_count": 723, "repo_created_at": "2023-07-11T18:43:53.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "icl-utk-edu/lapackpp", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "conte...
5e65c956-a31c-4bc9-8d36-619a9af2f0fb
ji-junhyuk/juntoplayground
maniax/shooting/ch02/directed_bullet_dda_init.cpp
#include <cmath> void init_directed_bullet_dda ( int i_theta, // 발사 각도 int i_ex, int i_ey, // 적의 좌표 int& i_x, int& i_y, // 탄의 좌표 int& i_vx, int& i_vy, // 탄의 이동방향 int& i_dx, int& i_dy, // X방향과 Y방향의 차이 int& i_diff // 오차 ) { // 가상적인 메인 캐릭터를 멀리 배치하기: // M_PI는 원주율 int i_mx = cos(M_PI / 18...
ALGO
0.997062
4.553408
{ "github_metadata": { "branch": "master", "commit_count": 1649, "repo_created_at": "2020-08-18T04:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "003f82f...
45adebe4-d6be-4bf1-bc2b-4de39cd2c5e8
Chillee/CompProgramming
CSES/archive/1084/main.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 5; int N, M, K; int A[MAXN], B[MAXN]; signed main() { ios::sync_with_stdio(0); cin.tie(0); cin >> N >> M >> K; for (int i = 0; i < N; i++) cin >> A[i]; for (int i = 0; i < M; i++) cin >> B[i]; sort(A, A + N), ...
ALGO
0.99996
4.099896
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-10-07T09:15:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b16be9caf...
feab1547-ebaf-47f3-8e0a-0046607ea27d
Riajul-Alam/Online-Judge-Solutions
CodeForces/GNU C++17/1467A _ Wizard of Orz/103780363.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define ff first #define ss second #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define mem(a,b) memset(a,b,sizeof(a)) #define fast ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NUL...
ALGO
0.999924
3.730142
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-10T19:53: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": "897680223fcc...
d873bfb2-ee07-41e5-a12b-408b545a0928
Frolower/GU
CPSC121/PA8/main.cpp
/* Name: <NAME> Class: CPCS 121, Fall 2022 Date: November 21, 2022 Programming Assignment: PA8 Description: Adventure Game Notes: - */ #include "header.h" int main() { char choice = '\n'; char board[BOARD_SIZE][BOARD_SIZE]; char currTile = '\n'; int playerCurrentInventoryStats[MAX_INVENTORY_SIZE...
TOOL
0.95513
3.558658
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2022-10-19T17:57:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63921aaa5...
5f096f64-b4b3-4b96-a552-1776495fe749
junhochoi-dev/algorithm
[PS]BOJ/00000_09999/01000_01999/01252/boj01252.cpp
#include <iostream> #include <algorithm> #include <string> #define endl '\n' using namespace std; int main() { cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(false); int carry = 0, sum = 0, idx; string v1, v2; cin >> v1 >> v2; if(v1[0] == '0' && v1.size() != 1){ idx = 0; ...
ALGO
0.999988
3.936814
{ "github_metadata": { "branch": "main", "commit_count": 1408, "repo_created_at": "2021-02-05T05:16:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e602bdca1...
0ede5ccc-9e9e-4359-b7c6-821aeb402d1d
dipta007/LeetCode
0348-design-tic-tac-toe/0348-design-tic-tac-toe.cpp
class TicTacToe { public: vector <vector <int> > v; /** Initialize your data structure here. */ TicTacToe(int n) { v.assign(n, vector<int>()); for(int i=0; i<n; i++) { v[i].assign(n, 0); } } /** Player {player} makes a move at ({row}, {col}). @param r...
ALGO
0.999967
5.663832
{ "github_metadata": { "branch": "main", "commit_count": 662, "repo_created_at": "2024-01-07T01:55: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": "1730e38a91...
a17fdb91-99ca-4f86-a912-b3833df4b778
Denver17/Algorithms_Exercise
PAT/乙级/1096_大美数.cpp
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<string> using namespace std; bool judge(vector<int> &vec, int num){ if(vec.size() < 4) return false; for(int a = 0; a < vec.size(); a++){ for(int b = a + 1; b < vec.size(); b++){ for(int c = b + 1; c < vec.s...
ALGO
0.999762
3.896785
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-06-12T14:30:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1531923bf4b3...
e7acbb65-78bc-4c9f-8022-5cdfe85e9050
R0HAN-KASHYAP01/DSA-In-CPP
Patterns/7.cpp
#include <iostream> #include <string> using namespace std; /* * *** ***** ******* ********* */ void pattern(int n) { for (int i = 0; i < n; i++) { // space for (int j = 0; j < n - i - 1; j++) { cout << " "; } // star for (int j = ...
ALGO
0.999758
4.355507
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-03-10T07:16:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "809a92a4315...
f276433c-8d48-4715-9acb-e0d353a84564
pranavmaske03/my-programs
cpp/program10.cpp
// program135.c #include<iostream> using namespace std; class Pattern { public: int iRow; int iCol; Pattern(int iNo1, int iNo2) { iRow = iNo1; iCol = iNo2; } void DisplayPattern() { int i = 0; int j = 0; if(iRow != iCol) { ...
ALGO
0.996141
5.59295
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-30T06: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": "6cc78ba8abdf...
29a1c9f9-4a33-4bab-b4b0-131bcbd1430a
Imran4424/Algorithm-implementation
Mathematics/Bit Operations/IsMultipleOfThree.cpp
#include <iostream> #include <cmath> using namespace std; int IsMultipleOfThree(int n) { int oddCount = 0; int evenCount = 0; /* checking the number is negative is negative or not if it is negative then making it positive */ if(n < 0) { n = -n; } if(n == 0) { return 1; } if(n == 1) { return ...
ALGO
0.999591
4.185645
{ "github_metadata": { "branch": "master", "commit_count": 1797, "repo_created_at": "2017-05-03T13:59:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a707fb5...
22ad6617-73c5-4f25-b7bd-63e23ded676e
harshith0406/quant-tech
datastructures/Binary_search/oddoccur.cpp
#include <bits/stdc++.h> using namespace std; int bin(vector<int> &v, int start, int end) { // int ans = -1; // if (start == end) // { // return start; // } // if (start > end) // { // return -1; // } // int mid = start + (end - start) / 2; // if (mid >= 0 && mid % 2 == 0) // { // if (v...
ALGO
0.999965
4.164726
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-05-19T06:56: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": "d7b951be6...
3e038f06-298a-4158-bd63-e3d04d99a61a
bunny-goorm/algorithm
BOJ/12813.cpp
#include <iostream> #include <string> #define MAX 100000 using namespace std; string a, b; int main(int argc, const char* argv[]) { ios_base::sync_with_stdio(false); cin.tie(0); cin >> a >> b; for (int k=0; k < MAX; k++) { if (a[k]-'0' && b[k]-'0') cout << '1'; else cout << '0'; ...
ALGO
0.999985
3.066463
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2021-12-28T13:11:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d028b5d95bb...
eeabd3a9-5e49-428d-a2ef-9c7b849deeaf
Akashsahu1998/LeetCode
Problems/Medium/1202 - Smallest String With Swaps.cpp
// Question) 1202. Smallest String With Swaps // Implementation // 1st Approach // Using DFS // Time complexity: O(E + VlogV) // Space complexity: O(E + V) class Solution { private: void dfs(vector<int> graph[], vector<int> &indices, vector<char> &characters, vector<int> &visited, string &s, int node){ ...
ALGO
0.999994
6.590011
{ "github_metadata": { "branch": "master", "commit_count": 1078, "repo_created_at": "2020-10-15T12:58: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": "17787a9...
357bbaa5-e903-4624-b3bc-6d2636bc7658
walnutwaldo/Programming_Contests
USACO/2015-2016 Season/US Open/Bronze/bcs.cpp
#include <bits/stdc++.h> #define SQ(a) (a)*(a) #define F0R(i, a) for(int i = 0; i < (a); i++) #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define R0F(i, a) for(int i = (a) - 1; i >= 0; i--) #define ROF(i, a, b) for(int i = (b) - 1; i >= (a); i--) #define F first #define S second #define PB push_back #define ...
ALGO
0.999957
3.09515
{ "github_metadata": { "branch": "master", "commit_count": 806, "repo_created_at": "2017-07-27T02:56:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6fb95b...
3e7d954d-6dd6-4e46-ae73-ab18d4b2782d
Pradeep17Jadhav/LeetCode-Questions
143-reorder-list/143-reorder-list.cpp
/** * Definition for singly-linked list. * 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: void reorderList(List...
ALGO
0.999996
6.017722
{ "github_metadata": { "branch": "main", "commit_count": 1607, "repo_created_at": "2021-12-25T13:53: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": "68486a01d...
76dba6ae-da52-4a6a-822a-b720d5277542
Kshaunish1010/DSA
GeekForGeek/Findtheclosestpairfromtwoarrays.cpp
#include <bits/stdc++.h> using namespace std; #define turbo \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); class Solution { public: vector<int> printClosest(int arr[], int brr[], int n, int m, int x) { vector<int> ans(2); int i = 0, j = m - 1, mindiff = INT...
ALGO
0.999988
4.362658
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2023-08-20T10:35: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": "626b24323be...
c1719df6-6006-40d4-83ee-bd4b1c824d35
m1cjey/hyper
math_library.cpp
#include"stdafx.h" /********************ベクトルノルムの計算********************/ //1ノルム double vector_norm1(double *d, int start, int end) { double norm=0.0; for(int i=start;i<end;i++) norm+=fabs(d[i]); //for(int i=m;i<n;i++) norm+=fabs(d[i]); //cout<<norm<<endl; // cout<<"finished, n:"<<n<<endl; return norm; } //2ノル...
ALGO
0.999503
3.02988
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2015-02-20T09: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": "8c2711acf...
5d1a0624-9250-41dd-8500-c0eaf5898213
UncP/Giraffe
src/object/sphere.cpp
/** * > Author: UncP * > Mail: <EMAIL> * > Github: https://www.github.com/UncP/Giraffe * > Description: * * > Created Time: 2016-08-04 19:29:25 **/ #include "sphere.hpp" namespace Giraffe { void Sphere::computeBox(std::vector<double> &near, std::vector<double> &far, const Vector3d *norm...
ALGO
0.997683
6.057728
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2016-07-22T12:48:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 203, "forks": 34, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56f80...
943c216f-fcbb-475d-94b8-aaa219b767fb
CypherKingdom/CppCodes
Graph Theory/ch06/ch06_ex2pq.cpp
#include<iostream> using namespace std; #include<functional> #include<queue> //#include<set> #define n 4 #define INF 99999 typedef pair<int,int> node;//<distance,vertex> void countSP(int [][n], int, int [], int [], int []);//prob2 void displayGraph(int [][n]); void displayDistPi(int [], int[]); int main(){ ...
ALGO
0.999944
3.500273
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-10T19:14: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": "624c2552bf65...
f5383fdd-28cb-42c6-bd2b-61fcec6e6976
ericniebler/range-v3
include/range/v3/algorithm/fill.hpp
/// \file // Range v3 library // // Copyright <NAME> 2013-present // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/range...
TOOL
0.95034
6.629167
{ "github_metadata": { "branch": "master", "commit_count": 2541, "repo_created_at": "2013-11-11T16:05:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4273, "forks": 457, "issues": 262, "pull_requests": 24 }, "file_meta": { "content_id": ...
18b8fd9b-2b21-4269-a37c-fc2e165224bd
kumarrohit5010/-OOP-DS-baral-labsheet-4
6.cpp
#include <iostream> using namespace std; class SerialNumber { private: static int count; // Static data member to hold the serial number int serial; public: SerialNumber() { count++; // Increment count for each object created serial = count; // Assign serial number based on count ...
TOOL
0.958317
6.119987
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-08T02:37: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": "f01979e2b155...
f502372c-6a4a-407f-9bf2-fc9207b0b444
lunamu/RandomizedTilingGPU
RTGPU_vs2015/src/UniformGrids.h
#ifndef _UNIFORMGRIDS_ #define _UNIFORMGRIDS_ #include "UtilsDefs.h" //#include <queue> const bool VALID = true; const bool INVALID = false; const int MAX_PER_GRID = 20; using namespace std; struct Grid { int morton; int num; Point2D points[MAX_PER_GRID]; bool valid[MAX_PER_GRID]; int priority[MAX_PER_GRID]; G...
ALGO
0.998106
5.264701
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-03-20T14:56: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": "60b648e94e...
2b4e0472-2a38-44f0-8fc9-146e9e75e85f
loregiac/Projects
High_Performance_Computing_Project/ADI/UNROL/ADI_pad_unrol_4x.cpp
#include <iostream> #include <algorithm> #include <string> #include <fstream> #include <cassert> #include <vector> #include <cmath> #include <malloc.h> #include <immintrin.h> #include "timer.hpp" #define PI 3.141592653589793 typedef int size_type; class Diffusion2D { public: Diffusion2D(const double D, ...
ALGO
0.999539
4.562192
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-27T17:48: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": "e8e8f6f9fb...
bc0727d7-3482-408c-9618-a8b6f91b129f
oosquare/OI-Codes
Storage/Luogu/P1344-追查坏牛奶.cpp
#include <bits/stdc++.h> using namespace std; #define int long long namespace IO { inline char mygetchar() { static char ff[100000], *A = ff, *B = ff; return A == B && (B = (A = ff) + fread(ff, 1, 100000, stdin), A == B) ? EOF : *A++; } template <typename T = int> T read() ...
ALGO
0.999911
4.383048
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2020-01-15T14:44:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa63b115d...
5e4e5a27-b502-4555-80ad-99c9b738d6bd
TCGBench/TCGBench
data/problems/problems_noip/problems_noip/P5684/P5684_std.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1'000'000'007; const int MAX = 2000; // Fast exponentiation ll power_pow(ll a, ll b) { ll res = 1; a %= MOD; while(b > 0){ if(b & 1) res = res * a % MOD; a = a * a % MOD; b >>=1; } return r...
ALGO
0.99999
4.913631
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-16T11:23:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89e7b3ae2fda4...
7c0b0c53-e50c-4f61-84b1-2972551278dd
titastg7/lowLevelDesign
Stackoverflow.cpp
/*########################################################################## System Requirements -------------------- 1. User Management: Users can register, log in, and manage their profiles. 2. Question Handling: Users can post, view, and search for questions. 3. Answering Questions: Users can answer posted questions...
TOOL
0.983906
6.721594
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2024-05-20T10:56: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": "e8a9bbdbb84...
dc89a3a3-d6b8-407b-8ce2-ab19693adbeb
Ras-al-Ghul/SPOJ
PRINT.cpp
// double sieve of eratosthenes // one is within 0 to sqrt(max possible) // other is lower to upper // check edge cases - lower bound, upper bound // here (upper bound - lower bound) was small hence storing an entire sieve was possible // check last line \n needed or not // prime numbers sqrt bounds // manage indexes p...
ALGO
0.999614
4.648418
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2017-07-21T20:23:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc8127bd5...
7577cc9c-75fd-4674-b26a-c75d0913f35d
kothariji/competitive-programming
GeeksforGeek - DSA Practice Problems/ZigZag_Array.cpp
/* * कर्मणये वाधिकारस्ते मां फलेषु कदाचन । * मां कर्मफलहेतुर्भू: मांते संङगोस्त्वकर्मणि ॥ */ #include <bits/stdc++.h> using namespace std; #define bug(...) __f (#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << endl; } template ...
ALGO
0.999979
4.623265
{ "github_metadata": { "branch": "master", "commit_count": 1881, "repo_created_at": "2020-08-27T07:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 680, "forks": 501, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "711...
a05f2235-e680-4d14-9be7-e5ea8ec7bd77
drew138/competitive
ArrayManipulation.cpp
#include <bits/stdc++.h> #define D(x) cout << #x << " = " << x << endl; #define ios ios_base::sync_with_stdio(0), cin.tie(0); #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define all(v) v.begin(), v.end() #define formap(map) for (const auto &[key, value] : map) #define ms(ar, val) memset(ar, val, sizeof ar) typ...
ALGO
0.999883
5.175514
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-08-22T00:09: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": "8fa0a3b58...