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 |
|---|---|---|---|---|---|---|---|
53972d96-83a2-403f-b509-0381a17bfaaa | EvanBrown96/560labs | lab11/BSTNode.cpp | /**
* @author: <NAME>
* @file: BSTNode.cpp
* @date: 2/27/19
* @brief: implemetation of binary search tree node
* adapted from 560 lab 5
*/
template <typename T>
BSTNode<T>::BSTNode(const T& value):
value(value), lst(nullptr), rst(nullptr){}
template <typename T>
BSTNode<T>::BSTNode(const T& value, BST... | TOOL | 0.979911 | 5.168696 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2019-01-27T06:41:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ee3e3bf... |
bd70e385-5257-401e-b2fc-7eb4faec27d8 | Prajwal208V/LeetCode-Solutions | 2-add-two-numbers/2-add-two-numbers.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 {
vector <int> reversFun(ListNode... | ALGO | 0.999987 | 5.938232 | {
"github_metadata": {
"branch": "master",
"commit_count": 663,
"repo_created_at": "2022-01-15T18:38:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62beecf8... |
bcc33d7f-3798-4f3a-801e-1bfaec005ee3 | kahypar/mt-kahypar | tools/snap_to_metis.cc | /*******************************************************************************
* MIT License
*
* This file is part of Mt-KaHyPar.
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ... | TOOL | 0.911421 | 5.210966 | {
"github_metadata": {
"branch": "master",
"commit_count": 3833,
"repo_created_at": "2019-09-02T14:54:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 148,
"forks": 30,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "430cd... |
c2f224b3-594e-4da4-9254-204e08a00bb5 | gkongs/portfolio_data-structure | MyBTree.h | #pragma once
#include <iostream>
#include <functional>
using namespace std;
// 중위 순회를 통해 값을 출력하는 이진트리 (Default_Pred 멤버 함수를 기준으로 오름차순으로 정렬되도록 하였습니다.)
template <class T>
class MyBTree
{
struct Node {
T val;
Node *left;
Node *right;
Node(const T &_val)
: val(_val){}
};
public:
MyBTree(const T &_val, function<... | ALGO | 0.999635 | 5.293364 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2020-10-21T09:22: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": "fa02b0833797... |
c88a8d16-dd8a-4342-8623-39f1ee410567 | tanmayaudupa/LeetCode | Trees/construct-binary-search-tree-from-preorder-traversal.cpp | // Author: <NAME>
// URL: https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) ... | ALGO | 0.999993 | 6.765646 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2021-09-19T00:46:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b1b0b8fd31... |
c660aed8-8375-4da9-8217-74f2df9627b7 | developertqw2017/task | datastructure/000 (源程序) (201621093052) (田茜文)/(000) (源程序) (201621093052) (田茜文)/源程序/mowang.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define OVERFLOW -2
#define MAXSIZE 100
#define stack_init_size 100
#define stackincrement 10
typedef char selemtype;
typedef char qelemtype;
typedef char elemtype;
typedef int status;
char e;
char demon[MAXSIZE];
///栈结构体
typedef struct
{
char bfa[20... | ALGO | 0.999554 | 3.186582 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2017-03-15T12:15: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": "2123584bd... |
7131640e-6f0c-4e98-a918-3c8a59c027ba | SecuritySbr/derevo | derevo/derevo.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <conio.h>
#include <string.h>
#define VER 50
#define SIZE 20
#define FALSE 0
#define TRUE 1
using namespace std;
class Derevo
{
private:
char Sename[SIZE];
Derevo *left;
Derevo *right;
float data;
public:
voi... | ALGO | 0.999388 | 3.066148 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2013-05-31T19:27:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92a9a1c816... |
2c8d2c53-ea95-450b-a1b6-ea91e021f97c | nikunj-garg/c-dsa | Arrays/maximumSubArraySum/maximumSubArraySum.cpp | #include<iostream>
#include<climits>
using namespace std;
int main() {
int n;
cin >> n;
int array[n];
for (int i = 0; i < n; i++) {
cin >> array[i];
}
// Approach 1
// Brute Force Approach
// int maxSum = INT_MIN;
// for (int i = 0; i < n; i++) {
// for (int j =... | ALGO | 0.999976 | 4.8488 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-01-23T13:20: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": "934c57468c44... |
822a5165-1e40-4f1b-92ed-ae55c9fbb8fe | Congb19/Priority_Scheduling_System | main.cpp | //
// Created by Congb on 2018/12/29.
// Heap: 最小堆实现优先队列
// Process: 作业进程类
//
// 请修改encoding为GBK,可以正常阅读注释。
//
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <windows.h>
#include <time.h>
#include "Process.h"
#include "Heap.h"
#define N 4 //每组任务个数
#define W 2 //剩余W的时候插入新任务
//W < N.
u... | ALGO | 0.999894 | 4.140812 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2018-12-29T07:07:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9399ef567... |
67e9502d-1d11-4ef8-abda-5a213f63d2a2 | jin3811/BAEKJOON | 2491.cpp | #include <bits/stdc++.h>
using namespace std;
int n;
vector<int> v;
void input() {
cin >> n;
v.resize(n);
for (int& x : v) cin >> x;
}
int getMaxIncrease() {
int len = 1, maxLen = 1;
for (int i = 1; i < v.size(); i++) {
if (v[i - 1] > v[i]) len = 1;
else len++;
maxLen ... | ALGO | 0.999769 | 3.953205 | {
"github_metadata": {
"branch": "master",
"commit_count": 211,
"repo_created_at": "2023-07-07T06:09:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "938179f2... |
bbfb6273-a788-45c6-89ba-e2d15faff2b0 | Cyber-Aju/100_Days_of_Cpp | Day 24/pre_In_PostOrder.cpp | #include <iostream>
struct TreeNode
{
int value;
TreeNode* left;
TreeNode* right;
TreeNode(int val) : value(val), left(nullptr), right(nullptr) {}
};
void preOrder(TreeNode* root)
{
if (!root) return;
std::cout << root->value << " ";
preOrder(root->left);
preOrder(root->right);
}
vo... | ALGO | 0.99981 | 6.459857 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2023-03-10T13:29: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": "5679e361fe0... |
c806e816-7952-4cb3-bd09-a79b94f7e76b | Elbialy01/Codeforces-solutions | President's Office.CPP | #include<iostream>
#include<set>
using namespace std;
int main()
{
int a,b;
set<char>s;
char h,arr[100][100];
cin >> a >> b>> h;
for (int i = 0;i < a;i++) {
for (int j = 0;j < b;j++) {
cin >> arr[i][j];
}
}
for (int i = 0;i < a;i++) {
for (int j = 0;j < b;j++) {
if (arr[i][j] == h) {
if (i ... | ALGO | 0.999708 | 3.369412 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2022-11-28T18:11: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": "f06508ffa9d... |
37386fce-4e9c-4717-91f1-1c9a95c8de53 | Tiencut/CTDL-GT | BT_Chuong6_Tree.cpp | #include <bits/stdc++.h>
using namespace std;
struct Nut
{
int Info;
Nut *Left, *Right;
};
Nut *T;
// 1. Tìm chiều cao của cây T.
int TinhChieuCao(Nut *T)
{
if (T == NULL)
{
return -1; // Cây rỗng có chiều cao -1
}
int leftHeight = TinhChieuCao(T->Left);
int rightHeight = TinhChieu... | ALGO | 0.999755 | 3.718415 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-05-12T01:46: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": "04e5c4e9779f... |
c3b07b64-cae4-4a56-a815-dc5605ef7f28 | MaruYoon/PortFolio | Compressed/Project1/Main.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <fstream>
#include <Windows.h>
// (ご,.こ)v
using namespace std;
struct StudentInfo
{
string Name;
int Index;
int Kor;
int Eng;
int Math;
};
void LoadDate();
void Output();
list... | ALGO | 0.99781 | 3.746569 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2021-07-26T04:30:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a6e754ab... |
8eacc626-7ca0-42b3-9e34-097b4d565e18 | franktea/acm | leetcode.com/0043. Multiply Strings/left_to_right.cpp | // 在字符数串s的第index个字符上加上val,可能会产生进位
void add_char(string& s, int index, int val)
{
int tmp = s[index] - '0' + val;
s[index] = tmp % 10 + '0';
if(tmp / 10 > 0) // 进位,再加一次
add_char(s, index - 1, tmp / 10);
}
// 模拟珠算乘法,从左往右算
class Solution {
public:
string multiply(string num1, string num2) {
... | ALGO | 0.999927 | 4.957789 | {
"github_metadata": {
"branch": "master",
"commit_count": 401,
"repo_created_at": "2015-04-16T16:40: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": "c938e583... |
67ecdb19-faad-4f51-8816-843ef75f8420 | ehnryx/acm | codeforces/1696/c.cpp | #include <bits/stdc++.h>
using namespace std;
//%:include "utility/defines.h"
//%:include "utility/fast_input.h"
//%:include "utility/output.h"
using ll = long long;
using ld = long double;
constexpr char nl = '\n';
constexpr int MOD = 998244353;
constexpr ld EPS = 1e-9L;
random_device _rd; mt19937 rng(_rd());
vect... | ALGO | 0.999801 | 6.00801 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2018-05-03T04:18:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2452d6325... |
5b104f99-325e-47a0-962b-e0c1f12d9f9a | TheDLCrimson/My-CP-journey | Pre-Uni Phase/Others/BinToHex.cpp | #include <bits/stdc++.h>
using namespace std;
long long BinToDec(string S)
{
long long l = S.length()-1;
long long ans = 0, x = 1;
for (long long i = l; i>=0; i--)
{
ans += int(S[i] - 48) * x ;
x *= 2;
}
return ans;
}
void DecToHex(long long n)
{
long long x, d=1;... | ALGO | 0.999915 | 4.279627 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-12-31T11:02: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": "fb682b753973... |
4d7deda6-108f-4745-ae9d-e4e87acce3ea | NVSL/CSE141pp-Tool-Moneta | archive/benchmark-4-16/programs/e_simple_macro3.cpp | #include <iostream>
#include <vector>
using namespace std;
extern "C" __attribute__ ((optimize("O0"))) void DUMP_ACCESS_START_TAG(const char* tag, int* begin, int* end) {}
extern "C" __attribute__ ((optimize("O0"))) void DUMP_ACCESS_STOP_TAG(const char* tag) {}
extern "C" __attribute__ ((optimize("O0"))) void DUMP_ACC... | ALGO | 0.976282 | 3.322855 | {
"github_metadata": {
"branch": "master",
"commit_count": 1018,
"repo_created_at": "2020-04-06T03:35:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "039765fd... |
e41d24ca-063d-4521-8161-3edf4a92b3ca | linyirun/ccc-usaco | usaco/paired_up.cpp | // http://www.usaco.org/index.php?page=viewproblem2&cpid=738
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
#define MOD 1000000007
#define INF 10000000
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(n... | ALGO | 0.999983 | 3.929935 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2021-08-06T22:15: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": "aaf59e4ec7d... |
9bd20ed4-6297-4a52-8fda-9a2cca1ddc0d | FNCRosse/PUCP-2024_2 | ALGORITMOS AVANZADOS/BACTRAKING/Multimochila/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Codigo: 20213714
* Created on 7 de septiembre de 2024, 06:32
*/
#include <iostream>
#include <vector>
using namespace std;
// Variables globales
vector<vector<int>> solucion; // Almacenará los paquetes asignados a cada mochila
int n; // Número de paquetes
// Función p... | ALGO | 0.999996 | 6.204169 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2024-08-21T19:59:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "931491be971... |
6e85ca81-cddd-400d-9ea5-06bfbd61359e | Yunuskngl/Leetcode_Hackerrank_Solutions | LEETCODE/Max_depth_of_binary_tree.cpp | //https://leetcode.com/problems/maximum-depth-of-binary-tree/
//SOLUTION 1:
/**
* 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... | ALGO | 0.999714 | 5.302567 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-08-15T10:44:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0819b7289c4... |
f920ad9e-caef-408f-8805-fd34a6188827 | evanw12345/CS216 | Lab8/SortedLinkedList.h | /* File: SortedLinkedList.h
* Course: CS216-00x
* Project: Project 2
* Purpose: The declaration of the Node class and the SortedLinkedList class
* Since these two classes have very closed relationship, we declare them in one header file
*
*** DO NOT CHANGE THIS FILE ***
*
*/
#ifndef SORTEDLINKEDLIST_H
#define... | TOOL | 0.971704 | 5.084645 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2020-12-02T22:31:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "69ceccedeb43... |
f053d518-5dde-4695-acbc-5fabe1bcb950 | JuYoungJeon/probsolv | baekjoon/3584/LCA.cpp | #include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstring>
#define MAX_SIZE 10001
using namespace std;
vector<int> graph[MAX_SIZE];
//ac[x][y] = x의 2^y 번째 조상을 의미
int ac[MAX_SIZE][30];
//depth: node의 깊이(level)
int depth[MAX_SIZE];
int visited[MAX_SIZE];
int rt[MAX_SIZE];
int max_level;
vo... | ALGO | 0.999965 | 4.064877 | {
"github_metadata": {
"branch": "master",
"commit_count": 283,
"repo_created_at": "2021-03-23T03:47: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": "f22ed4f1... |
762a4991-f344-4301-9d54-e48d0760b28e | ustcyyw/algorithm | leetcode/medium/map/findSwapValues.cpp | /**
* @Time : 2022/6/23-1:29 AM
* @Author : <EMAIL>
* @E-mail : <EMAIL>
* @Github : https://github.com/ustcyyw
* @desc :
*/
#include<bits/stdc++.h>
using namespace std;
/**
* 给定两个整数数组,请交换一对数值(每个数组中取一个数值),使得两个数组所有元素的和相等。
返回一个数组,第一个元素是第一个数组中要交换的元素,第二个元素是第二个数组中要交换的元素。若有多个答案,返回任意一个均可。若无满足条件的数值,返回空数组。
示例:
输入: ar... | ALGO | 0.999996 | 5.575041 | {
"github_metadata": {
"branch": "main",
"commit_count": 162,
"repo_created_at": "2024-11-11T07:09: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": "ae0c36ab6f... |
45a4f2d8-a9ec-496d-ab76-db901f67d6d0 | KaizynX/Code | google/kickstart/20220424InfinityArea.cpp | /*
* @Author: Kaizyn
* @Date: 2022-04-24 07:02:41
* @LastEditTime: 2022-04-24 07:07:22
*/
#include <bits/stdc++.h>
#define DEBUG
using namespace std;
namespace hjt {
template<typename A,typename B>
std::ostream &operator<<(std::ostream &o,const std::pair<A,B> &x){
return o<<'('<<x.first<<','<<x.second<<')';
}
#... | ALGO | 0.99946 | 4.306614 | {
"github_metadata": {
"branch": "master",
"commit_count": 351,
"repo_created_at": "2018-02-19T10:48: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": "2b13ba56... |
ce63c1bc-8656-4342-9710-7fdc1c7af5c9 | manitejagaddam/Code-Force | A/A. Team/team.cpp | #include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
int vaild(vector<vector<int>> questions){
int attempt = 0;
for(vector<int> i : questions){
int sum = 0;
for(int j : i){
sum += j;
if(sum == 2){
attempt++;
... | ALGO | 0.998807 | 3.578374 | {
"github_metadata": {
"branch": "code-forces",
"commit_count": 7,
"repo_created_at": "2025-01-18T17:20: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": "50065... |
8daf97df-8daa-477a-8bfd-ab689c926168 | dragontaoran/SUGEN | codeBase/MathUtils/cdf_fns.cpp | #include "cdf_fns.h"
#include "MathUtils/gamma_fns.h"
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
namespace math_utils {
double StandardNormalCDF(const double&x) {
return 0.5 * (1.0 + erf(x / sqrt(2)));
}
bool NormalCDF(
const double& x, const double& mean,... | ALGO | 0.998727 | 6.491673 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2016-11-02T06:52:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d354be... |
16cd4bc2-89d8-46db-b958-ff66edaa87c0 | GiuseppeBellamacina/Backup-Codici-Uni | Anno1/Semestre1/Programmazione1/Code eser/Robe vecchie a caso/Razionali2.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
class Razionale{
private:
int num, denom, segno;
int mcd(int x, int y){
return y == 0 ? x : mcd(y, x%y);
}
public:
Razionale(int n){
num = n;
denom = 1;
}
Razionale(int n, int d){
num = n;
denom = d;
int segno;
(n*... | ALGO | 0.994825 | 4.747852 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-11T12:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "199bcca55081... |
29aae8cb-66c4-44d4-922d-0ce8e5594983 | zbqmgldjfh/AlgorithmRecord | Baekjoon/gold/boj10942.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAX 2001
int N, M;
int arr[MAX];
int DP[MAX][MAX];
vector<pair<int, int>> vec;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
freopen("input.txt", "rt", stdin);
cin >> N;
for(int i = 1; i <= N; i++) {
cin >> arr[i];
}
... | ALGO | 0.999989 | 4.624452 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2022-03-08T04:20: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": "e9240add... |
a9056c9b-cad3-46e0-a372-794f076e0ac9 | Wangzhike/MyCodingInterview2 | 42_GreatestSumOfSubArray/main.cpp | #include <iostream>
#include <vector>
using namespace std;
int FindGreatestSumOfSubArray(vector<int> array) {
int n = array.size();
if (n < 0)
return 0;
int max_value = -1;
int bg = -1, ed = -1;
vector<int> gssa(n+1, 0);
int b = 1, e = 1;
for (int i = 1; i <= n; ++i)
{
... | ALGO | 0.99999 | 4.470963 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-09-21T13:12: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": "99701061d1... |
a640875b-c3d2-4e6f-b780-6979a69dc075 | RashidFarhanBD/Graphics-Project-Titanic-an-interactive-scenary- | demo.cpp | #include <iostream>
#include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#define CTRL_COUNT 100
//OK
//Initializes 3D rendering
void initRendering() {
glEnable(GL_DEPTH_TEST);
}
//Called when the window is resized
void handleResize(int w, int h) {
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
... | TOOL | 0.945078 | 4.538601 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-04-13T20:35:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df815d3804... |
36d911dd-dfd9-4570-9aab-0454a60ffd3f | Zhuan-pitt/PittCompMethods | CH3/EX7/POTENTIAL/src/potential.cpp | #include "QatPlotWidgets/PlotView.h"
#include "QatPlotting/PlotStream.h"
#include <QApplication>
#include <QMainWindow>
#include <QToolBar>
#include <QAction>
#include <cstdlib>
#include <iostream>
#include <string>
#include <Eigen/Dense>
typedef std::complex<double> Complex;
int main (int argc, char * * argv) {
... | ALGO | 0.969599 | 3.702418 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2020-08-24T17:58: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": "a06ac5012... |
ba1e6de2-830c-49aa-a4b3-b531c26dcf43 | melted/aoc2018 | other/d21.cpp | #include <iostream>
#include <set>
using namespace std;
int main() {
int r3 = 0 , r4 = 0, r5 = 0;
set<int> seen;
int last = 0;
bool first = true;
while (true) {
last = r4;
r3 = r4 | 65536;
r4 = 3730679;
while (true) {
r5 = r3 & 255;
r4 = r4 +... | ALGO | 0.99992 | 3.524895 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2018-11-30T23:43: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": "bad3ec1bf... |
e8bbae3d-e51a-4faa-b748-3d1799bd8e46 | abdullah-166/Assignment_3_DSA_Mid | Palindrome.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node* next;
Node(int val)
{
data = val;
next = nullptr;
}
};
bool Palindrome(Node* head)
{
if (head == nullptr || head->next == nullptr)
{
return true;
}
Node* slow = head;
Node* ... | ALGO | 0.999902 | 4.628333 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-07-26T02:30: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": "38b1521b7400... |
61ed746b-88e3-495e-95e7-d80539a52467 | Quancoder260503/Programming-Contest-Solution | ASIA PACIFIC/SINGAPORE/NATIONAL/2019/Frequentalpha.cc | #include "bits/stdc++.h"
using namespace std;
signed main(void)
{
int N;
while(cin >> N)
{
string S, T;
cin >> S >> T;
vector<vector<int>>dyn(N, vector<int>(26));
vector<vector<int>>dyn2(N, vector<int>(26));
for(int i = 0; i < N; i++)
{
dyn[i]... | ALGO | 0.99999 | 3.768045 | {
"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": "d65dd43fab1b... |
194affba-b5bb-4096-87e4-7ec05d81d9db | micheltakken/Microfluidics-Abstraction-Levels | LBM/Non-Newtonian/3D/newtonRaphson.h | /* This file is part of the Palabos library.
*
* The Palabos softare is developed since 2011 by FlowKit-Numeca Group Sarl
* (Switzerland) and the University of Geneva (Switzerland), which jointly
* own the IP rights for most of the code base. Since October 2019, the
* Palabos project is maintained by the Universit... | ALGO | 0.99982 | 5.469482 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-31T08:37:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e46ac304ffa... |
5698ffb3-b056-4617-96fa-a273312f43dc | RasedulRussell/uva_problem_solve | 12712_Pattern_Locker.cpp | #include<bits/stdc++.h>
using namespace std;
#define int unsigned long long
#define INF 10000
#define MAX 45
#define MOD 10000000000007
#define __FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
int32_t main(){
__FastIO;
int tc, cs = 1;
cin >> tc;
while(tc--){
int l, m, n;
... | ALGO | 0.999947 | 4.829783 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2018-12-07T03:38:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "651e07ed9... |
aeb80706-3c31-4aea-8a11-3a8c14ec8081 | CompRD/BroadCRD | src/tiled/AlignsPath.cc | // Copyright (c) 2000-2003 Whitehead Institute for Biomedical Research
//
#include "ScoreAlignment.h"
#include "tiled/AlignsPath.h"
/*
* aligns_path
* Constructor
*/
aligns_path::aligns_path( ) :
aligns_ ( 0 ),
aligns_index_ ( 0 ),
hits_ ( 0 ),
read_bags_ ( 0 ),
bases_ ( 0 ),
quals_ ( 0 ),
log_ ( ... | ALGO | 0.963135 | 5.436482 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2015-04-16T17:15:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de8b138a50... |
0d7e4f80-d764-4e68-95d9-cd858e5c8978 | SpicyChickenFLY/arduboy-game | 2048/game.cpp | #include "game.h"
Game::Game(int width, int height, int difficult) {
fps = 60;
score = 0;
lastMoveValid = false;
this->difficult = difficult;
this->width = width;
this->height = height;
size = width * height;
up = -1 * width;
down = width;
left = -1;
right = 1;
board = n... | ALGO | 0.968766 | 4.731859 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-09-18T09:47:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9cc9be0c8f... |
0772df39-fe5d-47ec-b84b-634f07ded31c | frost1990/leetcode_answers | 278-FirstBadVersion.cpp | /*
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version are also bad.
Suppose you have n versions [1, 2, ..., n] and... | ALGO | 0.994229 | 6.029333 | {
"github_metadata": {
"branch": "master",
"commit_count": 112,
"repo_created_at": "2015-06-18T05:29: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": "b4dc2d37... |
944b145a-feba-49c6-a2cf-02732d2ebfe5 | kashimAstro/ofxAutoRiggingModel | src/graphutils.cpp | /* This file is part of the Pinocchio automatic rigging library.
Copyright (C) 2007 <NAME> (<EMAIL>)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of ... | ALGO | 0.962807 | 5.00182 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2016-11-13T14:53:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 71,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f89a39... |
b42935ce-18eb-411c-9751-2becb00a2e60 | ishandutta2007/codeforces-e | emiso/normal/1474/C.cpp | #include <bits/stdc++.h>
#define MN 1001000
using namespace std;
typedef long long ll;
ll t, n, a[MN], maxi, mark[2010];
vector<pair<ll, ll>> ans, pos;
multiset<int> f, tmp;
int main() {
scanf("%lld", &t);
st:
scanf("%lld", &n);
for(int i = 0; i < 2*n; i++) {
scanf("%lld", &a[i]);
f... | ALGO | 0.999945 | 3.241633 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "8dbd1f46931f... |
61dfab4f-7ec5-49ca-b63e-b0e3a3cd0248 | MuhammadAryaNS/Lab.DesainDanAnalisisAlgoritma | Pertemuan 2 (Sorting Lanjutan)/Praktikum/Latihan.cpp | #include<iostream>
using namespace std;
void quick(int arr[], int kiri, int kanan) {
if (kiri >= kanan) {
return;
}
int x = kiri, y = kanan;
int temp;
int tengah = arr[kiri + (kanan - kiri) / 2];
while (x <= y) {
while (arr[x] > tengah) {
x++;
}
... | ALGO | 0.999951 | 5.243726 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-03-18T07:22: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": "0cdd1e74107... |
eb63b1b0-b8da-4765-80b2-85c8169b6dea | martintrojer/symbolic-execution | llvm-2.6/lib/Transforms/Scalar/IndVarSimplify.cpp | //===- IndVarSimplify.cpp - Induction Variable Elimination ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | ALGO | 0.98235 | 4.274857 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2011-11-10T08:38:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eae04ce4a... |
b5e3ed80-c807-44d2-b9ec-b298b349ceb9 | abidurrahman11/programming-problem-solving | FancyCoins.cpp | #include<iostream>
// #include<bits/stdc++.h>
// #include<set>
// #include<vector>
// #include<map>
// #include<algorithm>
using namespace std;
#define ll long long
#define nl "\n"
#define ws " "
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define MOD 1000000007
int main () {
int t;
cin>>t... | ALGO | 0.999318 | 3.207011 | {
"github_metadata": {
"branch": "master",
"commit_count": 390,
"repo_created_at": "2022-07-30T03:37:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b962aee... |
f0b98002-08a3-414a-9b03-3b937466d4d9 | yousuf11369/ET580LESSON2 | 4_multi_dimensional_arrays.cpp | // <NAME> 2024
#include <iostream>
#include <cassert>
void print(int a[][3], int s1, int s2) // parameters: array ptr, size of 1st dimension, size of 2nd dimension
{
for(int i=0; i<s1; ++i) {
for(int j=0; j<s2; ++j) {
std::cout << a[i][j] << " ";
}
std:... | TOOL | 0.926664 | 4.386672 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-09-09T23:03:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe0b011b72be... |
e8d3cd88-843b-4668-a5b5-86de3a3a23e8 | ibn-tahaikt-anass/Les-conteneurs-STL | exerc1.cpp | #include <iostream>
using namespace std;
class complexe
{
double Re;
double Img;
public:
complexe(double a = 0, double b = 0)
{
if (a != 0 && b != 0)
{
/* si a=1 et b=1 on a laiser a l'utilisateur
de romplire les champs de complexe */
cout << "\tEn... | ALGO | 0.954131 | 3.915855 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-12-16T22: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": "59f49322f0... |
d28dc991-47e3-4770-8dff-17b270e8a70c | neal2018/oj_env | codejam/2021/kse/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
// #define LOCAL
int main() {
#ifdef LOCAL
ifstream cin("/Users/neallai/Projects/oj_env/input.txt");
ofstream cout("/Users/neallai/Projects/oj_env/output.txt");
#endif // LOCAL
ll T, n;
cin >> T;
for (ll TT = 1; TT <= T; TT++) {
cout << ... | ALGO | 0.998945 | 3.818061 | {
"github_metadata": {
"branch": "master",
"commit_count": 175,
"repo_created_at": "2021-08-18T06:24:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e3d65ec6... |
80d9d13c-ca3c-45bb-8e05-bee508460066 | Arup-Sarkar-24/Practice_DS_in_C | code_stack_02.cpp | //Stack using Linkedlist
#include<stdio.h>
#include<stdlib.h>
struct node{
int data;
struct node * next;
};
int isempty(struct node * top){
if(top==NULL){
return 1;
}
else{
return 0;
}
}
int isfull(struct node * top){
struct node * p = (struct node *)malloc(sizeof(struct node));
if(p==NULL){
return 1;
}
... | ALGO | 0.999585 | 3.894751 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-11-25T12:57:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2550e99b98... |
683b535b-3bbe-4877-9d7c-541055a1842b | minseonkkim/Algorithm_Programmers | Lv3/49189.cpp | #include <string>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int dist[20001];
vector<int> graph[20001];
void bfs(){
queue<int> q;
dist[1] = 0;
q.push(1);
while(!q.empty()){
int x = q.front();
q.pop();
for(int i = 0; i < graph[x].s... | ALGO | 0.999516 | 4.531323 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2023-03-07T10:57: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": "9827c1c991... |
e19b0e57-233f-4f44-9511-7583e2183eb7 | h10i/atcoder | src/abc/abc386/abc386_c.cpp | #include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n) - 1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(... | ALGO | 0.999993 | 5.491445 | {
"github_metadata": {
"branch": "main",
"commit_count": 818,
"repo_created_at": "2019-08-04T13:46: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": "24c27aca78... |
84f51b64-e8da-4d09-8c9b-29ab7636a7aa | NgHung2310/BasicCpp | Lab4_Bai1_NguyenVietHung.cpp | #include<iostream>
#include<math.h>
#include<stdio.h>
#include<conio.h>
#include<string>
#include<ctime>
#pragma warning(disable : 4996)
using namespace std;
class BenhNhan
{
protected:
string ten, que_quan;
int nam_sinh;
public:
BenhNhan(string ten="", string que_quan="", int nam_sinh=0)
{
this->ten = ten;
thi... | TOOL | 0.987737 | 3.378361 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2021-10-21T03:14: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": "820cd635a8f... |
e967c55e-c239-4d53-b65e-9dbc206b951e | David-5-5/tutorial | cplus/leetcode/202505/algo1997.cpp | #include <bits/stdc++.h>
using namespace std;
// 动态规划 - 11.1 前缀和优化 DP
class Solution {
public:
int firstDayBeenInAllRooms(vector<int>& nextVisit) {
// 自行解答,朴素算法,超时
const int mod = 1e9 + 7;
int ans = 0, cur=0, n = nextVisit.size(), left = n;
vector<int> cnt(n);
while (left) {... | ALGO | 0.999984 | 5.331323 | {
"github_metadata": {
"branch": "main",
"commit_count": 2940,
"repo_created_at": "2022-11-22T17:09:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "927593ee9... |
3fc26bca-71a3-4592-98ab-7a05536832a2 | chmasak/OOPC | P6Q2employee.cpp | // Create a class employee with data members emp_id, name, slary and having functions void get() for input and void display() for displaying the employee details with their salary in descending order. Take the details of 5 employees with help of new operator.
#include <iostream>
#include <string>
using namespace std;
c... | TOOL | 0.98692 | 5.618705 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-01-15T11:01: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": "22a06cbdb338... |
9905adaf-c81e-49f1-8cca-1c710d6e2365 | kwamolif/kwamolif-PROGRAMACAO-ESTRUTURADA | Aula5Trabalho4Ex11.cpp | #include <cstdlib>
#include <iostream>
#include <cstring>
#include <locale>
using namespace std;
/*
Escrever um programa que leia 15 números, um de cada vez, e conte quantos destes valores são negativos. Exiba a quantidade de números negativos digitados.
*/
int main(int argc, char** argv) {
setlocale(LC_ALL, ... | TOOL | 0.996709 | 4.453655 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-28T20:43: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": "39b12a77c981... |
a045c855-2f61-4806-8433-f57f734e2ea0 | lazywzx/proLang | LeetCode_q/LinkedList/430扁平化多级双向链表.cpp | /*
你会得到一个双链表,其中包含的节点有一个下一个指针、一个前一个指针和一个额外的 子指针 。
这个子指针可能指向一个单独的双向链表,也包含这些特殊的节点。
这些子列表可以有一个或多个自己的子列表,以此类推,以生成如下面的示例所示的 多层数据结构 。
给定链表的头节点 head ,将链表 扁平化 ,以便所有节点都出现在单层双链表中。
让 curr 是一个带有子列表的节点。
子列表中的节点应该出现在扁平化列表中的 curr 之后 和 curr.next 之前 。
返回 扁平列表的 head 。列表中的节点必须将其 所有 子指针设置为 null 。
*/
class Node {
public:
int va... | ALGO | 0.999941 | 5.547034 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-10-29T06:56:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0d7522303... |
542ffa25-f648-4939-b9e8-ed24ced36969 | ssssswwwwwxxxxxxxwaxaca/program | old_program/single_triangle.cpp | #include <GL/glut.h>
#include <iostream>
#include <vector>
using namespace std;
// 全局变量存储顶点数据
vector<float> triangleVertices;
vector<float> squareVertices;
// 初始化环境
void init(void)
{
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // 设置背景颜色为黑色
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-1.0, 1.0,... | TOOL | 0.98146 | 4.675731 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-04-24T15:08: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": "25fef12f9ab... |
3d2fd375-9b10-4082-ab12-f42f2e2c2486 | EricVaughanOVR/VisualOdometryLib | FastLib/nonmax.cpp | #include <stdlib.h>
#include "fast.hpp"
using namespace correspondence;
#define Compare(X, Y) ((X)>=(Y))
void nonmax_suppression(FeatureList& corners)
{
int last_row;
int* row_start;
int i, j;
const int sz = (int)corners.allFeatures.size();
/*Point above points (roughly) to the pixel above the one of interest, ... | ALGO | 0.998175 | 5.541202 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2013-08-04T04:43:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e638084eb... |
caae8d61-aaf5-4647-afad-ba53ec117a3b | neka-nat/cupoch | src/cupoch/registration/permutohedral.h | /**
* Copyright (c) 2020 Neka-Nat
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, dis... | TOOL | 0.978066 | 7.349451 | {
"github_metadata": {
"branch": "main",
"commit_count": 533,
"repo_created_at": "2019-10-22T15:26:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 986,
"forks": 116,
"issues": 20,
"pull_requests": 2
},
"file_meta": {
"content_id": "93c79... |
cffa30ee-505a-46a9-b0a1-c54fd3bd60bd | k0sk/aoj | 2440.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, N) for (int i = 0; i < (int)N; i++)
int main() {
int N, M;
string ui, ti;
vector<string> ids;
while (cin >> N) {
for (int i = 0; i < N; i++) {
cin >> ui;
ids.push_back(ui);
}
... | ALGO | 0.99943 | 4.086163 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-01-25T05:50: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": "f6f3a5afd5... |
7db5b424-7a74-4daa-b63b-f060026e99c4 | Jitesh-Khuttan/Computer-Graphics | cohensutherland.cpp | #include "cohensutherland.h"
extern list<Object*> allObjects;
extern GLubyte *CURRENTCOLOR;
extern string CURRENTPATTERN;
extern int CURRENTTHICKNESS;
int Cohen::computeRegionCode(int X,int Y,int minX,int maxX,int minY,int maxY)
{
int regionCodes[] = {0,9,8,10,5,4,6,1,2};
//Assigninng Region Code To The Startin... | ALGO | 0.998576 | 3.454654 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-09-10T07:15:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70d8caf11... |
255f1b83-bf7f-4cea-bbd1-b62cc2fca520 | Akrobatik/ps | BaekJoon/32000/32982.cpp | // Title : 약물 복용
// Link : https://www.acmicpc.net/problem/32982
// Time : 0 ms
// Memory: 4188 KB
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, k;
vector<pair<int, int>> arr(3);
cin >> n >> k;
for (auto& [b, e] : arr) cin >> b >> e;
... | ALGO | 0.999995 | 4.454094 | {
"github_metadata": {
"branch": "main",
"commit_count": 2030,
"repo_created_at": "2025-01-18T13:13:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "005bf86ba... |
5d06d24f-00f4-4f60-be0b-ae6d49c20055 | danston/gbc | 2d/coords/GordonWixomR2.hpp | // Copyright <NAME> <EMAIL> (c) 2016-2017.
// README:
/*
Gordon-Wixom coordinates.
This class depends on:
1. BarycentricCoordinatesR2.hpp
2. SegmentCoordinatesR2.hpp
3. VertexExpressionsR2.hpp
4. VertexR2.hpp
This class also depends on the external integration library: gauss_legendre.hpp... | ALGO | 0.999496 | 6.866207 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2016-12-15T16:46:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7bd1b72... |
ad85b24a-c32f-4dd5-8166-f101a108277c | Dudubraga/Competitive-Programming | Beecrowd/1047/1047.cpp | #include <iostream>
using namespace std;
int main(){
int start_hour, start_minute, finish_hour, finish_minute;
int start, finish, time, hour, minute;
cin >> start_hour >> start_minute >> finish_hour >> finish_minute;
start = (start_hour * 60) + start_minute;
finish = (finish_hour * 60) + finish_m... | ALGO | 0.99895 | 4.243898 | {
"github_metadata": {
"branch": "main",
"commit_count": 247,
"repo_created_at": "2023-03-28T18:56: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": "b173a670f9... |
c924935d-a594-4f56-bf60-b0abf5cb4953 | VahanHay/Homework | easy/6_task_30.cpp | #include <iostream>
template <size_t N>
void foo (int(&arr)[N])
{
for(int i = 0 ; i < N ; ++i)
{
arr[i] = rand() % 90 ;
}
}
template <size_t N>
void boo(int(&arr)[N])
{
int evenCount = 0 ;
int oddCount = 0 ;
for(int i = 0 ; i < N ; ++i)
{
if(arr[i] % 2 == 0)
{
... | ALGO | 0.973574 | 4.946926 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-10-20T19:27: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": "6ef54ec5baa1... |
c310a05c-9c2a-4290-9ccd-ebb934240259 | Kyan820815/leetcode | lc02xx/lc0281.cpp | //--- Q: 0281. Zigzag Iterator
/**
* Your ZigzagIterator object will be instantiated and called as such:
* ZigzagIterator i(v1, v2);
* while (i.hasNext()) cout << i.next();
*/
//--- method 1: index recording
class ZigzagIterator {
public:
ZigzagIterator(vector<int>& v1, vector<int>& v2) {
arr.push_bac... | ALGO | 0.999959 | 6.2156 | {
"github_metadata": {
"branch": "main",
"commit_count": 137,
"repo_created_at": "2020-11-27T03:28: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": "e43b825b54... |
68407568-9c9a-4d80-b404-98dacdd37858 | kencs123/tugas-pertama | tugas 6.cpp | //tugas 6 <NAME>
//Given a sorted (ascending) linked list,
//manipulate it to become a sorted (descending) linked list.
// jadi nanti inputnya dalam scanf descending ya biar di linked listnya ascending
//"given a sorted (ascending) linked list.
//pakai bubble sort dari geek for geek
#include <stdio.h>
#include <stdli... | ALGO | 0.999929 | 3.891097 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-01-12T19:49: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": "d2b784de62fa... |
651984f2-1517-4adf-a5dd-1d9f983cda12 | Forrest-Z/aidrive | src/newton/cost/ProgressCost.h | #ifndef PROGRESS_COST_H
#define PROGRESS_COST_H
#define PROGRESS_WEIGHT_DEFAULT 0.05 // inverse of average velocity 20m/s expected
template <class T, int N> class progressCostParameters
{
public:
T k_p;
T probEpisodeEnd[N]; // Probability that episode ends exactly after stage i, not before, not after.
T... | ALGO | 0.99552 | 6.306255 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2022-03-16T03:53:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8507a5dea... |
8e28222f-1d3c-4d58-bc6f-599732b8e395 | 21A91A04D0/graph | topo_sort.cpp | /*
Topological sorting for Directed Acyclic Graph (DAG) is a
linear ordering of vertices such that
for every directed edge u-v, vertex u comes before v in the ordering.
Note: Topological Sorting for a graph is not possible if the graph is not a DAG.
*/
#include<bits/stdc++.h>
using namespace std;
v... | ALGO | 0.999997 | 5.42438 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-02-24T18:16:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7cb0e4784b63... |
d11b4f69-d1d6-48c0-8366-b65f19378995 | Giorgio1999/Bastet_V2 | src/MoveGenerator.cpp | #include "MoveGenerator.h"
#include "BitBoardUtility.h"
#include "Engine.h"
#include <array>
// These are all functionalities connected to move generation
// External Functions
// -------------------------------------------------------------------
void MoveGenerator::GetLegalMoves(Engine &engine,
... | ALGO | 0.992733 | 6.029319 | {
"github_metadata": {
"branch": "master",
"commit_count": 213,
"repo_created_at": "2024-04-29T21:42:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c8c0f45... |
ab9405bc-188e-43c5-b0eb-80b95c86c443 | crazy-JiangDongHua/algorithm | leetcode/leetcode65.cpp | class Solution {
private:
enum State{
STATE_INITIAL,
STATE_SIGN,
STATE_INTERGER,
STATE_POINT,
STATE_POINT_WITHOUT_INTERGE,
STATE_FLOAT,
STATE_EXP,
STATE_EXP_SIGN,
STATE_EXP_INTEGER
};
enum CharType{
NUMBER,
SIGN,
... | ALGO | 0.996998 | 4.369713 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2022-11-09T08:25: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": "3e14e69d7... |
dc6b178a-beed-434f-9d1c-7c60b7179a95 | windreamer/tire | test/algorithm/benchmark.cpp | #include "algorithm/consthash.hpp"
#include <stdexcept>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <cmath>
using namespace algorithm;
using namespace std;
int random (int a, int b)
{
if (b < a)
{
throw std::invalid_argument("b is less than a");
}
if ((b-a) > RAND_MAX)
... | ALGO | 0.989579 | 4.525262 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2011-01-27T02:57:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ae037526... |
c84f258f-b8f3-4390-8c8e-e4dbcc3fa82f | lastrise/Course-Work-2-S | main.cpp | #include "./functional.h"
void pngSetPixel(int x, int y, Image* image, Color color)
{
if (image->width < x + 1) return;
if (image->height < y + 1) return;
if (x < 0) return;
if (y < 0) return;
int size = 1;
if (image->color_type == PNG_COLOR_TYPE_RGB) size = 3;
if (image->color_type == PN... | TOOL | 0.99025 | 5.201981 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-09-05T15:04:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7fae53b028... |
ee2a8de0-41d7-4b5f-bac5-202979744917 | ninedayhx/code_log | binary_tree/222_count_complete_tree_nodes.cpp |
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), rig... | ALGO | 0.999379 | 4.378822 | {
"github_metadata": {
"branch": "main",
"commit_count": 134,
"repo_created_at": "2024-01-28T11:46:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8c1603420... |
ca8feb71-8437-49eb-aac5-ee591b9f6fb3 | andrewssobral/bgslibrary | bgslibrary/algorithms/CodeBook.h | #pragma once
#include <opencv2/opencv.hpp>
#include "IBGS.h"
namespace bgslibrary
{
namespace algorithms
{
namespace codebook {
struct codeword {
float min;
float max;
float f;
float l;
int first;
int last;
bool isStale;
};
}
class ... | ALGO | 0.975363 | 5.753675 | {
"github_metadata": {
"branch": "master",
"commit_count": 312,
"repo_created_at": "2014-02-16T21:35:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2234,
"forks": 742,
"issues": 89,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f... |
03b55424-0da8-436b-8d59-4ed7395ff4ea | dahlia52/BOJ-Programmers | 삼성 SW 역량 테스트 기출 문제/15863.cpp | // 감시
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> pi;
int n, m, min_cnt = 64;
vector<pi> cctv;
int dr[4] = { 0, -1, 0, 1 }; // 좌, 상, 우, 하
int dc[4] = { -1, 0, 1, 0 };
int check(vector<vector<int>> &room, int r, int c, int dir, int cnt) {
dir %= 4;
while (1) {
int nr = r + dr... | ALGO | 0.999833 | 4.561909 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2022-10-02T03:51: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": "76919842e7... |
cc7504f9-c5bb-4da6-8d5f-acdfb066aadd | LiunxPaisley/LeetCode | 150. Evaluate Reverse Polish Notation/150. Evaluate Reverse Polish Notation/150. Evaluate Reverse Polish Notation.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <array>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <list>
#include <deque>
#include <tuple>
#include <algorithm>
#include <utility>
#in... | ALGO | 0.999948 | 5.14188 | {
"github_metadata": {
"branch": "master",
"commit_count": 291,
"repo_created_at": "2018-03-15T14:21: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": "22ed7a2b... |
390dd0ac-d443-4c3a-9498-b8c50b39248b | SukminYun/Automata | HW1/main1.cpp | #include <stack>
#include <string>
#include <iostream>
#include <vector>
using namespace std;
// step1. Change regular expression to postfix form
int Precedence(char oper) {
switch (oper)
{
case '*':
return 3;
break;
case '.':
return 2;
break;
default:
retur... | ALGO | 0.999915 | 4.171668 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-07T04:28:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed59f2ed1a99... |
4e12ce37-eff9-476e-bf33-a7076d85771d | pouiyter/MinimalResolution | hopf_algebroid/13.h | //generate an index for the positions of the co-generators
template<typename algebroid, typename degree_type>
std::map<matrix_index,matrix_index> cofree_comodule<algebroid,degree_type>::gen_pos_index(){
std::map<matrix_index,matrix_index> result;
for(unsigned i=0; i<position_of_gens.size(); ++i)
result.emplace(posi... | ALGO | 0.929587 | 3.768703 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-04-07T08:04:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc8497e90... |
627cf06c-7777-4968-8223-21086966c182 | neetcode-gh/leetcode | cpp/0567-permutation-in-string.cpp | /*
Given 2 strings, return true if s2 contains permutation of s1
Ex. s1 = "ab", s2 = "eidbaooo" -> true, s2 contains "ba"
Sliding window, expand + count down char, contract + count up char
Time: O(n)
Space: O(1)
*/
class Solution {
public:
bool checkInclusion(string s1, string s2) {
i... | ALGO | 0.999963 | 6.720706 | {
"github_metadata": {
"branch": "main",
"commit_count": 9682,
"repo_created_at": "2021-01-20T16:10:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6062,
"forks": 2417,
"issues": 330,
"pull_requests": 215
},
"file_meta": {
"content_id": ... |
cb0be4ea-9724-4846-af60-bc6bef7fde81 | Ash310u/CPP | array.cpp | #include <iostream>
int main() {
// Declare a normal array
int arr[5] = {1, 2, 3, 4, 5};
// Print array elements
std::cout << "Array elements: ";
for (int i = 0; i < 5; i++) {
std::cout << arr[i] << " ";
}
std::cout << std::endl;
// Access and modify elements
std::... | TOOL | 0.961666 | 4.689785 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2025-06-20T12:43: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": "e85e4e70fe2... |
8ccc5f8f-a433-418b-adc1-8d58e07537df | RusakovRodion/Testing2 | app/process_backward.cpp | /**
* process_backward.c -- реализует обобщенную функцию обработки текста
* в обратном порядке следования строк
*
* Copyright (c) 2017, <NAME> <<EMAIL>>
*
* This code is licensed under a MIT-style license.
*/
#include "_text.h"
/**
* Обрабатывает список, применяя заданную функцию к каждой строке
*
* @param ... | ALGO | 0.940641 | 4.314727 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-06-05T13:37:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a14746ac5c... |
12080b45-f8eb-4384-b1a3-2084c6229629 | ErenSenoglu/CS202-Fundamental-Structures-of-Computer-Science | CS202_hw2/main.cpp | #include "NgramTree.h"
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main( int argc , char ** argv){
NgramTree tree;
string fileName ( argv [1]);
int n = atoi ( argv [2]);
tree.generateTree(fileName,n);
/*tree.addNgram("a");
tree.addNgram("z");
tree.addN... | ALGO | 0.984488 | 3.849612 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-02-06T08:14: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": "aac3d8deec... |
66f5d0cb-2323-4b16-b15e-da1811f3e891 | Chaste/Chaste | cell_based/src/cell_based_pde/EllipticGrowingDomainPdeModifier.cpp | /*
Copyright (c) 2005-2025, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... | ALGO | 0.996182 | 7.250685 | {
"github_metadata": {
"branch": "develop",
"commit_count": 7342,
"repo_created_at": "2016-07-08T13:37:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 138,
"forks": 64,
"issues": 56,
"pull_requests": 7
},
"file_meta": {
"content_id": "21c... |
6a1541b7-fe58-4f9a-b26f-cafaeffb061d | ChaneHaDa/coding-test | baekjoon/c++/1761.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int n;
vector<int> depth;
vector<int> dis;
vector<vector<pair<int, int>>> graph;
vector<vector<int>> parent;
void dfs(int x) {
for(auto [nx, nd]:graph[x]) {
if(depth[nx] == 0) {
depth[nx] = depth[x] + 1;
... | ALGO | 0.999983 | 5.181192 | {
"github_metadata": {
"branch": "main",
"commit_count": 105,
"repo_created_at": "2025-03-28T01:04:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d501097220... |
4073ba0b-b6ba-43a2-bc9b-e934744dac10 | fpled/ERROR_ESTIMATION | ENHANCEMENT/Construct_enhanced_force_fluxes_EET_EESPT.h | //
// C++ Interface: Construct_enhanced_force_fluxes_EET_EESPT
//
// Description: construction amelioree des densites d'effort par les methodes EET et EESPT
//
//
// Author: <NAME> <<EMAIL>>, (C) 2010
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef Construct_enhanced_force_fluxes_EET_E... | ALGO | 0.994911 | 3.205656 | {
"github_metadata": {
"branch": "master",
"commit_count": 292,
"repo_created_at": "2015-07-08T10:44:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "348e43ec... |
76c18d4f-54c3-43af-980e-27981df489ae | fepaf/Competitive-Programming | Resoluções OJ/uri/2784 - Ilhas.cpp | // Autor: [GAPA] <NAME><<EMAIL>>
// Nome: Ilhas
// Nível: 1
// Categoria: INICIANTE
// URL: https://www.urionlinejudge.com.br/judge/pt/problems/view/2784
#include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);
#define INF 0x3f3f3f3f
#define i64 long long
#define ii pair<int, int>
#define vi vector<int>
#define... | ALGO | 0.999924 | 4.221957 | {
"github_metadata": {
"branch": "master",
"commit_count": 620,
"repo_created_at": "2016-08-26T13:01:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "374d2a7... |
262b17f2-373b-4044-92d8-ed111df2e4dc | PointCloudLibrary/pcl | features/src/pfh.cpp | /*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2012, <NAME>, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permi... | ALGO | 0.925205 | 6.983484 | {
"github_metadata": {
"branch": "master",
"commit_count": 14566,
"repo_created_at": "2013-02-12T16:40:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10495,
"forks": 4656,
"issues": 432,
"pull_requests": 147
},
"file_meta": {
"content_id... |
73a485e1-f570-419b-8557-d98735d22686 | aryan1519/cpp-basics | Array_Questions/push_zeroes_to_end.cpp | /*
Push Zeros to end
Given a random integer array, push all the zeros that are present to end of the array. The respective order of other elements should remain same.
Change in the input array itself. You don't need to return or print elements. Don't use extra array.
Note : You need to do this in one scan of array onl... | ALGO | 0.999798 | 4.16902 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-02-26T18:36:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71535038d545... |
0bc449e5-fd0b-4b96-be49-464693a9bfcc | dahliaOS/zircon-rpi | zircon/kernel/lib/load_balancer/include/lib/load_balancer.h | // Copyright 2020 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#ifndef ZIRCON_KERNEL_LIB_LOAD_BALANCER_LOAD_BALANCER_H_
#define ZIRCON_KERNEL_LIB_LOAD_BALANCER_LOAD_BALANCER_H_
#include <intty... | TOOL | 0.926604 | 7.612418 | {
"github_metadata": {
"branch": "master",
"commit_count": 85953,
"repo_created_at": "2020-03-29T02:37:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 45,
"forks": 7,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "bbf2e1... |
c6009192-223a-4605-beda-a97c9def39fc | tahiat/DSA | HR_Swap_Nodes.cpp | #include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
vector<string> split(const string &);
/*
* Complete the 'swapNodes' function below.
*
* The function is expected to return a 2D_INTEGER_ARRAY.
* The function accepts following parameters:
* 1. 2D_INTEGER_A... | ALGO | 0.999962 | 5.438401 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-07-08T21:54: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": "00c063daba5... |
24b1609b-245e-4e4a-8121-1b74c46c695c | Pramoth-N/DAA | Backtracking/M-Colouring/practice/prob2.cpp | /*
Given an undirected graph represented by an adjacency matrix, your task is to determine whether the graph contains a Hamiltonian Cycle. A Hamiltonian Cycle is a cycle that visits every vertex exactly once and returns to the starting vertex. You need to check for the existence of such a cycle and print "True" if it e... | ALGO | 0.999913 | 6.322467 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2024-07-23T08: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": "8aa62244a... |
59517d82-0a0f-4c97-bf61-dc00a2836fae | convexwf/leetcode | .cpp/0988.smallest-string-starting-from-leaf.cpp | /*
* @lc app=leetcode id=988 lang=cpp
*
* [988] Smallest String Starting From Leaf
*/
// @lc code=start
// 1. dfs
// 2023-12-27 submission
// 70/70 cases passed
// Runtime: 3 ms, faster than 97.03% of cpp online submissions.
// Memory Usage: 20.1 MB, less than 62.42% of cpp online submissions.
/**
* Definition fo... | ALGO | 0.999983 | 6.737478 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2020-12-20T11:41:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1bb1f8f... |
53b1941d-7db5-4959-b612-3cffdc7bb70b | mabittar/aprendendo | C++/MATRIZ COLUNA POR COLUNA.h | #include <iostream>
#include <string>
using namespace std;
int main()
{
int MAT[4][5],L,C;
cout << "informe 20 valores : \n"; //entrada de dados na matriz
for (L = 0; L < 4; L++)
for (C = 0; C < 5; C++)
{
cin >> MAT[L][C];
}
cout << " Matriz Original: \n"; //saída de dad... | ALGO | 0.965167 | 3.980928 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-06-19T01:28: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": "217b536107... |
cd003cbf-8ec1-43da-a375-49a420e8252f | CaoWGG/TensorRT-CenterNet | src/utils.cpp | //
// Created by cao on 19-10-26.
//
#include "utils.h"
#include "ctdetConfig.h"
#include <sstream>
std::vector<float> prepareImage(cv::Mat& img, const bool& forwardFace)
{
int channel = ctdet::channel ;
int input_w = ctdet::input_w;
int input_h = ctdet::input_h;
float scale = cv::min(float(input_w)... | DATA | 0.952769 | 4.424677 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2019-10-27T06:09:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 771,
"forks": 156,
"issues": 65,
"pull_requests": 1
},
"file_meta": {
"content_id": "04f6... |
1dbf9b72-323f-4887-b62b-0f3fc4ffaa7d | izayoi-luno/algorithms | search/5_540.cpp | // leetcode #540. 有序数组中的单一元素
// 二分查找 不变量问题
/*
对于下标 x 左边的下标 y,如果 nums[y]=nums[y+1],则 y 一定是偶数,应该在右边找;
对于下标 x 右边的下标 z,如果 nums[z]=nums[z+1],则 z 一定是奇数,应该在左边找。
反之亦然
*/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int singleNonDuplicate(vector<int>& nums) {
int n = nums.s... | ALGO | 0.999908 | 5.863878 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-10-26T10:44: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": "4b0c5a8d1e68... |
c04bb2c8-e6cf-43d0-9a22-37601c3495a9 | hashsequence/matrixLibrary | cpp/matrixFractions.cpp | #include "matrixFractions.h"
#include <iostream>
#include <vector>
using namespace std;
template <class T>
Row<T>::Row(int n) {
this->n=n;
arr.resize(n);
}
template <class T>
Row<T>::Row(vector<T>& arr) {
this->n=arr.size();
this->arr=arr;
}
template <class T>
Row<T>::Row(int n, vector<T>& arr) {
... | ALGO | 0.999436 | 4.144066 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2023-03-27T23:23: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": "5c77ed41501... |
47a8c859-f12e-4124-83c7-5673416021cc | HJReachability/ilqgames | include/ilqgames/cost/locally_convex_proximity_cost.h | /*
* Copyright (c) 2019, The Regents of the University of California (Regents).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the a... | ALGO | 0.996184 | 7.471453 | {
"github_metadata": {
"branch": "master",
"commit_count": 1432,
"repo_created_at": "2018-11-09T00:25:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 171,
"forks": 49,
"issues": 11,
"pull_requests": 1
},
"file_meta": {
"content_id": "2fb5... |
66f5d7ee-eff6-4ebd-a683-cd9572de919c | SeYeol00/c--_algorithm | c++_lecture/section1/8/8.c++ | #include <iostream>
#include <stack>
#include <string>
using namespace std;
/**
* Checks if the brackets in the given string are balanced.
*
* @param str the string to check
*
* @return "yes" if the brackets are balanced, "no" otherwise
*
* @throws None
*/
string checkBrackets(string str) {
stack<char> s;
... | ALGO | 0.999049 | 6.132284 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-09-30T10:13: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": "e8c91868662... |
8a6b8c7a-cc4c-42e1-b521-2476412439cf | vijaypolimeru/laughing-invention | CompGeoMechUCD_MaterialModeling/ClassicElastoplasticMaterial/EvolvingVariables/sanisand2004_alpha_in_EV.cpp | ///////////////////////////////////////////////////////////////////////////////
// COPYLEFT (C): Woody's viral GPL-like license (by BJ):
// ``This source code is Copyrighted in
// U.S., for an indefinite period, and anybody
// caught using it without our permi... | ALGO | 0.918009 | 5.591902 | {
"github_metadata": {
"branch": "jaabell",
"commit_count": 1103,
"repo_created_at": "2019-09-03T11: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": "79dd93... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.