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 |
|---|---|---|---|---|---|---|---|
d0df9a93-0b69-486d-a613-e4a608d4ae0c | Ascend/op-plugin | op_plugin/ops/opapi/SortKernelNpuOpApi.cpp | // Copyright (c) 2023 Huawei Technologies Co., Ltd
// All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/BSD-3-Clause
//
// Unless requir... | ALGO | 0.97499 | 7.309708 | {
"github_metadata": {
"branch": "master",
"commit_count": 1827,
"repo_created_at": "2023-06-22T04:29:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "90e55506... |
4437007d-3263-4925-8e96-d78ccb870e36 | zwondd/Algorithm | leetcode/medium/1382_BalanceBinarySearchTree.cpp | /*
2023-01-15
[Leetcode][Medium] 1382. Balance a Binary Search Tree
*/
/**
* 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), righ... | ALGO | 0.999998 | 6.787141 | {
"github_metadata": {
"branch": "master",
"commit_count": 185,
"repo_created_at": "2018-12-11T13:31: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": "cf1c2da7... |
0a5e9cd7-4455-4e90-aff8-9477200a50a1 | shenzhihao/CFDEMWaveFoamIB | subModels/cloudWaveInterIB/cloudWaveInterIB2_0.H | /*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
<NAME>, <EMAIL>
Copyright 2009-2012 <NAME>
... | ALGO | 0.950399 | 5.023337 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-06T14:01:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df3e2a3c6e1a... |
d6c9e9e9-211d-4fb2-948a-ab43053c1123 | haveTryTwo/csutil | mystl/my_stl_algobase.h | // Copyright (c) 2015 The CSUTIL Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MY_STL_ALGOBASE_H_
#define MY_STL_ALGOBASE_H_
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "my_heap.h"
#include "my_stl_it... | TOOL | 0.967188 | 5.205758 | {
"github_metadata": {
"branch": "master",
"commit_count": 308,
"repo_created_at": "2015-08-14T08:58:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6532b06... |
2af9b98a-cb66-4db3-8a90-b4b9b99a3328 | man02123/leetcode-solutions | 2641-cousins-in-binary-tree-ii/2641-cousins-in-binary-tree-ii.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999981 | 5.610227 | {
"github_metadata": {
"branch": "main",
"commit_count": 2280,
"repo_created_at": "2023-01-05T16:25:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b00db37d0... |
ad31fe2c-bdf7-4efb-8ba3-d33666e6638d | 123456514/xiyou_DS | 西安邮电大学数据结构历年代码题/2012/_1.cpp | // 假设循环队列中设置rear和length两个变量存储队尾元素的位置和队中元素的个数,且队列长度为MAXSIZE,试给循环队列的定义,并分别写出入队和出队的实际算法
#include <stdio.h>
#define MAXSIZE 3 // 定义队列的最大长度,可按需调整
// 循环队列总结:
// 在一般的循环队列中,是需要空出一个位置,用于判断队列是否为空,或者为满
// 判满条件 if((rear + 1) % maxsize == front)
// 判空条件 if(front == rear)
// 在这种条件下得到队列中的元素个数 count = (rear - front + maxsize) % maxs... | ALGO | 0.9994 | 3.453724 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-25T16:45: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": "fffb1f6d0419... |
510acca8-9c30-47be-8c8e-db09284bed4c | ustbgaofan/LeetCode-4 | Surrounded Regions.h | // Surrounded Regions
/*
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.
For example,
X X X X
X O O X
X X O X
X O X X
After running your function, the board should be:
X X X X
X X X X
X X X X
X O X X
*/
/... | ALGO | 0.997117 | 7.328201 | {
"github_metadata": {
"branch": "master",
"commit_count": 415,
"repo_created_at": "2018-05-03T12:17: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": "eec41fb2... |
fd23a4e7-960c-4ffa-8bf3-386210c0d555 | oneapi-src/oneAPI-samples | DirectProgramming/C++SYCL/SYCLMigration/guided_simpleCudaGraphs_SYCLMigration/02_sycl_migrated_option2/Common/taskflow/algorithm/reduce.hpp | #pragma once
#include "../core/executor.hpp"
namespace tf {
// ----------------------------------------------------------------------------
// default reduction
// ----------------------------------------------------------------------------
template <typename B, typename E, typename T, typename O>
Task FlowBuilder:... | ALGO | 0.996206 | 6.104878 | {
"github_metadata": {
"branch": "main",
"commit_count": 2599,
"repo_created_at": "2020-05-27T04:52:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1054,
"forks": 727,
"issues": 59,
"pull_requests": 7
},
"file_meta": {
"content_id": "a88d... |
5952e27f-7681-41f9-9828-a5ca3ba50841 | Abdullah-Khawar/100Daysofcode | Day35/Find All People With Secret.cpp | class Solution {
public:
using P = pair<int, int>;
vector<int> findAllPeople(int n, vector<vector<int>>& meetings,
int firstPerson) {
// Step 1: Initialize a map to store meetings happening at each time
map<int, vector<P>> timeMeetings;
// Step 2: Populate ... | ALGO | 0.999985 | 6.430064 | {
"github_metadata": {
"branch": "main",
"commit_count": 108,
"repo_created_at": "2024-01-23T10:00: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": "03e59cb19d... |
1d002249-370d-4ecd-a78c-f4de337e5a03 | caoyuan0816/POJ | 3320/12625558_WA.cc | //
// main.cpp
// test
//
// Created by Yuan on 14-1-29.
// Copyright (c) 2014年 Yuan. All rights reserved.
//
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
#include <set>
#include <map>
#define MAX 0x7fffffff
... | ALGO | 0.999608 | 3.966022 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-01-22T10:22: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": "1b1c3e1ab9... |
8986cde0-96a1-4318-8cda-ca780ad5c10b | zhhehao/zhhehao | uvaoj/uva133.cpp | #include <stdio.h>
#include <string.h>
#define MAXN 23
int s[MAXN];
int left, n, k, m;
int *p0, *p1, *p2;
void que(void);
int main()
{
int rev;
while ((rev=scanf("%d%d%d", &n, &k, &m) == 3))
{
if(n == 0) break;
memset(s, 0, sizeof(s));
for (int i = 1; i <= n; i++)
s[i] = i;
p0 = s;
p1 = s + 1;
p2 =... | ALGO | 0.999984 | 3.220721 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2016-02-26T12:54: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": "882c0edc... |
9146f7cc-c260-4e50-8cec-4fca65f14ea8 | Rikon07/Codeforces-Rik_on | C_Closest_Cities.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int CountCoins(int n, int x, int y, vector<int> &left, vector<int> &right)
{
if(x == y)
{
return 0;
}
else
{
if(y > x)
{
return right[x - 1] - right[y - 1];
}
else
{
... | ALGO | 0.999965 | 4.831805 | {
"github_metadata": {
"branch": "main",
"commit_count": 34,
"repo_created_at": "2025-01-12T10:03: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": "3b7be8549c6... |
6e80dbef-e50a-4a7e-9b2b-cbd5fc6dca3a | hahslimor/practice | reverseint/solution.cpp | #include <iostream>
#include <vector>
#include <ostream>
#include <limits>
using namespace std;
class Solution {
public:
int32_t reverse(int32_t x) {
int32_t reverse_x = 0;
int32_t cur_digit, orig_x = x;
numeric_limits<int32_t> maxint32t;
while ( x != 0 ) {
cur_digit = ... | ALGO | 0.999965 | 4.981849 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-08-25T21:24: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": "a599f61a6... |
79297424-db46-484a-9ae3-549a60db453c | maheshmahajanplk/CppPractice | Study/C++/AlliedSoftTech_1.cpp | // C program to find smallest and second smallest elements
#include <stdio.h>
#include <limits.h> /* For INT_MAX */
#include <stdlib.h>
void print2Smallest(int arr[], int arr_size)
{
int i, first, second;
/* There should be atleast two elements */
if (arr_size < 2)
{
printf(" Invalid Input ")... | ALGO | 0.999868 | 4.324033 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-04-14T15:37: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": "a74bdec741... |
97634dfe-f3b3-4d48-9dd1-5ae40e456f6c | anna-morgan/drbcf | src/slice.h | #ifndef slice_h
#define slice_h
#include <vector>
#include "funs.h"
#include "info.h"
class logdensity {
public:
virtual double val(double y) = 0;
};
class ld_norm: public logdensity {
public:
double mu;
double sigma;
double val(double y) { return(R::dnorm(y, mu, sigma, 1)); }
ld_norm(double mu_, doubl... | ALGO | 0.984489 | 5.486178 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2024-04-24T21:35: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": "e9582800f... |
e3705d04-af78-4cd5-a663-6d007739a70e | ishandutta2007/codeforces-e | enchom/normal/555/C.cpp | #include <iostream>
#include <stdio.h>
#include <map>
#include <set>
using namespace std;
#define INF 1999999999
int n,q;
pair<int,int> cords[200111];
char tp[200111][3];
map<int,int> mymap;
map<int,int>::iterator myit;
set< pair<int,int> > dups;
int LEAFOFFSET=1;
int ITU[1000001];
int ITL[1000001];
int realX[10000... | ALGO | 0.999857 | 3.963906 | {
"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": "850ebdb8f157... |
3c9f7744-94e3-4d0d-b702-ddba62d37095 | superj6/CPcode | c++ sol/CSES/Tree Algorithms/counting_paths.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define endl '\n'
const int maxn = 200000;
int n, m;
bool visited[maxn], used[maxn];
int rnk[maxn], prv[maxn], par[maxn], p[maxn];
vector<int> graph[maxn];
vector<pair<int, int>> query[maxn];
int dp[maxn];
int find(int x... | ALGO | 0.999973 | 4.062913 | {
"github_metadata": {
"branch": "master",
"commit_count": 441,
"repo_created_at": "2019-09-09T05:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 129,
"forks": 37,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db61a... |
67876bb0-2047-4e3f-8d41-af80f89f630b | YunxiaWang/Handwritten-Mathematical-Expression-Recognition-and-Calculation | amdpool_seamcarving/img_processing.cpp | #include "img_processing.h"
unsigned char *read_bmp(char *fname,int* _w, int* _h)
{
unsigned char head[54];
FILE *f = fopen(fname,"rb");
// BMP header is 54 bytes
fread(head, 1, 54, f);
int w = head[18] + ( ((int)head[19]) << 8) + ( ((int)head[20]) << 16) + ( ((int)head[21]) << 24);
i... | TOOL | 0.965613 | 3.377069 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2015-12-10T17:52:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aae40dd8... |
0c160f83-53e8-46f8-9995-62abe74fdb22 | n27jain/ECE-150-Assignments | myCode/lab6/Projectile.cpp | //////////////////////////////////////////////////////////////
//
// Your #includes here; make sure you are allowed them ...
//
#include <stdlib.h>
#include <math.h>
//////////////////////////////////////////////////////////////
//
// #includes and function declarations; do not remove
//
#ifndef MARMOSET_TESTING
#in... | ALGO | 0.998264 | 5.692322 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-05-16T11:23: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": "1fb4ea5dfc... |
c806f3a5-abc2-456f-b0ea-47891eb92f41 | habanero-rice/hclib | test/performance-regression/full-apps/qmcpack/src/QMCDrivers/Experimental/Full_QMCCorrelatedSamplingLinearOptimize.cpp | //////////////////////////////////////////////////////////////////
// (c) Copyright 2005- by <NAME>
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// <NAME>
// National Center for Supercomputing Applications &
// Materials Comp... | ALGO | 0.993641 | 4.035005 | {
"github_metadata": {
"branch": "master",
"commit_count": 705,
"repo_created_at": "2014-08-11T16:15:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 71,
"forks": 36,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "752767... |
5ed2c4af-170f-459b-a4bc-81039ee37279 | alexklibisz/FSA-Animate | scratch/cpp/nfa2dfa.cpp | /*****************************************************
<NAME>
CS 461
Project 1: NFA to DFA Converter
USAGE
nfa2dfa < (nfa format file)
OUTPUT
Writes the DFA format file to standard out.
Description: This file defines the entire program which
converts a given NFA into a DFA. The program reads
form... | ALGO | 0.99929 | 4.51268 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2015-03-04T17:41:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b57237cde... |
20ad2096-f8aa-4dee-9e60-caeaa824a3b0 | AppleTreeQ/LeetCode | LeetCode/GenerateParentheses.h | //
// GenerateParentheses.h
// LeetCode
//
// Created by ipuser on 2014/12/29.
// Copyright (c) 2014年 qzhai. All rights reserved.
//
#ifndef LeetCode_GenerateParentheses_h
#define LeetCode_GenerateParentheses_h
class GenerateParentheses {
public:
vector<string> generateParenthesis(int n) {
vector<strin... | ALGO | 0.998749 | 5.691617 | {
"github_metadata": {
"branch": "master",
"commit_count": 96,
"repo_created_at": "2014-12-20T17:09:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d7cb2ec1... |
94fa4014-8d71-44f9-aa4b-c330da35861f | samiunblack/phitron | semester 2/basic data structure/week 2/assignment 2/5.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node* next;
Node(int val, Node* next = NULL)
{
this->val = val;
this->next = next;
}
};
void insert_head(Node* &head, Node* &tail, int val)
{
Node* node = new Node(v... | ALGO | 0.999859 | 4.22398 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2023-03-24T02:43:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edc453f96... |
bf62882f-b505-429b-aaa0-132f0be8c0f3 | hargunmujral/Competitive-Programming | middle-of-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution
{
public:
ListNode *middleNode(... | ALGO | 0.999754 | 6.456725 | {
"github_metadata": {
"branch": "main",
"commit_count": 336,
"repo_created_at": "2022-05-02T21:26: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": "2116b80370... |
100f0bad-5401-4aec-b733-40378cce60f8 | SaranyaDas/CS142Summer | LL.cpp | #include <iostream>
using namespace std;
class node {
public:
int data;
node *next;
node(int value) {
data = value;
next = NULL;
}
};
class LinkedList {
public:
node *head;
LinkedList() {
head = NULL;
... | ALGO | 0.999278 | 4.90028 | {
"github_metadata": {
"branch": "master",
"commit_count": 69,
"repo_created_at": "2019-05-24T12:16: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": "8b5949833... |
a5618648-f0aa-4116-bbbd-27f1532f9726 | NavdeepKaurRupaul/DSA | TREES/BST/is BST 2.cpp | #include <iostream>
using namespace std;
#include <queue>
#include<climits>
#include<algorithm>
template <typename T>
class BinaryTreeNode {
public :
T data;
BinaryTreeNode<T> *left;
BinaryTreeNode<T> *right;
BinaryTreeNode(T data) {
this -> data = data;
left = NULL;
right ... | ALGO | 0.999965 | 4.437422 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-12-17T10:10: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": "9d7d71793dc... |
89269736-fa94-4531-9619-82202104af47 | Nepochatova-Polina/Laboratories-2 | Lab6.cpp | #include <iostream>
#include "fstream"
#include <cstdio>
#include "utility.h"
using namespace std;
void Kerbosh(Set possibleNode, Set possibleClique, Set noNodes, BigList *MainList);
int main() {
Set possibleNode;
Set possibleClique;
Set noNodes;
BigList MainList;
int num = 7;
Node *mass[num];
... | ALGO | 0.998821 | 3.882491 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-02-11T15:23: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": "0e9b5186f7... |
4c209def-d095-44d5-b565-6d08b92fcc49 | d1ego38/Codigo_P1_BIII | Codigo_P1_BIII.ino | #include <Adafruit_NeoPixel.h>
#define PIN_Leds 12
#define NUMPIXELS 16
#define Trigger 3
#define Echo 4
#define A 5
#define B 6
#define C 7
#define D 8
#define E 9
#define F 10
#define G 11
Adafruit_NeoPixel neopixel = Adafruit_NeoPixel(NUMPIXELS, PIN_Leds, NEO_GRB + NEO_KHZ800);
int conteo_personas = 0;
float Me... | TOOL | 0.940668 | 5.448831 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-07-09T22:21: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": "608cb8318937... |
bebf78e7-09c9-42de-9f65-79883a33eaf1 | Cal26379/RSMesh | third_party/ScalFMM/include/ScalFMM/Kernels/Taylor/FTaylorKernel.hpp | // See LICENCE file at project root
#ifndef FTAYLORKERNEL_HPP
#define FTAYLORKERNEL_HPP
#include "../../Components/FAbstractKernels.hpp"
#include "../../Utils/FMemUtils.hpp"
#include "../../Utils/FLog.hpp"
#include "../../Utils/FSmartPointer.hpp"
#include "../P2P/FP2PR.hpp"
/**
* @author <NAME>
* @class FTaylorKern... | TOOL | 0.918867 | 3.849986 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2024-10-23T09:26:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "208f75779... |
06293d90-edab-4cab-8d8f-d7314f77022c | MergHQ/CRYENGINE | Code/CryEngine/CryAISystem/PolygonSetOps/LineSeg.h | // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
#ifndef LINE_SEGMENT_2D_H
#define LINE_SEGMENT_2D_H
#include "Utils.h"
#include <vector>
/**
* @brief A simple oriented 2D line segment implementation.
*/
template<typename VectorT>
class LineSeg
{
VectorT m_start;
VectorT m_end;
public:
L... | ALGO | 0.974969 | 6.315721 | {
"github_metadata": {
"branch": "release",
"commit_count": 109,
"repo_created_at": "2016-05-24T10:10:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 192,
"forks": 2085,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "dc... |
21cb55c9-7767-476f-a5f6-c42c27886102 | TheAlgorithms/C-Plus-Plus | math/fibonacci.cpp | /**
* @file
* @brief n-th [Fibonacci
* number](https://en.wikipedia.org/wiki/Fibonacci_sequence).
*
* @details
* Naive recursive implementation to calculate the n-th Fibonacci number.
* \f[\text{fib}(n) = \text{fib}(n-1) + \text{fib}(n-2)\f]
*
* @see fibonacci_large.cpp, fibonacci_fast.cpp, string_fibonacci.cp... | ALGO | 0.999308 | 7.244211 | {
"github_metadata": {
"branch": "master",
"commit_count": 1738,
"repo_created_at": "2016-07-16T10:19:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 32391,
"forks": 7439,
"issues": 10,
"pull_requests": 23
},
"file_meta": {
"content_id": ... |
9b859841-9c0f-4857-a9a8-950014da5fe1 | ChromiumWebApps/chromium | chrome/browser/ui/views/accessibility/accessibility_event_router_views.h | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_RO... | TOOL | 0.938685 | 4.261405 | {
"github_metadata": {
"branch": "master",
"commit_count": 260366,
"repo_created_at": "2014-02-21T14:19:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 231,
"forks": 307,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "c1... |
def7b5df-42c4-44b3-94aa-142f9feda431 | ThoseBygones/ACM_Code | CodeForces/CodeForces 848B.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAXN 100005
struct Dancer
{
int g,p,t,id;
} a[MAXN];
int x[MAXN],y[MAXN];
int q1[MAXN],q2[MAXN]; //make queue for vertically and horizontally moving dancers
bool cmp(Dancer &x,Dancer &y) //Format: t1+p2=t2+p1 => t1-p1=t2-p2
{
if(x.t-x.p==y.t-y.p)
... | ALGO | 0.999985 | 3.442064 | {
"github_metadata": {
"branch": "master",
"commit_count": 324,
"repo_created_at": "2017-05-12T16:58: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": "06507982... |
cab05e6c-5a9a-40b3-8593-a9042c268b37 | cmsj72/LeetCode | 0700-search-in-a-binary-search-tree/0700-search-in-a-binary-search-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999997 | 5.473286 | {
"github_metadata": {
"branch": "main",
"commit_count": 852,
"repo_created_at": "2023-12-02T14:35: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": "cf25e78392... |
a70df128-1ede-4717-ab5d-9346246905a1 | iglin/dynamic-systems-dsl-engine | DormandPrinceMethod.cpp | //
// Created by alex on 16.05.18.
//
#include "DormandPrinceMethod.h"
Result *DormandPrinceMethod::apply(InitialData *data, double h) {
int n = static_cast<int>(round((data->getTFinal() - data->getT0()) / h));
double tArray[n];
PointsTable *xTable = new PointsTable("x");
PointsTable *yTable = new Po... | ALGO | 0.997616 | 5.142419 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-02-04T14:56: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": "a38fe8209... |
5f12dfc8-8534-4168-b6a8-f0f225963a4a | AdityaNik/sppu-seit-cg-practicals | Tranformation/main.cpp | #include<iostream>
#include<stdlib.h>
#include<math.h>
#include<GL/glut.h>
using namespace std;
float finalMatrix[100][100];
float userMatrix[100][100];
float tx, ty;
float sx, sy;
float xm, ym;
int k = 0;
void init(){
glClearColor(1.0, 1.0, 1.0, 1.0);
glColor3f(0, 0, 0);
glPointSize(4);
glMatrixMode... | ALGO | 0.98198 | 3.379069 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-07-11T15:40:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "49e4b6ea8b... |
87444b79-ff9d-426e-9523-b7dec5e8f54e | manish-kumar1/LeetCode-Problems | Array/moveZero.cpp | /*
Q. Move Zeros End of Array
Given an integer array nums, move all 0's to the end of it
while maintaining the relative order of the non-zero elements.
Note that you must do this in-place without making a copy of the array.
Example 1:
Input: nums = [0,1,0,3,12]
Output: [1,3,12,0,0]
Example 2:
Input: nums = [0]
Ou... | ALGO | 0.999954 | 5.344748 | {
"github_metadata": {
"branch": "master",
"commit_count": 392,
"repo_created_at": "2023-10-07T13:28:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5d13f3c... |
5b7a00dc-0974-4c13-a55a-596e6a14dc67 | NLteQFik/Fundamentals-of-algorithmization-and-programming | 2nd semester/LR8/Task_1/binarysearchtree.h | #ifndef BINARYSEARCHTREE_H
#define BINARYSEARCHTREE_H
#include <QVector>
#include <cmath>
template <typename KeyT, typename ValueT>
class BinarySearchTree
{
public:
struct Node {
ValueT info;
KeyT key;
Node* left = nullptr;
Node* right = nullptr;
Node(ValueT info, KeyT key... | ALGO | 0.999823 | 5.474522 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2025-06-08T20:34: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": "5391803b4c3... |
d78abd02-039f-42ed-b9a9-2782c280e191 | itohdak/AtCoder | others/asakatsu/2020-09-14/B.cpp | #include <bits/stdc++.h>
#include <print.hpp>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(... | ALGO | 0.999347 | 3.469746 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2018-05-20T09:26:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6a7317c5... |
13631e95-dec5-4c1c-a524-d69045a6075c | anhle199/Code_Cpp | Library/Algorithms/Dynamic Programming/TheLongestIncreasingSubsequence/LongestIncreasingSubsequence/LongestIncreasingSubsequence.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
using namespace std;
vector<int> longestIncreasingSubsequenceV1(vector<int> arr) {
int n = arr.size(), i, j, pos_max;
vector<int> length(n + 2, 0), position(n + 2), result;
arr.insert(arr.begin(), INT_MIN);
for (int i = n; i... | ALGO | 0.999975 | 5.389571 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2020-07-26T07:01: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": "442d2547a... |
cdb8bdfa-b117-4bce-b082-e17fa723bfc2 | TTN-ATTN/assignment-cryptography | caesar_cipher.cpp | #include <bits/stdc++.h>
using namespace std;
class Cipher {
private:
string str; // ==== original string ==== //
int sh; // ==== shifting value ==== //
public:
Cipher() {};
Cipher(string str, int sh) {
this->str = str;
this->sh = sh;
};
... | ALGO | 0.998534 | 4.664936 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-14T11:18: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": "454bc7c4b578... |
c46cfbbb-3d9f-4a9b-9a08-cdfc447dcad4 | ivan-ivano/LAB_8.1_string | LAB_8.1_string.cpp | #include <iostream>
#include <string>
using namespace std;
bool hasPair(const string s)
{
size_t pos = 0;
while ((pos = s.find('S', pos)) != -1)
{
if (s[pos + 1] == 'Q')
return true;
pos++;
}
pos = 0;
while ((pos = s.find('Q', pos)) != -1)
{
if (s[pos + 1] == 'S')
return true;
pos++;
}
return fal... | ALGO | 0.994137 | 3.819488 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2023-11-14T21:18: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": "7ad8ff837f... |
f0c26c5a-edd3-46d7-ba96-7d221712c2f0 | AadityaPatil20/OOPs | c++ programme/Inheritance 2.cpp | //write a programme of multi level inheritance
#include<iostream>
using namespace std;
class m
{
public :
int m;
public :
void get_m(int i)
{
m=i;
}
};
class n
{
public :
int n;
void get_n(int j)
{
n=j;
}
};
class derived : public m,public n
{
pu... | TOOL | 0.93403 | 3.618859 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-05-21T12:52: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": "5f9dab616e6b... |
8d1d2a5e-1241-46a9-8c47-95bad6a7b0d1 | gpetruc/cmssw | L1Trigger/L1TMuonEndCap/src/Forest.cc | //////////////////////////////////////////////////////////////////////////
// Forest.cxx //
// =====================================================================//
// This is the object implementation of a forest of decision trees. //
// We need this to i... | ALGO | 0.901047 | 5.746217 | {
"github_metadata": {
"branch": "cmssw_8_0_5_patch1",
"commit_count": 159576,
"repo_created_at": "2013-06-27T13:07:23.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "cms-sw/cmssw",
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
... |
e1d81980-c6e1-4d4e-9b2c-760b1696ba60 | wchen02/polytechOS | Scheduler/Scheduler/srtn.hpp | #ifndef SRTN_H
#define SRTN_H
#include <vector>
#include <queue>
#include "scheduler.h"
#include "functors.hpp"
using namespace std;
class Srtn : public Scheduler{
public:
Srtn(const std::string& resourceFile): Scheduler(resourceFile), running(NULL){ }
void run( ){
cout << "===============\n"
<< " FCFS ... | ALGO | 0.995719 | 4.327178 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2010-02-11T06:40:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07d626c7f... |
342cce7d-b9a9-4583-be00-6c15673d6705 | prateeksarangi/Robocon_Codes | Motion.ino | #define dw(a, b) digitalWrite(a, b);
#define aw(a, b) analogWrite(a, b);
int pid_calc(int pv)
{
int kp = 20, ki = 1, kd = 0.1;
int lastError;
int error = pv - 0;
int I = 0, limI = 100;
I += error;
int D = error - lastError;
lastError = error;
I = I >= limI ? limI : I;
I = I <= -limI ? -limI : I;
... | TOOL | 0.965779 | 5.040487 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-09-23T15:09: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": "6d1724a328... |
77aa6a22-86ac-4dbe-af8e-26fa3a90f255 | bietdoikiem/cracking-algo | bigo_materials/lect_2/Books/main.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
ostream& operator<<(ostream& os, pair<int, int> const& x) {
os << x.first << ", " << x.second;
return os;
}
template <class T>
ostream& operator<<(ostream& os, vector<T> const& x) {
os << "{ ";
for (auto y : x) os << y << ... | ALGO | 0.999992 | 6.117542 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2022-03-30T10: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": "9b39c405e9... |
c4842d0a-dfc3-42b4-8410-ba6653e65f90 | fxfxxxfxx/CSES-sols | Graph_Algorithms/Longest_Flight_Route.cpp | #include <bits/stdc++.h>
using namespace std;
static void solve() {
int n, m; cin >> n >> m;
vector<vector<int>> adj(n + 1);
for (int i = 0; i < m; i++) {
int a, b; cin >> a >> b;
adj[a].push_back(b);
}
vector<pair<int,int>> res(n + 1);
res[n] = {1, -1};
auto dfs = [&](in... | ALGO | 0.999995 | 3.855459 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2023-10-04T16:22: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": "d36598ecfc6... |
71318ded-4b6c-4a72-8253-1897b429e267 | yuki62599/code | BinaryTree/700.cpp | #include <bits/stdc++.h>
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), right(nullptr) {}
TreeNode(int x, TreeNode* left, TreeNode* right) : val(x), left(left), r... | ALGO | 0.999997 | 5.615317 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2023-08-26T14:40:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee25cc5d6... |
2efc947b-40fb-4d02-8f88-3634f876f9bd | bravo-project/bravo | libraries/chain/util/reward.cpp |
#include <bravo/chain/util/reward.hpp>
#include <bravo/chain/util/uint256.hpp>
namespace bravo { namespace chain { namespace util {
uint8_t find_msb( const uint128_t& u )
{
uint64_t x;
uint8_t places;
x = (u.lo ? u.lo : 1);
places = (u.hi ? 64 : 0);
x = (u.hi ? u.hi : x);
return uint8_t... | ALGO | 0.99976 | 7.124413 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2018-12-13T10:03:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "88b0dffcb2... |
53283be7-45b1-4cb3-9060-1fa2d4b586b5 | RohanKhatua/LeetcodeSolutions | l236.cpp | #include <bits/stdc++.h>
using namespace std;
// Definition for a binary tree node.
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution
{
public:
vector<int> res;
map<int, vector<int>> contentMap;
void getCo... | ALGO | 0.999991 | 6.039567 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-08-17T08:12: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": "799adc9fb46d... |
fcf18b9f-c696-46d8-8cbc-4b1f5586450e | ANSH-PANT/Google-SDE-Preparation-Test-Series | Stack & Queue/Easy/844. Backspace String Compare.cpp | /*
Bruteforce Approach:
Time Complexity: O(n + m)
Space Complexity: O(n + m)
*/
class Solution {
public:
bool backspaceCompare(string s, string t) {
return processString(s) == processString(t);
}
string processString(string str) {
string result;
for (char c : str) {
if ... | ALGO | 0.999902 | 6.116228 | {
"github_metadata": {
"branch": "main",
"commit_count": 211,
"repo_created_at": "2024-01-28T15:04:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e2fb1002... |
6930b404-72af-47e7-8a3a-10b391c0a7be | Dvmenasalvas/MARP | Juez/Cuatri 2/67.cpp |
// <NAME>
// Comentario general sobre la solución,
// explicando cómo se resuelve el problema
#include <iostream>
#include <vector>
#include <algorithm> //max y min
#include <climits> //INT_MAX
// función que resuelve el problema
// comentario sobre el coste, O(f(N)), donde N es ...
struct moneda {
int valor, canti... | ALGO | 0.999905 | 4.173751 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2020-12-16T12:11: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": "11cf259394b7... |
f7831a30-9532-4a6a-91df-b7034b011de0 | Minsuchoi-1999/Algorithm_Problem_solving | 백준/Gold/3663. 고득점/고득점.cc | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string str;
int main() {
int T;
cin >> T;
for (int i = 0; i < T; i++) {
cin >> str;
int answer = 0;
int pos = 2e9;
int size = str.size();
for (int i = 0; i < size; i++)
answer += min(str[i] - 'A', 'Z' - str[i] + 1);
for... | ALGO | 0.999636 | 4.006063 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2023-11-16T06:01: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": "65a4477ffb... |
2d87ac89-a598-49ad-861a-a5ab28941831 | Alkotikotik/UniversalGravity | src/Main.cpp | #include <iostream>
#include <cmath>
#include "raylib.h"
#include <cassert>
#include <utility>
#include <vector>
#include <string>
#include <array>
using namespace std;
//for matrices
using Matrix2x2 = std::vector<std::vector<double>>;
// The whole system class
class NbodySimulation {
public:
//Constructor to se... | ALGO | 0.999853 | 5.352657 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-04-03T09:46: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": "b2dfaa7d98cf... |
db023216-f2d3-403a-b390-0137c73f4654 | DayBreakZhang/Free-Download-Manager-vs2010 | source/trunc/Bittorrent/libtorrent/src/kademlia/find_data.cpp | /*
Copyright (c) 2006, <NAME> & <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | TOOL | 0.950465 | 4.76989 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2015-02-27T03:21:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 54,
"forks": 37,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83669866... |
566ab749-c333-419c-abcd-9b23a84f7ca5 | gem5/gem5 | src/mem/cache/prefetch/signature_path.cc | /**
* Copyright (c) 2018 Metempsy Technology Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: redistributions of source code must retain the above copyright
* notice, this list ... | ALGO | 0.998231 | 7.616275 | {
"github_metadata": {
"branch": "stable",
"commit_count": 22975,
"repo_created_at": "2014-12-02T09:46:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2105,
"forks": 1470,
"issues": 88,
"pull_requests": 56
},
"file_meta": {
"content_id": ... |
0ebb86f1-3e84-438c-be0c-1d15c4ef7746 | ShimizuHaku/AtCoderPractice | 基礎練/ビット演算/ABC167-C.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N, M, X;
cin >> N >> M >> X;
vector<int> C(N);
vector<vector<int>> A(N,vector<int>(M));
for (int i = 0; i < N; ++i){
cin >> C[i];
for (int j = 0; j < M; ++j){
... | ALGO | 0.999956 | 4.156739 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-03-25T19:42:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fadc75f8cd6... |
e0edee6b-5818-4e29-b5c2-b47bff422fb7 | Samuel-lgd/cppGame | main.cpp | #include <conio.h>
#include <iostream>
#include <cstdlib>
using namespace std;
int y = 1;
int x = 1;
char player = 'O';
void draw(char (*array)[3])
{
// inconvéient: pas dynamique
cout << "\033[2J\033[1;1H"; // clear screen
cout << "Current player: " << player << endl;
cout << " " << array[0][0] << " | " << a... | ALGO | 0.995957 | 4.346165 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-01-24T12:53: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": "d71b12d6c5... |
0816dd7a-3470-42a5-8269-75bf441302bb | ryancoleman/lotsofcoresbook2code | Pearls2_Chapter09/Dependencies/src/qdpxx/tests/timeVaxpby.cc | #include "unittest.h"
#include <cmath>
#include "timeVaxpyDouble.h"
static double N_SECS=10;
static double T_SECS=30;
// VAXPBYZ kernel: (vaxpbyz4) z = ax + by
void
time_VAXPBYZ_double::run(void)
{
LatticeDiracFermionD3 x;
LatticeDiracFermionD3 y;
LatticeDiracFermionD3 z;
Double a = Double(2.3);
Double b... | TEST | 0.904011 | 5.374117 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2015-08-31T00:21:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 38,
"forks": 24,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8785aa7... |
4814e4ff-4069-4a77-b40f-fc249f29d524 | MrZhouSu/algorithm-learning | codeforces/Global/22/A.cpp | #include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
namespace fast_IO {
ll read() {
ll num = 0;
char c;
bool tag = false;
while ((c = getchar()) != '-' && c != '+' && (c < '0' || c > '9') && ~c)
;
if (!~c) return EOF;
if (c == '-')
tag = true;
else if (c == '+')
... | ALGO | 0.999931 | 3.130869 | {
"github_metadata": {
"branch": "main",
"commit_count": 127,
"repo_created_at": "2022-05-25T10:46: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": "4edf0a1135... |
661ef34a-cbaa-44c2-8618-66b11d871139 | Mazoise/42TESTERS-CONTAINERS | MAP/mains/keyComp_main.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* keyComp_main.cpp :+: :+: :+: ... | TEST | 0.943074 | 3.631756 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2021-03-22T10:06:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c8b2ea... |
84197712-7a84-4ce1-8bdd-cfde4086b868 | Himanshu-bishtt/data-structures-and-algorithms | 13-stack/parenthesis-matching/main.cpp | #include <iostream>
struct Stack {
int SIZE;
int TOP;
char *s;
} st;
void push(char ch) {
if (st.TOP == st.SIZE - 1) {
std::cout<<"Stack overflow"<<std::endl;
return;
};
st.TOP++;
st.s[st.TOP] = ch;
};
char pop() {
char ch;
if (st.TOP == -1) {
std::cout<<"Stack underflow"<<std::endl;
... | ALGO | 0.999216 | 5.036834 | {
"github_metadata": {
"branch": "master",
"commit_count": 146,
"repo_created_at": "2023-04-14T12:45: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": "034d6255... |
1ae43f12-c980-4add-bf42-6aa4e8bfd984 | thcy/CSES-Solutions | Additional Problems/Forbidden Cities (1705)/catkl.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
vi num, st;
vector<vector<pii>> ed;
int Time;
temp... | ALGO | 0.999969 | 4.731927 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-08-15T05:56:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 115,
"forks": 50,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "90ca0c... |
dd4036f5-b6bf-480d-81c7-029621b195d3 | vkraynova/Data-Sructures-and-Algorithms | Homework 12/task01.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
unordered_map<int, vector<int>> graph;
unordered_map<int, pair<bool, int>> visited;
int componentCounter = 1;
void dfs(int v) {
visited[v] = { true, componentCounter };
for (auto w : graph[v]) {
if (!visited[w].first) ... | ALGO | 0.999979 | 5.262642 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-05-09T17:26: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": "ba0cc0f6b4e... |
795d6a2a-27bd-4485-af32-071b84f58d22 | nitinb/Codes | snippets/knight_tour.cpp | /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : knight_tour.cpp
* Purpose :
* Creation Date : 12-04-2011
* Last Modified : Thursday 28 July 2011 01:58:00 PM IST
* Created By : Nitin
_._._._._._._._._._._._._._._._._._._._._.*/
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#... | ALGO | 0.998907 | 3.576561 | {
"github_metadata": {
"branch": "master",
"commit_count": 141,
"repo_created_at": "2011-05-13T14:32:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d6ca720... |
4cc74d3f-20cd-486c-9891-82b3381f3a9f | codeboy47/Competitive-Programming | GeeksForGeeks/Strings/longestEvenLengthSubstring.cpp | // Longest Even Length Substring such that Sum of First and Second Half is same
#include <bits/stdc++.h>
using namespace std;
// dp method can be used but it is difficult
// this method is just like to find longest palindromic substring
// fastest method O(n^2) time and O(1) space
void longestEvenLengthSubstring(char... | ALGO | 0.999352 | 4.171774 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2016-12-15T13:22:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb77eda1a... |
84815f2e-17cd-4b2b-8b1f-87896ebfa478 | Mudassir704/6Companies30Days | Goldman saches/11. Find Missing And Repeating.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
int *findTwoElement(int *arr, int n)
{
int *a = new int[2];
int i = 0;
while (i < n)
{
while ((i < n) && (arr[i] != arr[arr[i] - 1]))
swap(arr[arr[i] - 1], arr[i]);
i++... | ALGO | 0.999957 | 4.23332 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2021-12-31T15:53:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7349b597033... |
ca817e82-40c5-4f17-a8cd-890ac5509502 | theskcd/ICPC | CODECHEF/CFTREE.cpp | #include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;
// (づ°ω°)づミe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・
#define Foreach(i, c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define For(i,a,b) for(int (i)=(a);... | ALGO | 0.99986 | 4.267143 | {
"github_metadata": {
"branch": "master",
"commit_count": 133,
"repo_created_at": "2016-07-31T17:05:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "777933a7... |
1e28ba84-4064-47f3-98e3-8d1151c11470 | Justinshao33/competitive_programming | done/CSES/Houses_and_Schools.cpp | #pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include<bits/stdc++.h>
using namespace std;
#define ZTMYACANESOCUTE ios_base::sync_with_stdio(0), cin.tie(0)
#define ll long long
#define ull unsigned long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define debug(x) ... | ALGO | 0.999941 | 3.629369 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-07-01T18:14:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ad4476f5ae... |
63364e83-0234-4432-8a1c-796b98bc13f3 | chitranshp/DSA | Strings/Wordfreq.cpp | /* https://practice.geeksforgeeks.org/problems/most-frequent-word-in-an-array-of-strings3528/1 */
#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
string mostFrequentWord(string arr[], int n)
{
unordered_map<string, int> count;
int maxFreq = 0;
string maxFreqWo... | ALGO | 0.999958 | 5.828266 | {
"github_metadata": {
"branch": "main",
"commit_count": 552,
"repo_created_at": "2022-08-06T14:20: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": "b7a75ffc02... |
b630da91-4442-4de0-bd5a-dab80e2d59b9 | ishandutta2007/codeforces-k | kort0n/normal/1312/F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
template<class T>
inline bool chmin(T &a, T b) {
if(a > b) {
... | ALGO | 0.999816 | 4.089211 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "9081b50a3413... |
86375ee3-57e1-4245-b3c1-d9d5e16e5813 | MereyPolatkhan/competitive_programming_and_algorithms | icpc_acm_2/L11-12_Math, combinatorics, graphs revisited/c.cpp | #include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cassert>
#include <queue>
#include <bitset>
#include <numeric>
#include <vector>
#include <ctime>
... | ALGO | 0.999602 | 4.107165 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-05-09T10:34: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": "fb3ec2d196da... |
ebd3ddb2-6d1e-4433-98b6-f7c2540c9b06 | seleznev-semen/missprints_editor | lev_dist_mod.cpp | #include<algorithm>
#include<string>
#include<vector>
#include<iostream>
//function counts the levenshtein distance (editor distance), modified:
//no replaces are allowed, also returns value 3 (not fit by task cases)
//if to perform the edition, two or more inserts or deletes (one after another) are required
int calcu... | ALGO | 0.999892 | 4.644163 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2020-12-22T06:25: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": "4f8b78df6ef1... |
70044ff5-5698-4cee-a6d1-fa4a2c0e0ada | t3nsor/SPOJ | hotline.cpp | // 2021-08-18
#include <cctype>
#include <iostream>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
struct predicate {
string infinitive;
vector<string> object;
string conjugate(string subject, bool negative) {
string result;
if (negative) {
... | ALGO | 0.985289 | 3.815257 | {
"github_metadata": {
"branch": "master",
"commit_count": 392,
"repo_created_at": "2014-10-08T22:07:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 248,
"forks": 102,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b59... |
8b7d3f06-fb15-405f-a771-676d6ba4ef3b | blackbeardONE/CheggHero | coursehero_auto_reg/account_registered_on_20180326/txtsource/distnum3_.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
#define rep(i, l, r) for(int i=l; i<=r; i++)
#define dow(i, l, r) for(int i=l; i>=r; i--)
#define travel(x) for(edge *p=fir[x]; p; p=p->n)
#define travel_sap(x) for(edge *p=fir[x]; p; p=p->n)
#define clr(x,c) memset(x, c, sizeof(x))
typedef pair<int,int> Pi... | ALGO | 0.999925 | 3.808764 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-09-17T03:12:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57e59863c... |
90b66e6f-bdab-4f4b-af82-e36b1d2b0315 | CODE-OF-ZHANG/LeetCode | 188.买卖股票的最佳时机-iv.cpp | /*
* @lc app=leetcode.cn id=188 lang=cpp
*
* [188] 买卖股票的最佳时机 IV
*/
// @lc code=start
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution
{
public:
// 定义最值
const int INF = 0x3f3f3f3f;
int maxProfit(int k, vector<int> &prices)
{
int n = prices.size(... | ALGO | 0.999753 | 6.15103 | {
"github_metadata": {
"branch": "main",
"commit_count": 210,
"repo_created_at": "2024-09-13T07:29: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": "fe98a72214... |
18882766-c499-404b-b122-e83a78051077 | JorgeDPSilva/CG | aulas/aula8cg/main.cpp | #include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
float camX = 0, camY, camZ = 5;
int startX, startY, tracking = 0;
int alpha = 0, beta = 0, r = 5;
#define POINT_COUNT 5
// Points that make up the loop for catmull-rom interpola... | ALGO | 0.998999 | 4.217784 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-08-13T21:27: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": "31feeb4bba5b... |
db496c51-2910-4615-a6d8-0b0fb4371e09 | shiref209/learning-c | problem solving/c++/codeforces assiut sheet1/prob1.cpp | // https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/X
#include <iostream>
using namespace std;
// wrong my answer
int main()
{
long long l1, r1, l2, r2;
cin >> l1 >> r1 >> l2 >> r2;
if (l1 > r2 || l2 > r1)
{
// No intersection
cout << -1 << endl;
}
else if (l1 < l2... | ALGO | 0.999867 | 3.864423 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-07-31T21:02: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": "31425252cac... |
b9587cd6-5371-4ec1-a7c2-74379361dcb6 | jyhan0625/codetree-TILs | 240207/좌표평면 위의 균형 2/balance-on-coordinate-plane-2.cpp | #include <iostream>
#include <climits>
using namespace std;
class point {
public:
int x, y;
point(int x, int y) {
this->x = x;
this->y = y;
}
point(){}
};
point set[100];
int main() {
// 여기에 코드를 작성해주세요.
int n;
cin >> n;
int minx = INT_MAX, maxx = INT_MIN, mi... | ALGO | 0.999791 | 3.850828 | {
"github_metadata": {
"branch": "main",
"commit_count": 468,
"repo_created_at": "2023-11-27T13:38: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": "3d3c81bdb0... |
cdeee491-9846-4aef-9f88-1d0f24b2179d | Bhuynher1/cmpe126s18_labs | lib/lab05/src/linked_list.cpp | #include <linked_list.h>
namespace lab5 {
linked_list::linked_list() {
tail = head = nullptr;
}
linked_list::linked_list(std::string &data) {
node* temp = new node(data);
head = tail = temp;
}
linked_list::linked_list(const linked_list &original) {
node *temp;
... | ALGO | 0.984516 | 4.70672 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2021-05-13T17:45: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": "5ac933279... |
6d77f296-7b91-42e7-85b2-a1036e99b162 | mruchann/Algorithms | THE7/the7.cpp | #include "the7.h"
int max(int l, int r) {
return l >= r ? l : r;
}
void get_infection_scores(const std::vector<std::vector<std::pair<int, int>>>& network,
std::vector<float>& infection_scores) {
int N = network.size();
std::vector<std::vector<int>> delay_graph(N, std::v... | ALGO | 0.999531 | 4.117359 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-01-09T20:02: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": "6a50cad6d4... |
6f18eb59-bd88-4fdd-a3c4-628edb3dd894 | gnomegeek/cp-submissions | CSES/Dynamic Programming/edit_distance.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ump unordered_map
#define endl "\n"
#define pb push_back
#define all(x) x.begin(), x.end();
#define enter(a) \
for (int i = 0; i < a.size(); i++) cin >> a[i];
typedef vector<int> vi;
typedef vector<pair<int, int>> vpi;
typedef pair<int, i... | ALGO | 0.999993 | 5.293278 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2021-03-17T18:52: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": "e78f7c44fc3... |
dfdd924e-17c8-438a-a055-4c2277627745 | lyair1/IRobotSimulator-TAU | Ex_2/200945657_201588902/Simulation.h | /**
@author <NAME> ID 201588902
@author <NAME> ID 200945657
@version 1.0 30/1/16
*/
#ifndef SIMULATION_H
#define SIMULATION_H
#include "House.h"
#include "configReader.h"
#include "AbstractAlgorithm.h"
#include "Sensor.h"
#include <typeinfo>
class Simulation
{
public:
Simulation(AbstractAlgorithm* algorithm, House* h... | ALGO | 0.980747 | 4.11328 | {
"github_metadata": {
"branch": "master",
"commit_count": 222,
"repo_created_at": "2016-03-26T08:50: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": "6a1d3660... |
1ac055ea-ab42-43c0-a002-f8060943427e | Hedenghui/cpp | 2020.11.18.cpp | #include<iostream>
using namespace std;
#include<vector>
//#include <iostream>
//
//#define N 205
//using namespace std;
//int c[N][N];
//int x[N];
//int BestM[N];
//int n;
//int Bmin = 999999999;
//
//int sum(int k)
//{
// int temp = 0;
// for (int i = 1; i <= k; i++)
// temp += c[i][x[i]];
// return temp;
//}
//
//v... | ALGO | 0.999991 | 3.827913 | {
"github_metadata": {
"branch": "master",
"commit_count": 225,
"repo_created_at": "2020-03-31T14: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": "2fb64855... |
63b90ae4-4d38-48d1-87af-b1c5303b8f7c | re3el/LeetCode | PalindromeLinkedList.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* reverseList(ListNode *head)
{
ListNode *curr, *prev, *tmp;
curr = head, prev = NULL;
... | ALGO | 0.999813 | 5.93733 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2017-09-22T03:16: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": "3cfea5d49... |
7b321968-fc00-4c93-b5b6-20d71bc12a96 | Parth2031/DS-Algo-CPlusPlus | Recursion/MoveCharacters(Recursion).cpp | // ^ In this Question, Input character is compared in string and are moved to end of string
// ? Example => str = {abeedxxxdee} to {abeeddeexxx} where choosen chararcter is {x}.
// * String.indexOf(character/string) in Java => string.find(character/string) in C++ if true = 0
#include <iostream>
#include <string>
us... | ALGO | 0.999503 | 3.973365 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2020-02-22T17:21: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": "e2da9134d... |
3ae5124e-8d6c-48fc-9962-9de803a75417 | knix98/dsa-questions | Array/Highest occuring char in a string.cpp | /*
For a given a string(str), find and return the highest occurring character.
Example:
Input String: "abcdeapapqarr"
Expected Output: 'a'
Since 'a' has appeared four times in the string which happens to be the highest frequency character, the answer would be 'a'.
If there are two characters in the input string with ... | ALGO | 0.999993 | 5.312827 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-08-03T11:50: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": "acf9246dcea... |
545f19b6-a5a3-4666-b0cb-d3201d7e73b4 | jjaroztegi/AOC_2024 | Day 11/day11_part2.cpp | #include <fstream>
#include <iostream>
#include <sstream>
#include <unordered_map>
#include <vector>
#include <chrono>
using namespace std;
using namespace chrono;
using CacheType = unordered_map<long long, unordered_map<int, long long>>;
CacheType cache;
vector<long long> blink(long long stone) {
vector<long ... | ALGO | 0.999483 | 5.374927 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-12-01T19:48: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": "ccee6d256ed... |
c7bf4480-57d0-4835-83ba-8e69b255b4bc | alisw/AliPhysics | PWGLF/FORWARD/analysis2/AliFMDSharingFilter.cxx | //
// Class to do the sharing correction. That is, a filter that merges
// adjacent strip signals presumably originating from a single particle
// that impinges on the detector in such a way that it deposite energy
// into two or more strips.
//
// Input:
// - AliESDFMD object - from reconstruction
//
// Outp... | TOOL | 0.935899 | 5.28723 | {
"github_metadata": {
"branch": "master",
"commit_count": 89208,
"repo_created_at": "2016-06-21T19:31:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 104,
"forks": 792,
"issues": 0,
"pull_requests": 9
},
"file_meta": {
"content_id": "c1f... |
d7e81138-a7d9-41b4-8d14-09ea405647f3 | tinhngovnptho/Code | CP/Code THPT/DTQG 25/Contest/Contest 18/toys.cpp | /**------------------------------------------
------Author: Tinhnopro (<NAME>) ----------
---------From: CHV with luv <3 --------------
---------Value = Live + Love ----------------
------------------------------------------**/
#include<bits/stdc++.h>
#define el '\n'
#define fi first
#define se second
#define eb empl... | ALGO | 0.999961 | 3.736468 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-10-13T07:51: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": "a3a1c6b8531... |
ef67eb8a-2841-49eb-b8a5-95b02c09e1e1 | shay-ff/cpp-files | Atcoder/396/B_Card_Pile.cpp | /**
* created: 2025-03-08 17:31:23
**/
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#ifndef ONLINE_JUDGE
#include "../debug.cpp"
#else
#define debug(...)
#define debugArr(...)
#endif
#define int long long
#def... | ALGO | 0.998868 | 4.322146 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-08T13:22:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5eeb19ad07e6... |
b0165be5-b614-4d8f-8822-adbd98339643 | paarasv/QUESTIONS | 2384-root-equals-sum-of-children/root-equals-sum-of-children.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999894 | 5.802536 | {
"github_metadata": {
"branch": "main",
"commit_count": 557,
"repo_created_at": "2023-03-30T20:28: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": "886e6996ac... |
2269b12d-2d38-41a0-b950-316d93b73203 | StefanoPetrilli/isra | src/geometry/geometry.cc | //
// Created by Stefano on 3/23/2023.
//
#include <geometry.h>
namespace geometry {
position::Position findFirstHorizontalIntersection(position::Position camera_position, double angle, double tg) {
position::Position result{};
result.y = floor(camera_position.y / map::kBlockSize) * map::kBlockSize + (geometry:... | ALGO | 0.996558 | 6.693305 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2023-03-05T10:20:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3f4668b3... |
5ee12ecb-b274-497f-9514-eb6c43aaa0b4 | nykoh2001/Algorithm | cpp/algo/assignment/9주차/q2.cpp | #include <iostream>
#include <string>
#define Nmax 100
using namespace std;
struct point
{
char c;
int x, y;
};
struct line
{
struct point p1, p2;
float angle;
};
struct point polygon[Nmax];
int flag = 1;
float ComputeAngle(struct point p1, struct point p2)
{
int dx, dy, ax, ay;
float t;
dx = p2.x - p1... | ALGO | 0.999971 | 3.875915 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2023-03-08T13:33: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": "2cfa89114e... |
97ac09df-8c48-4061-9583-a4f553198a3b | umunevich/task-1 | main.cpp | // main.cpp
// created by <NAME>
#include <iostream>
#include <stdexcept>
#include <fstream>
#include <vector>
#include <map>
#include <iomanip>
#include "Random.h"
#include "calculate.h"
void processing_args(int argc, const char *argv[]);
std::vector<int> read_file(std::ifstream& input_file);
std::map<int, int> ge... | ALGO | 0.998417 | 5.303154 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-09-21T21:58:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7470901f9b... |
48adf919-2b02-4f9d-8371-7b9a72b73fcb | tasin557/Phitron | Node (doubly linked list).cpp | #include <bits/stdc++.h>
using namespace std;
class Node {
public:
int val;
Node* next;
Node* prev;
Node(int val) {
this->val = val;
this->next = NULL;
this->prev = NULL;
}
};
// Example 1: Print Doubly Linked List in Normal Order
void printNormal(Node* head) {
Node* t... | ALGO | 0.999779 | 6.253814 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-07-14T07:05:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "46cf4d86a282... |
3d585dfa-eed4-4646-a501-e6aa5265f751 | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/04/0408/personal_submission/cf412e_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN ((int) 1e6)
using namespace std;
int n, A[MAXN + 5];
long long ans;
char s[MAXN + 5];
int prv[MAXN + 5][5], nxt[MAXN + 5][5], f[MAXN + 5][2];
int main() {
scanf("%s", s + 1); n = strlen(s + 1);
for (int i = 1; i <= n; i++) {
if (s[i] >= 'a' && s[i] <= 'z') A[i] =... | ALGO | 0.991105 | 3.291368 | {
"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": "615c... |
08deb2d1-341a-441d-ad1b-0152ba361561 | zhaoruowei/leetcode | recursion/hannota.cpp | class sloution
{
public:
// n层汉诺塔移动
vector<string> hanota(int n)
{
// 左中右三个柱子
// 1.移动第i层时,需要把之前的0-i-1层移动到中间柱上
// 2.把当前层移动到右柱子上
// 3.把0-i-1层移到右柱子上
// 从第i层开始递归
// 保存每次移动的操作
vector<string> ans;
if (n < 1) return ans;
int i = n; // 把最后一层从左移... | ALGO | 0.999871 | 4.350891 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2022-09-30T10:48: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": "fe893dcc1d0... |
fd8fed2a-b613-4618-97f3-297bd0330d8d | nsamways/matacule | mMain/operon.cpp | /*
operon.cpp
member functions and data members for operon class
(c) <NAME> 2006-9
*/
#include<iostream>
#include<iomanip>
#include<fstream>
#include"operon.h"
using namespace std;
operon::operon() // constructor
{
}
operon::~operon() // destructor
{
}
void operon::init( int locus, genome *cur... | TOOL | 0.913275 | 5.406271 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-06-26T20:42: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": "8494b6f8aa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.