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 |
|---|---|---|---|---|---|---|---|
c51cfe6a-72ea-459f-bf94-190c1864819a | aadityarajkumawat/dsa | AlgoExpert Learning/validate-subsequence/validate-subsequence.cpp | #include <iostream>
using namespace std;
// O(n) time | O(1) space
bool validateSubsequenceV0(int array[], int arraySize, int sequence[], int seqSize) {
int arrIdx = 0;
int seqIdx = 0;
while (arrIdx < arraySize && seqIdx < seqSize) {
if (array[arrIdx] == sequence[seqIdx]) {
seqIdx += 1... | ALGO | 0.999396 | 6.197369 | {
"github_metadata": {
"branch": "main",
"commit_count": 175,
"repo_created_at": "2020-11-07T08:22:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17429eeceb... |
829f70e1-986f-4da7-b49e-65517a5f9127 | sweta1947/First-Order-method-filter | first order method.cpp | #include <math.h>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace cv;
using namespace std;
int main()
{
int A[3][3] = { { -1, 0, 1 }, { -2, 0, 2 }, { -1, 0, 1 } };
int B[3][3] = { { 1, 2, 1 }, { 0, 0, 0 }, { -1, -2, -1 } };
int Gx, Gy;
int e,f;
int c = 0;
int d = 0;
... | ALGO | 0.999377 | 3.703595 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-02-27T19:06:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e43b9c1ea... |
249278c4-063d-46d6-a9c1-0e62f196d715 | pranavbochare/DSA-CPP | queues 1/deque_implementation_using_dubly_linked_list_7.cpp | #include<iostream>
using namespace std;
class node{
public:
int val;
node* next;
node* prev;
node(int val){
this->val=val;
this->next=NULL;
this->prev=NULL;
}
};
class Deque{
public:
node* head;
node* tail;
int s=0;
Deque(){
head=tail=NULL;
s=0... | ALGO | 0.988736 | 4.521213 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2024-05-11T14:06: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": "6d38e9feea5... |
c4d1d763-ffc0-4234-8346-166e19646f93 | stefdasca/CompetitiveProgramming | Algorithms/segment-tree.cpp | /// https://infoarena.ro/problema/arbint
#include<bits/stdc++.h>
using namespace std;
ifstream f("arbint.in");
ofstream g("arbint.out");
int n, q, v[100002], aint[400002];
void build(int nod, int st, int dr)
{
if(st == dr)
{
aint[nod] = v[st];
return;
}
int mid = (st + dr) / 2;
bu... | ALGO | 0.999932 | 5.030062 | {
"github_metadata": {
"branch": "master",
"commit_count": 917,
"repo_created_at": "2018-09-28T18:19:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 48,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d622249... |
a2d44d6d-7797-44b8-847b-825eb8d52777 | abhiXsliet/Solved-DSA-Problems | GFG POTD/016-March-2025/028-activity-selection.cpp | // https://www.geeksforgeeks.org/problems/activity-selection-1587115620/1
//{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// TC : O(N*log(N))
// SC : O(N)
int activitySelection(vector<int> &start, vector<int> &finish) {
int n... | ALGO | 0.999694 | 5.71697 | {
"github_metadata": {
"branch": "main",
"commit_count": 2156,
"repo_created_at": "2023-07-29T13:17:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b346a655... |
269560c9-7abe-4ab2-9392-a975c1996144 | anirudhgupta03/LeetCode | DP/368. Largest Divisible Subset.cpp | //LIS Variant
//Ref: https://www.youtube.com/watch?v=Wv6DlL0Sawg
//Method - 1
class Solution {
public:
vector<int> largestDivisibleSubset(vector<int>& nums) {
sort(nums.begin(),nums.end());
int n = nums.size();
vector<int> dp[n];
dp[0].pus... | ALGO | 0.999986 | 6.023989 | {
"github_metadata": {
"branch": "main",
"commit_count": 1112,
"repo_created_at": "2021-01-04T09:39:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f64e993c8... |
dd3dee0e-159d-446f-b9af-8a7fafc3d515 | Abraham-Chileshe/IMKT-FEFU-2022-2023 | ОАиП/semester 2/Laboratory work/lab 2/02.cpp | /*
Реализовать модуль для работы с бинарным деревом (конструктор, деструктор, очищение, размер дерева, вставка элемента, удаление элемента, поиск)
*/
#include <stdio.h>
#include <stdlib.h>
// Структура для представления узла бинарного дерева
struct TreeNode {
int data;
struct TreeNode* left;
struct TreeNo... | ALGO | 0.999665 | 5.905482 | {
"github_metadata": {
"branch": "main",
"commit_count": 108,
"repo_created_at": "2023-03-13T03:42: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": "28bb060ebc... |
e961930a-dd09-4e8d-82a8-b129167d27c4 | JayantGoel001/LeetCode | 752-open-the-lock/752-open-the-lock.cpp | class Solution {
public:
int openLock(vector<string>& deadends, string target) {
unordered_set<string> deadSet(deadends.begin(), deadends.end());
if (deadSet.count("0000")) return -1;
queue<string> q({"0000"});
for (int steps = 0; !q.empty(); ++steps) {
for (int i = q.siz... | ALGO | 0.999939 | 5.862205 | {
"github_metadata": {
"branch": "master",
"commit_count": 7444,
"repo_created_at": "2021-10-01T11:35:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56c9fa... |
592454fe-646c-42e7-ae9b-654884b1c38c | Mizumic/-Assignment-in-Program-Design | test.cpp | #define _CRT_SECURE_NO_WARNINGS
#define MAX_GRID 4 // 4x4网格
//#include<stdio.h>
//#include<stdlib.h>
//#include<math.h>
//#include<string.h>
#include <bits/stdc++.h>
using namespace std;
int gamemap[MAX_GRID][MAX_GRID];//全局变量自动化为0,map数组用于存储各个格子里的值
bool flag = false;
void MoveUp() {//以向上移动为例
//先进行位移
for (int y = 0; ... | ALGO | 0.999892 | 3.027591 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2024-12-11T13:47: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": "151e21d7a... |
fd40bcff-d8f3-4484-a3ed-22d8b8ce364e | srv-code/College-Lab-Exercises | MCA/Sem 1/ADSA/src/stacks_and_queues/stack/using_linked_list/stack_using_linked_list_main.cpp | #include <iostream>
#include "stack_using_linked_list.cpp"
using namespace std;
int main()
{
int continue_input = 1, choice, element;
Stack_Linked_List stack;
system("clear");
while(continue_input)
{
cout << "\n\nEnter choice:" << endl;
cout <... | TOOL | 0.964919 | 4.881696 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-09-30T05:38: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": "eda648f6b6... |
eb75b976-f717-4580-ba60-a8ff1ce025c0 | limmyYun/codetree-TILs | 240819/비오는 날/rainy-day.cpp | #include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <ctime>
using namespace std;
// 날짜 문자열을 tm 구조체로 변환하는 함수
tm stringToDate(const string& dateStr) {
tm date = {};
istringstream ss(dateStr);
ss >> get_time(&date, "%Y-%m-%d");
return date;
}
// 두 tm 구조체의 날짜를 비교하는 함수
boo... | ALGO | 0.999916 | 6.056773 | {
"github_metadata": {
"branch": "main",
"commit_count": 133,
"repo_created_at": "2024-02-18T15:56: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": "7bdeefef9d... |
06e1e0f2-a207-4103-9b7f-aff3e0e4a4dc | ATCA2023/Magnet-Shape-Reconstruction1 | Reconstruction.cpp | #include <iostream>
#include <fstream>
#include <cmath>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <vector>
#include <iomanip>
#include <bitset>
#include <limits>
#include <chrono>
using namespace std;
#define isinsiderecorded (surfacePoint.x > maxX || surfacePoint.x < minX || surfacePoint.y > maxY || surf... | DATA | 0.97451 | 4.041473 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-06-23T05:53: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": "e2e14168295... |
1df4b031-fb2f-4c85-b811-bc6e8657204f | ppwwyyxx/OpenPano | src/stitch/incremental_bundle_adjuster.cc | //File: incremental_bundle_adjuster.cc
//Author: <NAME>
#include "incremental_bundle_adjuster.hh"
#include <Eigen/Dense>
#include <cmath>
#include <memory>
#include <array>
#include "camera.hh"
#include "match_info.hh"
#include "lib/config.hh"
#include "projection.hh"
#include "lib/timer.hh"
using namespace std;
usi... | ALGO | 0.986608 | 6.960677 | {
"github_metadata": {
"branch": "master",
"commit_count": 448,
"repo_created_at": "2013-04-24T03:56:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1966,
"forks": 568,
"issues": 33,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3... |
5786df76-744d-44d2-88a8-589fb23fea5f | forbeb/CNS-hw2 | Person.h | #include <string>
#include <vector>
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class Person {
private:
int shared_key;//shared key between person and server
int secret_key;//secret key used to make shared_key
int final_key;//final key with other person
... | ALGO | 0.997109 | 3.874201 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-12-15T10:30: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": "473169f0cd... |
7afbc93f-29c7-4bfd-b2df-07150737cdb2 | givenone/hardware-system-design-lab7 | src/fpga_api.cpp | #include "fpga_api.h"
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <cstring>
#define min(x, y) (((x) < (y)) ? (x) : (y))
FPGA::FPGA(off_t data_addr, off_t output_addr, int m_size, int v_size)
{
m_size_ = m_size;
v_size_ = v_size;
data_size_ = (m_size_ + 1) * v_size_ *... | ALGO | 0.988344 | 5.489226 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-04-25T13:27: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": "3ed10a31f... |
76ff81b0-0614-4982-acef-93d976176e65 | pinheirovictor/QXD0010_data_structure | 01_princesa/main.cpp | #include <iostream>
#include <list>
using namespace std;
//metodo prencher a lista
void preencherLista(list<int>& participantes,int qtd){
for(int i = 0; i < qtd; i++){
participantes.push_back(i + 1);
}
}
//metodo mostrar a lista
void mostarLista(list<int> lista){
for(auto elemento : lista){
... | ALGO | 0.99985 | 3.636115 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-04-02T18:54: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": "e6e944c85... |
90fc95a8-7eec-42fb-8ec7-4578b38f4596 | joeyl83/Advent-of-Code-2020 | Day3/Day3-Part2/Day3-Part2.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
int calculateTrees(int right, int down, vector<string> slope)
{
int treeCount = 0;
const size_t ROW_SIZE = slope[0].length();
int c = right;
for (int r = down; r < slope.size(); r = r + down)
{
... | ALGO | 0.999949 | 5.225258 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2023-10-18T00:17: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": "5a1d2a49af0... |
466a0789-6beb-4762-9924-9f2defe16e62 | Sifathislam/PhitronAllPrograms | C++/FinalExam/Sort_It.cpp | #include<bits/stdc++.h>
using namespace std;
// Create class
class Student
{
public:
string nm;
int cls;
char s;
int id;
int math_marks;
int english_marks;
int total_marks;
};
// Create the compare function for the sort
bool compare(Student a, Student b){
if (a.total_marks == b.t... | ALGO | 0.996166 | 3.718426 | {
"github_metadata": {
"branch": "main",
"commit_count": 184,
"repo_created_at": "2023-03-31T21:19:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8fed7a500b... |
2cd2b2d4-bb47-4ad8-a176-61f4a538e279 | ishandutta2007/codeforces-h | hollwoq_pelw/normal/1383/E.cpp | /*
/+==================================================+\
//+--------------------------------------------------+\\
|.|\\...>>>>>>> Hollwo_Pelw(ass) 's code <<<<<<<...//|.|
\\+--------------------------------------------------+//
\+==================================================+/
*/
#include <bits/stdc++.h>
using ... | ALGO | 0.999915 | 4.599763 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T02:01: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": "7e5221d2bfa2... |
5fb70fcf-1562-4fe9-ade0-b198e4fd85a2 | ChouE/LeetCode-Cpp | Design/shuffle.cpp | /**
* @file shuffle.cpp
* @author chouev
* @brief 一副牌54张,随机分配给4个玩家
* @version 0.1
* @date 2024-04-04
*
* @copyright Copyright (c) 2024
*
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <random>
#include <numeric>
#include <print>
// shuffle
void shuffleDeck(std::vector<int>& deck){
... | ALGO | 0.991028 | 4.593291 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2021-04-03T08:12:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef33aeb61... |
473194b1-1c7c-403d-96b1-366d21a3bb0f | BryanPKS/Group6_PBFT | PBFT.cpp | #include <iostream>
#include <vector>
#include <cstdlib>
#include <time.h>
#include <iostream>
#include "block.h"
#include "blockChain.h"
#define pre_prepared 0
#define prepared 1
#define committed 2
#define final_committed 3
void pre_prepare_state(int index);
void prepare_state(int index);
void committed_state(int i... | ALGO | 0.999331 | 4.274258 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-11-22T05:24: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": "755f4f1d7ad... |
11d0a072-6f7b-4c97-b815-bd1cd6caa39c | Keiko-Chan/CppIlab- | lfu-cash/lfu_list.h | #include <iostream>
#include <assert.h>
#include <list>
#include <iterator>
//---------------------------------------------------------------------
template <typename T>
struct list_node;
//---------------------------------------------------------------------
template <typename T>
struct lfu_node;
//-----------... | ALGO | 0.974516 | 4.140669 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2021-10-03T18:16: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": "dcde9f9b9... |
e73bb656-c1a9-4e80-bf9b-d1dfe9e395f0 | mayankbist45-zz/Codeforces-Solutions | atcoder/abc128/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;
void solve() {
int n, q;
cin >> n >> q;
vector<pair<int, pair<int, int>>> events;
for (int i = 0; i < n; i++) {
int s, t, x;
cin >> s >> t >> x;
... | ALGO | 0.999743 | 4.693638 | {
"github_metadata": {
"branch": "master",
"commit_count": 678,
"repo_created_at": "2020-12-24T11:23:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c03182a4... |
8630843b-32ec-41ab-ac1e-6a28c221e412 | MohamadKShaheen/CastleDSProject | DS/PQueue.h | #pragma once
#include"PNode.cpp"
template<class T>
class PQueue
{
PNode<T>* Head;
PNode<T>* Tail;
PNode<T>* ref;
int Count;
public:
PQueue(); //default constructor
int getCurrentSize(); //get the size of the list
bool isEmpty(); //check if the list is empty
void addItem(T V,int p); //add new item to t... | TOOL | 0.98565 | 4.181892 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-06T13:00: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": "8bce61f6a082... |
e685d393-3482-4809-aabd-cf80e81f1062 | iwsyhgim005/Coding-Ninjas-Introduction-to-CPP | Lecture 10 Character Arrays and 2D Arrays/PrintAllSubstrings.cpp | /*
Print All Substrings
For a given input string(str), write a function to print all the possible substrings.
Substring
A substring is a contiguous sequence of characters within a string.
Example: "cod" is a substring of "coding". Whereas, "cdng" is not as the characters taken are not contiguous
Input Format:
The fi... | ALGO | 0.999828 | 4.976853 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2022-03-22T14:27: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": "78164675546... |
5f59341a-e13e-4a47-a50a-3e86c1fb61e4 | imsanjayK/DataStructure | LinkList/usingTypedefStruct.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
typedef struct node
//struct node
{
int data;
struct node *next;
//linkList *next;
} linkList;
linkList *start;
//struct node *start;
void insertAtBegin(int value); // push
void insertAtEnd(int value); // push_back enqueue
void display(); ... | ALGO | 0.999325 | 3.447836 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-10-08T15:48:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fee82647a0... |
fcc504bd-b449-4575-8b43-e4ff801c35e8 | Ahmad-Fahad/UVA | solved/C++/11715.cpp | #include<bits/stdc++.h>
using namespace std;
double accelaration(double u, double v, double t)
{
double a = 0;
a = (v - u) / t;
return a;
}
double time(double u, double v, double a)
{
double t = 0;
t = (v - u) / a;
return t;
}
double endVelocity(double u, double a, double s)
{
double v = 0;... | ALGO | 0.999853 | 3.704654 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-03-02T20: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": "26ae8e1c4a... |
099eaaf9-7d51-4d1b-81e6-782f527e6eee | rolandjansky/athena | TestBeam/TBRec/src/TBPlaneTrackingAlgo.h | /*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TBREC_TBPLANETRACKINGALGO_H
#define TBREC_TBPLANETRACKINGALGO_H
#include "AthenaBaseComps/AthAlgorithm.h"
#include "TBEvent/TBHitPlaneCont.h"
#include <utility>
#include <vector>
/** @class TBHitPlane TBHitPlane.h "TBEvent/TBHi... | ALGO | 0.959326 | 6.17512 | {
"github_metadata": {
"branch": "master",
"commit_count": 100549,
"repo_created_at": "2022-08-07T05:54:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c95eb... |
7eea9d92-d319-4df3-8516-4757a61c1381 | HNU-ITEA-Official/10th_HNU_ITEA | pta/pta-a/a1085.cpp | #include <stdio.h>
#include <algorithm>
#define N 100010
using namespace std ;
int main()
{
long long n , p ;
scanf("%lld %lld",&n , &p) ;
long long num[N] ;
for(int i = 0 ; i < n ; i ++)
scanf("%lld",&num[i]) ;
sort(num , num + n ) ;
long long l = 0 , r = 0 , len = 1 ;
for(int l = ... | ALGO | 0.999935 | 3.489091 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-11-22T08:33:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "33f98a50ef0... |
862db644-656f-47d5-821a-8cd929acefd6 | greati/algorithms | Implementations/sorting/merge.cpp | #include <bits/stdc++.h>
using namespace std;
/* Merge
*
* Dados dois vetores, A[p..q] e A[q + 1..r], ambos em ordem crescente,
* une-os em outro vetor A[p..r], mantendo a ordem crescente.
*
* Worst-case: O(n).
* */
void merge(int *A, int p, int q, int r){
int n1 = q - p + 1;
int n2 = r - q;
int L[n1], R[n2]... | ALGO | 0.999935 | 5.465528 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2015-06-13T04:23: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": "f25fb2d6a... |
173940b4-4091-460b-a9b0-4d52fe127102 | mamun-akand/Problem-Solving-List-TOPIC-WISE | Bit Manipulation & Bitmask/Problem Solve/From Codeforce Blog/Codefoce Blog.cpp | // From Blog: https://codeforces.com/blog/entry/73558
#include<bits/stdc++.h>
using namespace std;
//=================================================================
//TYPES
#define ll long long int
#define ld long double
#define vll vector <ll>
#define vld vector <ld>
#define mp map <ll,ll>
#define ... | ALGO | 0.998914 | 3.815254 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2022-03-26T19:55: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": "e800cc60bcd... |
9fe74c57-a100-41df-91b2-a9b349a44461 | Camithilwen/Code-Cloning-Analysis | src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02647/s417089233.cpp | #include <cassert>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;
int N, K;
vector<int> A;
void simulate() {
int RUI[N + 1];
memset(RUI... | ALGO | 0.999934 | 4.042204 | {
"github_metadata": {
"branch": "main",
"commit_count": 243,
"repo_created_at": "2025-06-06T16:57:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "55b7acafdf... |
f064627e-111d-46cf-aa2f-d156c0a81627 | jiji4000/Aizu_online_judge | ITP2/ITP2_11_C.cpp | //
// ITP2_11_C.cpp
// AizuOnlineJudge
//
// Created by jiji on 2019/11/24.
// Copyright © 2019 jiji4000. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n,k;
unsigned int bitNum = 0,maxNum = 0;
cin >> n >> k;
vector<int> vec(k),vec2;
for(int... | ALGO | 0.999854 | 3.870831 | {
"github_metadata": {
"branch": "master",
"commit_count": 216,
"repo_created_at": "2018-02-12T02:46: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": "de46e0c9... |
ddd8f541-438e-444c-aaee-511b1553ffe8 | postech-dblab-iitp/turbograph-v3 | src/include/optimizer/orca/gporca/libgpopt/gpopt/xforms/CXformSimplifyGbAgg.h | //---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2012 EMC Corp.
//
// @filename:
// CXformSimplifyGbAgg.h
//
// @doc:
// Simplify an aggregate by splitting grouping columns into a set of
// functional dependencies in preparation for pushing Gb below... | ALGO | 0.908811 | 6.709903 | {
"github_metadata": {
"branch": "main",
"commit_count": 1476,
"repo_created_at": "2022-04-25T05:31:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 44,
"forks": 27,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "022cf85... |
42c186e4-2a2f-4cca-b7ed-b42ec8037295 | ganya7/Data-Structures | linked-list/singlelink.cpp | #include<bits/stdc++.h>
using namespace std;
class Node {
public:
int data;
Node *next;
Node(int d = 0) {
this->data = d;
this->next = NULL;
}
};
class List {
Node *head;
public:
List() {
head = NULL;
}
void insert_begin(int);
void insert_end(int);
... | ALGO | 0.999168 | 3.904255 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2017-12-27T06:32: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": "0f8554bf7... |
9b488879-33e8-4fb5-aabb-0e5fa6a1d60e | insungg/mcp-production | pythia/build/ageo.cc | // This Pythia script generates p-p fixed target collision events
// and collect the momentum of milicharged particles
#include <iostream>
#include <stdlib.h>
#include <fstream>
using namespace std;
#include "TFile.h"
#include "TTree.h"
#include "TThread.h"
#include "Pythia8/Pythia.h"
// define ageo vector for rec... | DATA | 0.902046 | 4.888237 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2023-08-16T05:36: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": "1cefb7aaa... |
e9a0fbb9-c0db-4f65-81f9-a0ac5c1006cc | AFNAN-091/CP | vjudge/STL_merathon/D.cpp | #include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define lcm(a,b) a*b/__gcd(a,b)
#define endl '\n'
#define yes cout<< "YES\n"
#define no cout<< "NO\n"
#define f(x) cout<< x <<endl
#define in(x) cin>> x
#define er(x) cerr << x << endl
#define FAsT ios_base::sync_with_stdio(false);cin.tie(NULL);
#d... | ALGO | 0.999948 | 4.434114 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-07-22T06:35: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": "bad1fd15843... |
4677b2b2-701a-4f96-b4bd-3d3eeee10d83 | DCTewi/CodeWorkspace | Contests/Luogu/lg1462.cc | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e4 + 5;
const int MAXM = 5e4 + 5;
const ll INF = 1e10 + 5;
struct Edge
{
ll to, cost;
Edge(ll t = 0LL, ll c = 0LL)
{
this->to = t; this->cost = c;
}
};
ll n, m, hp;
vector<Edge> edge[MAXN];
ll fee[MAXN], f_r... | ALGO | 0.999846 | 3.937163 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2019-03-12T11:11: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": "21a671b3... |
67e630ca-0e63-41c7-868e-0a3245b27cb0 | mgh3326/algorithm_inflearn | 37_LRU/37_LRU/소스.cpp | # include <iostream>
// 삽입 정렬
void insertion_sort(int list[], int n) {
int i, j, key;
// 인텍스 0은 이미 정렬된 것으로 볼 수 있다.
for (i = 1; i < n; i++) {
key = list[i]; // 현재 삽입될 숫자인 i번째 정수를 key 변수로 복사
// 현재 정렬된 배열은 i-1까지이므로 i-1번째부터 역순으로 조사한다.
// j 값은 음수가 아니어야 되고
// key 값보다 정렬된 배열에 있는 값이 크면 j번째를 j+1번째로 이동
for (j = i... | ALGO | 0.999995 | 4.930699 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2019-06-19T13:21:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "02b44527a... |
488993cb-d637-40a3-9b7c-4cbab78f43dd | deepam20050/IOI-training-archive | CEOI/2016/Kangaroo.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
scanf("%d %d %d", &n, &cs, &cf);
if (n == 2) {
return !printf("1");
}
for (int i = 1; i <= n; ++i) {
dp[n - 2][i][0] = 1;
dp[n - 2][i][1] = 1;
}
for (int i = 1; i <= n; ++i) {
pref[i][0] = pref[i - 1][0] + 1;
pref[i][1] = pref[i - 1][1] + 1;
... | ALGO | 0.999911 | 3.392854 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-10-31T10:44: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": "3f91ae41977f... |
23f34799-abe5-4c79-bdbb-9f65bf6112ca | kaii789/disaggregated-systems-research | common/performance_model/CAM_lz.cc | #include <assert.h>
#include <limits>
#include <iostream>
#include "CAM_lz.h"
CAMLZ::CAMLZ(string name, bool size_limit)
: m_name(name)
, m_cur_size(0)
, m_size_limit(size_limit)
{
m_dictionary_table = map<string, UInt32>();
m_reverse_table = map<UInt32, string>();
if(m_size_limit == true)
... | TOOL | 0.94776 | 5.360878 | {
"github_metadata": {
"branch": "master",
"commit_count": 764,
"repo_created_at": "2022-01-28T20:53:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb231956... |
e7fa409c-8f6b-4ade-ae48-deffa6e1d4c5 | natigeorgieva/SDP-2020 | Week 7/Solutions/task1.cpp | #include <iostream>
#include <stack>
/**
Функция, която по подадена РЕФЕРЕНЦИЯ към стек от цели числа
въвежда в нея числа от клавиатурата докато не достигне 0
@param[in] st референция към стек от цели числа
*/
void inputStack(std::stack<int>& st) {
int input; ///Променливата, в която ще помним текущото въведено ... | ALGO | 0.999823 | 5.023263 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-02-23T07:53:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a290d060b... |
816578be-b4e7-4545-be51-3afd34f30629 | syzygy608/CP_Practice | 2024/0707/cf/gym/533225/c/c.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <bitset>
#include <vector>
#include <utility>
#include <cassert>
#define F firs... | ALGO | 0.999942 | 3.462287 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2023-06-16T12:49:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7ce6781a58... |
ab9a5988-d699-4aae-88df-2806f7b0a358 | Jin-s-work/Algorithm | 그리디/BOJ 13975 파일 합치기 3.cpp |
#include <iostream> // stdio.h 와 같은 것
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <cmath>
#include <functional>
#include <map>
#include <set>
// control i
#define MAX 987654321
#define mod 1000000007
#define pii pair<int, int>
using ll = long... | ALGO | 0.999924 | 4.40728 | {
"github_metadata": {
"branch": "main",
"commit_count": 1201,
"repo_created_at": "2021-10-15T14:20:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e8be7fb8... |
44272dfb-d95e-408f-8089-b70bbd6c5e81 | AndroidBBQ/android10 | frameworks/ml/nn/driver/cache/BlobCache/BlobCache.h | /*
** Copyright 2011, The Android Open Source Project
**
** 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 b... | TOOL | 0.902567 | 7.550759 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-06-01T12:36:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 204,
"forks": 69,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "477857f98... |
6183a543-9be2-4462-86eb-8a47f183ea44 | ChavezLv/MyCode | mycode/PROJ/2021/39_works_by_myself/120821CppDay17/templateQueue.cc | #include <string.h>
#include <iostream>
#include <vector>
#include <memory>
#include <algorithm>
/* using namespace std; */
using std::cout;
using std::endl;
using std::shared_ptr;
#define N 10
template<typename Type>
class Queue {
public:
Queue();
void push(Type node);
void pop();
Type front();
... | TEST | 0.9223 | 4.095675 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2021-10-19T00:19:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88bec7dbe6... |
fb34b750-808c-4f74-90c6-7d476b079431 | psiskova/pancakes | Palacinky1/main.cpp | #define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include "palacinka.h"
#include "palacinkaGates.h"
#include "palacinkaGatesOpt.h"
#include "palacinkaGatesOpt2.h"
#include "twoDimensional.h"
#include <algorithm>
#include <array>
#include <random>
#include <chrono>
#include <Windows.h... | ALGO | 0.998104 | 4.297608 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-05-24T10:42:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52a53480f4... |
18fec762-fdd3-41e1-a8c5-b751bc937557 | NilFoundation/crypto3 | libs/blueprint/include/nil/blueprint/components/merkle_tree/r1cs/check_update.hpp | //---------------------------------------------------------------------------//
// Copyright (c) 2020-2021 <NAME> <<EMAIL>>
// Copyright (c) 2020-2021 <NAME> <<EMAIL>>
// Copyright (c) 2021 <NAME> <<EMAIL>>
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this s... | ALGO | 0.998019 | 7.288285 | {
"github_metadata": {
"branch": "master",
"commit_count": 10456,
"repo_created_at": "2019-04-13T23:20:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 84,
"forks": 13,
"issues": 44,
"pull_requests": 9
},
"file_meta": {
"content_id": "b615... |
5416387b-a61e-47d2-9109-902ed70ee450 | XOttabich77/cpp-search-server | search-server/search_server.cpp | #include "search_server.h"
using namespace std;
SearchServer::SearchServer(const std::string& stop_words_text)
: SearchServer(
SplitIntoWords(stop_words_text))
{
}
void SearchServer::AddDocument(int document_id, const std::string& document, DocumentStatus status, const vector<int>& ratings)
{
... | WEB | 0.992579 | 6.367321 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-05-01T13:16: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": "83085e7a4ee... |
54476b4f-e590-4ede-ab9b-e41b85f2774f | HarshCasper/NeoAlgo | C-Plus-Plus/heap/heap_implementation.cpp | /*
Heap is a binary tree which satisfies two properties:
1.Structure Property: All levels have maximum number of nodes except possibly the last level. In the last level, all nodes are to the left.
2.Heap Order Property: (max heap)Key in any node N is greater than or equal to the keys in both children of N.
... | ALGO | 0.999515 | 4.178698 | {
"github_metadata": {
"branch": "master",
"commit_count": 7521,
"repo_created_at": "2020-06-24T16:04:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 887,
"forks": 1041,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f... |
c6c40ea7-799f-4385-96f1-4355adadc116 | keifergu/vsrs | ViewSynLibStatic/src/Visbd.cpp | /*
* This software module ViSBD (View Synthesis Based on Disparity /Depth was originally developed by
* THOMSON INC. in the course of development of the ISO/IEC JTC1/SC29 WG 11 (MPEG) 3D Video for reference
* purposes and its performance may not have been optimized.
*
* Those intending to use this software modul... | TOOL | 0.986863 | 4.52881 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-06-07T12:08:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51f06eb5f... |
92654500-8edb-4b24-b806-1822871592d3 | odelalleau/PLearn | plearn/math/Mat.cc | // -*- C++ -*-
// PLearn (A C++ Machine Learning Library)
// Copyright (C) 1998 <NAME>
// Copyright (C) 1999-2002 <NAME>, <NAME> and University of Montreal
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.... | TOOL | 0.967945 | 5.745606 | {
"github_metadata": {
"branch": "master",
"commit_count": 10214,
"repo_created_at": "2011-11-03T15:46:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ca3c... |
26f55942-20ad-4cbb-9b92-3563c5b9e8c0 | nishantbadhautiya/My_Programming_Practice | DSA/C++/Love Bubber/Practice/27_double_pointers.cpp/1_main.cpp | #include <iostream>
using namespace std;
int main()
{
int num = 3;
int *ptr = #
int **ptr2 = &ptr;
int ***ptr3 = &ptr2;
cout << "Printing number : " << num << endl;
cout << "Printing ptr: " << ptr << endl;
cout << "Printing address of ptr: " << &ptr << endl;
cout << "Printing ptr2: " << ... | ALGO | 0.999022 | 3.768662 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2024-06-24T13:52: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": "95b3b62f17... |
d48b8133-9ab0-48c0-ab67-1fa9edb7e435 | flyingzhao/FacialExpressionDetection | lib/asmmodel.cpp | #include "asmmodel.h"
#include <cstdio>
namespace StatModel {
void ASMModel::buildModel(const string& shapeDefFile, const string& ptsListFile)
{
ShapeModel::buildModel(shapeDefFile, ptsListFile);
printf("(II) Building active model...\n");
buildLocalDiffStructure();
}
void ASMModel::buildLocalDiffStructu... | ALGO | 0.983421 | 3.555318 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2015-09-15T04:53:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 19,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e558af... |
c3cc5513-9fc3-4052-840c-b82fc3460bcf | HLSources/Tyrian-GroundAssault | xbm/bot_navigate.cpp | #include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "bot.h"
#include "bot_cvar.h"
#include "bot_func.h"
#include "bot_weapons.h"
#include "waypoint.h"
#include "pm_shared.h"// XDM3035c: VEC_HULL_*
// SET THIS UP BASED ON MOD!!!
int max_drop_height = 800;
static FILE *fp;
void BotFixIdealPitch(edict_t *... | ALGO | 0.982197 | 5.299741 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-12-03T12:31:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afda5d2833c... |
6ca516d5-42db-4698-92b9-9966eb925372 | alexzanderr/ProgrammingProblems | infoarena/dfs/solutie.cpp | #include <iostream>
#include <fstream>
using namespace std;
int matrice_adiac[1005][1005];
int vizitati[1005];
void print_matrice(int matrice[][1005], int dim) {
for (int i = 1; i <= dim; i++) {
for (int j = 1; j <= dim; j++) {
cout << matrice[i][j] << " ";
}
cout << "\n";
}
cout << endl;
}
void print_vi... | ALGO | 0.999955 | 4.64976 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-10-06T17:46: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": "f7056bbcb0... |
25fc9064-413a-4018-9590-16f0bfb92020 | memset0/vjudge-code | 计蒜客/T2068/28289674_AC_6ms_8468kB.cpp | // luogu-judger-enable-o2
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define M 10007
#define null NULL
#define caser(c) (c=='*')
int len;
char s[150000];
int match[150000]= {0}; // Match ')' by '('
int stack[150000]= {0}; //Stack [0..n]
void fillmatch(int n) {
int top=-1;
for(int i=0; i<n; i+... | ALGO | 0.999996 | 3.814434 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2020-11-05T04:40:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8204ba4e... |
80e30a96-2967-477d-8d19-2b2e5813cf13 | rafftod/ARGoS3-AutoMoDe | src/modules/AutoMoDeConditionNeighborsCount.cpp | /**
* @file <src/modules/AutoMoDeConditionNeighborsCount.cpp>
*
* @author <NAME> - <<EMAIL>>
*
* @package ARGoS3-AutoMoDe
*
* @license MIT License
*/
#include "AutoMoDeConditionNeighborsCount.h"
namespace argos {
/****************************************/
/****************************************... | ALGO | 0.931241 | 5.89334 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2022-07-14T10:44: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": "9bd477b95... |
387ba49f-b5b9-48f5-9a1b-cbf9ab6f40ad | shivgupta198922/LEETCODE-MASTER--Solution | 2326-spiral-matrix-iv/2326-spiral-matrix-iv.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:
static vector<vector<... | ALGO | 0.999995 | 5.515798 | {
"github_metadata": {
"branch": "main",
"commit_count": 1176,
"repo_created_at": "2024-04-20T15:30:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "454c6368c... |
8bbb0ab8-3717-44eb-bf69-d6566cb9cd2f | llynv/CP-files | icpc/icpc_g.cpp |
/*
Code by: linvg
Created: 28.10.2024 15:46:09
*/
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
const int INF = 0x3f3f3f3f3f;
const int MOD = 1e9 + 7;
const int N = 5e5 + 7;
int mp[N], oneAfterPos[N], pref[N];
char a[N];
void solve()
{
i... | ALGO | 0.999986 | 4.19378 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-05-26T04:12: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": "b38cbe13064... |
399c933f-aad5-4435-9b60-ef6b2f6a3299 | jmparlett/problemSolutions | advent_of_code_2021/day1/day1.cpp | #include <iostream>
#include <algorithm>
using namespace std;
#define ll long long int
#define ull unsigned long long int
#define li long int
#define ui unsigned int
void p1(FILE* f){
int current=0;
int prev=0;
int count=0;
fscanf(f, "%d\n",&prev);
while(fscanf(f, "%d\n",¤t) > 0){
if(current >... | ALGO | 0.999482 | 3.537858 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2021-07-16T04:50: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": "f5f79ecb3f5... |
479a9cd5-4a01-48ec-9091-8fc4c943195a | baszabilsal/LeetCode_DataStructureAndAlgorithm | Algorithm/15_3Sum/main.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
vector<vector<int>> threeSum(vector<int> &nums)
{
vector<vector<int>> output;
if (nums.size() > 2)
{
sort(nums.begin(), nums.end());
for (int i = 0; i < nums.size() - 2; i++)
{
... | ALGO | 0.999916 | 5.356731 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2022-02-22T02:38: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": "25688681f98... |
3a12ce87-2bfc-43c1-acdb-0530d5904fa8 | ZichenMen/cpp-programs | MusicRecommender/Recommender.cpp | /**
* A comprehensive C++ class designed for a music recommender system. It
* provides functionalities to manage user and artist data,
* and generate music recommendations based on users' listening habits and their social network.
*
* @author <NAME> <<EMAIL>>
* @date 12/1/2023
* @version __1.0__
*
*/
#include... | WEB | 0.950332 | 7.518674 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-01-31T06:41: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": "6cff17c58f24... |
e788d0f8-1472-4861-a64a-3c0fb464d34a | CarVac/librtprocess | src/include/xtranshelper.h | /*
* This file is part of librtprocess.
*
* Copyright (c) 2018 <NAME>
* Copyright (c) 2019 <NAME>
*
* librtprocess is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the license, or
*... | ALGO | 0.95763 | 5.874305 | {
"github_metadata": {
"branch": "master",
"commit_count": 233,
"repo_created_at": "2018-08-28T23:09:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 56,
"forks": 24,
"issues": 13,
"pull_requests": 2
},
"file_meta": {
"content_id": "08854... |
3ca9eb16-d998-49e6-b602-85a66a5ba4e7 | NishaMajhi/data-Structure | Recursion/removeLinkedListElement.cpp | /*
Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.
Example 1:
Input: head = [1,2,6,3,4,5,6], val = 6
Output: [1,2,3,4,5]
Example 2:
Input: head = [], val = 1
Output: []
Example 3:
Input: head = [7,7,7,7], val = 7
Outp... | ALGO | 0.999939 | 5.758954 | {
"github_metadata": {
"branch": "main",
"commit_count": 290,
"repo_created_at": "2021-07-21T11:39:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "daf810cf9e... |
11df59d8-3af9-4759-86a3-d98f0849e344 | jwezorek/advent_of_code | src/2019/day_10.cpp | #include "../util/util.h"
#include "y2019.h"
#include <filesystem>
#include <functional>
#include <print>
#include <ranges>
#include <unordered_set>
#include <numbers>
#include <boost/geometry.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries... | ALGO | 0.998812 | 6.153528 | {
"github_metadata": {
"branch": "main",
"commit_count": 450,
"repo_created_at": "2023-11-18T01:12:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c9237308c... |
0f6e30cd-7853-4090-992c-0cafee253d4b | mt-revolution/Competition | Atcoder/GigaCode2019D.cpp | #include<bits/stdc++.h>
using namespace std;
int main() {
int H,W;
long long K,V;
cin >> H >> W >> K >> V;
vector<vector<long long>> A(H, vector<long long>(W));
for(int i = 0; i < H; i++) {
for(int j = 0; j < W; j++) {
cin >> A[i][j];
}
}
vector<vector<long l... | ALGO | 0.999652 | 3.980442 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2020-11-25T10:11:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "33c2e53e6... |
91940811-38b1-4048-a9cf-bd78cfe1d129 | jashwanth/Advanced-Data-Structures- | HW1/doubleLinkedList.cpp | #include "doubleLinkedList.h"
doubleNode::doubleNode(int item, doubleNode* prev, doubleNode* next)
{
this->data = item;
this->prev = prev;
this->next = next;
}
int doubleNode::getNodeData()
{
return this->data;
}
doubleNode* doubleNode::getPrevNode()
{
return this->prev;
}
doubleNode* doubleNode::getNextN... | ALGO | 0.999822 | 3.923962 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-02-25T05:58:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "742613adba... |
0b6a38e4-c08e-46a8-8c54-8a29580a334b | Eskalante/Research | ShapeComparator/ShapeComparator/feature_rad2.h | #pragma once
#include "include.h"
// const double pi=3.14159265;
// test
class feature_rad2{
// C&D
public:
virtual ~feature_rad2() {}
// ACC
public:
virtual Mat extract(Mat input) {
return extract(input, 0, 150);
}
virtual Mat extract(Mat input, int from, int to) {
pi = 3.14159265;
double dfrom = (doub... | ALGO | 0.921908 | 4.801561 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-03-10T19:26: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": "353f77c055... |
a11d53fe-ba48-4961-aa57-ca071c7d87a7 | alexandraback/datacollection | solutions_5708284669460480_1/C++/akashin/b.cpp | #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <memory.h>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#define DB(x) cerr << #x << ": " << x << endl;
using namespace std;
//const char* inputFile = "file.in";
//const cha... | ALGO | 0.999348 | 3.80641 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "130acd205... |
717f2bb7-edf0-4486-b170-006efa7d1d4a | dillongoostudios/goo-engine | source/blender/compositor/operations/COM_CalculateMeanOperation.cc | /* SPDX-FileCopyrightText: 2011 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "COM_CalculateMeanOperation.h"
#include "COM_ExecutionSystem.h"
#include "IMB_colormanagement.h"
namespace blender::compositor {
CalculateMeanOperation::CalculateMeanOperation()
{
this->add_input_socket(Da... | TOOL | 0.918229 | 7.171451 | {
"github_metadata": {
"branch": "goo-engine-main",
"commit_count": 132039,
"repo_created_at": "2021-05-08T09:53:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1109,
"forks": 148,
"issues": 44,
"pull_requests": 6
},
"file_meta": {
"conte... |
8ba3811a-4b02-4dc5-ab78-261a2e6fd001 | RonaldoQuang/Codeptit-CPP | CPP0319-NHO NHAT-LON NHAT.cpp | //Cho số tự nhiên m và số nguyên s không âm.
//Nhiệm vụ của bạn là tìm số bé nhất và lớn nhất có m chữ số và tổng chữ số bằng s.
//Input
//Dòng đầu gồm 2 số m và s (1 ≤ m ≤ 100, 0 ≤ s ≤ 900).
//Output
//In ra kết quả của bài toán.
//Số đầu tiên là số bé nhất, số thứ hai là số lớn nhất.
//Nếu không có đáp án in ra “-1 ... | ALGO | 0.999873 | 3.559707 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2025-06-24T03:44: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": "ea07be3f4a1... |
98084acf-cd94-4e89-807c-d9ba18e63ac8 | travisdriver/object_tracking_ros | src/tracker.cpp | #include "tracker.h"
using namespace cv;
using namespace std;
const double NN_MATCH_RATIO = 0.75f; // nearest-neighbour matching ratio
const double RANSAC_THRESH = 2.5f; // RANSAC inlier threshold
const double ps = 0.0000035; // pixel size in meters
//const Mat CAMERA_MAT = (Mat1d(3, 3) << 1158.03, 0., 540.,
... | ALGO | 0.983133 | 6.069285 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2019-03-08T21:28: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": "184cec0e1... |
c45aea3a-d52e-4002-9a10-d240919ccb6d | Hcavazosg/claseprogramacion | Clase 6/Clase 6/Source.cpp | #include<iostream>
using namespace std;
void main() {
//// Ciclo es una sección de código que se va a repetir mientras una condición sea cumplida.
//// For, While, Do-While
//for (int i = 0; i < 5; i++) {
// // - Una variable que irá aumentando o disminuyendo
// // - Una condición a cump... | TOOL | 0.984402 | 3.186939 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-04-18T22:11: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": "95167a7c5689... |
64ce5641-9f9a-4226-948c-480976a19bc6 | SoCuteCute/Google_Kick_Start | 2020C-Q3-PerfectSubway-AC.cpp | /***********************************************
#
# Filename: 2020C-Q3-PerfectSubway.cpp
#
# Author: <NAME> - <EMAIL>
# Description: ---
# Create: 2020-11-13 17:42:55
# Last Modified: 2020-11-15 00:44:57
#
***********************************************/
#include <iostream>
#include <stdio.h>
#inc... | ALGO | 0.999687 | 4.078399 | {
"github_metadata": {
"branch": "Brodong",
"commit_count": 90,
"repo_created_at": "2020-10-28T13:47:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "092969c4... |
960491be-bbc3-44e7-9d34-7fb5d6679a7f | utopia9527/Daily-Exercises | 2021-8-27/MedianFinder.cpp | class MedianFinder {
public:
/** initialize your data structure here. */
//一个大堆一个小堆
//小堆的堆顶,是较大元素中最小的一个
//大堆的堆顶,是较小元素中的最大的一个
//两者的数量相差不超过1
//注意点:需要保证小堆的所有元素都大于大堆的元素,因此每个元素入大堆前,都需要与小堆堆顶进行比较
MedianFinder() {}
void addNum(int num) {
if(min_heap.empty())//小堆为空,先入小堆
... | ALGO | 0.999994 | 5.838732 | {
"github_metadata": {
"branch": "main",
"commit_count": 345,
"repo_created_at": "2020-11-09T06:41: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": "f071a853ee... |
9295d3e0-0e45-4656-a565-4bf725d4097e | adamm-xyz/CTCI | Chapter2/Problem3/problem3.cpp | #include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
struct Node
{
int data;
Node *next;
};
class LinkedList
{
private:
Node *head;
int count;
public:
LinkedList()
{
head = NULL;
count = 0;
}
void AppendNode(int x)
{
Node *temp = new Node;
temp->data = x;
te... | ALGO | 0.998559 | 4.253864 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2020-10-27T00:12: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": "aa1fab6a743... |
f29b8156-d176-46d8-9aa1-ca0be5e0a87c | deoliaman00/GraphSeriesStriver | noOfConnectedComponents.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution
{
public:
void dfs(int node, vector<int> adjA[], int V, int vis[])
{
vis[node] = 1;
for (auto it : adjA[node])
{
if (!vis[it])
... | ALGO | 0.999968 | 6.225308 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-01-10T16:14:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edd35b263073... |
e55b61fd-d4cf-4c16-a0a4-41e318018651 | sdx0909/dsa-problems-cpp | Queue/02-impl-circular-queue.cpp | #include<iostream>
#include<process.h>
#define MAX 5
using namespace std;
class Queue{
public:
int item[MAX],front,rear;
// operations
void create(Queue*);
void isEmpty(Queue*);
void isFull(Queue*);
void insert(Queue*,int);
int remove(Queue*);
void display(Queue*);
};
void ... | ALGO | 0.995184 | 4.412799 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-12-20T06:04: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": "e0c243c1da2... |
565d8756-11d5-4efc-808b-eece03fd9800 | DonWick32/IPMP | Week-8/Trees/Trees_22.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.999978 | 5.3701 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-02-04T05:22:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "01da80a1c59... |
41694a4a-7159-4dac-af3c-e6157f7d9059 | alwzbright97/Cpp-practice | codetree/grading-machine.cc | /*
코드트리 채점기
N개의 채점기가 준비
u0 : 초기 문제 URL
문제에서 URL = 도메인/문제ID(string)
도메인 : 알파벳 소문자 + '.'
문제 ID : 1 이상 10억 이하 정수값(int)
1. 준비
N개의 채점기
1번부터 N번까지의 번호
0초에 채점 우선 순위가 1인 URL이 u0인 초기 문제에 대한 채점 요청
채점 TASK는 채점 대기큐에 들어감
2. 채점 요청
t초에 채점 우선 순위가 p이면서 URL이 u인 문제에 대한 채점 요청
채점 TASK는 채점 대기 큐에 들어간다
채점 대기 큐에 있는 task 중 정확히 u와 일치하는 url이 단... | ALGO | 0.993859 | 5.109288 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2022-04-06T02:09: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": "cea1197cd... |
bd89d6b4-25c0-4ea0-acd4-91a8d21d1cd9 | mwy3055/Algorithm-codes | baekjoon/cpp/c++/3119.cpp | #include <bits/stdc++.h>
using namespace std;
struct board
{
int x, w, h, idx;
bool visible = false;
};
class cmp
{
public:
bool operator()(const board &a, const board &b) const
{
if (a.h != b.h)
return a.h > b.h;
if (a.x + a.w != b.x + b.w)
return a.x + a.w > b... | ALGO | 0.999992 | 4.173701 | {
"github_metadata": {
"branch": "main",
"commit_count": 1073,
"repo_created_at": "2022-01-08T11:18:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e45114df9... |
f9246aae-5ee6-4eca-bfb4-92d4ec75fde5 | BIC-MNI/EZminc | distortion_correction/sphericalHarmonicsTransform.cpp | /* ----------------------------- MNI Header -----------------------------------
@NAME :
@DESCRIPTION:
@COPYRIGHT :
Copyright 2006 <NAME>, McConnell Brain Imaging Centre,
Montreal Neurological Institute, McGill University.
Permission to use, copy, modify, and distribut... | TOOL | 0.943049 | 4.991822 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2012-03-08T18:19:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6,
"forks": 6,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb13096f8... |
ca24de1b-f6c3-49d7-9423-6429df85a623 | KratosMultiphysics/Kratos | applications/PoromechanicsApplication/custom_strategies/strategies/poromechanics_newton_raphson_nonlocal_strategy.hpp |
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: <NAME>
//
#if !defined(KRAT... | ALGO | 0.999643 | 6.23136 | {
"github_metadata": {
"branch": "master",
"commit_count": 106408,
"repo_created_at": "2017-02-13T10:58:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1141,
"forks": 265,
"issues": 381,
"pull_requests": 258
},
"file_meta": {
"content_id"... |
4739f006-c285-4bc0-ab2f-a44ab2eca105 | TiagoPinto13/Projeto-AED-2 | Projeto - Air Travel Flight Management System/Classes/Graph.h |
#ifndef PROJETO2_GRAPH_H
#define PROJETO2_GRAPH_H
#include <cstddef>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include "Airport.h"
#include <unordered_map>
#include <unordered_set>
using namespace std;
class Edge;
class Graph;
class Vertex;
/****************** Provided... | ALGO | 0.999178 | 3.35586 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2023-12-18T16:39:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0983d019b76... |
1a7b66f4-e1df-4fce-9b01-0f2a81889413 | OpenFOAM/OpenFOAM-dev | src/lagrangian/DSMC/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\... | ALGO | 0.992217 | 5.940272 | {
"github_metadata": {
"branch": "master",
"commit_count": 8589,
"repo_created_at": "2014-12-10T15:47:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1770,
"forks": 642,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "9a... |
887e5e02-00d7-404b-9f3f-dc8f9fe9db59 | xSeanliux/CompetitiveProgramming | UVa/11631/11631.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int disjoint[200000], n, m, a, b, w;
struct Path{
int e;
int s;
int wei;
};
class cmp{
public:
bool operator() (const Path &a, const Path &b) const{
return a.wei > b.wei; //the less the better
}
};
void sortOu... | ALGO | 0.999976 | 3.693734 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2018-11-18T06: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": "4a7068843... |
f6851ba3-e559-45a0-bca2-5777e754956e | JhaPrajjwal/ADSA | AVL Trees/AVL.cpp | #ifndef AVL_CPP
#define AVL_CPP
#include "BSTree.hpp"
#include "AVL.hpp"
#include<iostream>
#define inf 10000000
template<typename Key,typename Value>
int AVL<Key,Value>::size(BinaryNode<Key,Value> *root)
{
if(root==NULL) return 0;
return root->size;
}
template<typename Key,typename Value>
int AVL<Key,Value>::hei... | ALGO | 0.999363 | 4.689397 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-10-09T22:13: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": "2abd9d219f... |
d73cdc04-a9e4-4591-b195-4b4e1b6a1f5a | ishandutta2007/codeforces-r | realcomplex/normal/1213/F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = (int)2e5 + 9;
vector<int> T[N];
vector<int> R[N];
vector<int> ord;
bool vis[N];
vo... | ALGO | 0.999996 | 3.260902 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58: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": "1878fbb1b3ae... |
b71c1468-b1e3-424e-9dcc-2a637eff0d05 | vietdung07/c- | Data structures and Algorithms/LinkedList.hpp | #ifndef LINKED_LIST_MY_OWN
#define LINKED_LIST_MY_OWN
#include <iostream>
template <typename T1>
class LinkedList;
template <typename T>
class NODE
{
private:
NODE<T> *pre;
NODE<T> *nxt;
public:
T data;
NODE();
NODE(T _data);
NODE(const NODE &other);
NODE(NODE &&other);
friend class Li... | ALGO | 0.999595 | 5.383321 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2023-07-07T15:04:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8db648703... |
4bbc561e-4303-4235-bedc-5590e0fd34e1 | AhmedAshraf0/problem-solving-codeforces | P27. Scores in Order.cpp | //
// Created by CST on 15-Jan-22.
//
#include<bits/stdc++.h>
using namespace std;
bool compare(pair<pair<int,int>,int> p1, pair<pair<int,int>,int> p2){
if(p2.first.first >= p1.first.first)
return false;
return true;
}
bool compare2(pair<pair<int,int>,int> p1, pair<pair<int,int>,int> p2){
if(p2.seco... | ALGO | 0.999998 | 4.169804 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-07-01T19:14:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "90de2c4d53ee... |
224e99d5-835e-48ba-82b1-78a20a5f14a8 | EvanWang2015/Algorithms-DataStructure | shortest_path.cpp | #include <iostream>
#include <limits>
#include <vector>
#include <queue>
#include <functional>
#include <climits>
using std::vector;
using std::queue;
using std::pair;
using std::priority_queue;
using std::make_pair;
using std::greater;
typedef pair<int, long long> iPair;
void shortest_paths(vector<vector<iPair> > &a... | ALGO | 0.999954 | 3.557036 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2017-08-25T18:18: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": "03fec84c3... |
337548d5-0ea6-4ba9-8f26-2def8e5b5b7b | rranjik/ideal-octo-barnacle | 34-FindFirstAndLastPositionOfElementInSortedArray.cpp | class Solution {
public:
int bsl(const vector<int>& v, int t){
int l = 0;
int h = v.size()-1;
int res = -1;
while(l<=h){
//cout<<"l = "<<l<<"; h = "<<h;
int m = (l+h)/2;
//cout<<"; v[m] = "<<v[m]<<endl;
if(v[m] == t){
re... | ALGO | 0.999925 | 6.085465 | {
"github_metadata": {
"branch": "master",
"commit_count": 1637,
"repo_created_at": "2018-11-29T16:48:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6380adb... |
a5dfecc6-cb86-4fee-b54f-06b8d9d85a04 | nci/drishti | tools/paint/morphcurve.h | #ifndef MORPHCURVE_H
#define MORPHCURVE_H
#include <QtWidgets>
#include "commonqtclasses.h"
#include <QPointF>
#include <QMap>
//#include <QGLViewer/qglviewer.h>
//using namespace qglviewer;
// A tuple containing the editions array (an int[n][3] array)
// and the length of such array.
// This is used only by the fin... | ALGO | 0.952829 | 5.384319 | {
"github_metadata": {
"branch": "master",
"commit_count": 1000,
"repo_created_at": "2013-11-05T04:00:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 193,
"forks": 40,
"issues": 63,
"pull_requests": 2
},
"file_meta": {
"content_id": "6511... |
847b2170-12ff-43ce-bb09-6685165102fa | darthvaderrr-21/datastructure-and-algorithm | DP/largestIncresingSubsequence.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e5;
int dp[N];
int lis(vector<int> v, int n) {
if(n == 0) {
return 1;
}
if(dp[n] != -1) {
return dp[n];
}
dp[n] = 1;
for(int i=0; i<n; i++) {
if(v[n] > v[i]) {
dp[n] = max(dp[n], 1+lis(v, i))... | ALGO | 0.999959 | 4.82042 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-06-20T05:13: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": "a71ed62622f... |
718030f2-da66-4b8d-b269-9483c0335e90 | BharatAtbrat/LeastCode | Backtracking/N_queens.cpp | //Hard FB (fb is notorious for difficult questions apparently)
//TC O(n*n) or O(n!)
//SC O(n^2) 2d grid vector based to max n^2
/* Logic: place in diff rows
now place in one of the n cols and check if col + posDiagt+ negDiag
are different than the already stored in set, set stores the previous queen ke
posdiag an... | ALGO | 0.999876 | 5.903835 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-08-20T18:16:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22e34ebd481... |
9ecb42b3-a17d-4dfa-bd1a-3ad3d8335c57 | Rishi-11-2/CP | F_Rearrange_Query.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;
using namespace chrono;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define debug(x...) { cout << "(" << #x << ")" << " = ( "; PRINT(x); }
tem... | ALGO | 0.999962 | 4.392226 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2023-10-19T06:20: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": "9ee2231a7d5... |
7a6c3fec-1f5b-4288-97de-49a4985fd46a | L1Trk/SimpleTracklet | L1Trigger/TrackFindingTMTT/interface/HLS/KalmanUpdateHLS.h | /**
* This is the top-level HLS function within CMSSW, which updates a helix state by adding a stub to it.
* N.B. It therefore can't use the Settings class or any external libraries! Nor can it be a C++ class.
*
* All variable names & equations come from Fruhwirth KF paper
* http://dx.doi.org/10.1016/0168-9002%288... | ALGO | 0.910714 | 5.977587 | {
"github_metadata": {
"branch": "SimpleTracklet",
"commit_count": 192614,
"repo_created_at": "2019-02-08T15:21:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id":... |
c5b07610-c5d8-419a-ab9b-7a9e2a76dcb5 | 21Gxme/Data-structure-and-Algorithm1 | Heaps/Heaps.cpp | #include <iostream>
using namespace std;
class PriorityQueue
{
public:
virtual void insert(int val) = 0;
virtual int extract_min() = 0;
};
class Heap : public PriorityQueue
{
private:
int h[1000];
int h_size;
void heap_swap(int pos_a, int pos_b) {
int temp = h[pos_a];
h[pos_a] = ... | ALGO | 0.999936 | 5.258574 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-06-13T08:29: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": "0e0fddfc77bb... |
512e15b1-a876-4827-ab91-85fdabce1e9a | swimmingturtle165/Coding | CodeForces/Educational Codeforces Round 72/ques2.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;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> pll;
#define FOR(i,a,b) ... | ALGO | 0.999942 | 3.939832 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2020-10-06T12:22:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0aae65b04... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.