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 |
|---|---|---|---|---|---|---|---|
9f64293c-fc4f-430c-bb4a-2121a8e99248 | agentmishra/DSA | CodeForces/Div2&3/627/C.cpp | #include <bits/stdc++.h>
#define ll long long
#define newline "\n";
#define loop(from,to) for(int i=from;i<to;i++)
#define OJ \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout);
using namespace std;
char check(string s)
{
if(s.find('L')==string::npos)
return 'R';
if(s.find... | ALGO | 0.999969 | 3.941891 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2023-01-12T17:08:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "281379c00... |
52447822-e39c-4231-ae7c-92f3eb69bef5 | raman08/Coursera-Data-Structure-And-Algorithms-by-University-of-California-San-Diego | 4_Algorithms-on-Strings/week_4_suffix_array/3_suffix_array_matching/suffix_array_matching.cpp | #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using std::cin;
using std::string;
using std::vector;
vector<int> BuildSuffixArray(const string& text) {
vector<int> order;
// write your code here
return order;
}
vector<int> FindOccurrences(const string& pattern, const string& text,... | ALGO | 0.996669 | 3.824621 | {
"github_metadata": {
"branch": "master",
"commit_count": 146,
"repo_created_at": "2020-06-04T12:58:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 57,
"forks": 28,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "571456... |
f467e4be-b6e9-4918-ba63-86591012e91b | rpdev21/DSA-with-Cpp | recursion/merge_sort.cpp | #include <iostream>
using namespace std;
void merge(int *arr, int s, int e) {
int mid = (s + e) / 2;
int len1 = mid - s + 1;
int len2 = e - mid;
int *first = new int[len1];
int *second = new int[len2];
// Copy values to temporary arrays
int k = s;
for (int i = 0; i < len1; i++) {
... | ALGO | 0.999997 | 6.248103 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-04-24T04:54: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": "a42a155a7636... |
fe152933-2940-432a-8fff-fd3ecde5f448 | aditi2802/LeetCode | Longest Increasing Subsequence - GFG/longest-increasing-subsequence.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
private:
int f(int i, int previ, int n, int a[], vector<vector<int>> &dp){
if(i==n) return 0;
if(dp[i][previ+1]!=-1) return dp[i][previ+1];
int notTake = 0 + f(i+1, previ, n, a, ... | ALGO | 0.999938 | 6.126049 | {
"github_metadata": {
"branch": "main",
"commit_count": 1492,
"repo_created_at": "2022-01-12T19:28: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": "129c5669b... |
49f2e31f-5317-4b0d-9e27-9d16f4409d9f | Innopolis-UAV-Team/ros-global-localization | libs/WHI-3D-Local-Descriptor/src/WHI.cpp | #include "WHI/WHI.h"
#include <pcl/features/normal_3d.h>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;
/* *************************for class ThreePointsFeatureEstimation************************** */
void WHIFeatureEstimation::setInputCloud(pcl::PointCloud<pcl::PointXYZ>::Ptr& in)
{
cloud_in = in;
}
void... | ALGO | 0.982782 | 5.986207 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-05-02T14:27:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20507926884a... |
90fa9e48-a073-4704-b526-f5ae1e08b5af | DanielSWolf/rhubarb-lip-sync | rhubarb/lib/webrtc-8d2248ff/webrtc/base/sha1.cc | /*
* SHA-1 in C
* By <NAME> <<EMAIL>>
* 100% Public Domain
*
* -----------------
* Modified 7/98
* By <NAME> <<EMAIL>>
* Still 100% Public Domain
*
* Corrected a problem which generated improper hash values on 16 bit machines
* Routine SHA1Update changed from
* void SHA1Update(SHA1_CTX* context, unsigned ... | ALGO | 0.99951 | 6.695881 | {
"github_metadata": {
"branch": "master",
"commit_count": 510,
"repo_created_at": "2015-10-19T19:23:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2152,
"forks": 253,
"issues": 17,
"pull_requests": 2
},
"file_meta": {
"content_id": "57... |
05b849f8-1057-4cc0-ba81-f634a35afc7d | DanielGrad99/adventofcode2023 | 8/q8.2h.cpp | #include <algorithm>
#include <cassert>
#include <fstream>
#include <iostream>
#include <set>
#include <sstream>
#include <thread>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
struct Next {
std::string left;
std::string right;
std::string getNext(int dir) {
... | ALGO | 0.99876 | 5.245722 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-16T21:18: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": "64a7cdb62668... |
40542b7b-01af-42d6-b76c-4ca6a5f0c913 | kimGreg/JUNGOL | src/1919/pairs.cpp | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
int b, n, d, m;
long long tree2[3000][3000];
int arr[100100];
long long query2Y(int now, int l, int r, int x, int y){
if(r < y-d || l > y+d) return 0;
if(y-d <= l && r <= y+d) return tree2[x][now];
return query2Y(now*2, l, (l+r)/2... | ALGO | 0.999876 | 3.335518 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2018-09-01T09:18:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2fdf372e3... |
fc9a43f2-10cd-4642-aa3a-dcdf5e9994cf | zchee/cuda-sample | 6_Advanced/matrixMulDynlinkJIT/matrixMul_gold.cpp | /*
* Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... | ALGO | 0.963599 | 5.798869 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-10-06T22:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 371,
"forks": 179,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc3640... |
ffe42e28-613a-4237-adce-2d042d572539 | AbigailWilliams1/Leetcode-Daily | OfferI/Offer59-I.cpp | /*
剑指 Offer 59 - I. 滑动窗口的最大值 难度:困难
给定一个数组 nums 和滑动窗口的大小 k,请找出所有滑动窗口里的最大值。
示例:
输入: nums = [1,3,-1,-3,5,3,6,7], 和 k = 3
输出: [3,3,5,5,6,7]
解释:
滑动窗口的位置 最大值
--------------- -----
[1 3 -1] -3 5 3 6 7 3
1 [3 -1 -3] 5 3 6 7 3
1 3 [-1 -3 5] 3 6 7 5... | ALGO | 0.999953 | 6.145727 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2022-09-22T15:57:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8b4d12e08f... |
5199ea60-a1eb-488d-88e9-fae389c2d015 | adit2005/LEETCODE-CPP-DSA-QUESTIONS | 357-count-numbers-with-unique-digits/count-numbers-with-unique-digits.cpp | class Solution {
public:
int countNumbersWithUniqueDigits(int n) {
long long prevFactorial, curFactorial;
vector<vector<int>> nCk(11, vector<int>(11));
int dpOneBack;
dpOneBack = 1;
curFactorial = 1;
nCk[0][0] = 1;
for (int i = 1; i < 11; ++i){
... | ALGO | 0.999949 | 6.237193 | {
"github_metadata": {
"branch": "main",
"commit_count": 2659,
"repo_created_at": "2023-08-27T14:39:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c513edf7b... |
f43e185c-f554-4dd3-a9ae-793fc285bf7f | abhishekbankar002/LP5 | HPC/Assignment1BFS.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <omp.h>
using namespace std;
// Graph class representing a directed graph using adjacency list representation
class Graph {
int numNodes; // Number of nodes in the graph
vector<vector<int>> adjList; // Adjacency list
public:
Graph(int numNod... | ALGO | 0.999957 | 6.630375 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-05-25T11:09: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": "16f5046aac... |
0abfd83e-1e62-495f-884e-ad4ae022b38b | lxy-146/Can-Production | PersonalManagement/ChainOfResponsibility.cpp | /*
*ChainOfResponsibility.h-defination
*/
#include "ChainOfResponsibility.h"
using namespace std;
/*
*函数:Request::Request
*参数:int num, string name
*功能:Request构造函数
*/
Request::Request(int num, string name) {
counter++;
level = num;
content = name;
cout << counter << "." << content << endl; //创建Request对象的同时打印并标号
}... | ALGO | 0.989931 | 4.274683 | {
"github_metadata": {
"branch": "t",
"commit_count": 74,
"repo_created_at": "2021-10-12T08:31: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": "37a32516c3cd9f... |
26aea70d-9660-4559-8b66-18604d105937 | mohit701473/cpp | Lecture 60-61 Queue in C++/implement_DoublyEndedQueue.cpp | #include <bits/stdc++.h>
class Deque
{
public:
int size ;
int* arr ;
int front ;
int rare ;
Deque(int n)
{
size = n ;
arr = new int[size] ;
front = -1 ;
rare = -1 ;
}
// Pushes 'X' in the front of the deque. Returns true if it gets pushed into the d... | ALGO | 0.999415 | 4.657769 | {
"github_metadata": {
"branch": "main",
"commit_count": 226,
"repo_created_at": "2023-02-16T18:42: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": "17b1f1ecbe... |
815f27ac-c2b5-4d8d-99b4-5b3ec9e73f2c | Edison-Du/Competitive-Programming | Canadian Computing Competition/2020/S3 Searching for Strings.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
const int MAXN = (int)2e5+5;
const ll MOD = (ll)1e9+7;
const ll PRIME_A = 131;
const ll PRIME_B = 133;
string n, h;
int goodFreq[26], tempFreq[26], flag;
ll pow1[MAXN], pow2[MAXN];
ll hash1[MAXN], hash2[MAXN];
set<pll> ans;
l... | ALGO | 0.999974 | 4.236214 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-06-07T02:48: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": "3e099ef3325... |
2b9b4b23-5ec2-470f-8630-d8d64eb865a0 | BaiChunhui-9803/ofec_code | utility/heap/heap.h | #ifndef OFEC_MIN_MAX_HEAP_H
#define OFEC_MIN_MAX_HEAP_H
#include <vector>
namespace ofec {
template <typename T>
class Heap {
private:
std::vector<T> m_data;
std::vector<size_t> m_seq;
std::vector<int> m_pos;
public:
Heap(const std::vector<T> &data);
void updateValue(size_t id, const T &val);
void rem... | ALGO | 0.995978 | 5.604531 | {
"github_metadata": {
"branch": "baichunhui",
"commit_count": 20,
"repo_created_at": "2025-02-19T01:49: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": "6e612... |
068f8f4f-8498-4c70-9065-439e56f56cd1 | xela6134/leetcode | 153/find_minimum_in_sorted_array.cpp | #include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
int findMin(std::vector<int>& nums) {
int left = 0;
int right = nums.size() - 1;
int smallest = INT_MAX;
// Need a greedy algorithm which tries to find the smallest possible element
// 0 1 2 3 4 5 6
// ------------... | ALGO | 0.999551 | 5.335723 | {
"github_metadata": {
"branch": "main",
"commit_count": 260,
"repo_created_at": "2023-08-27T12:04: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": "4676056ebc... |
a6d2b723-698e-4320-8664-7f2e904d721d | HarshavardhanK/NumCPP | headers/matrix_ops.h | //
// Created by rakshitgl
//
#ifndef MATRIXPRO_MATRIX_OPS_H
#define MATRIXPRO_MATRIX_OPS_H
#include "matrix.h"
#include "setup_parallel.h"
using namespace numcpp;
using namespace parallel;
#define TS 32
#define WPT 8
namespace numcpp {
int is_broadcast_possible(const Matrix* valid_a, const Matrix* valid_b, long... | ALGO | 0.971885 | 4.90657 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2021-04-13T15:30: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": "13dacc51a4... |
42ad6306-072b-4adf-88b6-452cf5f471eb | f2rkan/intro-to-Programming-w-c-plus-plus | part-4/1/pers1.cpp | #include<iostream>
#include<cmath>
using namespace std;
//structure declarations
struct polar
{
double angle; //direction from origin
double distance; //distance from origin
};
struct rect
{
double x; //horizontal distance from origin
double y; //vertical distance from origin
};
void rect_to_polar(cons... | ALGO | 0.984098 | 4.590961 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-07-03T10:58: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": "8167c112a5f... |
b363c670-7b13-4a91-922c-22def52c863e | Ayush05G/Cpp_DSA | Data Structures & Algorithms/Recursion/recClass3Code1.cpp | #include <iostream>
#include<vector>
using namespace std;
void printSubsequences(string str, int i, string output,vector<string> &ans) {
//base case
if(i == str.length()) {
// cout << output << endl;
ans.push_back(output);
return;
}
//1 case khud solve karunga
char ch = str[i];
//include ch
... | ALGO | 0.999813 | 5.253093 | {
"github_metadata": {
"branch": "main",
"commit_count": 311,
"repo_created_at": "2024-06-01T21:05:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30c203f8fb... |
161cdbdd-9cf4-4dba-b988-88dd2c5e9d09 | goagain/Yahtzee-AI | midterm/c++ search/YahtzeeStatus.cpp | #include "YahtzeeStatus.hpp"
#include <algorithm>
int YahtzeeStatus::getUpperSum() const
{
static const auto list = std::vector<ScoreType>{
ScoreType::Ones,
ScoreType::Twos ,
ScoreType::Threes ,
ScoreType::Fours ,
ScoreType::Fives,
ScoreType::Sixes
};
int score = 0;
for (auto iter : list)
{
score += get... | ALGO | 0.906671 | 4.818451 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-09-10T21:15: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": "7c6527c5a5... |
fe66f630-e777-4012-9724-667408c30b4f | FallingStar624/GSDS3_Algo | kwangeun.yeo/0x1C/BOJ_11404.cpp | #include <iostream>
#define INF (0x3f3f3f3f)
#define MAXV (103)
using namespace std;
int V, E;
int d[MAXV][MAXV];
int main() {
freopen("input.txt", "r", stdin);
cin.tie(0);
ios::sync_with_stdio(0);
cin >> V >> E;
for (int i = 1; i <= V; ++i) {
for (int j = 1; j <= V; ++j) {
d[... | ALGO | 0.999993 | 4.650137 | {
"github_metadata": {
"branch": "main",
"commit_count": 1008,
"repo_created_at": "2022-03-30T08:56:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa6349de8... |
840aedc2-6ff7-4324-bf8a-3f9aea9a0ac2 | NicholasFan235/Google-Kickstart | 2020/Round E/High Buildings/Solution.cpp | #include <bits/stdc++.h>
//#include "CheckSolution.h"
int T, A, B, C, N;
std::vector<int> result;
void addInc(int n){
for (int i = 0; i < n; i++){
result.push_back(i+2);
}
}
void addMax(int n){
for (int i = 0; i < n; i++){
result.push_back(N);
}
}
void addDec(int n){
for (int i =... | ALGO | 0.999895 | 4.236542 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-11-19T13:26:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7390607ef8... |
61009abf-0f98-4517-8761-5c2a56d70061 | N-911/c_plus_plus_white | w3/0_t.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <sstream>
using namespace std;
class Person{
private:
map <int, string> first_names;
map <int, string> last_names;
public:
void ChangeFirstName(int year, const string& first_name){
// izmenenie imeni v god
first... | TOOL | 0.90278 | 3.621098 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-06-18T17:58:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76d6f48eb... |
e0e8731d-6f4c-4d09-a66c-10187753afcf | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/06/0611/personal_submission/cf725d_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN ((int) 3e5)
using namespace std;
int n;
__int128 tree1[MAXN + 10], tree2[MAXN + 10];
int lb(int x) { return x & (-x); }
void add(__int128 *tree, int pos, long long val) {
for (; pos <= n; pos += lb(pos)) tree[pos] += val;
}
__int128 query(__int128 *tree, int pos) {
__in... | ALGO | 0.99998 | 3.464957 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "5c1f... |
7c969391-05a3-4378-98b5-d9b506df7d6c | ashmanmode/code-samples | GfG/314B.cpp | #include <bits/stdc++.h>
using namespace std;
#define maxsiz 1000000
#define F first
#define S second
#define fr(i,k,n) for(int i = k ; i < n ; i++ )
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define printvect(a,n) fr(i,0,n) cout << a[i] << " " ;
#define point pair<int,int>
#define pii pair<int,int>
#d... | ALGO | 0.999892 | 3.692935 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-03-10T17:35: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": "a3db03d27a... |
f7842384-533f-4789-8ff9-2be481c3a66d | lpestl/old-some-effects | effects src/waves-sources-16.09.2013/waves1/waves/waves/WaveEquationSolver.h |
#ifndef __WAVEEQUATIONSOLVER_H__
#define __WAVEEQUATIONSOLVER_H__
class WaveEquationSolver
{
public:
WaveEquationSolver();
~WaveEquationSolver();
void CreateGrid(float width, float height, float gridStep, int timeStep, float speed);
void PerturbationIdx(int i, int j);
void PerturbationCoord(float x, float y);... | ALGO | 0.998541 | 5.115954 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-08-09T12:23: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": "db7ee29a67... |
113c838d-7c8c-427c-81a1-99f96af95fe9 | ahmedelsaie/AlgorithmsProblems | UVA/11538 - Chess Queen.cpp | #include <iostream>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <cstring>
using namespace std;
#define ll unsigned long long
ll fn(ll r, ll c);
ll pre[1000006];
int main()
{
pre[0] = 0;
for(ll i = 1; i <= 1000005; i++)
pre[i] = pre[i - 1] + i * (i - 1);
ll x, y;
while(... | ALGO | 0.99994 | 4.07136 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-12-26T01:29: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": "56842ed7b4... |
806a304b-393e-4a82-82d9-e405b4185234 | Soroar-Mia/xpsc-code | week 7/contest/C.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
bool canFormPath(int n, int k, const vector<int>& colors) {
unordered_map<int, int> colorCounts;
vector<int> blockSizes;
for (int i = 0; i < n; i++) {
colorCounts[colors[i]]++;
if (colorCounts[colors[i]] %... | ALGO | 0.999751 | 6.225998 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2023-06-16T17:36: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": "191e2f1bcb9... |
f1f36d8f-a913-4f2e-bc14-73f3b3a43253 | harsh0015/competitive_programming | new13/q2.cpp | #include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ceel(x, y) ((x) / (y) + !((x) % (y) == 0))
#define ff first
#define ss second
#define endl '\n'
#define print(v) for(auto x : v) cout << x << ' '; cout << endl;
#define debug(v) cout << #v << " = "; print(v);
... | ALGO | 0.999946 | 3.646541 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-06-02T07:58: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": "b91aa12c16... |
be7d27ef-956b-44c8-b764-a693c8630b12 | cupy/cupy | cupy/_core/include/cupy/complex/csqrt.h | /*
* Copyright 2008-2013 NVIDIA Corporation
* Copyright 2013 <NAME>
*
* 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
*
* Unl... | ALGO | 0.999088 | 7.600079 | {
"github_metadata": {
"branch": "main",
"commit_count": 30024,
"repo_created_at": "2016-11-01T09:54:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10345,
"forks": 931,
"issues": 519,
"pull_requests": 92
},
"file_meta": {
"content_id": "... |
211978e2-10b8-46f3-b32e-eb7333324d8c | WireLife/FightingCode | 2020备战蓝桥/刘燚杰/第十次作业/10-5.cpp | #include<iostream>
using namespace std;
const int array[] = {31,28,31,30,31,30,31,31,30,31,30,31};
struct Date
{
int year;
int month;
int day;
};
struct Date D1;
struct Date D2;
bool IsLeapYear(int year)
{
if((year%4 == 0 && year%100 != 0) || year%400 == 0)
return true;
return false;
}
in... | ALGO | 0.999941 | 3.364659 | {
"github_metadata": {
"branch": "master",
"commit_count": 743,
"repo_created_at": "2019-11-30T03:26:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6eab0c... |
37cefd95-7c82-4814-861b-18f718b33e07 | programming-653501/ShinkevichGS | LAB 5/Source.cpp | /* Программа создает двусвязный циклический список, где хранятся стеки */
/* Программа сортирует символы в стеках в алфавитном порядке */
/* Программа сливает все стеки в один */
/* version 1.0 */
#include <iostream>
using namespace std;
void keep_window_open()
{
cin.clear();
cin.ignore(0xFFFFFFFF, '\n');
cin.get... | ALGO | 0.999914 | 4.674089 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2017-02-16T19:08:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba00662d97... |
bc6e1c80-22f9-428a-9751-002b719f7423 | AIS-Bonn/object_detection_in_laser_range_data | laser_segmentation/src/segmenter.cpp | /** @file
*
* This class segments objects of a specified width in laser point clouds
*
* @author <NAME>
*/
#include <laser_segmentation/segmenter.h>
namespace laser_segmentation
{
Segmenter::Segmenter(ros::NodeHandle node, ros::NodeHandle private_nh)
: PUCK_NUM_RINGS(16)
, HOKUYO_NUM_RINGS(1)
, m_input_is_ve... | ALGO | 0.946237 | 5.576207 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-07-30T15:02:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 15,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "a43cd7c36991... |
42e5e5d8-ca33-4927-afeb-bf5f038c50af | SVDmodel/SVD | SVDModel/SVDCore/tools/filereader.cpp | /********************************************************************************************
** SVD - the scalable vegetation dynamics model
** https://github.com/SVDmodel/SVD
** Copyright (C) 2018- <NAME>, <NAME>
**
** This program is free software: you can redistribute it and/or modify
** it under th... | TOOL | 0.917973 | 6.274657 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2020-11-18T10:39:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae6d39ea... |
df160039-1242-4b47-b608-7a0df1884bdb | ishandutta2007/codeforces-s | strawberryc/normal/1677/E.cpp | #include <bits/stdc++.h>
#define p2 p << 1
#define p3 p << 1 | 1
template <class T>
inline void read(T &res) {
res = 0; bool bo = 0; char c;
while (((c = getchar()) < '0' || c > '9') && c != '-');
if (c == '-') bo = 1; else res = c - 48;
while ((c = getchar()) >= '0' && c <= '9')
res = (res << 3) + (res <<... | ALGO | 0.999653 | 3.681997 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f85ed2978f9... |
9ca0efd6-9bcc-4292-8f8e-29c0df71b86a | SumiTRawaTX/DSA-CODES | CODES/Linked List/Class 2/DoublyLinkedList/insertion.cpp | #include<iostream>
using namespace std;
class node {
public:
int data;
node* prev;
node* next;
node() {
this->prev = NULL;
this->next = NULL;
}
node(int data) {
this->data = data;
this->prev = NULL;
this->... | ALGO | 0.999551 | 4.810261 | {
"github_metadata": {
"branch": "main",
"commit_count": 301,
"repo_created_at": "2023-12-01T14:16: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": "776e6843c6... |
c327bf95-3e2a-4db8-9cbc-5df7a0b78942 | Ayushiverma844/Learning_Cpp_and_Dsa | DSA/5_SORTING/4_Merge_Sort.cpp | // Problem Statement:
// Title: Sort an Array using Merge Sort (with Vectors)
// Objective:
// Write a C++ program to sort a list of integers using the Merge Sort algorithm. The program should use the STL vector for dynamic array handling and implement a recursive merge sort with a helper merge function to combine so... | ALGO | 0.999998 | 6.779921 | {
"github_metadata": {
"branch": "main",
"commit_count": 313,
"repo_created_at": "2024-12-03T05:20: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": "3d40f20bf9... |
76406e96-eb37-484b-9031-5e7d9d5b5929 | rohanKanojia/Basic-DS-templates | Trie.h | #ifndef TRIE_H
#define TRIE_H
#include <unordered_map>
#include <string>
#include <vector>
class TNode {
std::string value;
bool isCompleteWord;
std::unordered_map<char, TNode *> children;
public:
TNode() : value(""), isCompleteWord(false) { }
TNode(std::vector<char> aSet, std::string val, bool isComplete) ... | ALGO | 0.981506 | 5.194842 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2015-08-18T13: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": "cf117fd30... |
5c680caa-6bc9-4212-90e3-d15db2ea8784 | CrunchiesJL/StatisticsSolver | Statistics.cpp | // Author: CrunchiesJL
using namespace std;
#include <array>
#include <sstream>
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cmath>
void PrintList(vector<double> list)
{
int count = 0;
for (double i : list)
{
cout << setprecision(10) << ... | TOOL | 0.988858 | 4.287877 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-05T04:06: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": "579a17f8290b... |
4e2028e8-6e13-4fed-80fc-e4a23e293e38 | ASSERT-KTH/Supersonic | predictions/submissions-aizu-cot-gpt4/Codenet/p00998/104734515/response_1.cpp | #include <iostream>
#include <cstdlib>
#include <algorithm>
using namespace std;
const int INF = 1 << 30;
struct Treap {
struct node {
int value;
node *left, *right;
int priority;
int cnt;
int small;
node(int v) : value(v), priority(rand()), cnt(1), small(v) {
... | ALGO | 0.999979 | 4.655393 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-02-03T10:33:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "081f7cb82ddb2... |
dc4ba3be-14ab-49e6-976e-114aff76091c | kutkarsh-2002/Daily-Coding-DS-Algo-Practice | Perfect Sum Problem - GFG/perfect-sum-problem.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
int perfectSum(int arr[], int n, int sum)
{
// Your code goes here
int mod= 1000000007;
int t[n+1][sum+1];
for(int i=0;i<n+1;i++)
{
for(int j=0;j<sum+1;j+... | ALGO | 0.999817 | 5.464689 | {
"github_metadata": {
"branch": "main",
"commit_count": 2594,
"repo_created_at": "2021-05-11T07:39:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "164f4563d... |
62ce02fd-6395-4e39-b08d-6a7b95e379b8 | kumasento/bag-of-junks | algo/AVL_Tree.cc | #include <iostream>
#include <memory>
#include <vector>
using namespace std;
struct BSTNode {
int key;
BSTNode *left, *right;
BSTNode *p;
// NIL node.
BSTNode() : key(INT_MIN), left(nullptr), right(nullptr), p(nullptr) {}
BSTNode(int key) : key(key), left(nullptr), right(nullptr), p(nullptr) {}
BSTNode... | ALGO | 0.999847 | 6.233038 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2021-02-18T23:15: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": "b3fa1a44d... |
dd971eca-ecd9-4eac-ac8e-1f3ae3790bec | byrondefaz/control-autodisparado-red | kernel/ttusnetwork.cpp | /*
* Copyright (c) 2016 Lund University
*
* Written by <NAME>, <NAME> and <NAME>,
* Department of Automatic Control LTH, Lund University, Sweden.
*
* This file is part of TrueTime 2.0.
*
* TrueTime 2.0 is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public Lic... | ALGO | 0.989549 | 4.372411 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-05-28T04:46: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": "8a2bb9be5... |
1dd57660-5386-4bba-8cf6-6be30774ed62 | fookwood/zoj-solutions-fish_ball | Vol.20(2900-2999)/#2935 Here We Go(relians) Again/p2935.cpp | // 1693333 2008-11-08 16:30:59 Accepted 2935 C++ 0 196 呆滞的慢板
// 地图最短路,直接归约成一般图 Dijkstra。
//////////////////////////////////////////////////////////
// 映射二分堆(Mapped_Binary_Heap)类模板 v1.3 //
//////////////////////////////////////////////////////////
// /... | ALGO | 0.999968 | 3.596102 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2012-06-05T02:38:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 102,
"forks": 27,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "78152f9... |
9d84db3f-7dbf-4d7e-9aa7-643857363e62 | soedinglab/MMseqs2 | src/util/sortresult.cpp | #include "Parameters.h"
#include "DBReader.h"
#include "DBWriter.h"
#include "Debug.h"
#include "Util.h"
#include "Matcher.h"
#include "QueryMatcher.h"
#include "FastSort.h"
#ifdef OPENMP
#include <omp.h>
#endif
int sortresult(int argc, const char **argv, const Command &command) {
Parameters &par = Parameters::ge... | ALGO | 0.979107 | 5.049214 | {
"github_metadata": {
"branch": "master",
"commit_count": 6592,
"repo_created_at": "2016-07-20T06:17:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1732,
"forks": 234,
"issues": 448,
"pull_requests": 15
},
"file_meta": {
"content_id": "... |
8fdda728-4296-4853-bce8-367d03bb358e | FelixMorenoPenarrubia/CompetitiveProgramming | virtual_contest/upcfinal17/p4.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<ld> vld;
typedef pair<ld, ld> dd;
typedef vector<dd> vdd;
ld EPS = 1e-18;
ld PI = 2*acos(0.0);
ld sq(ld x) {
return x*x;
}
ld sign(ld x) {
return (x > 0) ? 1 : -1;
}
bool has_positive_solution(ld a, ld... | ALGO | 0.999683 | 4.134211 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-03-03T21:08: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": "8e76d55453... |
82bc9651-f866-4bb6-8e59-a98cbd55a54c | dmitrii-gbe/Algorithms | 7th_Sprint/InsertStrings.cpp | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
struct StrPos {
std::string s;
size_t pos = 0;
StrPos() = default;
StrPos(const std::string &s_, size_t pos_) : s(s_), pos(pos_) {}
};
std::vector<StrPos> Read(int n) {
std::vector<StrPos> v(n);
for (int i = 0; i < n... | ALGO | 0.999872 | 5.085711 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2024-04-19T20: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": "9607ed54178... |
3a55bdb5-6c6f-44ed-ba7e-5e2806345e30 | btnkij/ACM | ybt/ybt1328.cpp | /**
* Number:ybt1328
* Title:光荣的梦想
* Status:AC
* Tag:[归并排序]
**/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
#define INF 0x3f3f3f3f
#define PI acos(-1)
typedef long long ll;
#define readi(i1) sc... | ALGO | 0.999977 | 4.010562 | {
"github_metadata": {
"branch": "master",
"commit_count": 155,
"repo_created_at": "2019-02-26T14:21: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": "46c66922... |
fdc7fba2-6366-4057-9ae8-2e2d1d63df41 | Anureet37/Coding | Codechef2.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
// void knapSack(int W, vector<int> &val, int n, vector<int>&a, int & asum)
// {
// int i, w;
// int K[n + 1][W + 1];
// // Build table K[][] in bottom up manner
// for (i = 0; i <= n; i++) {
// for (w = 0;... | ALGO | 0.999902 | 4.436837 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-12-23T10:47: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": "83fe07520... |
0b4fc046-6e73-41f0-8562-759e43c15ae1 | Shagor71/CP-Competetive-Programming- | Ramadan/Module 4/Ordered Set/1_Order_statistic_set.cpp | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
template <typename T> using o_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
//#define _42_
#ifdef _42_... | ALGO | 0.999555 | 4.384244 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2025-05-05T15:39: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": "9559346a77a... |
0581815a-54e1-40df-bd62-08004fc60932 | acornjello/TIL | Algorithm/Baekjoon/BFS_DFS/DFS/1012_유기농 배추.cpp | #include<iostream>
#include<vector>
using namespace std;
int N, M, K;
vector<vector<int>> node(50, vector<int>(50));
vector<vector<bool>> visited(50, vector<bool>(50));
int bug = 0;
void DFS(int y, int x) {
node[y][x] = 0;
if (x + 1 < M && node[y][x + 1] == 1) {
DFS(y, x + 1);
}
if (x - 1 >= 0 && node[y][x - ... | ALGO | 0.999848 | 4.160235 | {
"github_metadata": {
"branch": "master",
"commit_count": 117,
"repo_created_at": "2018-05-30T12:16:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "efb3d622... |
002b827e-bb94-40b1-8c4e-bf93268fb310 | marioo00/MultiThreaded-Sort | Proj 4 Multithreading/mysort.cpp | // Name: <NAME>
// Class (CECS 325-02)
// Project Name (Prog 4 – Threads)
//
//
// I certify that this program is my own original work. I did not copy any part of this program from
// any other source. I further certify that I typed each and every line of code in this program.
#include <iostream>
#include <fstream>
#i... | ALGO | 0.997832 | 5.482682 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-02-23T05:34: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": "9e23ee8809d1... |
efc07e4b-5e8b-498a-8d99-ee98251d42c7 | kss418/BOJ | 백준/Gold/32069. 가로등/가로등.cc | #include <bits/stdc++.h>
#include <ext/rope>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define fastio cin.tie(0), cout.tie(0), ios... | ALGO | 0.999986 | 4.143127 | {
"github_metadata": {
"branch": "main",
"commit_count": 1502,
"repo_created_at": "2022-09-09T06:57: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": "f39c6e4dc... |
34ac584c-4888-4601-bc7a-456b86c7fc65 | Yee172/SHY_ACM_Template | Codes/cpp/Wavator/math/cal.cpp | const long long mod = 1e9 + 7;
inline long long add(const long long &a, const long long &b) {
long long res = a + b;
if (res > mod)
res -= mod;
return res;
}
inline long long sub(const long long &a, const long long &b) {
return (a - b + mod) % mod;
}
inline long long mul(const long long &a, c... | ALGO | 0.99943 | 3.836197 | {
"github_metadata": {
"branch": "master",
"commit_count": 182,
"repo_created_at": "2018-06-07T13:38:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c038f83... |
58ecc93c-e958-4422-b116-14443e7e0a16 | ryansann/cci-solutions | 2.3/main.cpp | // delete middle node with only access to it
#include <iostream>
#include "../LinkedList/LinkedList.h"
#include "../LinkedList/Node.h"
using namespace std;
// helper - this is just to grab a middle node for input into deleteNodeWithoutHead
// O(n) time
// O(1) space
Node* LinkedList::getMiddleNode() {
if (length <=... | ALGO | 0.998569 | 5.110515 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2018-01-24T19:38: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": "3efa261be... |
a68ccd6b-52f6-4787-8e69-36f9eb496585 | ENSIMelec/RobotPrincipal2019 | PreCoupeNemaFusionPathfinfing/src/graphe.cpp | #include "graphe.h"
#include "noeud.h"
#include "map.h"
//Graphe::Graphe(){}
Graphe::Graphe(int monCote)
{
graph = Map(monCote);
}
//Fonction qui fait l'algo de Dijkstra
void Graphe::DijkstraAlgo(int source, vector<double> &min_distance, vector<int> &previous, const double max_weight)
{
int n = this->graph.... | ALGO | 0.998953 | 3.201599 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2019-05-01T07:17:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6abf644c53... |
545fd9bb-0893-4ac6-a643-a35e506577f5 | enjoy82/atcodersyozin | train/typical/046.cpp | // execute g++ main.cpp -std=c++14 -I C:\Users\naoya\Desktop\code\Atcoder
#include<bits/stdc++.h>
//#include<atcoder/all>
typedef long long ll;
typedef long double ld;
using namespace std;
//using namespace atcoder;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
//ordered_set 重複不可
#include <ext/pb_ds/assoc_con... | ALGO | 0.999795 | 3.803679 | {
"github_metadata": {
"branch": "master",
"commit_count": 115,
"repo_created_at": "2020-02-28T03:27: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": "90f590a9... |
90839980-b737-406d-9089-2841505e0b87 | qzshadow/Numbskull | FactorGraph.cpp |
#include "FactorGraph.h"
void FactorGraph::gibbs(size_t num_samples, int master_rank, std::vector<int> workers_rank) {
std::unordered_map<size_t, std::array<int, 2>> counter;
while (num_samples--) {
if (world.rank() == master_rank) { // master
// Master broadcasts its assignment of all ... | ALGO | 0.99845 | 6.147874 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2018-02-16T01:56:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4cd01850... |
f576f7df-0cc6-4a5b-89c3-417453dfa0e8 | hyperpower/CarpioPlus | examples/1-1-5-point_in_polygon/main.cpp | #include <iostream>
#include <memory>
#include <string>
#include "geometry/geometry.hpp"
#include "utility/random.hpp"
using namespace carpio;
typedef Point_<double, 2> Point;
typedef PointChain_<double, 2> PC;
typedef GGnuplotActor_<double, 2> GA;
int case_random() {
std::list<Point> l ={ Point(0, ... | ALGO | 0.944362 | 5.545054 | {
"github_metadata": {
"branch": "master",
"commit_count": 250,
"repo_created_at": "2018-06-14T11:41:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "44f53382... |
35f6df8f-b084-4672-964f-0254f04dc8c6 | Aakash310/codeChef | Linked List.cpp | #include <iostream>
#include<bits/stdc++.h>
using namespace std;
struct node{
int data;
struct node *link;
};
struct node *root = NULL;
struct node *root1 = NULL;
struct node *root2 = NULL;
struct node *root3 = NULL;
void NewNode(int data){
struct node* temp;
temp = (struct node*)malloc(sizeof(struct node));
tem... | ALGO | 0.999939 | 3.099787 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-05-27T20:18: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": "6817c1205f... |
ff45afb3-8f82-4913-9353-0b2845af7779 | ph2lb/BITX40-led-vfo | BITX40-led-vfo.ino | /*
* ------------------------------------------------------------------------
* "PH2LB LICENSE" (Revision 1) : (based on "THE BEER-WARE LICENSE" Rev 42)
* <<EMAIL>> wrote this file. As long as you retain this notice
* you can do modify it as you please. It's Free for non commercial usage
* and education and if... | TOOL | 0.951295 | 4.681069 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-01-11T21:37:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd99588ff3... |
2c87617d-a340-41c0-8e1a-2be0ae9232d8 | KaiXuanwby/C-Learning_intermediate | 55.类和对象--多态案例1--计算器类.cpp | //分别利用普通写法和多态技术,设计实现两个操作数进行运算的计算器类
//多态的优点:
//代码组织结构清晰
//可读性强
//利于前期和后期的扩展以及维护
#include<iostream>
using namespace std;
//普通编写-------不利于开发,维护以及扩展
class Calculator
{
public:
int getResult(string oper)
{
if (oper == "+")
{
return m_Num1 + m_Num2;
}
else if (oper == "-")
{
return m_Num1 - m_Num2;
}
e... | TOOL | 0.987071 | 5.14224 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-10T15:17: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": "d3f2a48f14ac... |
82338056-5041-4fd5-a8fc-637320d3e006 | riadath/problem-solves | UVA/uva_10976.cpp | #include <bits/stdc++.h>
using namespace std;
long long oll = 0;
#define ll long long
#define ull unsigned long long
#define FIO \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define pb push_back
#define pii pair<int, int>
#define pdd pair<double, double... | ALGO | 0.99958 | 3.807876 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2021-03-07T00:19:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02fc0a98c... |
b8fe285c-e23e-477d-837d-e4294111ab18 | Chandiharh-university/opps-and-dsa-keshav3815 | AdjacencyMatrix.cpp | #include <iostream>
#include <vector>
using namespace std;
void createAdjacencyMatrix(int vertices, vector<pair<int, int>> &edges, vector<vector<int>> &adjMatrix) {
adjMatrix.assign(vertices, vector<int>(vertices, 0));
for (auto edge : edges) {
int u = edge.first;
int v = edge.second;
... | ALGO | 0.999941 | 5.973895 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-12-19T09:13:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b67bf2651a8b... |
3413ca77-a4d0-469a-a76b-c12953125019 | ilyaCube/QuickChat | modules/common/Inc/protocol.hpp | #pragma once
#include <vector>
#include <string>
#include <regex>
#include <optional>
#include <algorithm>
#include <boost/system/error_code.hpp>
#define COMMAND_INDEX 1
#define ARGUMENT_INDEX 2
#define INDET_VALUE 1
#define NAME_INDEX 0
#define PASS_INDEX 1
namespace common
{
enum class protocol : unsigned
... | TOOL | 0.938508 | 4.356761 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2023-02-26T11:05:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "e86971720... |
3faeddd3-4945-4ec2-932d-9c4e58f3743a | Taewoo-Kang/cpp-for-coding-test | Problems/programmers/programmers_42576.cpp | // 완주하지 못한 선수
// 출처: https://programmers.co.kr/learn/courses/30/lessons/42576
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
using namespace std;
// 참고! unordered_map의 operator[]에서 key가 없을 경우에는 초기값을 생성하므로 int의 경우 0으로 초기화 됨
// 출처: https://stackoverflow.com/questions/59192236/does-std... | ALGO | 0.999298 | 5.163532 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2021-08-02T16:42: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": "833c71896... |
13368a17-93be-4ad0-8a91-40b99f73b33f | yveltvoumamy/phystech_study_projects | algo/1_term/sorts_and_bisect/O. Bisect_templates.cpp | #ifndef ALGORITMS_O_H
#define ALGORITMS_O_H
template <class T>
bool BinarySearch(const T* begin, const T* end, const T& value) {
while (1 < end - begin) {
if (value < *(begin + (end - begin) / 2)) {
end -= (end - begin) / 2;
} else {
begin += (end - begin) / 2;
}
}
if (!(*begin < value) &... | ALGO | 0.999903 | 6.023005 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-11-05T13:05: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": "6c6f6e9b7dcb... |
f1a93e25-fb81-4f53-af31-0709aa6b8cec | csus4uwu/sync2024 | sol/CF/1536B.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl "\n"
string s;
vector<string> res;
void solve() {
int n;
cin >> n;
cin >> s;
for (char i = 'a'; i <= 'z'; i++) {
if (s.find(i) == string::npos) {
string tmp = {};
tmp.push_back(i);
... | ALGO | 0.999889 | 4.049662 | {
"github_metadata": {
"branch": "main",
"commit_count": 829,
"repo_created_at": "2024-03-03T00:44: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": "0c4753b9a3... |
f7b4a9c3-5aa1-4f60-ac7e-f1a9ccade2d1 | nsh07/codeforces-solutions | 474B.cpp | //
// Created by <NAME> <https://github.com/nsh07>
//
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n;
vector<int> a(n), prefixA(n);
for (int i = 0; i < n; i++) cin >> a[i];
prefixA[0] = a[0];
for (int i = 1; i < n; i++) {
prefixA[i] = prefixA[i - 1] +... | ALGO | 0.999964 | 4.325463 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-01-28T06:52:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7a4ed036c4e9... |
9c3dd5ab-0aea-4265-8f02-0d7f24d99949 | ishandutta2007/codeforces-r | rubikun/normal/1696/F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define ... | ALGO | 0.999967 | 4.220654 | {
"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": "ed0b507c10d1... |
977232a5-debc-4b02-a522-6084546d6f39 | thecodinglab/adventofcode-2022 | src/day-03/solution.a.cpp | #include "base.hpp"
int main() {
int total = 0;
while (1) {
string content;
cin >> content;
if (!cin)
break;
string compartment_a = content.substr(0, content.length() / 2);
string compartment_b = content.substr(content.length() / 2);
for (int i = 0; i < compartment_a.length(); i++... | ALGO | 0.99973 | 3.921515 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2022-12-01T05:50:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e20bd231f... |
ce642128-b7a0-4e32-aa7b-388c23d369df | 0xPolygon/zkevm-prover | src/poseidon_opt/poseidon_opt.cpp | #include "poseidon_opt.hpp"
void Poseidon_opt::hash(vector<FrElement> &state, FrElement *result)
{
hash(state);
*result = state[0];
}
void Poseidon_opt::hash(vector<FrElement> &state)
{
assert(state.size() < 18);
const int t = state.size();
const int nRoundsP = N_ROUNDS_P[t - 2];
const vector<FrElement> *c = ... | ALGO | 0.999871 | 4.392912 | {
"github_metadata": {
"branch": "main",
"commit_count": 3081,
"repo_created_at": "2021-11-08T11:01:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 240,
"forks": 164,
"issues": 107,
"pull_requests": 29
},
"file_meta": {
"content_id": "972... |
6e2ffb29-bf48-4927-9bae-fd25eb8fc402 | AKalf/Breadth-First-Search-Algo | BreadthFirstSearch/Node.h | #pragma once
#include <iterator>
#include <iostream>
#include <sstream>
#include <string>
#include <map>
using namespace std;
template <class T>
class Node
{
std::map<Node<T>*, int> neighbours;
Node<T>* parent;
T value;
public:
// A node with a value, neighbours and cost paths
Node(T);
// Returns node'... | ALGO | 0.986787 | 4.43167 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-07T09:05: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": "f6be8dc783... |
9c1f7285-5edc-4234-a6cd-44ac1cf44a87 | 23021600-TranGiaKhanh/co-vua | engine/evaluation.h | #ifndef SRC_EVALUATION_H_
#define SRC_EVALUATION_H_
#include "types.h"
#include "position.h"
namespace Evaluation {
// Constants
constexpr int contempt_factor = -50; // a positive value to prefer draws, a negative value to avoid them. todo: not being used by the moment
constexpr int draw_score = 0;
/*
* Recei... | ALGO | 0.984331 | 6.726992 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2025-03-28T00: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": "962dc53425a... |
fcdb34da-7063-4b92-9e6f-8921f4d533be | mpfeifer1/Kattis | font.cpp | // <NAME>
// Version 04, 2018/02/17
#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 long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
const ld pi = 4.0*at... | ALGO | 0.999993 | 4.32407 | {
"github_metadata": {
"branch": "master",
"commit_count": 881,
"repo_created_at": "2017-11-27T05:28:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 175,
"forks": 79,
"issues": 3,
"pull_requests": 1
},
"file_meta": {
"content_id": "7092b... |
7bd8bb18-f484-440a-a73c-7db3bd7829cc | yongqingzs/BezierLib | test/test_quintic.cpp | #include <locale>
#include "bezier.hpp"
#ifdef _WIN32
#include <windows.h>
#endif
using namespace bezier;
int main() {
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
#endif
// 创建输出目录
std::string output_dir = "../output";
// 设置起点、方向和目标点
Point2D start_point = {-18408.05, -6982.94}; // 起点坐标
... | ALGO | 0.998605 | 5.750272 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2025-03-26T08:00: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": "910e40e42... |
a5efae84-cdef-488a-8dd3-33c4b4a4a86d | iamakshatjain/Codings | codechef/May Challenge 2020 Division 2/CHANDF/main.cpp | // WA
#include <bits/stdc++.h>
using namespace std;
long long int findZ(long long int x, long long int y, long long int l, long long int r){
if(x == 0) return l;
// case 1
long long int OR = x|y;
if(OR >=l && OR <= r){
return OR;
}
else if(OR < l){
}
else{
// OR > r ... | ALGO | 0.999944 | 3.807941 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-04-23T14:00: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": "7ed47bb8a... |
f0eb1be2-96b9-4abe-9654-d6760677f28c | braydonwang/AdventofCode | 2023/day17/day17p1.cc | #include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <queue>
#include <list>
#include <set>
#include <unordered_map>
#include <map>
#include <regex>
#include <string>
using namespace std;
#define ll long long
vector<string> split(string s);
vector<int> splitInt(str... | ALGO | 0.999966 | 5.137651 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2022-12-04T04: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": "14dda0f40... |
179f1877-f7eb-44a0-a4ef-89887554c630 | AnkitM18-tech/CP-Sheet | linked-list/starter.cpp | #include<bits/stdc++.h>
using namespace std;
struct ListNode {
public:
int val;
ListNode* next;
ListNode() {
val = 0;
next = nullptr;
}
ListNode(int val1) {
val = val1;
next = nullptr;
}
ListNode(int val1, Li... | ALGO | 0.999826 | 4.715466 | {
"github_metadata": {
"branch": "main",
"commit_count": 367,
"repo_created_at": "2021-08-29T10:44: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": "24ef7ecc13... |
683b6d01-edeb-4696-a23c-0823b26c0fb2 | nathansttt/hog2 | deprecated/coprobber/DSDijkstra.cpp | #include "DSDijkstra.h"
template<>
void DSDijkstra<graphState,graphMove,GraphEnvironment>::push_end_states_on_queue() {
QueueEntry qe;
CRState pos;
std::vector<graphState> neighbors;
node_iterator nit;
Graph *g = env->GetGraph();
node *n;
// sanity check: is the queue empty or are there rests?
assert( queue.e... | ALGO | 0.999485 | 4.552764 | {
"github_metadata": {
"branch": "PDB-refactor",
"commit_count": 2251,
"repo_created_at": "2015-08-19T21:02:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 117,
"forks": 62,
"issues": 9,
"pull_requests": 1
},
"file_meta": {
"content_id":... |
93a8ce80-711c-47fc-b25c-223e91f8cf87 | ishandutta2007/codeforces-f | froggyzhang/normal/1598/G.cpp | #include<bits/stdc++.h>
using namespace std;
#define N 500050
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int H=4;
bool isprime(int x){
for(int i=2;i*i<=x;++i){
if(x%i==0)return false;
}
return true;
}
inline int Get(int x){
while(!isprime(x))++x;
return x;
... | ALGO | 0.999945 | 3.431805 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43: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": "572ffd16ddd9... |
d1aef136-e38e-446d-8a0a-e5a7861ef811 | CharlesJu/Micromouse_Test | RollingAverage.cpp | /***************************************************
* *
* Rolling Average Filter for General Robotics Use *
* Author: <NAME> *
* *
*********************************************... | ALGO | 0.99762 | 5.744832 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-03-08T07:22: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": "6fed9f0b48... |
c0ddb5e1-cd7c-4c58-829b-a38ba931f2ff | wocantudou/iCVIPLib | source/include/core/nanodet_decode.hpp |
//
// Create by RangiLyu
// 2020 / 10 / 2
//
#ifndef __NANODET_DECODE_HPP__
#define __NANODET_DECODE_HPP__
#include <opencv2/core/core.hpp>
#include <vector>
namespace ICV_SAFE_OPENCV {
// #define DIS_PRED_LEN (32)
#define DIS_PRED_LEN (4)
#define NUM_CLASS (1) // 80
#define INPUT_SIZE (160)
#define REG_MAX (7)
cl... | ALGO | 0.905444 | 3.895095 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-06-13T11:31:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "46c1ea5aadd... |
ec9fa95a-969f-420a-9c5e-b0b36ddc4e23 | JinYoung-Shin/Algorithm-Challenge-2017 | hg/boj/1000/1874-stack-sequence/src/greedy.cpp | #include <bits/stdc++.h>
using namespace std;
stack<int> Stack;
vector<bool> op;// true -> +(push) / false -> -(pop)
vector<int> seq;
void fail() {
cout << "NO\n";
exit(EXIT_SUCCESS);
}
int main() {
int n;
cin >> n;
seq.reserve(n);
for (int i=0; i < n; i++) {
int tmp; cin >> tmp;
... | ALGO | 0.999997 | 4.290512 | {
"github_metadata": {
"branch": "master",
"commit_count": 388,
"repo_created_at": "2017-03-08T13:43: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": "7ca897d0... |
d3f46fda-e6bf-474e-bf3f-d2093ce921d0 | pranitarora94/OlderCode | Quoridor_player/client.cpp | //
// main.cpp
// AI_A5
//
// Created by <NAME> on 23/04/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
//
// main.cpp
// Testing123
//
// Created by <NAME> on 14/03/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#in... | ALGO | 0.999215 | 3.283826 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-04-20T15:17: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": "58006e2a98... |
51e83822-11e7-4575-9e15-e888e4163877 | PaddlePaddle/PaddleCustomDevice | backends/npu/kernels/cum_kernel.cc | // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
//
// 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... | ALGO | 0.985097 | 6.697657 | {
"github_metadata": {
"branch": "develop",
"commit_count": 1251,
"repo_created_at": "2022-03-29T08:05:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 88,
"forks": 171,
"issues": 26,
"pull_requests": 24
},
"file_meta": {
"content_id": "2d... |
f34aa50d-978a-481d-a0aa-0a05f76035dc | FiaDot/coding-test-cpp17 | bakjoon/dynamic_programming/fun_dp.cpp | //
// Created by <NAME> on 2023/03/22.
//
// 신나는 함수 실행 : https://www.acmicpc.net/problem/9184
/*
w(a,b,c)
if a <= 0 or b <= 0 or c <= 0, then w(a, b, c) returns:
1
if a > 20 or b > 20 or c > 20, then w(a, b, c) returns:
w(20, 20, 20)
if a < b and b < c, then w(a, b, c) returns:
w(a, b, c-1) + w(a, b-1, c-1) - w(a,... | ALGO | 0.998816 | 4.817333 | {
"github_metadata": {
"branch": "develop",
"commit_count": 75,
"repo_created_at": "2023-03-21T03:59:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b52640dd... |
048a4cf5-df37-48a5-b0ff-7c9750ca28ee | wcdbmv/CD | lab01/src/automaton/finite_automaton.hpp | #pragma once
#include <functional>
#include <set>
#include <string>
#include <unordered_map>
#include <types/common.hpp>
class FiniteAutomaton {
public:
explicit FiniteAutomaton(
States states = {},
Alphabet alphabet = {},
Transitions transitions = {},
State initial_state = {},
States accept_states = {}
... | ALGO | 0.928492 | 6.975742 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2022-02-25T20:12:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b30b3546e... |
f33f6f29-c0ca-4cfa-8275-54ac7a3f8c67 | ishandutta2007/codeforces-n | normie28/normal/785/E.cpp |
// Problem : E. Anton and Permutation
// Contest : Codeforces - Codeforces Round #404 (Div. 2)
// URL : https://codeforces.com/problemset/problem/785/E
// Memory Limit : 512 MB
// Time Limit : 4000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
/*
A Submission by $%U%$
at time: $%Y%$-$%M%$-$%D%$ ... | ALGO | 0.999784 | 4.207945 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "c079c1f4955d... |
2523fa6a-2489-4f0f-9295-3a12862e9127 | Sunwinds/3D-Geometric-Features | curvature/principal_curvature.cpp | #include "SurfaceMeshModel.h"
#include "principal_curvature.h"
using namespace igl;
inline CurvatureCalculator::CurvatureCalculator()
{
this->localMode=false;
this->projectionPlaneCheck=false;
this->sphereRadius=5;
this->st=K_RING_SEARCH;
this->nt=PROJ_PLANE;
this->montecarlo=false;
this->montecarloN=0;
this... | ALGO | 0.996646 | 5.075249 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-04-09T23:12:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e5c71553f... |
b32edf0d-3e08-4002-9bd2-6caca5946015 | KULeuven-COSIC/SCALE-MAMBA | src/Offline/DABitMachine.cpp | /*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2021, COSIC-KU Leuven, Kasteel<NAME>berg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
/*
* DABitMachine.cpp
*
* Created on: Mar 5, 2019
* Author: drotaru
... | ALGO | 0.958909 | 4.633939 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2018-05-02T10:40:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 261,
"forks": 84,
"issues": 0,
"pull_requests": 6
},
"file_meta": {
"content_id": "c327e1d... |
2c8e91d0-a091-47e7-a1fc-973d20e91b39 | jimlin2004/LeetCode | Sort/quick_sort/389/389.cpp | #include <iostream>
#include <string>
using namespace std;
class Solution
{
public:
char findTheDifference(string s, string t)
{
this->quickSort(s, 0, s.size() - 1);
this->quickSort(t, 0, t.size() - 1);
for (int i = 0; i < s.size(); i++)
{
if (s[i] != t[i])
... | ALGO | 0.99994 | 5.167712 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2024-01-15T14:25: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": "710b941b8eb... |
dd38ec7f-f33e-41c2-a10c-6ce5bd9b45f6 | piyush1way/Leetcode | 2160-minimum-operations-to-make-a-uni-value-grid/minimum-operations-to-make-a-uni-value-grid.cpp | class Solution {
public:
int minOperations(vector<vector<int>>& grid, int x) {
int n = grid.size();
int m = grid[0].size();
vector<int> ans;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
ans.push_back(grid[i][j]);
}
}
... | ALGO | 0.999962 | 5.65947 | {
"github_metadata": {
"branch": "main",
"commit_count": 215,
"repo_created_at": "2025-02-16T17:19:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67052ef7df... |
f2cb635e-c221-4cb9-b336-c710040f7759 | rishabg30/Question-Bank-DSA | Trees/LCA-Of-A-Binary-Tree.cpp | #include <bits/stdc++.h>
using namespace std;
//https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
class TreeNode {
public:
int val;
TreeNode *left = nullptr;
TreeNode *right = nullptr;
TreeNode(int val) {
this->val = val;
}
};
TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, Tr... | ALGO | 0.999995 | 5.720566 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2023-09-24T20:32: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": "712d42a0e05... |
4ec5f6ae-9245-46ef-b0ce-96859b294426 | DeepLink-org/DIOPI | impl/camb/functions_mmcv/nms_mlu.cpp | /**
* @file
* @author DeepLink
* @copyright (c) 2023, DeepLink.
*/
#include <diopi/functions_mmcv.h>
#include <memory>
#include "../common/common.hpp"
#include "../diopi_helper.hpp"
#include "../mlu_helper.hpp"
namespace impl {
namespace camb {
diopiError_t diopiTranspose(diopiContextHandle_t ctx, diopiTenso... | ALGO | 0.970372 | 6.249213 | {
"github_metadata": {
"branch": "main",
"commit_count": 1648,
"repo_created_at": "2023-04-11T12:45:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 72,
"forks": 36,
"issues": 14,
"pull_requests": 55
},
"file_meta": {
"content_id": "2d2779... |
cbca9a89-7e55-4aa9-b644-941ba47ca8be | huynguy97/IP-Week4 | main.3825448245349388020.cpp | //
//
//
//
//
//
//
#include <iostream>
using namespace std;
enum Month {January=1,February,March,April,May,June,July,August,September,October,November,December} ;
/* ... | ALGO | 0.999293 | 4.326488 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-05-12T17:17: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": "563ec8332b... |
bd2dc784-9dbb-4d82-88e9-13ec35e67601 | ManishPro-ops/DSA-codes | leetcode1.cpp | #include<iostream>
#include<math.h>
using namespace std;
int main(){
/*
int n,digit;
int answer=0;
cout << "enter the number "<<endl; //reversing number
cin >> n;
while(n!=0){
digit= n%10;
answer = (answer * 10) + digit;
n=n/10;
if((answer > INT_MAX / 1... | ALGO | 0.99945 | 3.593217 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-07-05T03:51: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": "c0401b149cf0... |
b9f9f35c-2a6a-4f08-ba0b-1187d337613f | Hanifgit/Software-Development | Computer Graphics/Human/main.cpp | #include<windows.h>
#include<bits/stdc++.h>
#include<GL/glut.h>
#include<stdlib.h>
#include<stdio.h>
#include <GL/gl.h>
using namespace std;
int xx[5],yy[5],xx2[5],yy2[5];
float shift = 0; // a variable used to move the boat right and left
void pp(int x,int y)
{
glBegin(GL_POINTS);
glVertex2i(x+shift,... | TOOL | 0.921202 | 3.02664 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2022-02-20T05:20: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": "b9040352cea... |
50bca915-8793-47a8-9b94-b6081433dbd7 | kassil/game_tetris | tetris.cpp | #include "board.hpp"
#include "my_array.tpp"
#include "mycurses.h"
#include <array>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
enum Cmd
{
Cmd_None,
Cmd_Down,
Cmd_Left,
Cmd_Right,
Cmd_RotL,
Cmd_RotR,
};
enum MoveResult
{
Blocked,
Moved,
Arrested,
};
struct Game
{
/... | ALGO | 0.905586 | 5.912059 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2023-08-21T04:29: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": "b05449041... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.